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


Public Member Functions | |
| FilterLogWriter (LogWriter *outputTo, int varCount, char **varList, char **unitList, bool passCycleStarts, int attCount=0, char **attList=NULL) | |
| Constructor. More... | |
| virtual | ~FilterLogWriter () |
| Destructor. More... | |
| virtual unsigned int | writeHeader () |
| Write header – passed to outputTo_. More... | |
| virtual unsigned int | write (const LogEntry *entry, const Unit *unit=NULL) |
| Write an entry to the text log. 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... | |
| virtual unsigned int | writeFooter () |
| Write footer – passed to outputTo_. 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... | |
| void | addParent () |
| void | removeParent () |
| int | getParentCount () |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual bool | isActive () |
| virtual void | lockWrites () |
| virtual void | unlockWrites () |
Protected Member Functions | |
| virtual void | resetInputs () |
| Reset cached input settings. More... | |
| void | initializeFilterLogWriter () |
| virtual unsigned int | writeCycleStart (const EventEntry *eventEntry) |
| virtual unsigned int | writeData (const DataEntry *dataEntry, int index, const Unit *unit=NULL) |
| virtual unsigned int | writeAtt (const DataEntry *dataEntry, int index, const Unit *unit=NULL) |
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_ |
| bool | passCycleStarts_ |
| int | attCount_ |
| char ** | attList_ |
| unsigned short * | uriCodes_ |
| int * | codeLookup_ |
| unsigned short * | attUriCodes_ |
| int * | attCodeLookup_ |
| bool * | isUniversal_ |
| Timestamp | lastTime_ |
| bool | initializedFilterLogWriter_ |
| unsigned int | slateElementURICount_ |
Protected Attributes inherited from LogWriter | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
Private Member Functions | |
| FilterLogWriter (const FilterLogWriter &old) | |
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.
| FilterLogWriter::FilterLogWriter | ( | LogWriter * | outputTo, |
| int | varCount, | ||
| char ** | varList, | ||
| char ** | unitList, | ||
| bool | passCycleStarts, | ||
| int | attCount = 0, |
||
| char ** | attList = NULL |
||
| ) |
|
virtual |
Destructor.
References attCodeLookup_, attUriCodes_, codeLookup_, LogWriter::getParentCount(), isUniversal_, outputTo_, LogWriter::removeParent(), units_, and uriCodes_.
|
private |
|
inlinevirtual |
Configure from a config file.
Reimplemented from LogWriter.
References LogWriter::config(), and outputTo_.
|
inlinevirtual |
Do what needs to be done at the end of the cycle.
Reimplemented from LogWriter.
References LogWriter::endCycle(), and outputTo_.
|
protected |
References attCodeLookup_, attCount_, attList_, attUriCodes_, codeLookup_, UnitRegistry::FindUnit(), Slate::GetElementURI(), Slate::GetElementURICode(), Slate::GetElementURICount(), initializedFilterLogWriter_, Slate::IsDirectoryRead(), ElementURI::isUniversal(), isUniversal_, ElementURI::NO_CODE, slateElementURICount_, unitList_, units_, uriCodes_, varCount_, and varList_.
Referenced by JsonLogWriter::write(), write(), NetCdfLogWriter::write(), and HDF5LogWriter::write().
|
protectedvirtual |
Reset cached input settings.
Reimplemented from LogWriter.
References attCodeLookup_, attCount_, attUriCodes_, codeLookup_, isUniversal_, ElementURI::NO_CODE, ElementURI::NUM_CODES, outputTo_, LogWriter::resetInputs(), units_, uriCodes_, and varCount_.
Referenced by FilterLogWriter().
Write an entry to the text log.
Filter the given Entry.
Implements LogWriter.
Reimplemented in HDF5LogWriter, NetCdfLogWriter, and JsonLogWriter.
References attCodeLookup_, codeLookup_, LogEntry::DATA_LOG_ENTRY, LogEntry::EVENT_LOG_ENTRY, DataEntry::getDataAccess(), DataAccess::getElementCode(), Slate::GetElementURICount(), EventEntry::getEventType(), LogEntry::getTimestamp(), LogEntry::getType(), DataAccess::getUniversalCode(), initializedFilterLogWriter_, initializeFilterLogWriter(), DataEntry::isBest(), lastTime_, ElementURI::NO_CODE, Timestamp::NOT_SET_TIME, passCycleStarts_, slateElementURICount_, EventEntry::START_CYCLE, units_, writeAtt(), writeCycleStart(), writeData(), and LogWriter::writeMutex_.
Referenced by JsonLogWriter::write(), NetCdfLogWriter::write(), and HDF5LogWriter::write().
|
protectedvirtual |
Reimplemented in HDF5LogWriter, NetCdfLogWriter, and JsonLogWriter.
References writeData().
Referenced by write().
|
protectedvirtual |
References outputTo_, and LogWriter::write().
Referenced by write().
|
protectedvirtual |
Reimplemented in HDF5LogWriter, NetCdfLogWriter, and JsonLogWriter.
References outputTo_, and LogWriter::write().
Referenced by write(), and writeAtt().
|
virtual |
Write footer – passed to outputTo_.
Reimplemented from LogWriter.
Reimplemented in HDF5LogWriter, NetCdfLogWriter, and JsonLogWriter.
References outputTo_, and LogWriter::wroteFooter_.
|
virtual |
Write header – passed to outputTo_.
Reimplemented from LogWriter.
Reimplemented in HDF5LogWriter, NetCdfLogWriter, and JsonLogWriter.
References outputTo_.
|
protected |
Referenced by initializeFilterLogWriter(), resetInputs(), write(), and ~FilterLogWriter().
|
protected |
|
protected |
Referenced by initializeFilterLogWriter().
|
protected |
|
protected |
Referenced by initializeFilterLogWriter(), resetInputs(), write(), and ~FilterLogWriter().
|
protected |
|
protected |
|
protected |
Referenced by config(), endCycle(), resetInputs(), writeCycleStart(), writeData(), writeFooter(), writeHeader(), and ~FilterLogWriter().
|
protected |
Referenced by write().
|
protected |
Referenced by initializeFilterLogWriter(), JsonLogWriter::write(), write(), HDF5LogWriter::write(), and NetCdfLogWriter::write().
|
protected |
Referenced by initializeFilterLogWriter().
|
protected |
|
protected |
|
protected |
Referenced by HDF5LogWriter::HDF5LogWriter(), initializeFilterLogWriter(), HDF5LogWriter::initializeHDF5LogWriter(), JsonLogWriter::initializeJsonLogWriter(), JsonLogWriter::JsonLogWriter(), NetCdfLogWriter::netCdfInitialize(), NetCdfLogWriter::NetCdfLogWriter(), resetInputs(), JsonLogWriter::writeAtt(), NetCdfLogWriter::writeAtt(), HDF5LogWriter::writeAtt(), JsonLogWriter::writeFooter(), HDF5LogWriter::writeFooter(), and NetCdfLogWriter::writeFooter().
|
protected |