5 #include <Poco/Mutex.h>
6 #include <Poco/SharedPtr.h>
7 #include <Poco/Timespan.h>
9 #include <Poco/DOM/Node.h>
10 #include <Poco/DOM/NodeIterator.h>
12 #include "core/PollableDevice.h"
13 #include "model/DeviceID.h"
14 #include "model/ModuleID.h"
15 #include "model/ModuleType.h"
16 #include "model/SensorData.h"
17 #include "util/Loggable.h"
26 typedef Poco::SharedPtr<BelkinWemoDevice> Ptr;
36 virtual bool requestModifyState(
const ModuleID& moduleID,
const double value) = 0;
38 void poll(Distributor::Ptr distributor)
override;
40 virtual std::list<ModuleType> moduleTypes()
const = 0;
41 virtual std::string name()
const = 0;
42 virtual Poco::FastMutex& lock();
50 static Poco::XML::Node*
findNode(Poco::XML::NodeIterator& iterator,
const std::string& name);
56 static std::list<Poco::XML::Node*>
findNodes(Poco::XML::NodeIterator& iterator,
const std::string& name);
61 Poco::FastMutex m_lock;
Abstract class representing generic BelkinWemo device.
Definition: BelkinWemoDevice.h:24
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
Definition: SensorData.h:20
static std::list< Poco::XML::Node * > findNodes(Poco::XML::NodeIterator &iterator, const std::string &name)
Finds all nodes with the given name and returns their values.
Definition: BelkinWemoDevice.cpp:61
void poll(Distributor::Ptr distributor) override
Perform polling for data and ship them via the given distributor.
Definition: BelkinWemoDevice.cpp:81
Definition: ModuleID.h:12
Definition: Loggable.h:19
DeviceID id() const override
Definition: BelkinWemoDevice.cpp:25
static Poco::XML::Node * findNode(Poco::XML::NodeIterator &iterator, const std::string &name)
Finds the first node with the given name and returns it's value. When the value of node si empty retu...
Definition: BelkinWemoDevice.cpp:40
Definition: DeviceID.h:17
PollableDevice is a device that is necessary to poll regularly for data. The polling can take some ti...
Definition: PollableDevice.h:18
RefreshTime refresh() const override
Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain ...
Definition: BelkinWemoDevice.cpp:30