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

#include <DataPacket.h>

Inheritance diagram for kdrive::baos::DataPacket:
kdrive::baos::DataRequest kdrive::baos::DataResponse kdrive::baos::DataIndication kdrive::baos::ErrorResponse kdrive::baos::DatapointValueIndication kdrive::baos::ServerItemIndication

Public Types

typedef std::shared_ptr< DataPacketPtr
 
typedef std::vector< unsigned char > Buffer
 

Public Member Functions

virtual ~DataPacket ()
 
void setMainService (unsigned char mainService)
 
unsigned char getMainService () const
 
void setSubService (unsigned char subService)
 
unsigned char getSubService () const
 
void setOffset (unsigned short offset)
 
unsigned short getOffset () const
 
void setCount (unsigned short count)
 
unsigned short getCount () const
 
void setBuffer (const Buffer &buffer)
 
BuffergetBuffer ()
 
const BuffergetBuffer () const
 
void setHeaderPolicy (std::shared_ptr< HeaderPolicy > headerPolicy)
 
void setVersion (unsigned char version)
 
unsigned char getVersion () const
 

Protected Member Functions

 DataPacket ()
 
std::size_t sizeImpl () const override
 
std::size_t readFromBufferImpl (const unsigned char *buffer, std::size_t bufferSize) override
 
std::size_t writeToBufferImpl (unsigned char *buffer, std::size_t bufferSize) const override
 

Member Typedef Documentation

typedef std::vector<unsigned char> kdrive::baos::DataPacket::Buffer
typedef std::shared_ptr<DataPacket> kdrive::baos::DataPacket::Ptr

Constructor & Destructor Documentation

DataPacket::~DataPacket ( )
virtual
DataPacket::DataPacket ( )
protected

Member Function Documentation

DataPacket::Buffer & DataPacket::getBuffer ( )
const DataPacket::Buffer & DataPacket::getBuffer ( ) const
unsigned short DataPacket::getCount ( ) const
unsigned char DataPacket::getMainService ( ) const
unsigned short DataPacket::getOffset ( ) const
unsigned char DataPacket::getSubService ( ) const
unsigned char DataPacket::getVersion ( ) const
std::size_t DataPacket::readFromBufferImpl ( const unsigned char *  buffer,
std::size_t  bufferSize 
)
overrideprotected
void DataPacket::setBuffer ( const Buffer buffer)
void DataPacket::setCount ( unsigned short  count)
void DataPacket::setHeaderPolicy ( std::shared_ptr< HeaderPolicy headerPolicy)
void DataPacket::setMainService ( unsigned char  mainService)
void DataPacket::setOffset ( unsigned short  offset)
void DataPacket::setSubService ( unsigned char  subService)
void DataPacket::setVersion ( unsigned char  version)
std::size_t DataPacket::sizeImpl ( ) const
overrideprotected
std::size_t DataPacket::writeToBufferImpl ( unsigned char *  buffer,
std::size_t  bufferSize 
) const
overrideprotected

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