CARMA C++
TiltMeter.h
Go to the documentation of this file.
1 #ifndef SZA_ANTENNA_CANBUS_TILTMETER_H
2 #define SZA_ANTENNA_CANBUS_TILTMETER_H
3 
12 
14 
15 #include "carma/szautil/Temperature.h"
16 
17 #include "carma/szaarrayutils/rtcnetcoms.h"
18 
19 namespace sza {
20  namespace antenna {
21  namespace canbus {
22 
23  class TiltMeter : public CanDevice {
24  public:
25 
29  TiltMeter(sza::antenna::control::SzaShare* share,
30  std::string boardName,
33 
37  virtual ~TiltMeter();
38 
39  //------------------------------------------------------------
40  // Blanking-frame monitor members.
41  //------------------------------------------------------------
42 
46  std::map<carma::canbus::msgType, std::string>
47  getHalfSecMonitors() const;
48 
52  void processBlankingFrameMonitor1(std::vector<carma::canbus::byteType>& data, bool isSim);
53 
57  void processBlankingFrameMonitor2(std::vector<carma::canbus::byteType>& data, bool isSim);
58 
62  void processBlankingFrameMonitor3(std::vector<carma::canbus::byteType>& data, bool isSim);
63 
67  void processBlankingFrameMonitor4(std::vector<carma::canbus::byteType>& data, bool isSim);
68 
72  void processBlankingFrameMonitor5(std::vector<carma::canbus::byteType>& data, bool isSim);
73 
77  void processBlankingFrameMonitor6(std::vector<carma::canbus::byteType>& data, bool isSim);
78 
79  //------------------------------------------------------------
80  // Commands for this device.
81  //------------------------------------------------------------
82 
83  enum OpMode {
84  ON,
85  OFF,
86  MANUAL
87  };
88 
92  enum hostCommands
93  {
94  HOSTCMD_SET_TEMP = 0x080, // Set the desired temp of the tiltmeter
95  HOSTCMD_REGULATE_TEMP = 0x081, // Regulate the temperature
96  HOSTCMD_SET_LOOP_GAIN = 0x082, // Set the loop gain
97  HOSTCMD_SET_LOOP_INT_CONST = 0x083, // Set the loop integration constant
98  HOSTCMD_SET_LOOP_RATE_CONST = 0x084, // Set the loop rate constant
99  HOSTCMD_SET_LOOP_BW = 0x085, // Set the loop bandwidth
100  HOSTCMD_WRITE_EEPROM = 0x086, // Write loop parameters to EEPROM
101  };
102 
103  sza::util::Angle afZero_;
104  sza::util::Angle lrZero_;
105 
109  std::vector<carma::canbus::Message>
110  setTemperature(sza::util::Temperature temp, bool send=true);
111 
115  std::vector<carma::canbus::Message>
116  regulateTemperature(sza::array::TiltmeterMode opmode, float pwrFract, bool send=true);
117 
121  std::vector<carma::canbus::Message>
122  setLoopGain(float gain, bool send=true);
123 
127  std::vector<carma::canbus::Message>
128  setLoopIntegrationConstant(float constant, bool send=true);
129 
133  std::vector<carma::canbus::Message>
134  setLoopRateConstant(float constant, bool send=true);
135 
139  std::vector<carma::canbus::Message>
140  setLoopBandwidth(float bw, bool send=true);
141 
145  std::vector<carma::canbus::Message>
146  writeToEeprom(bool send=true);
147 
151  void setZeros(sza::util::Angle& afZero, sza::util::Angle& lrZero);
152 
153  }; // End class TiltMeter
154 
155  } // End namespace canbus
156  } // End namespace antenna
157 } // End namespace sza
158 
159 
160 
161 #endif // End #ifndef SZA_ANTENNA_CANBUS_TILTMETER_H
Started: Fri Nov 21 15:46:44 UTC 2003.
Tagged: Thu Nov 13 16:53:54 UTC 2003.
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