Class AbstractPrimaryConsumer
Defined in File abstract_primary_consumer.h
Inheritance Relationships
Base Type
public urcl::comm::IConsumer< PrimaryPackage >
(Template Class IConsumer)
Derived Type
public urcl::primary_interface::PrimaryConsumer
(Class PrimaryConsumer)
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.
Subclassed by urcl::primary_interface::PrimaryConsumer
Public Functions
-
AbstractPrimaryConsumer() = default
-
virtual ~AbstractPrimaryConsumer() = default
This consume method is usually 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
-
virtual bool consume(ErrorCodeMessage &pkg) = 0
-
AbstractPrimaryConsumer() = default