5 #include <Poco/Mutex.h>
7 #include "core/DevicePoller.h"
8 #include "core/PollableDevice.h"
35 void schedule(PollableDevice::Ptr device);
54 std::map<DeviceID, PollableDevice::Ptr> m_polled;
55 DevicePoller::Ptr m_devicePoller;
56 mutable Poco::FastMutex m_lock;
void setDevicePoller(DevicePoller::Ptr poller)
Configure DevicePoller to use.
Definition: PollingKeeper.cpp:16
PollingKeeper takes care of devices that are being polled. It cancels all polled devices it manages u...
Definition: PollingKeeper.h:17
void cancelAll()
Cancel all registered pollable devices.
Definition: PollingKeeper.cpp:37
void cancel(const DeviceID &id)
Cancel polling of the device represented by the given ID and unregister it.
Definition: PollingKeeper.cpp:29
PollableDevice::Ptr lookup(const DeviceID &id) const
Lookup a device the PollingKeeper takes care of.
Definition: PollingKeeper.cpp:47
void schedule(PollableDevice::Ptr device)
Register the given device and schedule it into the underlying poller.
Definition: PollingKeeper.cpp:21
~PollingKeeper()
Cancel all registered pollable devices.
Definition: PollingKeeper.cpp:11
Definition: DeviceID.h:17