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

Tiltmeter device class. More...

#include <carma/antenna/bima/Tiltmeter.h>

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

Public Types

enum  OpMode {
  LOOP_ON, LOOP_OFF, MANUAL, LOOP_ON,
  LOOP_OFF, MANUAL
}
 Enumeration for Thermal control operation mode. More...
 
enum  OpMode {
  LOOP_ON, LOOP_OFF, MANUAL, LOOP_ON,
  LOOP_OFF, MANUAL
}
 Enumeration for Thermal control operation mode. More...
 

Public Member Functions

std::map
< carma::canbus::msgType,
std::string > 
getHalfSecMonitors () const
 Retrieve a map of this devices half second monitor points. More...
 
std::map
< carma::canbus::msgType,
std::string > 
getHalfSecMonitors () const
 Retrieve a map of this devices half second monitor points. More...
 
carma::services::Angle getMostRecentAftForwardTilt () const
 Get most recent aft-forward tilt measurement. More...
 
carma::services::Angle getMostRecentLeftRightTilt () const
 Get most recent left-right tilt measurement. More...
 
std::map
< carma::canbus::msgType,
std::string > 
getSlowMonitors () const
 Return a map of this devices slow monitor points. More...
 
std::map
< carma::canbus::msgType,
std::string > 
getSlowMonitors () const
 Return a map of this devices slow monitor points. More...
 
void processMsg (carma::canbus::msgType mid, std::vector< carma::canbus::byteType > &data, bool sim)
 Process a CAN message addressed to the CryoCompressor module. More...
 
void processMsg (carma::canbus::msgType mid, std::vector< carma::canbus::byteType > &data, bool sim)
 Process a CAN message addressed to the CryoCompressor module. More...
 
void regulateTemperature (OpMode opMode, float pwrFract)
 Regulate temperature. More...
 
void regulateTemperature (OpMode opMode, float pwrFract)
 Regulate temperature. More...
 
void setLoopBandwidth (float bw)
 Set loop bandwidth. More...
 
void setLoopBandwidth (float bw)
 Set loop bandwidth. More...
 
void setLoopGain (float gain)
 Set loop gain. More...
 
void setLoopGain (float gain)
 Set loop gain. More...
 
void setLoopIntegrationConstant (float loopInteg)
 Set loop integration constant. More...
 
void setLoopIntegrationConstant (float loopInteg)
 Set loop integration constant. More...
 
void setLoopRateConstant (float rateConst)
 Set loop rate constant. More...
 
void setLoopRateConstant (float rateConst)
 Set loop rate constant. More...
 
void setTemperature (float temp)
 Set temperature of the tiltmeter. More...
 
void setTemperature (float temp)
 Set temperature of the tiltmeter. More...
 
carma::canbus::Message simulateMsg (carma::canbus::msgType mid)
 Produce a simulated CAN message for a given msgType. More...
 
carma::canbus::Message simulateMsg (carma::canbus::msgType mid)
 Produce a simulated CAN message for a given msgType. More...
 
 Tiltmeter (carma::canbus::nodeType node, carma::canbus::CanOutput &io, carma::monitor::OvroSubsystem &mon, unsigned short antNo)
 Constructor. More...
 
 Tiltmeter (carma::canbus::nodeType node, carma::canbus::CanOutput &io, carma::monitor::BimaSubsystem &bmon)
 Constructor. More...
 
void updateFrameData ()
 Update Frame Data. More...
 
void updateFrameData ()
 Update Frame Data. More...
 
void writeLoopParametersToEEPROM ()
 Write loop parameters to EEPROM. More...
 
void writeLoopParametersToEEPROM ()
 Write loop parameters to EEPROM. More...
 
virtual ~Tiltmeter ()
 Destructor. More...
 
virtual ~Tiltmeter ()
 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...
 
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

Tiltmeter device class.

This class implements API No. 040 for the OVRO Tiltmeter CAN module.

Definition at line 34 of file Tiltmeter.h.

Member Enumeration Documentation

Enumeration for Thermal control operation mode.

Definition at line 112 of file Tiltmeter.h.

Enumeration for Thermal control operation mode.

