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

PacketFactory20. More...

#include <Protocol2x.h>

Inheritance diagram for kdrive::baos::PacketFactory2x:
kdrive::baos::BaosPacketFactory

Public Types

typedef std::shared_ptr< DataRequestDataRequestPtr
 

Public Member Functions

 PacketFactory2x ()
 
virtual ~PacketFactory2x ()
 
void setProtocolVersion (unsigned char version)
 Sets the 2x protocol version The default is version V20. More...
 
std::shared_ptr< connector::Packet > create (const unsigned char *buffer, std::size_t bufferLength) override
 To determine if a packet is an error response we check: that the packet has a length of packet header bytes + 1 and the number of items is 0 and the error code non-zero. More...
 
- Public Member Functions inherited from kdrive::baos::BaosPacketFactory
 BaosPacketFactory ()
 
virtual ~BaosPacketFactory ()
 
std::shared_ptr< connector::Packet > create (const unsigned char *buffer, std::size_t bufferLength) override
 Creates the packet type from a corresponding byte stream Actually, this simply returns an UnknownPacket and should be overridden by the specific protocol packet factory. More...
 

Static Public Member Functions

static DataRequestPtr createDataRequest (unsigned char version)
 

Additional Inherited Members

- Protected Member Functions inherited from kdrive::baos::BaosPacketFactory
std::shared_ptr< DataPacketcreateFromSubService (unsigned char subService, unsigned char errorCode)
 Creates a packet based on the subService command If errorCode represents an error, a ErrorResponse will be created. More...
 

Detailed Description

PacketFactory20.

Member Typedef Documentation

Constructor & Destructor Documentation

PacketFactory2x::PacketFactory2x ( )
PacketFactory2x::~PacketFactory2x ( )
virtual

Member Function Documentation

Packet::Ptr PacketFactory2x::create ( const unsigned char *  buffer,
std::size_t  bufferLength 
)
override

To determine if a packet is an error response we check: that the packet has a length of packet header bytes + 1 and the number of items is 0 and the error code non-zero.

DataRequest::Ptr PacketFactory2x::createDataRequest ( unsigned char  version)
static
void PacketFactory2x::setProtocolVersion ( unsigned char  version)

Sets the 2x protocol version The default is version V20.


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