BAOS .net SDK
18.2.0
|
The BaosConnection is responsible for creating a TCP/IP stream or a FT 1.2 connection with the baos server More...
#include <BaosConnection.h>
Public Member Functions | |
BaosConnection () | |
Constructor. More... | |
~BaosConnection () | |
Destructor cleans up unmanaged and managed resources. More... | |
void | connectIp (System::String^remoteHost, unsigned char protocol, bool decodeProtocol) |
Connects to the remote IP BAOS device. More... | |
void | connectIp (System::String^remoteHost) |
Connects to the remote IP BAOS device. More... | |
void | connectIp (System::String^remoteHost, bool decodeProtocol) |
Connects to the remote IP BAOS device. More... | |
void | connectIpByName (System::String^name) |
Enumerates the network and finds all available IP BAOS devices. More... | |
void | connectIpByName (System::String^name, bool decodeProtocol) |
Enumerates the network and finds all available BAOS devices. More... | |
void | connectIpNat (System::String^remoteHost, unsigned short port, unsigned char protocol, bool decodeProtocol) |
Connects to a remote IP BAOS device with NAT More... | |
void | connectSerial (System::String^serialDeviceName, bool decodeProtocol) |
Connects to a Serial FT1.2 BAOS device More... | |
void | disconnect () |
Disconnects the connection More... | |
bool | isConnected () |
Returns true if the connection is available false otherwise More... | |
unmanaged::ConnectorPtr | getConnector () |
Returns the unmanaged (shared) connector pointer. More... | |
Protected Member Functions | |
!BaosConnection () | |
Finalizer (non-deterministic destructor) cleans up unmanaged resources. More... | |
The BaosConnection is responsible for creating a TCP/IP stream or a FT 1.2 connection with the baos server
The BaosConnection is responsible for creating a TCP/IP socket connection or FT 1.2 connection to the remote BAOS device. For IP it requires the IP Address of the device and for FT 1.2 Serial the name of the serial port. The BaosConnection is a wrapper around the Connector which is used throughout the baos rpc library.
It implements a connect and a disconnect signal. These signals are invoked when the stream connection is connector and disconnected respectively. Note: a stream connection can be auto-disconnected if the tcp/ip connection is terminated by the remote peer (baos device).
DEPRECATED! Use ScopedBaosConnection instead. This class calls only the functions from BaosConnection.
kdrive::baos::bindings::BaosConnection::BaosConnection | ( | ) |
Constructor.
There are no parameters.
kdrive::baos::bindings::BaosConnection::~BaosConnection | ( | ) |
Destructor cleans up unmanaged and managed resources.
|
protected |
Finalizer (non-deterministic destructor) cleans up unmanaged resources.
void kdrive::baos::bindings::BaosConnection::connectIp | ( | System::String^ | remoteHost, |
unsigned char | protocol, | ||
bool | decodeProtocol | ||
) |
Connects to the remote IP BAOS device.
remoteHost | The remote is the IP Address of the device. |
protocol | The protocol is the BAOS protocol version:
|
decodeProtocol | Indicates whether the packet trace is enabled, if true use in conjunction with the logger |
void kdrive::baos::bindings::BaosConnection::connectIp | ( | System::String^ | remoteHost | ) |
Connects to the remote IP BAOS device.
remoteHost | Remote Host is the IP Address of the device. Tip: you can find this address with the NetnNode Client Application when you select Open Port - Knx via Ip Tunnelling. |
void kdrive::baos::bindings::BaosConnection::connectIp | ( | System::String^ | remoteHost, |
bool | decodeProtocol | ||
) |
Connects to the remote IP BAOS device.
remoteHost | The remote is the IP Address of the device. |
decodeProtocol | Indicates whether the packet trace is enabled, if true use in conjunction with the logger |
void kdrive::baos::bindings::BaosConnection::connectIpByName | ( | System::String^ | name | ) |
Enumerates the network and finds all available IP BAOS devices.
Selects the device that matches the specified name and opens a connection to it.
name | The device friendly name. (Which you can set with the ETS) |
This auto-select the BAOS protocol.
void kdrive::baos::bindings::BaosConnection::connectIpByName | ( | System::String^ | name, |
bool | decodeProtocol | ||
) |
Enumerates the network and finds all available BAOS devices.
Selects the device that matches the specified name and opens a connection to it.
name | The device friendly name. (Which you can set with the ETS) |
decodeProtocol | Indicates whether the packet trace is enabled, if true use in conjunction with the logger |
This auto-select the BAOS protocol.
void kdrive::baos::bindings::BaosConnection::connectIpNat | ( | System::String^ | remoteHost, |
unsigned short | port, | ||
unsigned char | protocol, | ||
bool | decodeProtocol | ||
) |
Connects to a remote IP BAOS device with NAT
remoteHost | Remote Host is the IP Address of the device. Tip: you can find this address with the NetnNode Client Application when you select Open Port - Knx via Ip Tunnelling. |
port | The port associated with the connection. The default port of the BAOS TCP protocol is 12004 |
protocol | The protocol is the BAOS protocol version:
|
decodeProtocol | Indicates whether the packet trace is enabled, if true use in conjunction with the logger |
This function does perform enumeration, if the protocol version is unknown, to determine the protocol version
void kdrive::baos::bindings::BaosConnection::connectSerial | ( | System::String^ | serialDeviceName, |
bool | decodeProtocol | ||
) |
Connects to a Serial FT1.2 BAOS device
serialDeviceName | SerialDeviceName is the platform specific device name, e.g. COM1 or /dev/ttyS0 |
decodeProtocol | Indicates whether the packet trace is enabled, if true use in conjunction with the logger |
void kdrive::baos::bindings::BaosConnection::disconnect | ( | ) |
Disconnects the connection
unmanaged::ConnectorPtr kdrive::baos::bindings::BaosConnection::getConnector | ( | ) |
Returns the unmanaged (shared) connector pointer.
Used by the managed C++ implementation
bool kdrive::baos::bindings::BaosConnection::isConnected | ( | ) |
Returns true if the connection is available false otherwise