6 #include <Poco/SharedPtr.h>
7 #include <Poco/Timespan.h>
9 #include "commands/DeviceAcceptCommand.h"
10 #include "commands/DeviceUnpairCommand.h"
11 #include "commands/GatewayListenCommand.h"
12 #include "core/DeviceManager.h"
13 #include "model/DeviceID.h"
14 #include "model/ModuleType.h"
15 #include "model/RefreshTime.h"
40 void setRefresh(
const Poco::Timespan &refresh);
47 void setPath(
const std::string &path);
48 void setVendor(
const std::string &vendor);
54 void setUnit(
const std::string &unit);
61 const std::set<DeviceID> &devices,
62 const DeviceStatusHandler::DeviceValues &values)
override;
65 void handleAccept(
const DeviceAcceptCommand::Ptr cmd)
override;
69 const Poco::Timespan &timeout)
override;
82 DeviceID buildID(
const std::string &path);
88 double convertToHPA(
const double value);
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
Definition: PressureSensorManager.h:31
void stop() override
Definition: PressureSensorManager.cpp:75
AsyncWork is an interface allowing to wait until an asynchronous operation finishes. It is also possible to force-stop it by calling cancel().
Definition: AsyncWork.h:21
void handleRemoteStatus(const DevicePrefix &prefix, const std::set< DeviceID > &devices, const DeviceStatusHandler::DeviceValues &values) override
Wake-up the main thread when received new status.
Definition: PressureSensorManager.cpp:80
AsyncWork< std::set< DeviceID > >::Ptr startUnpair(const DeviceID &id, const Poco::Timespan &timeout) override
Starts device unpair process in a technology-specific way. This method is always called inside a crit...
Definition: PressureSensorManager.cpp:121
AsyncWork::Ptr startDiscovery(const Poco::Timespan &timeout) override
Starts device discovery process in a technology-specific way. This method is always called inside a c...
Definition: PressureSensorManager.cpp:89
void handleAccept(const DeviceAcceptCommand::Ptr cmd) override
Generic handler of the DeviceAcceptCommand. It might be helpful to override this method in case we ne...
Definition: PressureSensorManager.cpp:105
Definition: DeviceManager.h:48
Definition: DeviceID.h:17
void setPath(const std::string &path)
sets the Path to Air Pressure Sensor device entry output file. Reading from this file invoke measurin...
Definition: PressureSensorManager.cpp:153
void setUnit(const std::string &unit)
sets the expected unit, conversion of this unit needs to be made before shipping measured value...
Definition: PressureSensorManager.cpp:163
DevicePrefix prefix() const override
Definition: DeviceManager.cpp:33