CARMA C++
PipelineHandle.h
Go to the documentation of this file.
1 #ifndef CARMA_CONTROL_PIPELINE_HANDLE_H
2 #define CARMA_CONTROL_PIPELINE_HANDLE_H
3 
14 #include "carma/corba/corba.h"
16 #include "carma/control/SubarrayControl.h"
17 #include "carma/monitor/ControlSubsystem.h"
18 #include "carma/pipeline/pipelineControl.h"
19 #include "carma/util/SeqTypedefs.h"
20 
21 typedef carma::monitor::ControlBandPoints CBP;
22 
23 namespace carma {
24 namespace control {
25 
26 
27 typedef RemoteObjHandleT< pipeline::PipelineControl >
28  PipelineControlRemoteObjHandle;
29 
30 
33  public:
48  const std::string& DOname,
49  monitor::ControlSubsystem& controlSubsystem,
50  monitor::MonitorSystem& monitorSystem,
51  monitor::MonitorPointBool& reachableMP,
52  monitor::MonitorSubsystem& pipelineMonitorSystem,
53  const int firstAstroBandNo,
54  const std::string& msgPrefix);
55 
56  virtual ~PipelineHandle();
57 
58  void setDecimationMode(const DecimationMode decimationMode,
59  const unsigned short astroBandNo);
60 
61  void integrate(double intTime, CORBA::Long numInts,
62  double gap, CORBA::Boolean science,
63  int preferredSeqNo );
64 
75  int monErrLimit);
76 
82  void resetTsys(carma::util::SeqShort carmaAntNoSeq);
83 
84  protected:
85  virtual monitor::MonitorPointInt& getSeqNoMP() = 0;
86  virtual void decimate(const bool dec, const unsigned short astroBandNo);
87  monitor::ControlSubsystem& controlSubsystem_;
88  monitor::MonitorSystem& monitorSystem_;
89  const int firstAstroBandNo_;
90  // Prefix for messages (e.g. "C3Gmax8")
91  const std::string msgPrefix_;
92  std::vector<CBP*> CBPvector_;
93 
94  private:
95  void keepEndChannels(const bool value, const unsigned short astroBandNo);
96 
97  // Sequence number boilerplate
98  int nextSequenceNo_;
99  int consecutiveErrors_;
100  int errLimit_;
101  };
102 
103 // ===========================================================================
104 // ************** Derived classes for specific pipeline handles **************
105 // Derived classes for specific pipeline handles
106 class SLPipelineHandle : public PipelineHandle {
107  public:
116  SLPipelineHandle(
117  monitor::ControlSubsystem& controlSubsystem,
118  monitor::MonitorSystem& monitorSystem,
119  monitor::ControlSubsystemBase::Reachable& reachableContainer);
120 
121  monitor::MonitorPointInt& getSeqNoMP();
122 };
123 
124 class WBPipelineHandle : public PipelineHandle {
125  public:
134  WBPipelineHandle(
135  monitor::ControlSubsystem& controlSubsystem,
136  monitor::MonitorSystem& monitorSystem,
137  monitor::ControlSubsystemBase::Reachable& reachableContainer);
138 
139  monitor::MonitorPointInt& getSeqNoMP();
140  void decimate(const bool dec, const unsigned short astroBandNo);
141 };
142 
143 class C3gMax8PipelineHandle : public PipelineHandle {
144  public:
153  C3gMax8PipelineHandle(
154  monitor::ControlSubsystem& controlSubsystem,
155  monitor::MonitorSystem& monitorSystem,
156  monitor::ControlSubsystemBase::Reachable& reachableContainer);
157 
158  monitor::MonitorPointInt& getSeqNoMP();
159 };
160 
161 class C3gMax23PipelineHandle : public PipelineHandle {
162  public:
171  C3gMax23PipelineHandle(
172  monitor::ControlSubsystem& controlSubsystem,
173  monitor::MonitorSystem& monitorSystem,
174  monitor::ControlSubsystemBase::Reachable& reachableContainer);
175 
176  monitor::MonitorPointInt& getSeqNoMP();
177 };
178 
179 } // namespace carma::control
180 } // namespace carma
181 
182 
183 #endif
bool isIntegrationComplete(const monitor::MonitorSystem &monsys, int monErrLimit)
Compare next sequence number with one returned by monitor system.
sequence< short > SeqShort
Sequence of CORBA::Short.
Definition: SeqTypedefs.idl:10
Long integer value monitor point (4 bytes).
The monitor system for the Control subsystem.
Manages connection to remote DO.
Manages pipeline control DO connections.
PipelineHandle(const std::string &DOname, monitor::ControlSubsystem &controlSubsystem, monitor::MonitorSystem &monitorSystem, monitor::MonitorPointBool &reachableMP, monitor::MonitorSubsystem &pipelineMonitorSystem, const int firstAstroBandNo, const std::string &msgPrefix)
Constructor.
Typed class for managing connections to DOs.
Monitor system base class.
Definition: MonitorSystem.h:81
Abstract MonitorSubsystem base class.
void resetTsys(carma::util::SeqShort carmaAntNoSeq)
Reset tsys for given carma antenna number sequence.