Fledge
An open source edge computing platform for industrial users
Datapoint Class Reference

Name and value pair used to represent a data value within an asset reading. More...

#include <datapoint.h>

Public Member Functions

 Datapoint (const std::string &name, DatapointValue &value)
 Construct with a data point value.
 
std::string toJSONProperty ()
 Return asset reading data point as a JSON property that can be included within a JSON document.
 
const std::string getName () const
 Return the Datapoint name.
 
void setName (std::string name)
 Rename the datapoint.
 
const DatapointValue getData () const
 Return Datapoint value.
 
DatapointValuegetData ()
 Return reference to Datapoint value.
 
std::vector< Datapoint * > * parseJson (const std::string &json)
 Parse a json string and generates a corresponding datapoint vector. More...
 
std::vector< Datapoint * > * recursiveJson (const rapidjson::Value &document)
 Recursive method to convert a JSON string to a datapoint. More...
 

Detailed Description

Name and value pair used to represent a data value within an asset reading.

Member Function Documentation

◆ parseJson()

std::vector< Datapoint * > * Datapoint::parseJson ( const std::string &  json)

Parse a json string and generates a corresponding datapoint vector.

Parsing a Json string.

Parameters
json: string json
Returns
vector of datapoints

◆ recursiveJson()

std::vector< Datapoint * > * Datapoint::recursiveJson ( const rapidjson::Value &  document)

Recursive method to convert a JSON string to a datapoint.

Parameters
document: object rapidjon
Returns
vector of datapoints

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