Public Member Functions | Protected Attributes | List of all members
urcl::primary_interface::PrimaryPackage Class Referenceabstract

The PrimaryPackage is solely an abstraction level. It inherits form the URPackage and is also a parent class for primary_interface::RobotMessage, primary_interface::RobotState. More...

#include <primary_package.h>

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

Public Member Functions

virtual bool consumeWith (AbstractPrimaryConsumer &consumer)=0
 Consume this package with a specific consumer. This should be overwritten in inherited packages. More...
 
virtual bool parseWith (comm::BinParser &bp)
 Sets the attributes of the package by parsing a serialized representation of the package. More...
 
 PrimaryPackage ()
 Creates a new PrimaryPackage object. More...
 
virtual std::string toString () const
 Produces a human readable representation of the package 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
 

Protected Attributes

std::unique_ptr< uint8_t > buffer_
 
size_t buffer_length_
 

Additional Inherited Members

- Public Types inherited from urcl::comm::URPackage< PackageHeader >
using HeaderType = PackageHeader
 

Detailed Description

The PrimaryPackage is solely an abstraction level. It inherits form the URPackage and is also a parent class for primary_interface::RobotMessage, primary_interface::RobotState.

Definition at line 45 of file primary_package.h.

Constructor & Destructor Documentation

urcl::primary_interface::PrimaryPackage::PrimaryPackage ( )
inline

Creates a new PrimaryPackage object.

Definition at line 51 of file primary_package.h.

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

Member Function Documentation

virtual bool urcl::primary_interface::PrimaryPackage::consumeWith ( AbstractPrimaryConsumer consumer)
pure virtual

Consume this package with a specific consumer. This should be overwritten in inherited packages.

Parameters
consumerPlaceholder for the consumer calling this
Returns
true on success

Implemented in urcl::primary_interface::RobotState, urcl::primary_interface::RobotMessage, urcl::primary_interface::KinematicsInfo, and urcl::primary_interface::VersionMessage.

bool urcl::primary_interface::PrimaryPackage::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

Implements urcl::comm::URPackage< PackageHeader >.

Reimplemented in urcl::primary_interface::RobotState, urcl::primary_interface::RobotMessage, urcl::primary_interface::KinematicsInfo, and urcl::primary_interface::VersionMessage.

Definition at line 35 of file primary_package.cpp.

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

Produces a human readable representation of the package object.

Returns
A string representing the object

Implements urcl::comm::URPackage< PackageHeader >.

Reimplemented in urcl::primary_interface::RobotState, urcl::primary_interface::RobotMessage, urcl::primary_interface::KinematicsInfo, and urcl::primary_interface::VersionMessage.

Definition at line 41 of file primary_package.cpp.

Member Data Documentation

std::unique_ptr<uint8_t> urcl::primary_interface::PrimaryPackage::buffer_
protected

Definition at line 84 of file primary_package.h.

size_t urcl::primary_interface::PrimaryPackage::buffer_length_
protected

Definition at line 85 of file primary_package.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