BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Static Public Member Functions
BeeeOn::FitpDevice Class Reference

#include <FitpDevice.h>

Inheritance diagram for BeeeOn::FitpDevice:
BeeeOn::Loggable

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< ModuleTypemodules () 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
 

Detailed Description

Keeps information about devices that are paired within the BeeeOn system.

Member Function Documentation

ModuleID FitpDevice::deriveCOORDModuleID ( const uint8_t  id)
static

Returns coordinator (COORD) module ID.

ModuleID FitpDevice::deriveEDModuleID ( const uint8_t  id)
static

Returns end device (ED) module ID.

double FitpDevice::extractValue ( const std::vector< uint8_t > &  values)
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.

double FitpDevice::moduleValue ( uint8_t  id,
const std::vector< uint8_t > &  data 
)
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.


The documentation for this class was generated from the following files: