|
LRAUV
revA
|
Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the filesystem. More...
#include <BinaryLogWriter.h>


Public Member Functions | |
| BinaryLogWriter (bool withDirectory=false) | |
| Default Constructor Assumes that the stream will be assigned later via setOutStream() More... | |
| BinaryLogWriter (OutStream &stream, bool withDirectory=false) | |
| Constructor, takes an OutStream. More... | |
| virtual | ~BinaryLogWriter () |
| Destructor. More... | |
| virtual unsigned int | writeHeader () |
| Start the binary log. More... | |
| virtual unsigned int | write (const LogEntry *entry, const Unit *unit=NULL) |
| Write an entry to the log. More... | |
| virtual void | resetTimeBase () |
| Calling this resets the time base to "zero". 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 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 () |
Protected Attributes | |
| Timestamp | timeBase_ |
| Start of the cycle time. More... | |
| bool | withDirectory_ |
Protected Attributes inherited from LogWriter | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
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 LogWriter | |
| LogWriter () | |
| Protected constructor for pure virtual class. More... | |
| LogWriter (OutStream &outStream) | |
| Protected constructor for pure virtual class. More... | |
Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the filesystem.
| BinaryLogWriter::BinaryLogWriter | ( | bool | withDirectory = false | ) |
Default Constructor Assumes that the stream will be assigned later via setOutStream()
| withDirectory | If true, include DirectoryEntry entries. |
| BinaryLogWriter::BinaryLogWriter | ( | OutStream & | stream, |
| bool | withDirectory = false |
||
| ) |
Constructor, takes an OutStream.
| stream | An OutStream for output. |
| withDirectory | If true, include DirectoryEntry entries. |
|
virtual |
Destructor.
|
inlinevirtual |
Calling this resets the time base to "zero".
References Timestamp::NOT_SET_TIME, and timeBase_.
Referenced by Supervisor::RestartLogs().
Write an entry to the log.
This does not actually change units, since binary logs are always in the base unit.
| entry | The LogEntry to write/serialize |
| unit | optional unit to express the value in |
Implements LogWriter.
References LogWriter::logStream_, timeBase_, LogEntry::write(), and LogWriter::writeMutex_.
|
virtual |
Start the binary log.
Reimplemented from LogWriter.
Reimplemented in DirectoryLogWriter.
References OutStream::isWritable(), LogWriter::logStream_, timeBase_, withDirectory_, and DirectoryEntry::write().
Referenced by DirectoryLogWriter::writeHeader().
|
protected |
Start of the cycle time.
Referenced by resetTimeBase(), write(), and writeHeader().
|
protected |
Referenced by writeHeader().