Public Member Functions | Public Attributes | List of all members
urcl::primary_interface::RobotMessage Class Reference

The RobotMessage class is a parent class for the different received robot messages. More...

#include <robot_message.h>

Inheritance diagram for urcl::primary_interface::RobotMessage:
Inheritance graph
[legend]

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_
 

Detailed Description

The RobotMessage class is a parent class for the different received robot messages.

Definition at line 56 of file robot_message.h.

Constructor & Destructor Documentation

urcl::primary_interface::RobotMessage::RobotMessage ( const uint64_t  timestamp,
const uint8_t  source 
)
inline

Creates a new RobotMessage object to be filled from a package.

Parameters
timestampTimestamp of the package
sourceThe package's source

Definition at line 65 of file robot_message.h.

virtual urcl::primary_interface::RobotMessage::~RobotMessage ( )
virtualdefault

Member Function Documentation

bool urcl::primary_interface::RobotMessage::consumeWith ( AbstractPrimaryConsumer consumer)
virtual

Consume this package with a specific consumer.

Parameters
consumerPlaceholder for the consumer calling this
Returns
true on success

Implements urcl::primary_interface::PrimaryPackage.

Reimplemented in urcl::primary_interface::VersionMessage.

Definition at line 39 of file robot_message.cpp.

bool urcl::primary_interface::RobotMessage::parseWith ( comm::BinParser bp)
virtual

Sets the attributes of the package by parsing a serialized representation of the package.

Parameters
bpA parser containing a serialized version of the package
Returns
True, if the package was parsed successfully, false otherwise

Reimplemented from urcl::primary_interface::PrimaryPackage.

Reimplemented in urcl::primary_interface::VersionMessage.

Definition at line 34 of file robot_message.cpp.

std::string urcl::primary_interface::RobotMessage::toString ( ) const
virtual

Produces a human readable representation of the package object.

Returns
A string representing the object

Reimplemented from urcl::primary_interface::PrimaryPackage.

Reimplemented in urcl::primary_interface::VersionMessage.

Definition at line 44 of file robot_message.cpp.

Member Data Documentation

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.


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


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26