CARMA C++
GunnPll.h
Go to the documentation of this file.
1 
11 #ifndef CARMA_ANTENNA_OVRO_GUNNPLL_H
12 #define CARMA_ANTENNA_OVRO_GUNNPLL_H
13 
15 
16 namespace log4cpp {
17  // Forward declaration
18  class Category;
19 } // End namespace log4cpp
20 
21 namespace carma {
22 
23 namespace monitor {
24  class GunnPll;
25  class OvroSubsystem;
26  class StateMonitorPointEnum;
27  class Xac;
28 } // End namespace :monitor
29 
30 namespace antenna {
31 namespace ovro {
32 
37 public:
38 
47  carma::monitor::OvroSubsystem & subsys );
48 
52  virtual ~GunnPll();
53 
62 
71 
84  bool sim);
85 
96 
106  void updateFrameData();
107 
108  // Control commands
115  void setLoFrequency(double freq) const;
116 
123  void setGunnOperatingVoltage(float voltage) const;
124 
129  void setLoopGain(float gain) const;
130 
135  void enableGunn(bool on) const;
136 
141  void disableAllGunns() const;
142 
147  void toggleSweep(bool on) const;
148 
153  void enableIfMonitorOutput(bool on) const;
154 
159  void setTuner(unsigned long pos) const;
160 
165  void setBackshort(unsigned long pos) const;
166 
171  void setAttenuator(unsigned long pos) const;
172 
177  void jogTuner(short microsteps) const;
178 
183  void jogBackshort(short microsteps) const;
184 
189  void jogAttenuator(short microsteps) const;
190 
191 protected:
192 
193  // Nothing
194 
195 private:
196 
197  // Disallow assignment and copy construction.
198  GunnPll(const GunnPll &);
199  GunnPll &operator=(const GunnPll &);
200 
201  // Routines to process individual blanking frame CAN packets.
202  // These routines are called by processMsgs.
203  void processBlankingFramePacket1(::carma::canbus::DataVector & data);
204  void processBlankingFramePacket2(::carma::canbus::DataVector & data);
205  void processBlankingFramePacket3(::carma::canbus::DataVector & data);
206  void processBlankingFramePacket4(::carma::canbus::DataVector & data);
207  void processBlankingFramePacket5(::carma::canbus::DataVector & data);
208  void processBlankingFramePacket6(::carma::canbus::DataVector & data);
209  void processBlankingFramePacket7(::carma::canbus::DataVector & data);
210  void processBlankingFramePacket8(::carma::canbus::DataVector & data);
211  void processBlankingFramePacket9(::carma::canbus::DataVector & data);
212 
213  // Routines to produce individual simulated blanking frame CAN packets.
214  // These routines are called by simulateMsg.
215  ::carma::canbus::Message simBlankingFramePacket1();
216  ::carma::canbus::Message simBlankingFramePacket2();
217  ::carma::canbus::Message simBlankingFramePacket3();
218  ::carma::canbus::Message simBlankingFramePacket4();
219  ::carma::canbus::Message simBlankingFramePacket5();
220  ::carma::canbus::Message simBlankingFramePacket6();
221  ::carma::canbus::Message simBlankingFramePacket7();
222  ::carma::canbus::Message simBlankingFramePacket8();
223  ::carma::canbus::Message simBlankingFramePacket9();
224 
225  ::carma::monitor::StateMonitorPointEnum * state_;
226  ::carma::monitor::GunnPll * mon_;
227  ::carma::monitor::Xac * xacMon_;
228  ::log4cpp::Category & log_;
229 
230 }; // End class GunnPll
231 }}} // End namespace carma::antenna::ovro
232 #endif
void jogAttenuator(short microsteps) const
Move the attenuator by a given number of microsteps.
void setTuner(unsigned long pos) const
Move the Gunn tunder to a given position.
carma::canbus::Message simulateMsg(carma::canbus::msgType mid)
Produce a simulated CAN message for a given msgType.
void toggleSweep(bool on) const
Turn phase-lock loop sweep on or off.
::std::map< ::carma::canbus::msgType,::std::string > MsgIdInfoMap
Alias for an ::std::map containing a string description of a message id, keyed by the described carma...
Definition: Device.h:30
void processMsg(::carma::canbus::msgType mid,::carma::canbus::DataVector &data, bool sim)
Process a CAN message addressed to this module.
Class to encapsulate a CAN message.
Definition: Message.h:21
carma::canbus::MsgIdInfoMap getHalfSecMonitors() const
Retrieve a map of this devices half second monitor points.
void setAttenuator(unsigned long pos) const
Move the LO attenuator to a given position.
XacDevice canbus::device class implementation.
Definition: XacDevice.h:37
void setBackshort(unsigned long pos) const
Move the Gunn backshort to a given position.
void disableAllGunns() const
Disable all Gunn modules.
virtual ~GunnPll()
Destructor.
unsigned short nodeType
Carma Node Type id type.
Definition: Types.h:66
void jogTuner(short microsteps) const
Move the tuner by a given number of microsteps.
::std::vector< ::carma::canbus::byteType > DataVector
Alias for CAN data.
Definition: Types.h:72
void setLoFrequency(double freq) const
Set the LO frequency and start the lock sequence.
void enableIfMonitorOutput(bool on) const
Turn phase-lock IF monitor output on or off.
void jogBackshort(short microsteps) const
Move the backshort by a given number of microsteps.
carma::canbus::devices::XacDevice class declaration.
GunnPll CAN device class.
Definition: GunnPll.h:36
unsigned short msgType
Carma Message id type.
Definition: Types.h:69
void setGunnOperatingVoltage(float voltage) const
Set nominal bias voltage for the Gunn.
GunnPll(carma::canbus::nodeType node, carma::canbus::CanOutput &co, carma::monitor::OvroSubsystem &subsys)
Constructor.
CanOutput interface.
Definition: CanOutput.h:26
carma::canbus::MsgIdInfoMap getSlowMonitors() const
Retrieve a map of this devices sow (5 second) monitor points.
void enableGunn(bool on) const
Turn Gunn on or off.
void updateFrameData()
Update Frame Data.
void setLoopGain(float gain) const
Set the loop gain for the phase-lock loop.