25 #ifndef C_DEVICE_MANAGER_HPP 26 #define C_DEVICE_MANAGER_HPP 34 #include <boost/noncopyable.hpp> 35 #include <boost/thread/shared_mutex.hpp> 53 :
private boost::noncopyable
72 std::multiset<SignalValue>
GetValues(std::string type,
123 #endif // C_DEVICE_MANAGER_HPP Physical adapter device interface.
Definition: IAdapter.hpp:67
The interface between broker modules and the device architecture.
Definition: CDeviceManager.hpp:52
boost::shared_mutex m_mutex
Mutex for the device map.
Definition: CDeviceManager.hpp:116
bool DeviceExists(std::string devid) const
Tests to see if a device exists.
Definition: CDeviceManager.cpp:175
PhysicalDeviceSet::const_iterator const_iterator
A typedef providing a const iterator for this object.
Definition: CDeviceManager.hpp:83
CDevice::Pointer GetDevice(std::string devid)
Gets a device by its identifier.
Definition: CDeviceManager.cpp:196
void RevealDevice(std::string devid)
Move a pointer to the visible device set.
Definition: CDeviceManager.cpp:122
std::size_t DeviceCount() const
Counts the number of managed devices.
Definition: CDeviceManager.cpp:223
CDeviceManager()
Private constructor.
Definition: CDeviceManager.cpp:76
std::set< CDevice::Pointer > GetDevicesOfType(std::string type)
Retrieves all the stored devices of a specified type.
Definition: CDeviceManager.cpp:240
SignalValue GetNetValue(std::string type, std::string signal)
Returns the result of a binary operation on a set of device signals.
Definition: CDeviceManager.cpp:296
float SignalValue
Type of the value for device signals.
Definition: IAdapter.hpp:42
PhysicalDeviceSet m_devices
Mapping from identifiers to device pointers.
Definition: CDeviceManager.hpp:110
bool RemoveDevice(std::string devid)
Remove a device by its identifier.
Definition: CDeviceManager.cpp:150
boost::shared_ptr< CDevice > Pointer
Pointer to physical device interface.
Definition: CDevice.hpp:77
Handles the creation of adapters and their associated devices.
Definition: CAdapterFactory.hpp:54
std::map< std::string, CDevice::Pointer > PhysicalDeviceSet
A typedef for the mapping of identifier to device pointers.
Definition: CDeviceManager.hpp:80
General FREEDM Namespace.
Definition: CBroker.cpp:53
std::multiset< SignalValue > GetValues(std::string type, std::string signal)
Retrieves a multiset of stored values for the given device signal.
Definition: CDeviceManager.cpp:268
void AddDevice(CDevice::Pointer device)
Add a pointer to the hidden device set.
Definition: CDeviceManager.cpp:93
Provides an interface for communicating with an MQTT broker.
Definition: CMqttAdapter.hpp:56
PhysicalDeviceSet m_hidden_devices
Set of uninitialized device objects.
Definition: CDeviceManager.hpp:113
PhysicalDeviceSet::iterator iterator
A typedef providing an iterator for this object.
Definition: CDeviceManager.hpp:86
static CDeviceManager & Instance()
Gets the instance of the device manager.
Definition: CDeviceManager.cpp:61