BAOS .net SDK
18.2.0
|
The StreamConnection is responsible for creating a TCP/IP stream connection with the baos server More...
#include <StreamConnection.h>
Public Member Functions | |
StreamConnection () | |
Constructor. More... | |
~StreamConnection () | |
Destructor cleans up unmanaged and managed resources. More... | |
void | connect (System::String^remoteHost, unsigned char protocol, bool decodeProtocol) |
Connects to the remote device. More... | |
void | connect (System::String^remoteHost) |
Connects to the remote device. More... | |
void | connect (System::String^remoteHost, bool decodeProtocol) |
Connects to the remote device. More... | |
void | connectByName (System::String^name) |
Enumerates the network and finds all available BAOS devices. More... | |
void | connectByName (System::String^name, bool decodeProtocol) |
Enumerates the network and finds all available BAOS devices. More... | |
void | connectNat (System::String^remoteHost, unsigned short port, unsigned char protocol, bool decodeProtocol) |
Connects to a remote IP BAOS device with NAT 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 | |
!StreamConnection () | |
Finalizer (non-deterministic destructor) cleans up unmanaged resources. More... | |
The StreamConnection is responsible for creating a TCP/IP stream connection with the baos server
The StreamConnection is responsible for creating a TCP/IP socket connection to the remote BAOS device. It requires the IP Address of the device. The StreamConnection 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).
kdrive::baos::bindings::StreamConnection::StreamConnection | ( | ) |
Constructor.
There are no parameters.
kdrive::baos::bindings::StreamConnection::~StreamConnection | ( | ) |
Destructor cleans up unmanaged and managed resources.
|
protected |
Finalizer (non-deterministic destructor) cleans up unmanaged resources.
void kdrive::baos::bindings::StreamConnection::connect | ( | System::String^ | remoteHost, |
unsigned char | protocol, | ||
bool | decodeProtocol | ||
) |
Connects to the remote 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::StreamConnection::connect | ( | System::String^ | remoteHost | ) |
Connects to the remote 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::StreamConnection::connect | ( | System::String^ | remoteHost, |
bool | decodeProtocol | ||
) |
Connects to the remote 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::StreamConnection::connectByName | ( | System::String^ | name | ) |
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) |
This auto-select the BAOS protocol.
void kdrive::baos::bindings::StreamConnection::connectByName | ( | 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::StreamConnection::connectNat | ( | 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::StreamConnection::disconnect | ( | ) |
Disconnects the connection
unmanaged::ConnectorPtr kdrive::baos::bindings::StreamConnection::getConnector | ( | ) |
Returns the unmanaged (shared) connector pointer.
Used by the managed C++ implementation
bool kdrive::baos::bindings::StreamConnection::isConnected | ( | ) |
Returns true if the connection is available false otherwise