CARMA C++
carma::antenna::ovro::GunnPll Class Reference

GunnPll CAN device class. More...

#include <carma/antenna/ovro/canbus/GunnPll.h>

Inheritance diagram for carma::antenna::ovro::GunnPll:
carma::canbus::devices::XacDevice carma::canbus::Device

Public Member Functions

void disableAllGunns () const
 Disable all Gunn modules. More...
 
void enableGunn (bool on) const
 Turn Gunn on or off. More...
 
void enableIfMonitorOutput (bool on) const
 Turn phase-lock IF monitor output on or off. More...
 
carma::canbus::MsgIdInfoMap getHalfSecMonitors () const
 Retrieve a map of this devices half second monitor points. More...
 
carma::canbus::MsgIdInfoMap getSlowMonitors () const
 Retrieve a map of this devices sow (5 second) monitor points. More...
 
 GunnPll (carma::canbus::nodeType node, carma::canbus::CanOutput &co, carma::monitor::OvroSubsystem &subsys)
 Constructor. More...
 
void jogAttenuator (short microsteps) const
 Move the attenuator by a given number of microsteps. More...
 
void jogBackshort (short microsteps) const
 Move the backshort by a given number of microsteps. More...
 
void jogTuner (short microsteps) const
 Move the tuner by a given number of microsteps. More...
 
void processMsg (::carma::canbus::msgType mid,::carma::canbus::DataVector &data, bool sim)
 Process a CAN message addressed to this module. More...
 
void setAttenuator (unsigned long pos) const
 Move the LO attenuator to a given position. More...
 
void setBackshort (unsigned long pos) const
 Move the Gunn backshort to a given position. More...
 
void setGunnOperatingVoltage (float voltage) const
 Set nominal bias voltage for the Gunn. More...
 
void setLoFrequency (double freq) const
 Set the LO frequency and start the lock sequence. More...
 
void setLoopGain (float gain) const
 Set the loop gain for the phase-lock loop. More...
 
void setTuner (unsigned long pos) const
 Move the Gunn tunder to a given position. More...
 
carma::canbus::Message simulateMsg (carma::canbus::msgType mid)
 Produce a simulated CAN message for a given msgType. More...
 
void toggleSweep (bool on) const
 Turn phase-lock loop sweep on or off. More...
 
void updateFrameData ()
 Update Frame Data. More...
 
virtual ~GunnPll ()
 Destructor. More...
 
- Public Member Functions inherited from carma::canbus::devices::XacDevice
bool isOnline ()
 Is Device ONLINE? More...
 
void reset ()
 Reset the can module via CORBA using Device::softReset() method. More...
 
virtual void setState (deviceStateType state)
 Set the state of the device. More...
 
void startChannelOneFastSampling (unsigned short fastItem)
 Start fast sampling on channel one with the requested data item. More...
 
void startChannelTwoFastSampling (unsigned short fastItem)
 Start fast sampling on channel two with the requested data item. More...
 
void stopChannelOneFastSampling ()
 Stop fast sampling on channel one. More...
 
void stopChannelTwoFastSampling ()
 Stop fast sampling on channel two. More...
 
 XacDevice (carma::canbus::apiType api, carma::canbus::nodeType node, carma::canbus::CanOutput &canOutput)
 Constructor. More...
 
virtual ~XacDevice ()
 Destructor. More...
 
- Public Member Functions inherited from carma::canbus::Device
carma::canbus::Message createDummyMsg () const
 Create a dummy CAN message. More...
 
carma::canbus::Message createMsgToAllNodes (msgType messageId) const
 Create a CAN message addressed to all nodes of this type. More...
 
carma::canbus::Message createMsgToHost (msgType messageId) const
 Create a CAN message addressed from this Device to the host. More...
 
carma::canbus::Message createMsgToNode (msgType messageId) const
 Create a CAN message addressed to this device from the host. More...
 
 Device (apiType api, nodeType node, CanOutput &io)
 Device constructor. More...
 
apiType getApi () const
 Return api code of device. More...
 
char getApiVersion () const
 Get API Version of this Device. More...
 
boardType getBoardType () const
 Return board type id of device. More...
 
busIdType getBusId () const
 Return bus Id that node resides on. More...
 
virtual MsgIdInfoMap getControls () const
 Return a map of devices controls. More...
 
keyType getKey () const
 Create a key unique to this api and node. More...
 
double getLastRxTime () const
 Get Last RX Time for device. More...
 
unsigned int getNlatePackets () const
 Get number of late packets. More...
 
nodeType getNode () const
 Return node location code of device. More...
 
serialNumberType getSerialNumber () const
 Return serial number of device. More...
 
deviceStateType getState () const
 Status access routine. More...
 
virtual void processMsg (msgType messageId, std::vector< byteType > &data, bool sim)=0
 Process a CAN message. More...
 
void reset ()
 Perform a software reset of module. More...
 
void setBoardType (boardType bt)
 Set board type of device. More...
 
void setBusId (busIdType busId)
 Set busId of device. More...
 
virtual void setLastRxTime (double rxMjd)
 Set latest rx time. More...
 
