BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
#include <FitpDevice.h>
Public Types | |
enum | DeviceType { END_DEVICE, COORDINATOR } |
typedef Poco::SharedPtr < FitpDevice > | Ptr |
Public Member Functions | |
FitpDevice (DeviceID id) | |
DeviceID | deviceID () const |
void | setDeviceID (const DeviceID &deviceId) |
DeviceType | type () const |
std::list< ModuleType > | modules () const |
size_t | moduleEDOffset (const uint8_t &id) const |
size_t | moduleCOORDOffset (const uint8_t &id) const |
SensorData | parseMessage (const std::vector< uint8_t > &data, DeviceID deviceID) const |
Public Member Functions inherited from BeeeOn::Loggable | |
Loggable (const ClassInfo &info) | |
Loggable (const std::type_info &info) | |
Static Public Member Functions | |
static double | extractValue (const std::vector< uint8_t > &values) |
static double | voltsToPercentage (double milivolts) |
static double | moduleValue (uint8_t id, const std::vector< uint8_t > &data) |
static ModuleID | deriveEDModuleID (const uint8_t id) |
static ModuleID | deriveCOORDModuleID (const uint8_t id) |
Static Public Member Functions inherited from BeeeOn::Loggable | |
static Poco::Logger & | forMethod (const char *name) |
static Poco::Logger & | forClass (const ClassInfo &info) |
static Poco::Logger & | forClass (const std::type_info &info) |
template<typename T > | |
static Poco::Logger & | forInstance (const T *i) |
static void | configureSimple (Poco::Logger &logger, const std::string &level) |
static void | logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line) |
Additional Inherited Members | |
Protected Member Functions inherited from BeeeOn::Loggable | |
void | setupLogger (Poco::Logger *logger=0) const |
Poco::Logger & | logger () const |
Keeps information about devices that are paired within the BeeeOn system.
|
static |
Returns coordinator (COORD) module ID.
|
static |
Returns end device (ED) module ID.
|
static |
Returns module value.
size_t FitpDevice::moduleCOORDOffset | ( | const uint8_t & | id | ) | const |
Returns count of bytes that has to be skipped in case of coordinator.
size_t FitpDevice::moduleEDOffset | ( | const uint8_t & | id | ) | const |
Returns count of bytes that has to be skipped in case of end device.
list< ModuleType > FitpDevice::modules | ( | ) | const |
Returns module types of device. ED - battery, inner temperature, outer temperature, humidity, RSSI module. COORD - battery, inner temperature, RSSI module.
|
static |
Returns modified module value.
SensorData FitpDevice::parseMessage | ( | const std::vector< uint8_t > & | data, |
DeviceID | deviceID | ||
) | const |
Processes data received from device. It is able to recognize a particular module and its value.