|
LRAUV
revA
|
Defines a LogWriter that generates a text table of values. More...
#include <TextTableLogWriter.h>


Public Member Functions | |
| TextTableLogWriter (const char *separator, int varCount, char **varList, char **unitList, bool hideUnits=false, bool interpolate=false) | |
| Constructor. More... | |
| virtual | ~TextTableLogWriter () |
| Destructor. More... | |
| unsigned int | writeHeader () |
| Write the log header, if any. More... | |
| unsigned int | writeFooter () |
| Write the log footer, if any. More... | |
Public Member Functions inherited from TableLogWriter | |
| TableLogWriter (int varCount, char **varList, char **unitList, bool interpolate) | |
| Constructor. More... | |
| TableLogWriter (LogWriter *outputTo, int varCount, char **varList, char **unitList, bool interpolate) | |
| Constructor. More... | |
| virtual | ~TableLogWriter () |
| Destructor. More... | |
| virtual unsigned int | write (const LogEntry *entry, const Unit *unit=NULL) |
| Write an entry to the text log. More... | |
| virtual unsigned int | writeAllInterpolated () |
| virtual void | resetInputs () |
| Reset cached input settings. More... | |
Public Member Functions inherited from LogWriter | |
| virtual | ~LogWriter () |
| Destructor. More... | |
| virtual void | setOutStream (OutStream &outStream) |
| Sets the OutStream. More... | |
| virtual bool | isValid () |
| Return true if logStream_ is available. More... | |
| virtual void | endCycle () |
| Do what needs to be done at the end of the cycle. More... | |
| virtual void | config (Logger &logger) |
| Configure from a config file. More... | |
| void | addParent () |
| void | removeParent () |
| int | getParentCount () |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual bool | isActive () |
| virtual void | lockWrites () |
| virtual void | unlockWrites () |
Private Member Functions | |
| TextTableLogWriter (const TextTableLogWriter &old) | |
| void | initializeTextTableLogWriter () |
| unsigned int | writeRow () |
| unsigned int | writeToColumn (const DataEntry *dataEntry, const int column) |
Private Attributes | |
| const char * | separator_ |
| bool | hideUnits_ |
| Str * | valueStrings_ |
| char | buf_ [80] |
Additional Inherited Members | |
Public Types inherited from LogWriter | |
| enum | ServiceType { NO_SERVICE = -1, SERVICE_COURIER, SERVICE_EXPRESS, SERVICE_PRIORITY, SERVICE_NORMAL, SERVICE_BULK, SERVICE_COUNT, SERVICE_MULTI } |
Static Public Member Functions inherited from LogWriter | |
| static ServiceType | Str2ServiceType (const char *const serviceTypeStr, int len=-1) |
| static const char * | ServiceType2Str (LogWriter::ServiceType serviceType) |
| static size_t | ServiceType2Strlen (LogWriter::ServiceType serviceType) |
Static Public Attributes inherited from LogWriter | |
| static const char *const | SERVICE_TYPE_STRS [SERVICE_COUNT] |
| static size_t const | SERVICE_TYPE_STRLEN [SERVICE_COUNT] |
Protected Member Functions inherited from TableLogWriter | |
| TableLogWriter (const TableLogWriter &old) | |
| void | initializeTableLogWriter () |
| virtual void | clearRow () |
| virtual unsigned int | writeSyslog (const SyslogEntry *syslogEntry) |
| const DataEntry ** | newDataEntryRow () |
| void | deleteDataEntryRow (const DataEntry **dataEntryRow) |
| unsigned int | writeInterpolated (const LogEntry *logEntry, const int column) |
| unsigned int | writeDataEntryRow (unsigned int row) |
| DataEntry * | interpolateDataEntry (const Timestamp ×tamp, const DataEntry *startEntry, const DataEntry *endEntry) |
| DataEntry * | nanDataEntry (const Timestamp ×tamp, const DataEntry *origEntry) |
Protected Member Functions inherited from LogWriter | |
| LogWriter () | |
| Protected constructor for pure virtual class. More... | |
| LogWriter (OutStream &outStream) | |
| Protected constructor for pure virtual class. More... | |
Protected Attributes inherited from TableLogWriter | |
| LogWriter * | outputTo_ |
| int | varCount_ |
| char ** | varList_ |
| char ** | unitList_ |
| const Unit ** | units_ |
| unsigned short * | uriCodes_ |
| bool * | isUniversal_ |
| int * | codeLookup_ |
| bool | interpolate_ |
| FlexArray< const DataEntry ** > | interpBuffer_ |
| FlexArray< SyslogEntry * > | interpSyslogs_ |
| FlexArray< Timestamp * > | interpTimes_ |
| FlexArray< const True * > | readerColumn_ |
| Timestamp | lastTime_ |
| bool | initializedTableLogWriter_ |
| unsigned int | slateElementURICount_ |
| bool | deleteLists_ |
Protected Attributes inherited from LogWriter | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
Static Protected Attributes inherited from TableLogWriter | |
| static True | True_ |
Defines a LogWriter that generates a text table of values.
A list of variable names is supplied to the constructor. If any of these variables change their value in a computation cycle, then a new line is added to the text table listing the current value of every variable.
See FileLogWriter for output to the filesystem.
| TextTableLogWriter::TextTableLogWriter | ( | const char * | separator, |
| int | varCount, | ||
| char ** | varList, | ||
| char ** | unitList, | ||
| bool | hideUnits = false, |
||
| bool | interpolate = false |
||
| ) |
Constructor.
References Str::append(), initializeTextTableLogWriter(), valueStrings_, and TableLogWriter::varCount_.
|
virtual |
Destructor.
References valueStrings_.
|
private |
|
private |
References buf_.
Referenced by TextTableLogWriter().
|
virtual |
Write the log footer, if any.
Reimplemented from TableLogWriter.
References TableLogWriter::writeFooter(), writeRow(), and LogWriter::wroteFooter_.
|
virtual |
Write the log header, if any.
Reimplemented from TableLogWriter.
References OutStream::bytesWritten(), LogWriter::isValid(), LogWriter::logStream_, separator_, TableLogWriter::varCount_, TableLogWriter::varList_, OutStream::write(), and OutStream::writeChar().
|
privatevirtual |
Reimplemented from TableLogWriter.
References Timestamp::asDouble(), buf_, OutStream::bytesWritten(), LogWriter::isValid(), TableLogWriter::lastTime_, LogWriter::logStream_, separator_, Timestamp::toString(), valueStrings_, TableLogWriter::varCount_, OutStream::write(), and OutStream::writeChar().
Referenced by writeFooter().
|
privatevirtual |
Reimplemented from TableLogWriter.
References DataEntry::getDataValueString(), hideUnits_, TableLogWriter::units_, and valueStrings_.
|
private |
Referenced by initializeTextTableLogWriter(), and writeRow().
|
private |
Referenced by writeToColumn().
|
private |
Referenced by writeHeader(), and writeRow().
|
private |
Referenced by TextTableLogWriter(), writeRow(), writeToColumn(), and ~TextTableLogWriter().