forked from mavlink/MAVSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.h
48 lines (41 loc) · 1.39 KB
/
device.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once
#include "device_plugin_container.h"
namespace dronecore {
class DeviceImpl;
/**
* @brief A Device represents a vehicle such as a drone or robot.
*
* A device can consist of multiple components such as an autopilot with a gimbal and camera.
*
* This class is derived from DevicePluginContainer, which provides methods
* to access plugin classes like Action, Telemetry, Info, Logging, Offboard and Mission
* (for example, using `DroneCore::device().action()...`).
*
* **NOTE** The content of DevicePluginContainer, and hence the available accessors,
* are auto-generated at compile time.
*
* Device objects are not created or destroyed directly by API consumers. They are accessed using, for example, DroneCore::device() and cleaned up when DroneCore is destroyed.
*/
class Device : public DevicePluginContainer
{
public:
/**
* @brief Constructor (internal use only).
*
* This constructor does not need to be called by any consumer of the API.
*
* @param impl The underlying device implementation.
*/
explicit Device(DeviceImpl *impl);
/**
* @brief Destructor (internal use only).
*
* The destructor of Device does not need to be called by any consumer of the API.
*/
~Device();
private:
// Non-copyable
Device(const Device &) = delete;
const Device &operator=(const Device &) = delete;
};
} // namespace dronecore