CARMA C++
VlbiMonitorShimImpl.h
1 #ifndef VLBIMONITORSHIMIMPL_H
2 #define VLBIMONITORSHIMIMPL_H
3 
4 #include "carma/corba/corba.h"
5 #include "carma/monitor/VlbiSubsystem.h"
6 #include "carma/util/PthreadMutex.h"
7 #include "carma/vlbi/VlbiMonitorShim.h"
8 
9 namespace carma {
10 namespace vlbi {
11 
12  typedef struct {
13  carma::vlbi::DelayTripletSeq seq;
14  int valid_frames;
15  } VlbiDelays;
16 
17  typedef struct {
18  VlbiDelays delays;
19  ::carma::vlbi::BandWidthType bandwidth; bool bandwidth_ok;
20  ::carma::vlbi::FpgaModeType fpgaMode; bool fpgaMode_ok;
21  ::CORBA::Long seqNo; bool seqNo_ok;
22  ::CORBA::Long astroBandNo; bool astroBandNo_ok;
23  ::CORBA::Boolean noiseOn; bool noiseOn_ok;
24  ::CORBA::Double centerMHz; bool centerMHz_ok;
25  ::CORBA::Double dconMHz; bool dconMHz_ok;
26  ::carma::vlbi::SidebandType sb; bool sb_ok;
27  ::CORBA::Boolean bdcEnabled; bool bdcEnabled_ok;
28  double lastUpdated; bool lastUpdated_ok;
29  bool online; bool online_ok;
30  } VlbiBandData;
31 
32  class VlbiMonitorShimImpl
33  {
34  public:
35  static const int num_bands = 8;
36 
37  // Constructor
38  VlbiMonitorShimImpl( double autoWriteDelayInS );
39 
40  // Interface methods
41 
42  void
43  setOnlineState (
44  ::CORBA::Long band,
45  ::CORBA::Boolean isOnline);
46 
47  void
48  setBandwidth (
49  ::CORBA::Long band,
50  ::carma::vlbi::BandWidthType bandwidth,
51  ::carma::vlbi::FpgaModeType fpgaMode,
52  ::CORBA::Long seqNo,
53  ::CORBA::Long astroBandNo);
54 
55  void
56  setNoiseSourceState (
57  ::CORBA::Long band,
58  ::CORBA::Boolean isOn);
59 
60  void
61  setDelays (
62  ::CORBA::Long band,
63  const ::carma::vlbi::DelayTripletSeq & inputTriplets);
64 
65  void
66  setDownconverter (
67  ::CORBA::Long band,
68  ::CORBA::Double centerMHz,
69  ::CORBA::Double dconMHz,
71  ::CORBA::Boolean bdcEnabled);
72 
73  protected:
74 
75  static void thread( VlbiMonitorShimImpl &This ) { This.run(); }
76  void run();
77 
78  const carma::monitor::VlbiSubsystem &_mon;
79  const double _autoWriteDelayInS;
80 
81  // One extra to allow 1-based indexing
82  VlbiBandData bandData_[num_bands+1];
83 
84  private:
86 
87  }; // end class VlbiMonitorShimImpl
88 
89 } // namespace carma::vlbi
90 } // namespace carma
91 
92 #endif // VLBIMONITORSHIMIMPL_H
93 
94 // vim: set expandtab sw=2 ts=2 :
SidebandType
Downconverter sideband choice.
Definition: CorDataBase.idl:62
BandWidthType
Supported spectral correlator bandwidths.
Definition: CorDataBase.idl:25
A simple wrapper class that makes use of ::pthread_mutex_t easier in a C++ world. ...
Definition: PthreadMutex.h:41
FpgaModeType
Astroband mode – The correlator FPGA configuration/polarization mode.
Definition: CorDataBase.idl:68