Definition at line 124 of file Tiltmeter.h.

Constructor & Destructor Documentation

carma::antenna::ovro::Tiltmeter::Tiltmeter ( carma::canbus::nodeType  node,
carma::canbus::CanOutput io,
carma::monitor::BimaSubsystem &  bmon 
)

Constructor.

Parameters
nodeLocation id of this instance (node location id).
ioReference to CanOutput class.
antNoBIMA (6-m) Antenna number [7..15].
virtual carma::antenna::ovro::Tiltmeter::~Tiltmeter ( )
virtual

Destructor.

carma::antenna::ovro::Tiltmeter::Tiltmeter ( carma::canbus::nodeType  node,
carma::canbus::CanOutput io,
carma::monitor::OvroSubsystem &  mon,
unsigned short  antNo 
)

Constructor.

Parameters
nodeLocation id of this instance (node location id).
ioReference to CanOutput class.
antNoOVRO (10-m) Antenna number [1..6].
virtual carma::antenna::ovro::Tiltmeter::~Tiltmeter ( )
virtual

Destructor.

Member Function Documentation

std::map<carma::canbus::msgType, std::string> carma::antenna::ovro::Tiltmeter::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 OFFLINE state.

Returns
a map of the devices half second monitor points string descriptions keyed by message id.

Implements carma::canbus::Device.

std::map<carma::canbus::msgType, std::string> carma::antenna::ovro::Tiltmeter::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 OFFLINE state.

Returns
a map of the devices half second monitor points string descriptions keyed by message id.

Implements carma::canbus::Device.

carma::services::Angle carma::antenna::ovro::Tiltmeter::getMostRecentAftForwardTilt ( ) const

Get most recent aft-forward tilt measurement.

Note that this is the raw tilt value - no tilt zero has been applied.

Returns
Most recent aft-forward tilt.
carma::services::Angle carma::antenna::ovro::Tiltmeter::getMostRecentLeftRightTilt ( ) const

Get most recent left-right tilt measurement.

Note that this is the raw tilt value - no tilt zero has been applied.

Returns
Most recent left-right tilt measurement.
std::map<carma::canbus::msgType, std::string> carma::antenna::ovro::Tiltmeter::getSlowMonitors ( ) const
virtual

Return a map of this devices slow monitor points.

These monitor points will be simulated every 5 seconds if the device is in the OFFLINE state.

Returns
a map of the devices slow (5 sec) monitor points string descriptions keyed by message id.

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

std::map<carma::canbus::msgType, std::string> carma::antenna::ovro::Tiltmeter::getSlowMonitors ( ) const
virtual

Return a map of this devices slow monitor points.

These monitor points will be simulated every 5 seconds if the device is in the OFFLINE state.

Returns
a map of the devices slow (5 sec) monitor points string descriptions keyed by message id.

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

void carma::antenna::ovro::Tiltmeter::processMsg ( carma::canbus::msgType  mid,
std::vector< carma::canbus::byteType > &  data,
bool  sim 
)
virtual

Process a CAN message addressed to the CryoCompressor module.

This routine is responsible for processing all CAN messages addressed to this device.

Parameters
midthe 10bit message id (carma::canbus::msgType)
datareference to the byte vector containing the raw data.
simIndicates if message is simulate or real.
See Also
carma::canbus::Device::processMsg

Implements carma::canbus::Device.

void carma::antenna::ovro::Tiltmeter::processMsg ( carma::canbus::msgType  mid,
std::vector< carma::canbus::byteType > &  data,
bool  sim 
)
virtual

Process a CAN message addressed to the CryoCompressor module.

This routine is responsible for processing all CAN messages addressed to this device.

Parameters
midthe 10bit message id (carma::canbus::msgType)
datareference to the byte vector containing the raw data.
simIndicates if message is simulate or real.
See Also
carma::canbus::Device::processMsg

Implements carma::canbus::Device.

void carma::antenna::ovro::Tiltmeter::regulateTemperature ( OpMode  opMode,
float  pwrFract 
)

Regulate temperature.

