BAOS SDK  18.2.0
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
kdrive::baos::StreamConnector2x Class Reference

The StreamConnector is responsible for creating a TCP/IP stream connection with the baos server with version 2x. More...

#include <StreamConnector2x.h>

Inheritance diagram for kdrive::baos::StreamConnector2x:
kdrive::baos::StreamConnector kdrive::baos::BaosConnector

Public Types

typedef std::shared_ptr< StreamConnector2xPtr
 
- Public Types inherited from kdrive::baos::StreamConnector
typedef std::shared_ptr< StreamConnectorPtr
 
- Public Types inherited from kdrive::baos::BaosConnector
typedef std::shared_ptr< BaosConnectorPtr
 

Public Member Functions

 StreamConnector2x ()
 
 StreamConnector2x (const std::string &remoteHost, unsigned short port)
 
virtual ~StreamConnector2x ()
 
- Public Member Functions inherited from kdrive::baos::StreamConnector
 StreamConnector ()=delete
 
 StreamConnector (unsigned char version)
 
 StreamConnector (unsigned char version, const std::string &remoteHost, unsigned short port=StreamProtocolConstants::Port)
 
 StreamConnector (const StreamConnector &)=delete
 
virtual ~StreamConnector ()
 
StreamConnectoroperator= (const StreamConnector &)=delete
 
void open (const std::string &remoteHost, unsigned short port=StreamProtocolConstants::Port)
 Opens a connection. More...
 
std::string getDescription () override
 Returns a formatted port description. More...
 
void setIpAddress (const std::string &ipAddress)
 Sets the IPv4 address from a BAOS device. More...
 
std::string getIpAddress () const
 Gets the IPv4 address from the BAOS device. More...
 
void setIpPort (unsigned short port)
 Sets the port number from the server (BAOS device). More...
 
unsigned short getIpPort () const
 Gets the port number from the server (BAOS device). More...
 
- Public Member Functions inherited from kdrive::baos::BaosConnector
 BaosConnector ()=delete
 
virtual ~BaosConnector ()
 Destroys the BaosConnector. More...
 
unsigned int getConnectorId () const
 Returns the connector id. More...
 
void setVersion (unsigned char version)
 Sets the protocol version. More...
 
unsigned char getVersion () const
 Returns the protocol version. More...
 
virtual bool isConnected () const
 Indicates whether the rx thread is still running, which means that the connector is connected. More...
 

Static Public Attributes

static const std::string ConnectorTypeLabel = "baos.tcp.2x"
 
- Static Public Attributes inherited from kdrive::baos::StreamConnector
static const std::string ConnectorTypeLabel = "baos.tcp"
 
static const std::string IpAddress = "baos.tcp.ip_address"
 Property Key for device IPv4 address. More...
 
static const std::string IpPort = "baos.tcp.ip_port"
 Property Key for device IPv4 port. More...
 
static const std::string DeviceName = "baos.tcp.device_name"
 Property Key for device name (optional; set in enumeration) More...
 
- Static Public Attributes inherited from kdrive::baos::BaosConnector
static const std::string ConnectorId = "baos.connector_id"
 Property Key for the connector id, set in the constructor. More...
 
static const std::string Version = "baos.version"
 Property Key for version, set by the connector type or enumeration. More...
 
static const std::string RouteTransportPacket = "baos.route_transport_packet"
 

Protected Member Functions

void resetPropertiesImpl () override
 
void openImpl () override
 
void rxImpl () override
 
- Protected Member Functions inherited from kdrive::baos::StreamConnector
int readFromSocket (unsigned char *buffer, int maxBytesToRead)
 
int readFromSocket (unsigned char *buffer, std::size_t bufferSize, int bytesToRead, bool validate)
 
void openImpl () override
 
void closeImpl () override
 
void resetPropertiesImpl () override
 Calls resetPropertiesImpl from BaosConnector and readded following properties with default values: More...
 
void txImpl (std::shared_ptr< connector::Packet > packet) override
 Encapsulate the packet and send it to the socket. More...
 
- Protected Member Functions inherited from kdrive::baos::BaosConnector
 BaosConnector (unsigned char version)
 Property Key for enable/disable routing of Transport Packets. More...
 
void resetPropertiesImpl () override
 Calls resetPropertiesImpl from base class and readded own properties. More...
 

Additional Inherited Members

- Protected Types inherited from kdrive::baos::StreamConnector
enum  Defaults { BufferSize = 2048 }
 

Detailed Description

The StreamConnector is responsible for creating a TCP/IP stream connection with the baos server with version 2x.

Member Typedef Documentation

Constructor & Destructor Documentation

StreamConnector2x::StreamConnector2x ( )
StreamConnector2x::StreamConnector2x ( const std::string &  remoteHost,
unsigned short  port 
)
StreamConnector2x::~StreamConnector2x ( )
virtual

Member Function Documentation

void StreamConnector2x::openImpl ( )
overrideprotected
void StreamConnector2x::resetPropertiesImpl ( )
overrideprotected
void StreamConnector2x::rxImpl ( )
overrideprotected

Member Data Documentation

const std::string StreamConnector2x::ConnectorTypeLabel = "baos.tcp.2x"
static

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