LRAUV  revA
TextTableLogWriter Class Reference

Defines a LogWriter that generates a text table of values. More...

#include <TextTableLogWriter.h>

Inheritance diagram for TextTableLogWriter:
Collaboration diagram for TextTableLogWriter:

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_
 
StrvalueStrings_
 
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)
 
DataEntryinterpolateDataEntry (const Timestamp &timestamp, const DataEntry *startEntry, const DataEntry *endEntry)
 
DataEntrynanDataEntry (const Timestamp &timestamp, 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
LogWriteroutputTo_
 
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
OutStreamlogStream_
 Stores an OutStream. More...
 
bool wroteHeader_
 
bool wroteFooter_
 
Mutex writeMutex_
 
int parentCount_
 
bool active_
 
- Static Protected Attributes inherited from TableLogWriter
static True True_
 

Detailed Description

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.

Constructor & Destructor Documentation

TextTableLogWriter::TextTableLogWriter ( const char *  separator,
int  varCount,
char **  varList,
char **  unitList,
bool  hideUnits = false,
bool  interpolate = false 
)
TextTableLogWriter::~TextTableLogWriter ( )
virtual

Destructor.

References valueStrings_.

TextTableLogWriter::TextTableLogWriter ( const TextTableLogWriter old)
private

Member Function Documentation

void TextTableLogWriter::initializeTextTableLogWriter ( )
private

References buf_.

Referenced by TextTableLogWriter().

unsigned int TextTableLogWriter::writeFooter ( )
virtual

Write the log footer, if any.

Reimplemented from TableLogWriter.

References TableLogWriter::writeFooter(), writeRow(), and LogWriter::wroteFooter_.

unsigned int TextTableLogWriter::writeHeader ( )
virtual
unsigned int TextTableLogWriter::writeToColumn ( const DataEntry dataEntry,
const int  column 
)
privatevirtual

Member Data Documentation

char TextTableLogWriter::buf_[80]
private
bool TextTableLogWriter::hideUnits_
private

Referenced by writeToColumn().

const char* TextTableLogWriter::separator_
private

Referenced by writeHeader(), and writeRow().

Str* TextTableLogWriter::valueStrings_
private

The documentation for this class was generated from the following files: