5 #include <Poco/Event.h>
6 #include <Poco/SharedPtr.h>
7 #include <Poco/Timespan.h>
9 #include "core/PollableDevice.h"
10 #include "core/Result.h"
11 #include "model/DeviceID.h"
12 #include "model/ModuleID.h"
13 #include "model/ModuleType.h"
14 #include "model/RefreshTime.h"
15 #include "model/SensorData.h"
16 #include "vdev/VirtualModule.h"
22 typedef Poco::SharedPtr<VirtualDevice> Ptr;
27 void setID(
const DeviceID &deviceId);
30 void setVendorName(
const std::string &vendorName);
31 std::string vendorName()
const;
33 void setProductName(
const std::string &productName);
34 std::string productName()
const;
36 std::list<VirtualModule::Ptr> modules()
const;
37 void addModule(
const VirtualModule::Ptr virtualModule);
38 std::list<ModuleType> moduleTypes()
const;
44 const ModuleID &moduleID,
double value);
47 void poll(Distributor::Ptr distributor)
override;
51 std::string m_vendorName;
52 std::string m_productName;
53 std::list<VirtualModule::Ptr> m_modules;
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
Definition: SensorData.h:20
Definition: ModuleID.h:12
DeviceID id() const override
Definition: VirtualDevice.cpp:20
void poll(Distributor::Ptr distributor) override
Perform polling for data and ship them via the given distributor.
Definition: VirtualDevice.cpp:108
RefreshTime refresh() const override
Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain ...
Definition: VirtualDevice.cpp:69
Definition: VirtualDevice.h:20
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