LRAUV  revA
BinaryLogReader.h
Go to the documentation of this file.
1 
10 #ifndef BINARYLOGREADER_H_
11 #define BINARYLOGREADER_H_
12 
13 #include "LogReader.h"
14 
15 #include "io/InStream.h"
16 #include "logger/Logger.h"
17 #include "utils/Timestamp.h"
18 
19 class LogEngine;
20 
27 class BinaryLogReader : public LogReader
28 {
29 public:
31  BinaryLogReader( Logger& sysLogger,
32  const Timestamp& startTime = Timestamp::NOT_SET_TIME,
33  const Timestamp& endTime = Timestamp::NOT_SET_TIME,
34  const Str& whileRunningName = Str::EMPTY_STR,
35  LogEngine* writeEngine = NULL, LogEngine* syslogEngine = NULL );
36 
38  virtual ~BinaryLogReader();
39 
41  virtual unsigned int read();
42 
44  {
45  return timeAdjust_;
46  }
47 
48  void setTimeAdjust( const Timespan& timeAdjust )
49  {
50  timeAdjust_ = timeAdjust;
51  }
52 
54  {
55  return firstTime_;
56  }
57 
59  {
60  return lastTime_;
61  }
62 
63 private:
64 
65  // Note that the copy constructor below is private and not given a body.
66  // Any attempt to call it will return a compiler error.
67  BinaryLogReader( const BinaryLogReader& old ); // disallow copy constructor
68 
71 
74 
83  unsigned short whileRunningCode_;
84  bool running_;
85 };
86 
87 #endif /*BINARYLOGREADER_H_*/
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
Timespan timeAdjust_
GPS Adjustment of time.
Definition: BinaryLogReader.h:73
void setTimeAdjust(const Timespan &timeAdjust)
Definition: BinaryLogReader.h:48
bool running_
Definition: BinaryLogReader.h:84
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: LogReader.h:21
Timestamp timeBase_
Start of the cycle time.
Definition: BinaryLogReader.h:70
virtual ~BinaryLogReader()
Destructor.
Definition: BinaryLogReader.cpp:36
Timespan class, represents a delta of time.
Definition: Timestamp.h:248
Defines a LogReader specific to writing binary values to a stream See FileLogReader for input from th...
Definition: BinaryLogReader.h:27
LogEngine * writeEngine_
Definition: BinaryLogReader.h:79
Timestamp firstTime_
Definition: BinaryLogReader.h:81
Timespan getTimeAdjust()
Definition: BinaryLogReader.h:43
static const Timestamp NOT_SET_TIME
Constant value to represent "no time".
Definition: Timestamp.h:37
const Str & whileRunningName_
Definition: BinaryLogReader.h:78
Contains the LogReader class definition.
Replacement for standard template class string.
Definition: Str.h:12
Component responsible for handling the contents of the LogQueue.
Definition: LogEngine.h:63
Timestamp getLastTime()
Definition: BinaryLogReader.h:58
Contains the InStream and NullInStream class declarations.
Timestamp getFirstTime()
Definition: BinaryLogReader.h:53
BinaryLogReader(Logger &sysLogger, const Timestamp &startTime=Timestamp::NOT_SET_TIME, const Timestamp &endTime=Timestamp::NOT_SET_TIME, const Str &whileRunningName=Str::EMPTY_STR, LogEngine *writeEngine=NULL, LogEngine *syslogEngine=NULL)
Default Constructor.
Definition: BinaryLogReader.cpp:16
const Timestamp & endTime_
Definition: BinaryLogReader.h:77
Timestamp lastTime_
Definition: BinaryLogReader.h:82
unsigned short whileRunningCode_
Definition: BinaryLogReader.h:83
Contains the Logger class definition.
static const Str EMPTY_STR
Definition: Str.h:19
virtual unsigned int read()
Read the log.
Definition: BinaryLogReader.cpp:39
Logger & sysLogger_
Definition: BinaryLogReader.h:75
Contains the Timestamp and Timespan class declarations.
const Timestamp & startTime_
Definition: BinaryLogReader.h:76
Represents absolute times.
Definition: Timestamp.h:31
LogEngine * syslogEngine_
Definition: BinaryLogReader.h:80