Parameters
opModeOperation mode of thermal control loop.
pwrFractFraction of maximum power - only used if opMode = MANUAL).
void carma::antenna::ovro::Tiltmeter::regulateTemperature ( OpMode  opMode,
float  pwrFract 
)

Regulate temperature.

Parameters
opModeOperation mode of thermal control loop.
pwrFractFraction of maximum power - only used if opMode = MANUAL).
void carma::antenna::ovro::Tiltmeter::setLoopBandwidth ( float  bw)

Set loop bandwidth.

Parameters
bwLoop BW (inverse of sample and correction interval) in Hz.
See Also
writeLoopParametersToEEPROM.
void carma::antenna::ovro::Tiltmeter::setLoopBandwidth ( float  bw)

Set loop bandwidth.

Parameters
bwLoop BW (inverse of sample and correction interval) in Hz.
See Also
writeLoopParametersToEEPROM.
void carma::antenna::ovro::Tiltmeter::setLoopGain ( float  gain)

Set loop gain.

Set a new value for the loop gain.

Parameters
gainLoop gain in (percent max pwr)/K.
See Also
writeLoopParametersToEEPROM
void carma::antenna::ovro::Tiltmeter::setLoopGain ( float  gain)

Set loop gain.

Set a new value for the loop gain.

Parameters
gainLoop gain in (percent max pwr)/K.
See Also
writeLoopParametersToEEPROM
void carma::antenna::ovro::Tiltmeter::setLoopIntegrationConstant ( float  loopInteg)

Set loop integration constant.

Parameters
loopIntegLoop integration constant in (percent max pwr)/K.
See Also
writeLoopParametersToEEPROM
void carma::antenna::ovro::Tiltmeter::setLoopIntegrationConstant ( float  loopInteg)

Set loop integration constant.

Parameters
loopIntegLoop integration constant in (percent max pwr)/K.
See Also
writeLoopParametersToEEPROM
void carma::antenna::ovro::Tiltmeter::setLoopRateConstant ( float  rateConst)

Set loop rate constant.

Parameters
rateConstLoop derivative gain in (percent max. pwr)/K.
See Also
writeLoopParametersToEEPROM
void carma::antenna::ovro::Tiltmeter::setLoopRateConstant ( float  rateConst)

Set loop rate constant.

Parameters
rateConstLoop derivative gain in (percent max. pwr)/K.
See Also
writeLoopParametersToEEPROM
void carma::antenna::ovro::Tiltmeter::setTemperature ( float  temp)

Set temperature of the tiltmeter.

Parameters
tempTemperature in C.
void carma::antenna::ovro::Tiltmeter::setTemperature ( float  temp)

Set temperature of the tiltmeter.

Parameters
tempTemperature in C.
carma::canbus::Message carma::antenna::ovro::Tiltmeter::simulateMsg ( carma::canbus::msgType  mid)
virtual

Produce a simulated CAN message for a given msgType.

This routine creates a Message with simulated data for an input message id. The returned message is automatically placed in the CAN message queue for retrieval and processing by the Master class. It thus can be used to test the processMsg method above.

Parameters
midthe 10bit message id (carma::canbus::msgType)

Implements carma::canbus::Device.

carma::canbus::Message carma::antenna::ovro::Tiltmeter::simulateMsg ( carma::canbus::msgType  mid)
virtual

Produce a simulated CAN message for a given msgType.

This routine creates a Message with simulated data for an input message id. The returned message is automatically placed in the CAN message queue for retrieval and processing by the Master class. It thus can be used to test the processMsg method above.

Parameters
midthe 10bit message id (carma::canbus::msgType)

Implements carma::canbus::Device.

void carma::antenna::ovro::Tiltmeter::updateFrameData ( )
virtual

Update Frame Data.

Reimplemented from carma::canbus::Device.

void carma::antenna::ovro::Tiltmeter::updateFrameData ( )
virtual

Update Frame Data.

Reimplemented from carma::canbus::Device.

void carma::antenna::ovro::Tiltmeter::writeLoopParametersToEEPROM ( )

Write loop parameters to EEPROM.

void carma::antenna::ovro::Tiltmeter::writeLoopParametersToEEPROM ( )

Write loop parameters to EEPROM.


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