LRAUV  revA
BinaryLogWriter.h
Go to the documentation of this file.
1 
10 #ifndef BINARYLOGWRITER_H_
11 #define BINARYLOGWRITER_H_
12 
13 #include "LogWriter.h"
14 
15 #include "io/OutStream.h"
16 
23 class BinaryLogWriter : public LogWriter
24 {
25 public:
31  BinaryLogWriter( bool withDirectory = false );
32 
38  BinaryLogWriter( OutStream &stream, bool withDirectory = false );
39 
41  virtual ~BinaryLogWriter();
42 
44  virtual unsigned int writeHeader();
45 
51  virtual unsigned int write( const LogEntry *entry, const Unit* unit = NULL );
52 
54  virtual void resetTimeBase()
55  {
57  }
58 
59 protected:
60 
63 
65 
66 };
67 
68 #endif /*BINARYLOGWRITER_H_*/
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: LogWriter.h:25
Contains the LogWriter class definition.
virtual void resetTimeBase()
Calling this resets the time base to "zero".
Definition: BinaryLogWriter.h:54
virtual ~BinaryLogWriter()
Destructor.
Definition: BinaryLogWriter.cpp:37
Timestamp timeBase_
Start of the cycle time.
Definition: BinaryLogWriter.h:62
Contains the OutStream class declaration.
BinaryLogWriter(bool withDirectory=false)
Default Constructor Assumes that the stream will be assigned later via setOutStream() ...
Definition: BinaryLogWriter.cpp:19
One "entry" in a LogQueue.
Definition: LogEntry.h:33
static const Timestamp NOT_SET_TIME
Constant value to represent "no time".
Definition: Timestamp.h:37
bool withDirectory_
Definition: BinaryLogWriter.h:64
Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the...
Definition: BinaryLogWriter.h:23
virtual unsigned int write(const LogEntry *entry, const Unit *unit=NULL)
Write an entry to the log.
Definition: BinaryLogWriter.cpp:54
This is a very abstract class that can be implemented by classes that want to send stream output...
Definition: OutStream.h:41
virtual unsigned int writeHeader()
Start the binary log.
Definition: BinaryLogWriter.cpp:41
Code that represents an engineering unit.
Definition: Unit.h:24
Represents absolute times.
Definition: Timestamp.h:31