On this page
article
peary::device::DeviceManager
peary::device::DeviceManager
#include <peary/device/DeviceManager.hpp>
Public Functions
| Name | |
|---|---|
| DeviceManager()Default constructor. | |
| ~DeviceManager()Destructor. | |
| Device * | getDevice(size_t id)Get a device by its ID. |
| std::vector< Device * > | getDevices()Get a list of all managed devices. |
| size_t | addDevice(const std::string & name, const config::Configuration & config)Add a new device by loading its library and instantiating it. |
| void | clearDevices()Clear all devices, deleting their instances. |
Detailed Description
class peary::device::DeviceManager;
Caribou Device Manager.
This class holds is the interface between the individual devices and the actual setup. It loads the required device device library at runtime, the device library is identified by the device name.
Public Functions Documentation
function DeviceManager
DeviceManager()
Default constructor.
function ~DeviceManager
~DeviceManager()
Destructor.
function getDevice
Device * getDevice(
size_t id
)
Get a device by its ID.
Parameters:
- id ID of the device to be retrieved
Return: Pointer to the device instance
function getDevices
std::vector< Device * > getDevices()
Get a list of all managed devices.
Return: Vector of pointers to all managed devices
function addDevice
size_t addDevice(
const std::string & name,
const config::Configuration & config
)
Add a new device by loading its library and instantiating it.
Parameters:
- name Name of the device to be added
- config Configuration object for the device
Return: ID of the newly added device
function clearDevices
void clearDevices()
Clear all devices, deleting their instances.
Updated on 2025-11-14 at 11:31:23 +0100