CreOS SDK
The CreOS SDK allows you to interact with Avular robots
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Loading...
Searching...
No Matches
creos::Client Class Reference

The client class. More...

#include <creos/client.hpp>

Public Member Functions

 Client (std::string_view host, unsigned port)
 Constructor for the client.
 
 Client (std::string_view host)
 Constructor for the client.
 
 Client ()
 Default constructor for the client.
 
void unsubscribe (SubscriptionId id)
 Unsubscribe from a data source.
 
ISensorsInterfacesensors ()
 Get the sensors interface.
 
const ISensorsInterfacesensors () const
 
IPowerManagementInterfacepower_management ()
 Get the power management interface.
 
const IPowerManagementInterfacepower_management () const
 
ISetpointControlInterfacesetpoint_control ()
 Get the setpoint control interface.
 
const ISetpointControlInterfacesetpoint_control () const
 
ITransformsInterfacetransforms ()
 Get the transforms interface.
 
const ITransformsInterfacetransforms () const
 
ISystemInfoInterfacesystem_info ()
 Get the system info interface.
 
const ISystemInfoInterfacesystem_info () const
 
IDiagnosticsInterfacediagnostics ()
 Get the diagnostics interface.
 
const IDiagnosticsInterfacediagnostics () const
 

Detailed Description

The client class.

This class is used to interact with the CreOS Agent.

Constructor & Destructor Documentation

◆ Client() [1/3]

creos::Client::Client ( std::string_view host,
unsigned port )

Constructor for the client.

This constructor creates a new client object and connects to the specified host and port.

Parameters
hostThe host to connect to.
portThe port to connect to.
Exceptions
creos::ConnectionErrorIf the client could not connect to the host.

◆ Client() [2/3]

creos::Client::Client ( std::string_view host)

Constructor for the client.

This constructor creates a new client object and connects to the specified host using the default port. You can change the default port by setting the CREOS_PORT environment variable.

Parameters
hostThe host to connect to.
Exceptions
creos::ConnectionErrorIf the client could not connect to the host.

◆ Client() [3/3]

creos::Client::Client ( )

Default constructor for the client.

This constructor creates a new client object and connects to the default host and port. You can change the default host and port by setting the CREOS_HOST and CREOS_PORT environment variables.

Member Function Documentation

◆ diagnostics()

IDiagnosticsInterface * creos::Client::diagnostics ( )

Get the diagnostics interface.

The diagnostics interface is used to get diagnostic information from the robot. This information can be used to monitor the health of the robot and detect any issues that may arise.

Returns
The diagnostics interface. It may return nullptr if the interface is not available.

◆ power_management()

IPowerManagementInterface * creos::Client::power_management ( )

Get the power management interface.

The power management interface is used to control the power state of the robot. It can be used to put the robot into a low power mode to conserve energy.

Returns
The power management interface. It may return nullptr if the interface is not available.

◆ sensors()

ISensorsInterface * creos::Client::sensors ( )

Get the sensors interface.

The sensors interface is used to get sensor data from sensors on the robot.

Returns
The sensors interface. It may return nullptr if the interface is not available.

◆ setpoint_control()

ISetpointControlInterface * creos::Client::setpoint_control ( )

Get the setpoint control interface.

The setpoint control interface is used to send setpoint control commands to the robot.

Returns
The setpoint control interface. It may return nullptr if the interface is not available.

◆ system_info()

ISystemInfoInterface * creos::Client::system_info ( )

Get the system info interface.

The system info interface is used to get information about the robot, like the name and serial number.

Returns
The system info interface. It may return nullptr if the interface is not available.

◆ transforms()

ITransformsInterface * creos::Client::transforms ( )

Get the transforms interface.

The transforms interface is used to get information about the relationships between different coordinate frames. A coordinate frame is a frame of reference used to define the position and orientation of different parts of the robot.

The transformations can be static or dynamic. Static transformations do not change often, like the transformation from the main body of the robot to a fixed sensor. Dynamic transformations can change continuously, like the transformation from the main body of the robot to the tip of a mounted robot arm.

Returns
The transforms interface. It may return nullptr if the interface is not available.

◆ unsubscribe()

void creos::Client::unsubscribe ( SubscriptionId id)

Unsubscribe from a data source.

Parameters
idThe subscription ID.
Exceptions
InvalidArgumentErrorIf the subscription ID is invalid.

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