Class PrimaryConsumer

Inheritance Relationships

Base Type

Class Documentation

class PrimaryConsumer : public urcl::primary_interface::AbstractPrimaryConsumer

Primary consumer implementation.

This class implements an AbstractPrimaryConsumer such that it can consume all incoming primary messages. The actual work for each package will be done in this class.

Public Functions

inline PrimaryConsumer()
virtual ~PrimaryConsumer() = default
inline virtual bool consume(RobotMessage &msg) override

Consume a RobotMessage.

Parameters:

msg – Robot message

Returns:

True

inline virtual bool consume(RobotState &msg) override

Consume a RobotState.

Parameters:

msg – Robot state

Returns:

True

inline virtual bool consume(VersionMessage &pkg) override

Handle a VersionMessage.

Parameters:

pkgVersionMessage

Returns:

True

inline virtual bool consume(KinematicsInfo &pkg) override

Handle a KinematicsInfo.

Parameters:

pkgKinematicsInfo

Returns:

True

inline virtual bool consume(ErrorCodeMessage &pkg) override

Handle an ErrorCodeMessage.

Parameters:

pkgErrorCodeMessage

Returns:

True

inline void setErrorCodeMessageCallback(std::function<void(ErrorCode&)> callback_function)

Set callback function which will be triggered whenever error code messages are received.

Parameters:

callback_function – Function handling the event information. The error code message received is passed to the function.