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

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

#include <BaosConnection.h>

Inheritance diagram for kdrive::baos::ScopedBaosConnection:
kdrive::baos::BaosConnection

Public Member Functions

 ScopedBaosConnection (const std::string &name, bool decodeProtocol=false)
 Creates a ScopedBaosConnection, and connects to a remote baos device with the specified name. More...
 
 ScopedBaosConnection (const std::string ipAddress, unsigned char version, bool decodeProtocol=false)
 Creates a ScopedBaosConnection, and connects to a remote baos device with the specified ip address (remoteHost). More...
 
 ScopedBaosConnection (const BaosDevice &baosDevice, bool decodeProtocol=false)
 Creates a ScopedBaosConnection, and connects to a remote baos device with the specified ip address (remoteHost). More...
 
virtual ~ScopedBaosConnection ()
 Destroys the ScopedBaosConnection 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
 

Detailed Description

Auto-connect and disconnect of the StreamConnection.

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

Examples:
BaosDatapointDescription.cpp, BaosEventListener.cpp, BaosLightSwitcher.cpp, BaosMultiConnector.cpp, and BaosMultiThreaded.cpp.

Constructor & Destructor Documentation

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

Creates a ScopedBaosConnection, and connects to a remote baos device with the specified name.

The device can be obtained with a BaosEnumerator.

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

ScopedBaosConnection::ScopedBaosConnection ( const std::string  ipAddress,
unsigned char  version,
bool  decodeProtocol = false 
)
explicit

Creates a ScopedBaosConnection, and connects to a remote baos device with the specified ip address (remoteHost).

If version is 0 an enumeration will be performed to determine the version.

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

ScopedBaosConnection::ScopedBaosConnection ( const BaosDevice &  baosDevice,
bool  decodeProtocol = false 
)
explicit

Creates a ScopedBaosConnection, and connects to a remote baos device with the specified ip address (remoteHost).

The device can be obtained with a BaosEnumerator.

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

ScopedBaosConnection::~ScopedBaosConnection ( )
virtual

Destroys the ScopedBaosConnection and closes the connection.


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