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


Classes | |
| class | True |
Public Member Functions | |
| 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 | writeHeader () |
| Write the log header, if any. More... | |
| virtual unsigned int | writeAllInterpolated () |
| virtual unsigned int | writeFooter () |
| Write the log footer, if any. More... | |
| 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 () |
Protected Member Functions | |
| TableLogWriter (const TableLogWriter &old) | |
| void | initializeTableLogWriter () |
| virtual void | clearRow () |
| virtual unsigned int | writeRow () |
| virtual unsigned int | writeSyslog (const SyslogEntry *syslogEntry) |
| virtual unsigned int | writeToColumn (const DataEntry *dataEntry, const int column) |
| 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 | |
| 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 | |
| static True | True_ |
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] |
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.
| TableLogWriter::TableLogWriter | ( | int | varCount, |
| char ** | varList, | ||
| char ** | unitList, | ||
| bool | interpolate | ||
| ) |
Constructor.
References resetInputs().
| TableLogWriter::TableLogWriter | ( | LogWriter * | outputTo, |
| int | varCount, | ||
| char ** | varList, | ||
| char ** | unitList, | ||
| bool | interpolate | ||
| ) |
Constructor.
References LogWriter::addParent(), outputTo_, and resetInputs().
|
virtual |
Destructor.
References codeLookup_, deleteDataEntryRow(), deleteLists_, LogWriter::getParentCount(), interpBuffer_, isUniversal_, outputTo_, LogWriter::removeParent(), FlexArrayBase::size(), unitList_, units_, uriCodes_, varCount_, varList_, and LogWriter::writeFooter().
|
protected |
|
protectedvirtual |
Reimplemented in NetCdfTableLogWriter.
Referenced by write().
|
protected |
References varCount_.
Referenced by writeDataEntryRow(), and ~TableLogWriter().
|
protected |
References codeLookup_, UnitRegistry::FindUnit(), Slate::GetElementURI(), Slate::GetElementURICode(), Slate::GetElementURICount(), initializedTableLogWriter_, Slate::IsDirectoryRead(), ElementURI::isUniversal(), isUniversal_, ElementURI::NO_CODE, slateElementURICount_, unitList_, units_, uriCodes_, varCount_, and varList_.
Referenced by write(), and NetCdfTableLogWriter::write().
|
protected |
References Timestamp::asDouble(), DataValue::copyTo(), DataEntry::getDataAccess(), DataEntry::getDataValue(), DataAccess::getNoInterpFlag(), LogEntry::getTimestamp(), DataValue::getUnit(), AuvMath::Interpolate1D(), DataValue::setFrom(), and LogEntry::setTimestamp().
Referenced by writeInterpolated().
|
protected |
References DataEntry::getDataValue(), DataValue::getUnit(), DataValue::setFrom(), and LogEntry::setTimestamp().
Referenced by writeInterpolated().
|
protected |
References varCount_.
Referenced by writeInterpolated().
|
virtual |
Reset cached input settings.
Reimplemented from LogWriter.
References codeLookup_, initializedTableLogWriter_, isUniversal_, ElementURI::NO_CODE, ElementURI::NUM_CODES, outputTo_, LogWriter::resetInputs(), slateElementURICount_, units_, uriCodes_, varCount_, and writeAllInterpolated().
Referenced by TableLogWriter().
Write an entry to the text log.
Write the given Entry to the OutStream.
Pipes the toString() method of the entry to the OutStream with some formatting.
Implements LogWriter.
Reimplemented in NetCdfTableLogWriter.
References clearRow(), codeLookup_, LogEntry::DATA_LOG_ENTRY, LogEntry::EVENT_LOG_ENTRY, DataEntry::getDataAccess(), DataAccess::getElementCode(), Slate::GetElementURICount(), EventEntry::getEventType(), LogEntry::getTimestamp(), LogEntry::getType(), DataAccess::getUniversalCode(), initializedTableLogWriter_, initializeTableLogWriter(), interpolate_, DataEntry::isBest(), lastTime_, ElementURI::NO_CODE, Timestamp::NOT_SET_TIME, ElementURI::SELF_CODE, slateElementURICount_, EventEntry::START_CYCLE, LogEntry::SYSLOG_LOG_ENTRY, writeInterpolated(), LogWriter::writeMutex_, writeRow(), writeSyslog(), and writeToColumn().
Referenced by NetCdfTableLogWriter::write().
|
virtual |
References interpBuffer_, interpolate_, FlexArrayBase::size(), and writeDataEntryRow().
Referenced by resetInputs(), and writeFooter().
|
protected |
References deleteDataEntryRow(), interpBuffer_, interpSyslogs_, interpTimes_, lastTime_, FlexArray< T >::pop(), readerColumn_, True_, varCount_, writeRow(), writeSyslog(), and writeToColumn().
Referenced by writeAllInterpolated(), and writeInterpolated().
|
virtual |
Write the log footer, if any.
Reimplemented from LogWriter.
Reimplemented in LinearApproximationLogWriter, NetCdfTableLogWriter, and TextTableLogWriter.
References outputTo_, writeAllInterpolated(), and LogWriter::writeFooter().
Referenced by TextTableLogWriter::writeFooter(), and NetCdfTableLogWriter::writeFooter().
|
virtual |
Write the log header, if any.
Reimplemented from LogWriter.
Reimplemented in LinearApproximationLogWriter, NetCdfTableLogWriter, and TextTableLogWriter.
References outputTo_, and LogWriter::writeHeader().
|
protected |
References LogEntry::DATA_LOG_ENTRY, LogEntry::getTimestamp(), LogEntry::getType(), FlexArray< T >::insert(), interpBuffer_, interpolateDataEntry(), interpSyslogs_, interpTimes_, lastTime_, nanDataEntry(), newDataEntryRow(), FlexArray< T >::push(), readerColumn_, FlexArrayBase::size(), LogEntry::SYSLOG_LOG_ENTRY, True_, varCount_, and writeDataEntryRow().
Referenced by write().
|
protectedvirtual |
Reimplemented in LinearApproximationLogWriter, NetCdfTableLogWriter, and TextTableLogWriter.
References lastTime_, outputTo_, LogEntry::setTimestamp(), EventEntry::START_CYCLE, and LogWriter::write().
Referenced by write(), and writeDataEntryRow().
|
protectedvirtual |
Reimplemented in LinearApproximationLogWriter.
References outputTo_, and LogWriter::write().
Referenced by write(), and writeDataEntryRow().
|
protectedvirtual |
Reimplemented in LinearApproximationLogWriter, NetCdfTableLogWriter, and TextTableLogWriter.
References outputTo_, and LogWriter::write().
Referenced by write(), and writeDataEntryRow().
|
protected |
Referenced by initializeTableLogWriter(), resetInputs(), write(), and ~TableLogWriter().
|
protected |
Referenced by LinearApproximationLogWriter::~LinearApproximationLogWriter(), and ~TableLogWriter().
|
protected |
Referenced by writeAllInterpolated(), writeDataEntryRow(), writeInterpolated(), and ~TableLogWriter().
|
protected |
Referenced by write(), and writeAllInterpolated().
|
protected |
Referenced by writeDataEntryRow(), and writeInterpolated().
Referenced by writeDataEntryRow(), and writeInterpolated().
|
protected |
|
protected |
|
protected |
Referenced by LinearApproximationLogWriter::config(), LinearApproximationLogWriter::endCycle(), LinearApproximationLogWriter::forceWrite(), resetInputs(), LinearApproximationLogWriter::sendOutput(), TableLogWriter(), writeFooter(), writeHeader(), LinearApproximationLogWriter::writeHeader(), writeRow(), LinearApproximationLogWriter::writeRow(), writeSyslog(), LinearApproximationLogWriter::writeSyslog(), writeToColumn(), and ~TableLogWriter().
Referenced by writeDataEntryRow(), and writeInterpolated().
|
protected |
Referenced by initializeTableLogWriter(), resetInputs(), write(), and NetCdfTableLogWriter::write().
|
staticprotected |
Referenced by writeDataEntryRow(), and writeInterpolated().
|
protected |
Referenced by initializeTableLogWriter(), and ~TableLogWriter().
|
protected |
|
protected |
|
protected |
Referenced by deleteDataEntryRow(), LinearApproximationLogWriter::forceWriteRow(), initializeTableLogWriter(), NetCdfTableLogWriter::netCdfInitialize(), NetCdfTableLogWriter::NetCdfTableLogWriter(), newDataEntryRow(), LinearApproximationLogWriter::preInitialize(), LinearApproximationLogWriter::resetDirectoryEntries(), resetInputs(), TextTableLogWriter::TextTableLogWriter(), writeDataEntryRow(), NetCdfTableLogWriter::writeFooter(), TextTableLogWriter::writeHeader(), writeInterpolated(), TextTableLogWriter::writeRow(), LinearApproximationLogWriter::writeRow(), LinearApproximationLogWriter::~LinearApproximationLogWriter(), and ~TableLogWriter().
|
protected |