CARMA C++
VisBrickReader.h
1 
2 // $Id: VisBrickReader.h,v 1.1 2011/08/18 23:25:52 abeard Exp $
3 
4 #ifndef CARMA_PIPELINE_VISBRICKREADER_H
5 #define CARMA_PIPELINE_VISBRICKREADER_H
6 
7 #include "carma/util/Time.h" // For frameType
8 
9 #include <fstream>
10 #include <map>
11 
12 namespace carma {
13 
14  namespace correlator {
15  namespace lib {
16 
17  class CorrelatorData;
18 
19  } // namespace lib
20  } // namespace correlator
21 
22  namespace pipeline {
23 
24  typedef
25  ::std::map< carma::util::frameType,
26  carma::correlator::lib::CorrelatorData * > RecordsByFrameMap;
27 
32  public:
33 
41  explicit CorrelatorVisBrickReader( const std::string & filename,
42  bool continueOnFileErrors = false );
43 
47  virtual ~CorrelatorVisBrickReader();
48 
56 
60  RecordsByFrameMap getRecordsKeyedByFrame( );
61 
66  bool fileErrorDetected( ) const;
67 
68  private:
69 
70  void extractRecords( );
71 
72  const std::string inputFilename_;
73  const std::string className_;
74  std::ifstream fp_;
75  RecordsByFrameMap records_;
76  RecordsByFrameMap::iterator recordIterator_;
77  const bool continueOnFileErrors_;
78  bool fileErrorDetected_;
79  };
80 
81  } // End namespace pipeline
82 } // End namespace carma
83 
84 #endif //CARMA_PIPELINE_CORRELATORVISBRICKREADER_H
const carma::correlator::lib::CorrelatorData & readOne()
Read a single record from file.
Common time functions.
bool fileErrorDetected() const
Was a file error detected while extracting correlator data records?
unsigned int frameType
Half second frames since Jan 1, 2000.
Definition: types.h:29
RecordsByFrameMap getRecordsKeyedByFrame()
Retrieve a map of all records keyed by frame time.
CorrelatorVisBrickReader(const std::string &filename, bool continueOnFileErrors=false)
Constructor.
virtual ~CorrelatorVisBrickReader()
Destructor.
Reads Correlator Data from a specifiec file.
Class used to represents bands of Correlator Data.