Kobuki 1.0.0
C++ API for the Kobuki research robot
Loading...
Searching...
No Matches
packet_handler::payloadBase Class Referenceabstract

Provides base class for payloads. More...

#include <payload_base.hpp>

Inheritance diagram for packet_handler::payloadBase:

Public Member Functions

 payloadBase (const bool is_dynamic_=false, const unsigned char length_=0)
 
virtual bool serialise (ecl::PushAndPop< unsigned char > &byteStream)=0
 
virtual bool deserialise (ecl::PushAndPop< unsigned char > &byteStream)=0
 

Public Attributes

bool yes
 
const bool is_dynamic
 
const unsigned char length
 

Protected Member Functions

template<typename T >
void buildVariable (T &V, ecl::PushAndPop< unsigned char > &buffer)
 
template<typename T >
void buildBytes (const T &V, ecl::PushAndPop< unsigned char > &buffer)
 

Detailed Description

Provides base class for payloads.

Member Function Documentation

◆ deserialise()

virtual bool packet_handler::payloadBase::deserialise ( ecl::PushAndPop< unsigned char > &  byteStream)
pure virtual

Implemented in kobuki::Command.

Member Data Documentation

◆ is_dynamic

const bool packet_handler::payloadBase::is_dynamic

it indicates the type of derived packet. if packet type is dynamic, length of packet can be changed during communication session. Ohterwise can not.

◆ length

const unsigned char packet_handler::payloadBase::length

it indicates length of data part of packet, except header and length field. if packet is fixed type, this value should be matched with length field. if packet is dynamic type, this value indicates minimal value of length field.

◆ yes

bool packet_handler::payloadBase::yes

this is simple magic to write the flag, when we get the packet from the host or when we want to send the data


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