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
system_info_interface.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 October 31
11 * Author: Robbert-Jan de Jager
12 *
13 * @file Definitions of the system info interface.
14 ****************************************************************************/
15#pragma once
16
17#include <creos/client_global.hpp>
18#include <creos/messages/battery_status.hpp>
19#include <creos/messages/system_info.hpp>
20#include <creos/subscription.hpp>
21
22namespace creos {
23
28class CREOS_CLIENT_API ISystemInfoInterface {
29public:
30 static constexpr char name[] = "system_info";
31 static constexpr unsigned version = 1;
32
33 virtual ~ISystemInfoInterface() = default;
34
48 const std::function<void(const creos_messages::SystemInfo&)>& callback) = 0;
49
64 virtual creos_messages::SystemInfo getSystemInfo(int timeout_ms = 1500) = 0;
65
79 const std::function<void(const creos_messages::BatteryStatus&)>& callback) = 0;
80
95 virtual creos_messages::BatteryStatus getBatteryStatus(int timeout_ms = 1500) = 0;
96};
97
98} // namespace creos
The interface for retrieving general system information of an Avular robot.
Definition system_info_interface.hpp:28
virtual creos_messages::SystemInfo getSystemInfo(int timeout_ms=1500)=0
Get the system info.
virtual creos_messages::BatteryStatus getBatteryStatus(int timeout_ms=1500)=0
Get the battery status.
virtual SubscriptionId subscribeToSystemInfo(const std::function< void(const creos_messages::SystemInfo &)> &callback)=0
Subscribe to system info messages.
virtual SubscriptionId subscribeToBatteryStatus(const std::function< void(const creos_messages::BatteryStatus &)> &callback)=0
Subscribe to battery status updates.
This type holds an subscription ID.
Definition subscription.hpp:22
The main namespace for the CreOS client library.
BatteryStatus message contains the current battery state.
Definition battery_status.hpp:28
System info message containing information about the connected system.
Definition system_info.hpp:44