BAOS SDK
18.2.0
|
Auto-connect and disconnect of the StreamConnection. More...
#include <BaosConnection.h>
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 | |
BaosConnection & | operator= (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... | |
ConnectSignal & | getConnectSignal () |
Returns the connect signal This is invoked when the connector thread is started. More... | |
DisconnectSignal & | getDisconnectSignal () |
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< BaosConnector > | BaosConnectorPtr |
typedef boost::signals2::signal< void()> | ConnectSignal |
typedef boost::signals2::signal< void()> | DisconnectSignal |
Auto-connect and disconnect of the StreamConnection.
RAII for BaosConnection. Connects in the constructor and disconnects in the destructor.
|
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.
|
virtual |
Destroys the ScopedSerialBaosConnection and closes the connection.