BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Provides a method to parse SensorData from a string containing JSONObject to a SensorData object. More...
#include <JSONSensorDataParser.h>
Public Member Functions | |
SensorData | parse (const std::string &data) const override |
Additional Inherited Members | |
Public Types inherited from BeeeOn::SensorDataParser | |
typedef Poco::SharedPtr < SensorDataParser > | Ptr |
Provides a method to parse SensorData from a string containing JSONObject to a SensorData object.
Example string:
{"device_id":"0x499602d2","timestamp":150000000000,"data":[{"module_id":5,"value":4.2},{"module_id":4,"value":0.5}]}
would be parsed to a SensorData object with relevant values. It is assumed that the "timestamp" contains epochMicroseconds. When a "value" is null, it is parsed to NaN.
|
overridevirtual |
Convert string representation of SensorData to SensorData object.
Implements BeeeOn::SensorDataParser.