The RobotMessage class is a parent class for the different received robot messages. More...
#include <robot_message.h>
Public Member Functions | |
virtual bool | consumeWith (AbstractPrimaryConsumer &consumer) |
Consume this package with a specific consumer. More... | |
virtual bool | parseWith (comm::BinParser &bp) |
Sets the attributes of the package by parsing a serialized representation of the package. More... | |
RobotMessage (const uint64_t timestamp, const uint8_t source) | |
Creates a new RobotMessage object to be filled from a package. More... | |
virtual std::string | toString () const |
Produces a human readable representation of the package object. More... | |
virtual | ~RobotMessage ()=default |
Public Member Functions inherited from urcl::primary_interface::PrimaryPackage | |
PrimaryPackage () | |
Creates a new PrimaryPackage object. More... | |
virtual | ~PrimaryPackage ()=default |
Public Member Functions inherited from urcl::comm::URPackage< PackageHeader > | |
URPackage ()=default | |
Creates a new URPackage object. More... | |
virtual | ~URPackage ()=default |
Public Attributes | |
RobotMessagePackageType | message_type_ |
uint8_t | source_ |
uint64_t | timestamp_ |
Additional Inherited Members | |
Public Types inherited from urcl::comm::URPackage< PackageHeader > | |
using | HeaderType = PackageHeader |
Protected Attributes inherited from urcl::primary_interface::PrimaryPackage | |
std::unique_ptr< uint8_t > | buffer_ |
size_t | buffer_length_ |
The RobotMessage class is a parent class for the different received robot messages.
Definition at line 56 of file robot_message.h.
|
inline |
Creates a new RobotMessage object to be filled from a package.
timestamp | Timestamp of the package |
source | The package's source |
Definition at line 65 of file robot_message.h.
|
virtualdefault |
|
virtual |
Consume this package with a specific consumer.
consumer | Placeholder for the consumer calling this |
Implements urcl::primary_interface::PrimaryPackage.
Reimplemented in urcl::primary_interface::VersionMessage.
Definition at line 39 of file robot_message.cpp.
|
virtual |
Sets the attributes of the package by parsing a serialized representation of the package.
bp | A parser containing a serialized version of the package |
Reimplemented from urcl::primary_interface::PrimaryPackage.
Reimplemented in urcl::primary_interface::VersionMessage.
Definition at line 34 of file robot_message.cpp.
|
virtual |
Produces a human readable representation of the package object.
Reimplemented from urcl::primary_interface::PrimaryPackage.
Reimplemented in urcl::primary_interface::VersionMessage.
Definition at line 44 of file robot_message.cpp.
RobotMessagePackageType urcl::primary_interface::RobotMessage::message_type_ |
Definition at line 98 of file robot_message.h.
uint8_t urcl::primary_interface::RobotMessage::source_ |
Definition at line 97 of file robot_message.h.
uint64_t urcl::primary_interface::RobotMessage::timestamp_ |
Definition at line 96 of file robot_message.h.