CreOS SDK
The CreOS SDK allows you to interact with Avular robots
 
Loading...
Searching...
No Matches
creos::IDiagnosticsInterface Class Referenceabstract

The interface for retrieving diagnostic information from an Avular robot. More...

#include <creos/diagnostics_interface.hpp>

Public Member Functions

virtual SubscriptionId subscribeToState (const std::function< void(const creos_messages::State &)> &callback)=0
 Subscribe to state information of the robot.
 
virtual creos_messages::State getState (int timeout_ms=1500)=0
 Get the state of the robot.
 
virtual SubscriptionId subscribeToUserEvents (const std::function< void(const creos_messages::UserEvent &)> &callback)=0
 Subscribe to user events generated by the robot.
 

Static Public Attributes

static constexpr char name [] = "diagnostics"
 
static constexpr unsigned version = 1
 

Detailed Description

The interface for retrieving diagnostic information from an Avular robot.

Member Function Documentation

◆ getState()

virtual creos_messages::State creos::IDiagnosticsInterface::getState ( int timeout_ms = 1500)
pure virtualOriginVertex

Get the state of the robot.

Get the latest information about the state of different components of the robot.

Parameters
timeout_msThe timeout in milliseconds for the request.
Returns
creos_messages::State The state of the robot.
Exceptions
creos::TimeoutErrorIf the system info is not received within the timeout.
creos::UnsupportedErrorIf the robot does not provide this data, or the client and agent are incompatible.
creos::Exceptionif any other error occurred while getting the data.

◆ subscribeToState()

virtual SubscriptionId creos::IDiagnosticsInterface::subscribeToState ( const std::function< void(const creos_messages::State &)> & callback)
pure virtualOriginVertex

Subscribe to state information of the robot.

Subscribe to updates about the state of different components of the robot.

Parameters
callbackThe callback function that will be called when new data is available.
Returns
SubscriptionId The id of the subscription.
Exceptions
creos::UnsupportedErrorIf the robot does not provide this data, or the client and agent are incompatible.
creos::SubscriptionErrorif the subscription failed.

◆ subscribeToUserEvents()

virtual SubscriptionId creos::IDiagnosticsInterface::subscribeToUserEvents ( const std::function< void(const creos_messages::UserEvent &)> & callback)
pure virtualOriginVertex

Subscribe to user events generated by the robot.

Subscribe to messages meant for a user, generated by the robot's internal systems.

Parameters
callbackThe callback function that will be called when new data is available.
Returns
SubscriptionId The id of the subscription.
Exceptions
creos::UnsupportedErrorIf the robot does not provide this data, or the client and agent are incompatible.
creos::SubscriptionErrorif the subscription failed.

The documentation for this class was generated from the following file: