1 #ifndef OMFLINKEDDATA_H 2 #define OMFLINKEDDATA_H 17 #include <omfbuffer.h> 18 #include <linkedlookup.h> 41 OMFLinkedData( std::unordered_map<std::string, LALookup> *linkedAssetState,
42 const OMF_ENDPOINT PIServerEndpoint = ENDPOINT_CR) :
43 m_linkedAssetState(linkedAssetState),
44 m_endpoint(PIServerEndpoint),
45 m_doubleFormat(
"float64"),
46 m_integerFormat(
"int64")
49 const std::string& DefaultAFLocation = std::string(),
51 void buildLookup(
const std::vector<Reading *>& reading);
52 void setSendFullStructure(
const bool sendFullStructure) {m_sendFullStructure = sendFullStructure;};
54 void setDelimiter(
const std::string &delimiter) {m_delimiter = delimiter;};
55 void setFormats(
const std::string& doubleFormat,
const std::string& integerFormat)
57 m_doubleFormat = doubleFormat;
58 m_integerFormat = integerFormat;
61 std::string getBaseType(
Datapoint *dp,
const std::string& format);
62 void sendContainer(std::string& link,
Datapoint *dp,
OMFHints * hints,
const std::string& baseType);
67 case DatapointValue::DatapointTag::T_FLOAT:
68 case DatapointValue::DatapointTag::T_INTEGER:
69 case DatapointValue::DatapointTag::T_STRING:
77 bool m_sendFullStructure;
78 std::string m_delimiter;
86 std::unordered_map<std::string, LALookup> *m_linkedAssetState;
91 OMF_ENDPOINT m_endpoint;
97 std::string m_containers;
98 std::set<std::string> m_containerNames;
99 std::string m_doubleFormat;
100 std::string m_integerFormat;
An encapsulation of an error return from an OMF call.
Definition: omferror.h:21
void buildLookup(const std::vector< Reading *> &reading)
If the entries are needed in the lookup table for this block of readings then create them...
Definition: linkdata.cpp:279
The OMFLinkedData class.
Definition: omflinkeddata.h:38
Name and value pair used to represent a data value within an asset reading.
Definition: datapoint.h:310
dataTagType getType() const
Return the Tag type.
Definition: datapoint.h:226
bool processReading(OMFBuffer &payload, bool needDelim, const Reading &reading, const std::string &DefaultAFLocation=std::string(), OMFHints *hints=NULL)
OMFLinkedData constructor, generates the OMF message containing the data.
Definition: linkdata.cpp:72
A set of hints for a reading.
Definition: OMFHint.h:151
An asset reading represented as a class.
Definition: reading.h:33
Class to hold an actual reading value.
Definition: datapoint.h:30
Definition: http_sender.h:20
Buffer class designed to hold OMF payloads that can grow as required but have minimal copy semantics...
Definition: omfbuffer.h:24
bool flushContainers(HttpSender &sender, const std::string &path, std::vector< std::pair< std::string, std::string > > &header, OMFError &error, bool *isConnected)
Flush the container definitions that have been built up.
Definition: linkdata.cpp:501