21 #ifndef OLAD_PLUGIN_API_DEVICEMANAGER_H_
22 #define OLAD_PLUGIN_API_DEVICEMANAGER_H_
29 #include "ola/timecode/TimeCode.h"
30 #include "olad/Device.h"
31 #include "olad/Preferences.h"
42 : alias(alias), device(device) {}
110 std::vector<device_alias_pair>
Devices()
const;
138 static const unsigned int MISSING_DEVICE_ALIAS;
141 typedef std::map<std::string, device_alias_pair> DeviceIdMap;
142 typedef std::map<unsigned int, AbstractDevice*> DeviceAliasMap;
147 DeviceIdMap m_devices;
148 DeviceAliasMap m_alias_map;
150 unsigned int m_next_device_alias;
151 std::set<class OutputPort*> m_timecode_ports;
156 template <
class PortClass>
157 void SavePortPatchings(
const std::vector<PortClass*> &ports)
const;
159 void SavePortPriority(
const Port &port)
const;
160 void RestorePortPriority(
Port *port)
const;
162 template <
class PortClass>
163 void RestorePortSettings(
const std::vector<PortClass*> &ports)
const;
165 static const char PORT_PREFERENCES[];
166 static const unsigned int FIRST_DEVICE_ALIAS = 1;
167 static const char PRIORITY_VALUE_SUFFIX[];
168 static const char PRIORITY_MODE_SUFFIX[];
173 #endif // OLAD_PLUGIN_API_DEVICEMANAGER_H_
Definition: Preferences.h:343
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
Responsible for performing Port operations.
Definition: PortManager.h:37
Definition: DeviceManager.h:36
Definition: TimeCode.h:33
Keeps track of OLA's devices.
Definition: DeviceManager.h:61
std::vector< device_alias_pair > Devices() const
Return a list of all devices and their aliases.
Definition: DeviceManager.cpp:158
unsigned int DeviceCount() const
Return the number of devices.
Definition: DeviceManager.cpp:154
AbstractDevice * GetDevice(unsigned int alias) const
Lookup a device using the device alias.
Definition: DeviceManager.cpp:169
bool UnregisterDevice(const std::string &device_id)
Unregister a device by id.
Definition: DeviceManager.cpp:127
~DeviceManager()
Destructor.
Definition: DeviceManager.cpp:67
Definition: Preferences.h:145
void UnregisterAllDevices()
Remove all devices.
Definition: DeviceManager.cpp:182
DeviceManager(PreferencesFactory *prefs_factory, class PortManager *port_manager)
Create a new DeviceManager.
Definition: DeviceManager.cpp:56
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
The base port class.
Definition: Port.h:49
void SendTimeCode(const ola::timecode::TimeCode &timecode)
Send timecode to all ports which support timecode.
Definition: DeviceManager.cpp:191
bool RegisterDevice(AbstractDevice *device)
Register a device.
Definition: DeviceManager.cpp:73