CreOS SDK
The CreOS SDK allows you to interact with Avular robots
 
Loading...
Searching...
No Matches
diagnostics_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 21
11 * Author: Niels Rood
12 *
13 * @file Header file for diagnostics interface
14 ****************************************************************************/
15#pragma once
16
17#include <creos/client_global.hpp>
18#include <creos/messages/gnss.hpp>
19#include <creos/messages/state.hpp>
20#include <creos/messages/user_event.hpp>
21#include <creos/subscription.hpp>
22
23namespace creos {
24
28class CREOS_CLIENT_API IDiagnosticsInterface {
29public:
30 static constexpr char name[] = "diagnostics";
31 static constexpr unsigned version = 1;
32
33 virtual ~IDiagnosticsInterface() = default;
34
47 virtual SubscriptionId subscribeToState(const std::function<void(const creos_messages::State&)>& callback) = 0;
48
62 virtual creos_messages::State getState(int timeout_ms = 1500) = 0;
63
77 const std::function<void(const creos_messages::UserEvent&)>& callback) = 0;
78};
79
80} // namespace creos
The interface for retrieving diagnostic information from an Avular robot.
Definition diagnostics_interface.hpp:28
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.
virtual SubscriptionId subscribeToState(const std::function< void(const creos_messages::State &)> &callback)=0
Subscribe to state information of the robot.
This type holds an subscription ID.
Definition subscription.hpp:22
The main namespace for the CreOS client library.
The state of the robot.
Definition state.hpp:28
An event meant for a robot user.
Definition user_event.hpp:28