LRAUV  revA
DecimationLogWriter Class Reference

Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...

#include <DecimationLogWriter.h>

Inheritance diagram for DecimationLogWriter:
Collaboration diagram for DecimationLogWriter:

Public Types

enum  DecimationType {
  UNDEFINED_DECIMATION = -1, NO_DECIMATION, ALL_DATA, LINEAR_APPROXIMATION,
  MOST_RECENT, DECIMATION_COUNT, DECIMATION_MULTI
}
 
- Public Types inherited from LogWriter
enum  ServiceType {
  NO_SERVICE = -1, SERVICE_COURIER, SERVICE_EXPRESS, SERVICE_PRIORITY,
  SERVICE_NORMAL, SERVICE_BULK, SERVICE_COUNT, SERVICE_MULTI
}
 

Public Member Functions

 DecimationLogWriter (LogWriter &outputTo, DecimationType decimationType)
 Constructor. More...
 
virtual ~DecimationLogWriter ()
 Destructor. More...
 
DecimationType getDecimationType () const
 
virtual void setParameter (DataValue *parameter, Logger &logger)
 
virtual unsigned int flush ()
 
- Public Member Functions inherited from LogWriter
virtual ~LogWriter ()
 Destructor. More...
 
virtual unsigned int writeHeader ()
 Write the log header, if any. More...
 
virtual void setOutStream (OutStream &outStream)
 Sets the OutStream. More...
 
virtual bool isValid ()
 Return true if logStream_ is available. More...
 
virtual unsigned int write (const LogEntry *entry, const Unit *unit=NULL)=0
 Write the given LogEntry - should lock the writeMutex_. More...
 
virtual void endCycle ()
 Do what needs to be done at the end of the cycle. More...
 
virtual unsigned int writeFooter ()
 Write the log footer, if any. More...
 
virtual void config (Logger &logger)
 Configure from a config file. More...
 
virtual void resetInputs ()
 Reset cached input settings. More...
 
void addParent ()
 
void removeParent ()
 
int getParentCount ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual bool isActive ()
 
virtual void lockWrites ()
 
virtual void unlockWrites ()
 

Static Public Member Functions

static const char * DecimationType2Str (DecimationLogWriter::DecimationType decimationType)
 
static DecimationType Str2DecimationType (const char *const typeStr, int len=-1)
 
- 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

static const char *const DECIMATION_TYPE_STRS [DECIMATION_COUNT]
 
static const size_t DECIMATION_TYPE_STRLEN [DECIMATION_COUNT]
 
- 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 Attributes

LogWriteroutputTo_
 Stores an LogWriter. More...
 
DecimationType decimationType_
 Stores the decimationType. More...
 
- Protected Attributes inherited from LogWriter
OutStreamlogStream_
 Stores an OutStream. More...
 
bool wroteHeader_
 
bool wroteFooter_
 
Mutex writeMutex_
 
int parentCount_
 
bool active_
 

Private Member Functions

 DecimationLogWriter (const DecimationLogWriter &old)
 

Additional Inherited Members

- Protected Member Functions inherited from LogWriter
 LogWriter ()
 Protected constructor for pure virtual class. More...
 
 LogWriter (OutStream &outStream)
 Protected constructor for pure virtual class. More...
 

Detailed Description

Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc.

Constructor & Destructor Documentation

DecimationLogWriter::DecimationLogWriter ( LogWriter outputTo,
DecimationType  decimationType 
)
inline

Constructor.

virtual DecimationLogWriter::~DecimationLogWriter ( )
inlinevirtual

Destructor.

DecimationLogWriter::DecimationLogWriter ( const DecimationLogWriter old)
private

Member Function Documentation

const char * DecimationLogWriter::DecimationType2Str ( DecimationLogWriter::DecimationType  decimationType)
static
virtual unsigned int DecimationLogWriter::flush ( )
inlinevirtual

Reimplemented in LinearApproxLogWriter, and MostRecentLogWriter.

Referenced by MultiLogWriter::flush().

DecimationType DecimationLogWriter::getDecimationType ( ) const
inline
virtual void DecimationLogWriter::setParameter ( DataValue parameter,
Logger logger 
)
inlinevirtual

Reimplemented in LinearApproxLogWriter.

Referenced by DecimationLogManager::configLog().

DecimationLogWriter::DecimationType DecimationLogWriter::Str2DecimationType ( const char *const  typeStr,
int  len = -1 
)
static

Member Data Documentation

const size_t DecimationLogWriter::DECIMATION_TYPE_STRLEN
static
Initial value:
=
{
4,
3,
19,
10,
}

Referenced by Str2DecimationType().

const char *const DecimationLogWriter::DECIMATION_TYPE_STRS
static
Initial value:
=
{
"none",
"all",
"linearApproximation",
"mostRecent",
}

Referenced by DecimationType2Str(), and Str2DecimationType().

DecimationType DecimationLogWriter::decimationType_
protected

Stores the decimationType.

Referenced by getDecimationType().


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