![]() |
Kobuki 1.0.0
C++ API for the Kobuki research robot
|
Provides simple packet finder which may be consist of stx, etx, payload, ... More...
#include <packet_finder.hpp>
Public Types | |
enum | packetFinderState { clearBuffer = 0 , waitingForStx , waitingForPayloadSize , waitingForPayloadToEtx , waitingForEtx } |
typedef ecl::PushAndPop< unsigned char > | BufferType |
Public Member Functions | |
PacketFinderBase () | |
void | configure (const std::string &sigslots_namespace, const BufferType &putStx, const BufferType &putEtx, unsigned int sizeLengthField, unsigned int sizeMaxPayload, unsigned int sizeChecksumField, bool variableSizePayload) |
void | clear () |
void | enableVerbose () |
virtual bool | update (const unsigned char *incoming, unsigned int numberOfIncoming) |
virtual bool | checkSum () |
unsigned int | numberOfDataToRead () |
void | getBuffer (BufferType &bufferRef) |
void | getPayload (BufferType &bufferRef) |
Public Attributes | |
enum packetFinderState | state |
Provides simple packet finder which may be consist of stx, etx, payload, ...
Usage:
kobuki::PacketFinderBase::PacketFinderBase | ( | ) |
Default constructor. Use with configure().
|
virtual |
Checks for incoming packets.
incoming | |
numberOfIncoming |