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

The BaosConnector is a QueueConnector which means it is possible to use the queue to obtain the Rx packet notifications. More...

#include <BaosConnector.h>

Inheritance diagram for kdrive::baos::BaosConnector:
kdrive::baos::FT12Connector kdrive::baos::StreamConnector kdrive::baos::UsbConnector kdrive::baos::StreamConnector12 kdrive::baos::StreamConnector2x

Public Types

typedef std::shared_ptr< BaosConnectorPtr
 

Public Member Functions

 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 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

 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...
 

Detailed Description

The BaosConnector is a QueueConnector which means it is possible to use the queue to obtain the Rx packet notifications.

You have to enable to queue to receive notifications. There are several versions of the Baos protocol and each version implements its own BaosConnector type (i.e. handles the socket communication and the packetization). The BaosConnector type is used through the library as the main connector type.

Member Typedef Documentation

Constructor & Destructor Documentation

kdrive::baos::BaosConnector::BaosConnector ( )
delete
BaosConnector::~BaosConnector ( )
virtual

Destroys the BaosConnector.

BaosConnector::BaosConnector ( unsigned char  version)
protected

Property Key for enable/disable routing of Transport Packets.

Creates the BaosConnector The version should be one of the versions from the API ProtocolVersions This class is never directly instanced, but is derived from by one of the StreamConnector protocol classes

Member Function Documentation

unsigned int BaosConnector::getConnectorId ( ) const

Returns the connector id.

unsigned char BaosConnector::getVersion ( ) const

Returns the protocol version.

bool BaosConnector::isConnected ( ) const
virtual

Indicates whether the rx thread is still running, which means that the connector is connected.

Note: it is possible that the rx thread is still running and the connector is not connected, and there is typically a small delay before a socket exception is thrown and the rx thread is shutdown

Reimplemented in kdrive::baos::UsbConnector.

void BaosConnector::resetPropertiesImpl ( )
overrideprotected

Calls resetPropertiesImpl from base class and readded own properties.

void BaosConnector::setVersion ( unsigned char  version)

Sets the protocol version.

Member Data Documentation

const std::string BaosConnector::ConnectorId = "baos.connector_id"
static

Property Key for the connector id, set in the constructor.

const std::string BaosConnector::RouteTransportPacket = "baos.route_transport_packet"
static
const std::string BaosConnector::Version = "baos.version"
static

Property Key for version, set by the connector type or enumeration.


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