Class Message
Defined in File Message.h
Inheritance Relationships
Derived Types
public clearpath::CmdMessage
(Class CmdMessage)public clearpath::DataAckermannOutput
(Class DataAckermannOutput)public clearpath::DataDifferentialControl
(Class DataDifferentialControl)public clearpath::DataDifferentialOutput
(Class DataDifferentialOutput)public clearpath::DataDifferentialSpeed
(Class DataDifferentialSpeed)public clearpath::DataEcho
(Class DataEcho)public clearpath::DataEncoders
(Class DataEncoders)public clearpath::DataEncodersRaw
(Class DataEncodersRaw)public clearpath::DataFirmwareInfo
(Class DataFirmwareInfo)public clearpath::DataGear
(Class DataGear)public clearpath::DataMaxAcceleration
(Class DataMaxAcceleration)public clearpath::DataMaxSpeed
(Class DataMaxSpeed)public clearpath::DataPlatformAcceleration
(Class DataPlatformAcceleration)public clearpath::DataPlatformInfo
(Class DataPlatformInfo)public clearpath::DataPlatformMagnetometer
(Class DataPlatformMagnetometer)public clearpath::DataPlatformName
(Class DataPlatformName)public clearpath::DataPlatformOrientation
(Class DataPlatformOrientation)public clearpath::DataPlatformRotation
(Class DataPlatformRotation)public clearpath::DataPowerSystem
(Class DataPowerSystem)public clearpath::DataProcessorStatus
(Class DataProcessorStatus)public clearpath::DataRangefinderTimings
(Class DataRangefinderTimings)public clearpath::DataRangefinders
(Class DataRangefinders)public clearpath::DataRawAcceleration
(Class DataRawAcceleration)public clearpath::DataRawCurrent
(Class DataRawCurrent)public clearpath::DataRawGyro
(Class DataRawGyro)public clearpath::DataRawMagnetometer
(Class DataRawMagnetometer)public clearpath::DataRawOrientation
(Class DataRawOrientation)public clearpath::DataRawTemperature
(Class DataRawTemperature)public clearpath::DataRawVoltage
(Class DataRawVoltage)public clearpath::DataSafetySystemStatus
(Class DataSafetySystemStatus)public clearpath::DataSystemStatus
(Class DataSystemStatus)public clearpath::DataVelocity
(Class DataVelocity)public clearpath::Request
(Class Request)
Class Documentation
-
class Message
Subclassed by clearpath::CmdMessage, clearpath::DataAckermannOutput, clearpath::DataDifferentialControl, clearpath::DataDifferentialOutput, clearpath::DataDifferentialSpeed, clearpath::DataEcho, clearpath::DataEncoders, clearpath::DataEncodersRaw, clearpath::DataFirmwareInfo, clearpath::DataGear, clearpath::DataMaxAcceleration, clearpath::DataMaxSpeed, clearpath::DataPlatformAcceleration, clearpath::DataPlatformInfo, clearpath::DataPlatformMagnetometer, clearpath::DataPlatformName, clearpath::DataPlatformOrientation, clearpath::DataPlatformRotation, clearpath::DataPowerSystem, clearpath::DataProcessorStatus, clearpath::DataRangefinderTimings, clearpath::DataRangefinders, clearpath::DataRawAcceleration, clearpath::DataRawCurrent, clearpath::DataRawGyro, clearpath::DataRawMagnetometer, clearpath::DataRawOrientation, clearpath::DataRawTemperature, clearpath::DataRawVoltage, clearpath::DataSafetySystemStatus, clearpath::DataSystemStatus, clearpath::DataVelocity, clearpath::Request
Public Functions
-
Message()
-
Message(void *input, size_t msg_len)
-
Message(uint16_t type, uint8_t *payload, size_t payload_len, uint32_t timestamp = 0, uint8_t flags = 0, uint8_t version = 0)
-
virtual ~Message()
-
void send()
-
uint8_t getLength()
-
uint8_t getLengthComp()
-
uint8_t getVersion()
-
uint32_t getTimestamp()
-
uint8_t getFlags()
-
uint16_t getType()
-
uint16_t getChecksum()
-
inline size_t getPayloadLength()
-
size_t getPayload(void *buf, size_t max_size)
-
inline size_t getTotalLength()
-
size_t toBytes(void *buf, size_t buf_size)
-
bool isValid(char *whyNot = NULL, size_t strLen = 0)
-
inline bool isCommand()
-
inline bool isRequest()
-
inline bool isData()
-
virtual std::ostream &printMessage(std::ostream &stream = std::cout)
-
void printRaw(std::ostream &stream = std::cout)
Public Static Functions
Public Static Attributes
-
static const size_t MAX_MSG_LENGTH = 256
-
static const size_t MIN_MSG_LENGTH = HEADER_LENGTH + CRC_LENGTH
-
static const uint8_t SOH = 0xAA
-
static const uint8_t STX = 0x55
Protected Types
Protected Functions
-
inline size_t crcOffset()
-
void setLength(uint8_t len)
-
void setVersion(uint8_t version)
-
void setTimestamp(uint32_t timestamp)
-
void setFlags(uint8_t flags)
-
void setType(uint16_t type)
-
uint8_t *getPayloadPointer(size_t offset = 0)
-
void setPayload(void *buf, size_t buf_size)
-
void setPayloadLength(uint8_t len)
-
void makeValid()
Protected Static Attributes
-
static const size_t CRC_LENGTH = 2
-
static const uint16_t CRC_INIT_VAL = 0xFFFF
-
static const size_t HEADER_LENGTH = 12
Friends
- friend class Transport
-
Message()