CARMA C++
DataContainer.h
1 #ifndef CARMA_PIPELINE_DATACONTAINER_H
2 #define CARMA_PIPELINE_DATACONTAINER_H
3 
4 #include "carma/util/PthreadMutex.h"
5 #include "carma/util/types.h"
6 
7 #include <map>
8 
9 namespace carma {
10 
11 namespace correlator {
12 namespace lib {
13 
14 class CorrelatorData;
15 
16 } // namespace carma::correlator::lib
17 } // namespace carma::correlator
18 
19 namespace pipeline {
20 
21 class DataContainer {
22  public:
23 
27  explicit DataContainer( );
28 
32  virtual ~DataContainer( );
33 
43  void getCorrelatorData( carma::correlator::lib::CorrelatorData * cd,
44  carma::util::frameType frame ) const;
45 
51  void fillCorrelatorData(
53 
59  void setExpectedNumberOfBands( int expectedNumberOfBands );
60 
68  void clearCorrelatorData( carma::util::frameType olderThan );
69 
73  typedef ::std::map< int, int > LateBandMap;
74 
78  LateBandMap getLateBandMap( ) const;
79 
83  typedef ::std::map< int, int > DupBandMap;
84 
91  DupBandMap getDuplicateBandMap( ) const;
92 
93  private:
94 
95  DataContainer( const DataContainer & rhs );
96  DataContainer & operator=( const DataContainer & rhs );
97 
98  mutable carma::util::PthreadMutex guard_;
99  typedef ::std::map<
101  carma::correlator::lib::CorrelatorData * > CorrelatorDataMap;
102  CorrelatorDataMap correlatorData_;
103  int expectedNumberOfBands_;
104  carma::util::frameType oldestValidFrame_;
105 
106  mutable carma::util::PthreadMutex lateBandMapGuard_;
107  LateBandMap lateBandMap_;
108 
109  mutable carma::util::PthreadMutex dupBandMapGuard_;
110  DupBandMap dupBandMap_;
111 };
112 
113 
114 } // End namespace pipeline
115 } // End namespace carma
116 
117 
118 #endif
unsigned int frameType
Half second frames since Jan 1, 2000.
Definition: types.h:29
Class used to represents bands of Correlator Data.
A simple wrapper class that makes use of ::pthread_mutex_t easier in a C++ world. ...
Definition: PthreadMutex.h:41
Various type definitions for util classes.