#include <DataJSON.h>
Public Member Functions | |
bool | DataToStringJSON (const p_data_hdr_t &hdr, const uint8_t *buf, string &json) |
bool | StringJSONToData (string &s, p_data_hdr_t &hdr, uint8_t *buf, uint32_t bufSize) |
int | WriteDataToFile (cISLogFileBase *pFile, const p_data_hdr_t &dataHdr, const uint8_t *dataBuf, const char *prefix) |
Definition at line 42 of file DataJSON.h.
bool cDataJSON::DataToStringJSON | ( | const p_data_hdr_t & | hdr, |
const uint8_t * | buf, | ||
string & | json | ||
) |
Convert data to a json string buf is assumed to be large enough to hold the data structure json filled with json data return true if success, false if no map found
Definition at line 134 of file DataJSON.cpp.
bool cDataJSON::StringJSONToData | ( | string & | s, |
p_data_hdr_t & | hdr, | ||
uint8_t * | buf, | ||
uint32_t | bufSize | ||
) |
Parse a json string into a data packet data needs the id set to the proper data id buf memory to fill with data bufSize size of available memory in buf order id contains the value for ordering data returns true if success, false if no map found
Definition at line 59 of file DataJSON.cpp.
int cDataJSON::WriteDataToFile | ( | cISLogFileBase * | pFile, |
const p_data_hdr_t & | dataHdr, | ||
const uint8_t * | dataBuf, | ||
const char * | prefix | ||
) |
Definition at line 38 of file DataJSON.cpp.