void setSerialNumber (serialNumberType sn)
 Set serial number of device. More...
 
void startChannelOneFastSampling (unsigned short fastItem)
 Start fast sampling the specified data item on channel 1. More...
 
void startChannelTwoFastSampling (unsigned short fastItem)
 Start fast sampling the specified data item on channel 2. More...
 
void stopChannelOneFastSampling ()
 Stop fast sampling on channel 1 This routine will stop fast sampling on channel 1 regardless of whether this node is fast sampling the channel or not! In other words the request goes out globally. More...
 
void stopChannelTwoFastSampling ()
 Stop fast sampling on channel 2 This routine will stop fast sampling on channel 2 regardless of whether this node is fast sampling the channel or not! In other words the request goes out globally. More...
 
virtual ~Device ()
 Device destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from carma::canbus::Device
static keyType createKey (apiType api, nodeType node)
 
- Static Public Attributes inherited from carma::canbus::devices::XacDevice
static const carma::canbus::msgType SYSTEM_MONITOR_PACKET_1 = 0x120
 
static const carma::canbus::msgType SYSTEM_MONITOR_PACKET_2 = 0x121
 
static const carma::canbus::msgType SYSTEM_MONITOR_PACKET_3 = 0x122
 
static const carma::canbus::msgType SYSTEM_MONITOR_PACKET_4 = 0x123
 
static const carma::canbus::msgType SYSTEM_MONITOR_PACKET_5 = 0x124
 
- Protected Member Functions inherited from carma::canbus::devices::XacDevice
virtual void initialize ()
 Initialization hook. More...
 
void processSystemMonitorPacket (carma::canbus::msgType mid, carma::canbus::DataVector &data, carma::monitor::Xac &xac)
 Process a system monitor packet. More...
 
void processSystemMonitorPacket1 (carma::canbus::DataVector &data, carma::monitor::Xac &xac)
 Process System Monitor Packet 1 This routine processes standard system monitor packet 1 and places the data into the input Xac reference. More...
 
void processSystemMonitorPacket2 (carma::canbus::DataVector &data, carma::monitor::Xac &xac)
 Process System Monitor Packet 2. More...
 
void processSystemMonitorPacket3 (carma::canbus::DataVector &data, carma::monitor::Xac &xac)
 Process System Monitor Packet 3. More...
 
void processSystemMonitorPacket4 (carma::canbus::DataVector &data, carma::monitor::Xac &xac)
 Process System Monitor Packet 4. More...
 
void processSystemMonitorPacket5 (carma::canbus::DataVector &data, carma::monitor::Xac &xac)
 Process System Monitor Packet 5. More...
 
carma::canbus::Message simSystemMonitorPacket (carma::canbus::msgType mid)
 Simulate system monitor packet. More...
 
carma::canbus::Message simSystemMonitorPacket1 ()
 Simulate System Monitor Packet 1. More...
 
carma::canbus::Message simSystemMonitorPacket2 ()
 Simulate System Monitor Packet 2. More...
 
carma::canbus::Message simSystemMonitorPacket3 ()
 Simulate System Monitor Packet 3. More...
 
carma::canbus::Message simSystemMonitorPacket4 ()
 Simulate System Monitor Packet 4. More...
 
carma::canbus::Message simSystemMonitorPacket5 ()
 Simulate System Monitor Packet 5. More...
 
- Protected Member Functions inherited from carma::canbus::Device
void incrementLatePacketCount ()
 Increment the late packet count by 1. More...
 
bool isPacketLate (double window=100.0)
 Determine if the last packet sent from this device was late. More...
 
void resetLatePacketCount ()
 Reset the late packet count to 0. More...
 
void setApiVersion (char api)
 Set API Version. More...
 
- Static Protected Member Functions inherited from carma::canbus::devices::XacDevice
static bool isSystemMonitorPacket (carma::canbus::msgType)
 Check that input message type is a system monitor packet. More...
 
- Protected Attributes inherited from carma::canbus::Device
const apiType api_
 
CanOutputio_
 Reference to CanOutput object. More...
 
const keyType key_
 
const nodeType node_
 
- Static Protected Attributes inherited from carma::canbus::Device
static const msgType RESET = 0x0000
 Software reset message id. More...
 
static const msgType START_CHANNEL_1_FAST_SAMPLING = 0x0004
 Begin channel 1 fast sampling message id. More...
 
static const msgType START_CHANNEL_2_FAST_SAMPLING = 0x0005
 Begin channel 2 fast sampling message id. More...
 
static const msgType STOP_CHANNEL_1_FAST_SAMPLING = 0x0002
 Stop channel 1 fast sampling message id. More...
 
static const msgType STOP_CHANNEL_2_FAST_SAMPLING = 0x0003
 

Detailed Description

GunnPll CAN device class.

Definition at line 36 of file GunnPll.h.

Constructor & Destructor Documentation

carma::antenna::ovro::GunnPll::GunnPll ( carma::canbus::nodeType  node,
carma::canbus::CanOutput co,
carma::monitor::OvroSubsystem &  subsys 
)

Constructor.

