CARMA C++
VlbiHandle.h
Go to the documentation of this file.
1 #ifndef CARMA_CONTROL_VLBI_HANDLE_H
2 #define CARMA_CONTROL_VLBI_HANDLE_H
3 
18 #include <vector>
19 
20 #include "carma/corba/corba.h"
22 #include "carma/control/CorrelatorInfo.h"
23 #include "carma/monitor/ControlSubsystem.h"
24 #include "carma/monitor/NoiseSource.h"
25 #include "carma/correlator/obsRecord2/CorDataBase.h"
26 #include "carma/util/corrUtils.h"
27 
28 
29 namespace carma {
30 namespace control {
31 
32 
33 // Vlbi handle implements the Correlator_I interface per
34 // DaveM's email of March 11, 2011
35 // Note the Correlator_I interface gets its remote object name
36 // from carma/conf/slcorrelator.conf. Your DO will have to
37 // set its remove name
38 typedef RemoteObjHandleT< correlator::obsRecord2::Correlator_I >
39  CorrelatorControlRemoteObjHandle;
40 
41 
44  public:
55  VlbiHandle(
56 // Dave -
57 // I removed the bool spectral argument here, assuming you don't need it.
58 // -- Marc
59  unsigned int band,
60  monitor::MonitorSystem & monitorSys,
61  monitor::ControlSubsystemBase::Reachable & reachable,
62  bool defaultLogIfNotReach );
63 
64  virtual ~VlbiHandle( );
65 
71  ::std::vector< correlator::obsRecord2::DelayTriplet > triplets );
72 
76  bool isOffline() const { return !online_ ; }
77 
80  //@param offline True if the band is online, false if offline
81  void setOnline( const bool online ) {
82  online_ = online;
83  }
84 
95  void setBandwidth(
97  const int preferredSeqNo,
98  const unsigned int astroBandNo = 0 );
99 
106  void optimizeThresholds( const int preferredSeqNo );
107 
114  void flattenPhases( const int preferredSeqNo );
115 
123  bool isActionComplete( const monitor::MonitorSystem & monsys,
124  int monDataErrorLimit );
125 
126 
130  void setAstroBandMode( util::CorrelatorFpgaModeType astroBandMode ) { astroBandMode_ = astroBandMode; }
131 
134  util::CorrelatorFpgaModeType getFpgaMode( ) const { return astroBandMode_; }
135 
136  private:
137 
138  bool isNoiseSourceEnabled( void );
139  bool isNoiseSourceDisabled( void );
140  bool isNoiseSource(
141  monitor::NoiseStatusMonitorPointEnum::NOISESTATUS status
142  );
143 
144  void setNextSequenceNo( int preferredSequenceNo );
145 
146  bool online_;
147  int nextSequenceNo_;
148  int consecutiveErrors_;
149  int errLimit_;
150  monitor::MonitorSystem & monitorSys_;
151  const unsigned int bandNo_;
152  // Needed??
153  util::CorrelatorFpgaModeType astroBandMode_;
154 
155 };
156 
157 
158 } // namespace carma::control
159 } // namespace carma
160 
161 
162 #endif
void setInputDelayTriplets(::std::vector< correlator::obsRecord2::DelayTriplet > triplets)
set input delay triplets for a single polarization.
void flattenPhases(const int preferredSeqNo)
Flatten phases on the band.
CorrelatorFpgaModeType
FPGA configuration modes.
VlbiHandle(unsigned int band, monitor::MonitorSystem &monitorSys, monitor::ControlSubsystemBase::Reachable &reachable, bool defaultLogIfNotReach)
Constructor.
void setOnline(const bool online)
Mark a band offline or online.
Definition: VlbiHandle.h:81
Manages correlator control DO connections.
Definition: VlbiHandle.h:43
bool isOffline() const
Definition: VlbiHandle.h:76
void setAstroBandMode(util::CorrelatorFpgaModeType astroBandMode)
Set the Astroband (FPGA) mode of this band.
Definition: VlbiHandle.h:130
Manages connection to remote DO.
Typed class for managing connections to DOs.
void setBandwidth(carma::correlator::obsRecord2::BandWidthType bw, const int preferredSeqNo, const unsigned int astroBandNo=0)
Set bandwidth with a preferred sequence number.
Monitor system base class.
Definition: MonitorSystem.h:81
BandWidthType
Supported spectral correlator bandwidths.
Definition: CorDataBase.idl:25
void optimizeThresholds(const int preferredSeqNo)
Optimize thresholds on the band.
bool isActionComplete(const monitor::MonitorSystem &monsys, int monDataErrorLimit)
Compare next sequence number with one returned from monitor system.
util::CorrelatorFpgaModeType getFpgaMode() const
Get the FPGA mode of this band.
Definition: VlbiHandle.h:134