11 #ifndef JSONLOGWRITER_H_
12 #define JSONLOGWRITER_H_
18 #include "../Lib/cJSON/cJSON.h"
33 JsonLogWriter(
bool formatted,
int varCount,
char** varList,
char** unitList,
34 int attCount = 0,
char** attList = NULL );
68 short universalCode );
Defines a LogWriter that generates a text table of values.
Definition: FilterLogWriter.h:32
cJSON ** vars_
Definition: JsonLogWriter.h:77
BinaryDataType
These are binary type identifiers for serializing and unserializing The syntax below handles up to 16...
Definition: BinaryDataType.h:39
cJSON * json_
Definition: JsonLogWriter.h:73
void setAttValue(const DataEntry *dataEntry, const int attIndex)
Set an attribute value.
bool formatted_
Definition: JsonLogWriter.h:76
JsonLogWriter(bool formatted, int varCount, char **varList, char **unitList, int attCount=0, char **attList=NULL)
Constructor.
Definition: JsonLogWriter.cpp:28
virtual unsigned int writeAtt(const DataEntry *dataEntry, int index, const Unit *unit)
Definition: JsonLogWriter.cpp:173
const Unit ** units_
Definition: JsonLogWriter.h:79
A DataValue is an abstract base class for a data value and associated engineering units of the value...
Definition: DataValue.h:35
virtual unsigned int writeData(const DataEntry *dataEntry, int index, const Unit *unit)
Definition: JsonLogWriter.cpp:95
const ElementURI ** uris_
Definition: JsonLogWriter.h:80
One "entry" in a LogQueue.
Definition: LogEntry.h:33
Code unit that represents an atomic unit of data destined for writing in the log file.
Definition: DataEntry.h:43
virtual ~JsonLogWriter()
Destructor.
Definition: JsonLogWriter.cpp:50
cJSON ** timeVars_
Definition: JsonLogWriter.h:78
unsigned int writeHeader()
Start writing the Json file.
Definition: JsonLogWriter.cpp:63
Simple Interface that contains getFilename() function.
Contains the FilterLogWriter class definition.
void addVar(const int index, const ElementURI *uri, BinaryDataType binaryType, const Unit &unit, short universalCode)
Add a new variable.
Definition: JsonLogWriter.cpp:270
bool finalized_
Definition: JsonLogWriter.h:75
Contains the BinaryDataType enumeration.
Defines a LogWriter that generates a JSON table of values.
Definition: JsonLogWriter.h:28
void initializeJsonLogWriter()
Initialize variables, etc.
Definition: JsonLogWriter.cpp:219
Code unit that represents a unique name for a DataElement.
Definition: ElementURI.h:27
bool jsonLogWriterInitialized_
Definition: JsonLogWriter.h:74
unsigned int writeFooter()
Finish writing the Json file.
Definition: JsonLogWriter.cpp:178
unsigned int write(const LogEntry *entry, const Unit *unit=NULL)
Write an entry to the buffer.
Definition: JsonLogWriter.cpp:68
Code that represents an engineering unit.
Definition: Unit.h:24