Parameters
nodeLocation id of this instance (node location id).
coReference to CanOutput class.
subsysReference to OvroSubsystem monitor instance.
virtual carma::antenna::ovro::GunnPll::~GunnPll ( )
virtual

Destructor.

Member Function Documentation

void carma::antenna::ovro::GunnPll::disableAllGunns ( ) const

Disable all Gunn modules.

This routine turns off the LO for all Gunn modules.

void carma::antenna::ovro::GunnPll::enableGunn ( bool  on) const

Turn Gunn on or off.

Parameters
onEnable Gunn if true, disable if false.
void carma::antenna::ovro::GunnPll::enableIfMonitorOutput ( bool  on) const

Turn phase-lock IF monitor output on or off.

Parameters
onEnable monitor output if true, disable if false.
carma::canbus::MsgIdInfoMap carma::antenna::ovro::GunnPll::getHalfSecMonitors ( ) const
virtual

Retrieve a map of this devices half second monitor points.

The monitor points returned from this routine will be simulated if the device is in the SIMULATED state.

Returns
Map with string descriptions of the devices's half frame rate monitor points (half second) keyed by message id.

Implements carma::canbus::Device.

carma::canbus::MsgIdInfoMap carma::antenna::ovro::GunnPll::getSlowMonitors ( ) const
virtual

Retrieve a map of this devices sow (5 second) monitor points.

The monitor points returned from this routine will be simulated if the device is in the SIMULATED state.

Returns
MsgIdInfoMap containing a string description of the device's slow monitor points keyed by message id.

Reimplemented from carma::canbus::devices::XacDevice.

void carma::antenna::ovro::GunnPll::jogAttenuator ( short  microsteps) const

Move the attenuator by a given number of microsteps.

Parameters
microstepsDistance to move the attenuator in microsteps.
void carma::antenna::ovro::GunnPll::jogBackshort ( short  microsteps) const

Move the backshort by a given number of microsteps.

Parameters
microstepsDistance to move the backshort in microsteps.
void carma::antenna::ovro::GunnPll::jogTuner ( short  microsteps) const

Move the tuner by a given number of microsteps.

Parameters
microstepsDistance to move the Gunn tuner in microsteps.
void carma::antenna::ovro::GunnPll::processMsg ( ::carma::canbus::msgType  mid,
::carma::canbus::DataVector data,
bool  sim 
)

Process a CAN message addressed to this module.

This routine is responsible for processing all CAN messages addressed TO this device. It's effectively a callback routine that gets called by the carma::canbus::Master object.

Parameters
midMessage identifier.
dataReference to the byte vector containing raw CAN data.
simTrue if message is simulated, false normally.
See Also
carma::canbus::Device::processMsg
void carma::antenna::ovro::GunnPll::setAttenuator ( unsigned long  pos) const

Move the LO attenuator to a given position.

Parameters
posLO attenuator position in micro-step units.
void carma::antenna::ovro::GunnPll::setBackshort ( unsigned long  pos) const

Move the Gunn backshort to a given position.

Parameters
posGunn backshort position in micro-step units.
void carma::antenna::ovro::GunnPll::setGunnOperatingVoltage ( float  voltage) const

Set nominal bias voltage for the Gunn.

The actual voltage may be slightly different from this by the error voltage added by the phase-lock loop.

Parameters
voltsGunn operating voltage in 0.01V units.
void carma::antenna::ovro::GunnPll::setLoFrequency ( double  freq) const

Set the LO frequency and start the lock sequence.

Note that the LO frequency may be the Gunn frequency or three times the Gunn frequency for the 1-mm LO which utilizes a tripler.

Parameters
freqRequested LO frequency in GHz units.
void carma::antenna::ovro::GunnPll::setLoopGain ( float  gain) const

Set the loop gain for the phase-lock loop.

Parameters
gainRequested gain in 0.1% units.
void carma::antenna::ovro::GunnPll::setTuner ( unsigned long  pos) const

Move the Gunn tunder to a given position.

Parameters
posTuner position in micro-step units.
carma::canbus::Message carma::antenna::ovro::GunnPll::simulateMsg ( carma::canbus::msgType  mid)
virtual

Produce a simulated CAN message for a given msgType.

Creates a CAN message with simulated data for an input message id. This routine is called automatically by the carma::canbus::Master object and the returned message is placed in the CAN message queue and subsequently processMsg is called with the message.

Parameters
midMessage identifier.
See Also
carma::canbus::Device::simulateMsg

Implements carma::canbus::Device.

void carma::antenna::ovro::GunnPll::toggleSweep ( bool  on) const

Turn phase-lock loop sweep on or off.

Parameters
onEnable sweep if true, disable if false.
void carma::antenna::ovro::GunnPll::updateFrameData ( )
virtual

Update Frame Data.

This method is called automatically every 1/2 second by the carma::canbus::Master object. It is required to allow this class to update monitor data on the frame timescale that is not directly associated with a CAN packet. Examples of this are the state of the module (ONLINE, OFFLINE, etc) and the number of messages being sent and receive for this module.

Reimplemented from carma::canbus::Device.


The documentation for this class was generated from the following file: