Class PrimaryConsumer
Defined in File primary_consumer.h
Inheritance Relationships
Base Type
public urcl::primary_interface::AbstractPrimaryConsumer
(Class AbstractPrimaryConsumer)
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:
pkg – VersionMessage
- Returns:
True
-
inline virtual bool consume(KinematicsInfo &pkg) override
Handle a KinematicsInfo.
- Parameters:
pkg – KinematicsInfo
- Returns:
True
-
inline virtual bool consume(ErrorCodeMessage &pkg) override
Handle an ErrorCodeMessage.
- Parameters:
pkg – ErrorCodeMessage
- Returns:
True
-
inline virtual bool consume(RobotModeData &pkg) override
-
inline virtual bool consume(ConfigurationData &pkg) override
-
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.
-
inline std::shared_ptr<KinematicsInfo> getKinematicsInfo()
Get the kinematics info.
- Returns:
Shared pointer to the kinematics info
-
inline std::shared_ptr<RobotModeData> getRobotModeData()
Get the latest robot mode.
The robot mode will be updated in the background. This will always show the latest received robot mode independent of the time that has passed since receiving it.
-
inline std::shared_ptr<VersionInformation> getVersionInformation()
Get the latest version information.
The version information will be updated in the background. This will always show the latest received version information independent of the time that has passed since receiving it. If no version information has been received yet, this will return a nullptr.
-
inline std::shared_ptr<ConfigurationData> getConfigurationData()
Get the latest configuration data.
The configuration data will be updated in the background. This will always show the latest received configuration data independent of the time that has passed since receiving it. If no configuration data has been received yet, this will return a nullptr.
-
inline PrimaryConsumer()