2025-01-05 14:19:53 -04:00
|
|
|
#ifndef DEVICEMANAGER_H
|
|
|
|
|
#define DEVICEMANAGER_H
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <string>
|
2025-01-08 06:23:34 -04:00
|
|
|
#include <memory>
|
2025-01-05 14:19:53 -04:00
|
|
|
#include <opts.h>
|
2025-01-07 14:11:51 -04:00
|
|
|
#include <utility>
|
|
|
|
|
#include <iostream>
|
2025-01-12 14:31:33 -04:00
|
|
|
#include <user/senseDeviceSpec.h>
|
2025-01-05 14:19:53 -04:00
|
|
|
|
|
|
|
|
class DeviceManager
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static DeviceManager& getInstance()
|
|
|
|
|
{
|
|
|
|
|
static DeviceManager instance;
|
|
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-07 14:11:51 -04:00
|
|
|
std::string readDeviceFile(const std::string& filename);
|
2025-01-10 18:27:10 -04:00
|
|
|
void collateAllDeviceSpecs(void);
|
2025-01-07 14:11:51 -04:00
|
|
|
void parseAllDeviceSpecs(void);
|
2025-01-10 18:27:10 -04:00
|
|
|
static const std::string stringifyDeviceSpecs(void);
|
2025-01-05 14:19:53 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
DeviceManager() = default;
|
|
|
|
|
~DeviceManager() = default;
|
|
|
|
|
DeviceManager(const DeviceManager&) = delete;
|
|
|
|
|
DeviceManager& operator=(const DeviceManager&) = delete;
|
2025-01-07 14:11:51 -04:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
std::string allDeviceSpecs;
|
2025-01-13 08:02:59 -04:00
|
|
|
static std::vector<std::shared_ptr<InteroceptorDeviceSpec>>
|
2025-01-08 06:23:34 -04:00
|
|
|
interoceptorDeviceSpecs;
|
2025-01-13 08:02:59 -04:00
|
|
|
static std::vector<std::shared_ptr<ExtrospectorDeviceSpec>>
|
2025-01-08 06:23:34 -04:00
|
|
|
extrospectorDeviceSpecs;
|
2025-01-13 08:02:59 -04:00
|
|
|
static std::vector<std::shared_ptr<SenseDeviceSpec>>
|
2025-01-12 14:31:33 -04:00
|
|
|
senseDeviceSpecs;
|
2025-01-05 14:19:53 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // DEVICEMANAGER_H
|