BAOS SDK  18.2.0
Public Member Functions | List of all members
kdrive::baos::ScopedSerialBaosConnection Class Reference

Auto-connect and disconnect of the StreamConnection. More...

#include <BaosConnection.h>

Inheritance diagram for kdrive::baos::ScopedSerialBaosConnection:
kdrive::baos::BaosConnection

Public Member Functions

 ScopedSerialBaosConnection (const std::string &name, bool decodeProtocol=false)
 Creates a ScopedSerialBaosConnection, and connects via FT1.2 to a baos device with the specified name. More...
 
virtual ~ScopedSerialBaosConnection ()
 Destroys the ScopedSerialBaosConnection and closes the connection. More...
 
- Public Member Functions inherited from kdrive::baos::BaosConnection
 BaosConnection ()
 Creates a default (disconnected) BaosConnection. More...
 
 BaosConnection (const BaosConnection &)=delete
 
BaosConnectionoperator= (const BaosConnection &)=delete
 
virtual ~BaosConnection ()
 Destroys the StreamConnection. More...
 
BaosConnectorPtr getConnector ()
 returns the connector throws a NullPointerException exception if the connector is not connected More...
 
void connectIp (const std::string remoteHost, unsigned char version, bool decodeProtocol=false)
 Connects to a remote IP BAOS device. More...
 
void connectIp (const BaosDevice &baosDevice, bool decodeProtocol=false)
 Connects to a remote IP BAOS device. More...
 
void connectIpByName (const std::string &name, bool decodeProtocol=false)
 Connects to a remote IP BAOS device It gets the IP address and protocol version via a KNXnet/IP Search Request/Response. More...
 
void connectIpByAddress (const std::string &ipAddress, bool decodeProtocol=false)
 Connects to a remote IP BAOS device It gets the protocol version via a KNXnet/IP Search Request/Response. More...
 
void connectIpNat (const std::string &ipAddress, unsigned short port, unsigned char version, bool decodeProtocol=false)
 Connects to a remote IP BAOS device with NAT. More...
 
void connectSerial (const std::string &serialDeviceName, bool decodeProtocol=false)
 Connects to a Serial FT1.2 BAOS device. More...
 
void disconnect ()
 Disconnects the connection to a remote device. More...
 
bool isConnected () const
 Returns true if the connection is established, false otherwise. More...
 
ConnectSignalgetConnectSignal ()
 Returns the connect signal This is invoked when the connector thread is started. More...
 
DisconnectSignalgetDisconnectSignal ()
 Returns the disconnect signal This is invoked when the connector thread is stopped. More...
 

Additional Inherited Members

- Public Types inherited from kdrive::baos::BaosConnection
typedef std::shared_ptr< BaosConnectorBaosConnectorPtr
 
typedef boost::signals2::signal< void()> ConnectSignal
 
typedef boost::signals2::signal< void()> DisconnectSignal
 

Detailed Description

Auto-connect and disconnect of the StreamConnection.

RAII for BaosConnection. Connects in the constructor and disconnects in the destructor.

Constructor & Destructor Documentation

ScopedSerialBaosConnection::ScopedSerialBaosConnection ( const std::string &  name,
bool  decodeProtocol = false 
)
explicit

Creates a ScopedSerialBaosConnection, and connects via FT1.2 to a baos device with the specified name.

e.g /dev/ttyAMA0

If decodeProtocol is true, the BAOS protocol will be decoded and logged This is used typically for Debug purposes.

ScopedSerialBaosConnection::~ScopedSerialBaosConnection ( )
virtual

Destroys the ScopedSerialBaosConnection and closes the connection.


The documentation for this class was generated from the following files: