CreOS SDK
The CreOS SDK allows you to interact with Avular robots
 
Loading...
Searching...
No Matches
client.hpp
1// Copyright (C) 2024 Avular Holding B.V. - All Rights Reserved
2// You may use this code under the terms of the Avular
3// Software End-User License Agreement.
4//
5// You should have received a copy of the Avular
6// Software End-User License Agreement license with
7// this file, or download it from: avular.com/eula
8//
9/*****************************************************************************
10 * Created on: 2024 June 19
11 * Author: Robbert-Jan de Jager
12 *
13 * Main header file for the CreOS client library.
14 ****************************************************************************/
15#pragma once
16
17#include <creos/client_global.hpp>
18#include <creos/diagnostics_interface.hpp>
19#include <creos/errors.hpp>
20#include <creos/power_management_interface.hpp>
21#include <creos/sensors_interface.hpp>
22#include <creos/setpoint_control_interface.hpp>
23#include <creos/subscription.hpp>
24#include <creos/system_info_interface.hpp>
25#include <creos/transforms_interface.hpp>
26#include <memory>
27#include <string_view>
28
33namespace creos {
34
147class ClientImpl;
148
154class CREOS_CLIENT_API Client {
155public:
165 Client(std::string_view host, unsigned port);
166
176 Client(std::string_view host);
177
186 ~Client();
187
195
204 const ISensorsInterface* sensors() const;
205
215 const IPowerManagementInterface* power_management() const;
216
225 const ISetpointControlInterface* setpoint_control() const;
226
241 const ITransformsInterface* transforms() const;
242
251 const ISystemInfoInterface* system_info() const;
252
262 const IDiagnosticsInterface* diagnostics() const;
263
264private:
266 friend ClientImpl& getImplFromClient(Client& client);
267 friend const ClientImpl& getImplFromClient(const Client& client);
269
270 std::unique_ptr<ClientImpl> impl_;
271
272 ClientImpl& impl() { return *impl_; }
273
274 const ClientImpl& impl() const { return *impl_; }
275};
276
277} // namespace creos
The client class.
Definition client.hpp:154
void unsubscribe(SubscriptionId id)
Unsubscribe from a data source.
Client()
Default constructor for the client.
ISystemInfoInterface * system_info()
Get the system info interface.
ITransformsInterface * transforms()
Get the transforms interface.
IPowerManagementInterface * power_management()
Get the power management interface.
Client(std::string_view host, unsigned port)
Constructor for the client.
Client(std::string_view host)
Constructor for the client.
ISensorsInterface * sensors()
Get the sensors interface.
IDiagnosticsInterface * diagnostics()
Get the diagnostics interface.
ISetpointControlInterface * setpoint_control()
Get the setpoint control interface.
The interface for retrieving diagnostic information from an Avular robot.
Definition diagnostics_interface.hpp:28
The interface for querying and managing the power state of an Avular robot.
Definition power_management_interface.hpp:27
The interface for retrieving sensor data from an Avular robot.
Definition sensors_interface.hpp:36
The interface for sending control setpoints to an Avular robot.
Definition setpoint_control_interface.hpp:30
The interface for retrieving general system information of an Avular robot.
Definition system_info_interface.hpp:28
The interface for retrieving information about the relationships between different coordinate frames ...
Definition transforms_interface.hpp:27
This type holds an subscription ID.
Definition subscription.hpp:22
The main namespace for the CreOS client library.