|
| RevogiDevice (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const std::string &productName, const std::list< ModuleType > &moduleTypes, const HciInterface::Ptr hci) |
|
std::list< ModuleType > | moduleTypes () const override |
|
std::string | vendor () const override |
|
std::string | productName () const override |
|
bool | pollable () const override |
| Returns true if the device is pollable, otherwise false.
|
|
void | poll (Distributor::Ptr distributor) override |
| Perform polling for data and ship them via the given distributor.
|
|
| BLESmartDevice (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const HciInterface::Ptr hci) |
|
DeviceID | id () const override |
|
RefreshTime | refresh () const override |
| Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain a valid time.
|
|
MACAddress | macAddress () const |
|
virtual void | pair (Poco::SharedPtr< HciInterface::WatchCallback > callback) |
| When the device supports processing of advertising data, it should call a watch() on the given HciInterface in this method and a unwatch() in the destructor. When the method is re-called it do not have any effect.
|
|
virtual void | requestModifyState (const ModuleID &moduleID, const double value) |
| Modifies the device module given by moduleID to a given value. More...
|
|
virtual SensorData | parseAdvertisingData (const std::vector< unsigned char > &data) const |
| Transforms advertising data to SensorData. More...
|
|
|
virtual SensorData | parseValues (const std::vector< unsigned char > &values) const =0 |
| Convert actual setting of the device to SensorData.
|
|
void | sendWriteRequest (HciConnection::Ptr conn, std::vector< unsigned char > payload, const unsigned char checksum) |
| Prepends header and appends footer to payload and then sends it to device.
|
|
virtual void | prependHeader (std::vector< unsigned char > &payload) const =0 |
|
virtual void | appendFooter (std::vector< unsigned char > &payload, const unsigned char checksum) const |
|
void | setupLogger (Poco::Logger *logger=0) const |
|
Poco::Logger & | logger () const |
|
| Loggable (const ClassInfo &info) |
|
| Loggable (const std::type_info &info) |
|
Abstract class for Revogi devices.
The class provides static method to create instance of specific Reovig device class. Device identification is according to device name located in the vendor specific characteristic. The class also allows to obtain actual setting of the device and send commands. The command consist of three parts: the prefix, the message body and the suffix. In the suffix is located checksum.