CARMA C++
DataCollectorN.h
1 #ifndef CARMA_PIPELINE_DATACOLLECTORN_H
2 #define CARMA_PIPELINE_DATACOLLECTORN_H
3 
5 #include "carma/util/PthreadMutex.h"
6 
7 #include <string>
8 
9 namespace carma {
10 
11 namespace corba {
12  class Server;
13 }
14 
15 namespace correlator {
16 namespace lib {
17 
18 class CorrelatorData;
19 
20 } // namespace carma::correlator::lib
21 } // namespace carma::correlator
22 
23 namespace pipeline {
24 
25 class DataContainer;
26 
33  public:
34 
38  DataCollectorN( const std::string & ncName,
39  DataContainer & dataContainer,
40  carma::corba::Server & server );
41 
45  virtual ~DataCollectorN();
46 
51 
55  bool isCollectorActive( ) const;
56 
62 
63  private:
64 
65  DataContainer & _dataContainer;
67 
68  bool corrConsumerActive_;
69  mutable carma::util::PthreadMutex corrConsumerActiveMutex_;
70 
71  bool collectionActive_;
72  mutable carma::util::PthreadMutex collectionActiveMutex_;
73 
74  static const std::string className_;
75 
76  const std::string ncName_;
77 
78  struct CollectionThreadArgs;
79 
80  static void dataCollectionThread( CollectionThreadArgs & args );
81 
82  };
83 
84 } // namespace carma::pipeline
85 } // namespace carma
86 
87 #endif
Concrete class responsible for connecting to a single band of Correlator Data.
Structure to hold corr consumer statistics for profiling.
Abstract base class for listener called back by CorrDataConsumer.
virtual ~DataCollectorN()
Destructor.
Implements CorrConsumer interface for CORBA.
Class used to represents bands of Correlator Data.
carma::correlator::obsRecord2::CorbaCorrConsumerStats getCorbaCorrConsumerStats() const
Retrieve deserialization statistics.
Class for creating, managing and serving requests to CORBA servants.
Definition: Server.h:22
A simple wrapper class that makes use of ::pthread_mutex_t easier in a C++ world. ...
Definition: PthreadMutex.h:41
bool isCollectorActive() const
Is collection active.
DataCollectorN(const std::string &ncName, DataContainer &dataContainer, carma::corba::Server &server)
Constructor.
void processData(carma::correlator::lib::CorrelatorData *cd)
called when data is available