CARMA C++
Receiver.h
Go to the documentation of this file.
1 #ifndef SZA_ANTENNA_CANBUS_RECEIVER_H
2 #define SZA_ANTENNA_CANBUS_RECEIVER_H
3 
11 #include "carma/szautil/Amp.h"
12 #include "carma/szautil/Rx.h"
13 #include "carma/szautil/Voltage.h"
14 
16 
17 namespace sza {
18  namespace antenna {
19  namespace canbus {
20 
21  class Receiver : public CanDevice {
22  public:
23 
24  enum Amp {
25  Amp30GHzRFStage1Vg = 0,
26  Amp30GHzRFStage2Vg = 1,
27  Amp30GHzRFStage3Vg = 2,
28  Amp30GHzRFStage4Vg = 3,
29 
30  Amp30GHzRFStage1Id = 4,
31  Amp30GHzRFStage2Id = 5,
32  Amp30GHzRFStage3Id = 6,
33  Amp30GHzRFStage4Id = 7,
34 
35  Amp30GHzIF1 = 8,
36 
37  // 90 GHz Amp codes
38 
39  Amp90GHzRF1Stage1Vg = 9,
40  Amp90GHzRF1Stage2Vg = 10,
41  Amp90GHzRF2Stage1Vg = 11,
42  Amp90GHzRF2Stage2Vg = 12,
43 
44  Amp90GHzRF1Vd = 13,
45  Amp90GHzRF2Vd = 14,
46 
47  Amp90GHzIFVd = 15,
48  Amp90GHzIFVg = 16
49  };
50 
54  Receiver(sza::antenna::control::SzaShare* share,
55  std::string boardName,
58 
62  virtual ~Receiver();
63 
67  std::vector<carma::canbus::Message>
68  setAmpBias(Amp amp, short bias, bool send=true);
69 
73  std::vector<carma::canbus::Message>
74  setAmpBias(sza::util::Rx::Id rxType,
75  sza::util::Amp::Type ampType,
76  sza::util::Amp::Stage stage,
77  sza::util::Amp::Bias biasType,
78  short bias, bool send=true);
79 
83  std::vector<carma::canbus::Message>
84  toggleFastSampling(unsigned channel, bool start, bool send=true);
85 
86  private:
87 
88  //------------------------------------------------------------
89  // Blanking-frame (half-second) monitor members.
90  //------------------------------------------------------------
91 
95  std::map<carma::canbus::msgType, std::string>
96  getHalfSecMonitors() const;
97 
98  // Methods to deal with monitor packets for this device.
99 
100  void processBlankingFrameMonitor1(std::vector<carma::canbus::byteType>& data, bool isSim);
101  void processBlankingFrameMonitor2(std::vector<carma::canbus::byteType>& data, bool isSim);
102  void processBlankingFrameMonitor3(std::vector<carma::canbus::byteType>& data, bool isSim);
103  void processBlankingFrameMonitor4(std::vector<carma::canbus::byteType>& data, bool isSim);
104  void processBlankingFrameMonitor5(std::vector<carma::canbus::byteType>& data, bool isSim);
105  void processBlankingFrameMonitor6(std::vector<carma::canbus::byteType>& data, bool isSim);
106  void processBlankingFrameMonitor7(std::vector<carma::canbus::byteType>& data, bool isSim);
107  void processBlankingFrameMonitor8(std::vector<carma::canbus::byteType>& data, bool isSim);
108  void processBlankingFrameMonitor9(std::vector<carma::canbus::byteType>& data, bool isSim);
109  void processBlankingFrameMonitor10(std::vector<carma::canbus::byteType>& data, bool isSim);
110  void processBlankingFrameMonitor11(std::vector<carma::canbus::byteType>& data, bool isSim);
111 
112  //------------------------------------------------------------
113  // Commands for this device.
114  //------------------------------------------------------------
115 
119  enum engineeringCommands
120  {
121  ENGCMD_SET_AMP_BIAS = 0x080,
122  };
123 
124  }; // End class Receiver
125 
126  } // End namespace canbus
127  } // End namespace antenna
128 } // End namespace sza
129 
130 
131 
132 #endif // End #ifndef SZA_ANTENNA_CANBUS_RECEIVER_H
Started: Fri Nov 21 15:46:44 UTC 2003.
Tagged: Tue Mar 30 08:59:30 PST 2004.
Tagged: Tue Mar 30 08:46:08 PST 2004.
unsigned short nodeType
Carma Node Type id type.
Definition: Types.h:66
CanOutput interface.
Definition: CanOutput.h:26
An instance of this class is created by AntennaMaster and passed to the constructors of other tasks...
Definition: Share.h:38