Class AbstractPrimaryConsumer

Inheritance Relationships

Base Type

Class Documentation

class AbstractPrimaryConsumer : public urcl::comm::IConsumer<PrimaryPackage>

Base consumer for primary packages.

Primary interface consumers can inherit from this class in order to implement the visitor pattern for consuming primary packages.

Public Functions

AbstractPrimaryConsumer() = default
virtual ~AbstractPrimaryConsumer() = default
inline virtual bool consume(std::shared_ptr<PrimaryPackage> product) final

This consume method is usally being called by the Pipeline structure. We don’t necessarily need to know the specific package type here, as the packages themselves will take care to be consumed with the correct function (visitor pattern).

Parameters:

product – package as it is received from the robot

Returns:

true on successful consuming

virtual bool consume(RobotMessage &pkg) = 0
virtual bool consume(RobotState &pkg) = 0
virtual bool consume(VersionMessage &pkg) = 0
virtual bool consume(KinematicsInfo &pkg) = 0