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

The interface for retrieving general system information of an Avular robot. More...

#include <creos/system_info_interface.hpp>

Public Member Functions

virtual SubscriptionId subscribeToSystemInfo (const std::function< void(const creos_messages::SystemInfo &)> &callback)=0
 Subscribe to system info messages.
 
virtual creos_messages::SystemInfo getSystemInfo (int timeout_ms=1500)=0
 Get the system info.
 
virtual SubscriptionId subscribeToBatteryStatus (const std::function< void(const creos_messages::BatteryStatus &)> &callback)=0
 Subscribe to battery status updates.
 
virtual creos_messages::BatteryStatus getBatteryStatus (int timeout_ms=1500)=0
 Get the battery status.
 

Static Public Attributes

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

Detailed Description

The interface for retrieving general system information of an Avular robot.

Member Function Documentation

◆ getBatteryStatus()

virtual creos_messages::BatteryStatus creos::ISystemInfoInterface::getBatteryStatus ( int timeout_ms = 1500)
pure virtualOriginVertex

Get the battery status.

The battery status contains information about the battery, like the state and alerts. This function will block until the battery status is received.

Parameters
timeout_msThe time in milliseconds to wait for the battery status.
Returns
creos_messages::BatteryStatus The battery status.
Exceptions
creos::TimeoutErrorIf the battery status 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.

◆ getSystemInfo()

virtual creos_messages::SystemInfo creos::ISystemInfoInterface::getSystemInfo ( int timeout_ms = 1500)
pure virtualOriginVertex

Get the system info.

The system info contains information about the connected system, like the name and serial number. This function will block until the system info is received.

Parameters
timeout_msThe time in milliseconds to wait for the system info.
Returns
creos_messages::SystemInfo The system info.
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.

◆ subscribeToBatteryStatus()

virtual SubscriptionId creos::ISystemInfoInterface::subscribeToBatteryStatus ( const std::function< void(const creos_messages::BatteryStatus &)> & callback)
pure virtualOriginVertex

Subscribe to battery status updates.

The battery status contains information about the battery, like the state and alerts.

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 to be created.

◆ subscribeToSystemInfo()

virtual SubscriptionId creos::ISystemInfoInterface::subscribeToSystemInfo ( const std::function< void(const creos_messages::SystemInfo &)> & callback)
pure virtualOriginVertex

Subscribe to system info messages.

The system info messages contain information about the connected system, like the name and serial number.

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 to be created.

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