|
CARMA C++
|
10-m Antenna Drive Module CAN Implementation (API No. More...
#include <carma/antenna/ovro/canbus/Drive.h>
Classes | |
| struct | TimestampedAzOverlapState |
| Timestamped az overlap state. More... | |
Public Types | |
| enum | BaseSwitchState { OFF, REMOTE_CONTROL, LOCAL_CONTROL } |
| Enum describing base switch state. More... | |
Public Member Functions | |
| Drive (carma::canbus::CanOutput &canOutput, carma::monitor::OvroSubsystem &monitorSubsys, unsigned short antNo, const std::string confFilename="antenna/ovro/drive.conf") | |
| Constructor. More... | |
| TimestampedAzOverlapState | getAzOverlapState () const |
| Retrieve boolean indicating if azimuth is in the overlap region. More... | |
| BaseSwitchState | getBaseSwitchState () const |
| bool | getControllerOvertemp () const |
| Retrieve boolean indicating if any of the three drive controllers shows an overtemp fault. More... | |
| carma::canbus::MsgIdInfoMap | getHalfSecMonitors () const |
| Get map of half second monitor points processed by this class. More... | |
| carma::canbus::MsgIdInfoMap | getSlowMonitors () const |
| Get map of slow monitor points processed by this class. More... | |
| bool | isAtHwLimit () const |
| Retrieve boolean indicating if drive is at a hw limit. More... | |
| bool | isDriveEnabled () const |
| Retrieve boolean indicating if drive is enabled. More... | |
| bool | isInEngineeringMode () const |
| Is module in engineering mode? More... | |
| void | processMsg (carma::canbus::msgType messageId,::std::vector< carma::canbus::byteType > &data, bool sim) |
| Process CAN message. More... | |
| void | setAzElDriveRates (double azRateInRadPerS, double elRateInRadPerS, const carma::services::Angle &elevation) |
| Set azimuth and elevation drive rates. More... | |
| void | setEngineeringMode (bool enable) |
| Set engineering mode. More... | |
| void | setRawDriveVoltages (float azRawVolts, float elRawVolts) |
| Set raw drive voltages for engineering purposes. More... | |
| carma::canbus::Message | simulateMsg (carma::canbus::msgType messageId) |
| Simulate CAN message. More... | |
| void | stop () |
| Stop the drives This is just a shortcut for enabling the drives followed by seting the drive rates to 0. More... | |
| void | updateConfDataFromFile () |
| Update configuration parameters from conf file. More... | |
| void | writeMonitorData () |
| Write monitor data. More... | |
| virtual | ~Drive () |
| 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 | |
| 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_ |
| CanOutput & | io_ |
| 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 |
10-m Antenna Drive Module CAN Implementation (API No.
248). All commands which move an antenna must be called every 1/2 second. If this isn't done, the drive system will timeout, stop and apply the breaks. This class internally reads from a configuration file which contains important parameters such as DC offsets, rate/voltage gains and max slew rates. The filename is currently conf/antenna/ovro/drive.conf.
|
explicit |
Constructor.
| canOutput | Reference to CanIo or CanOutput instance. |
| monitorSubsys | Reference to Ovro monitor subsystem instance. |
| shareWithVax | When true, don't write monitor points which typically come from the vax. |
| confFilename | Name of configuration file. |
|
virtual |
Destructor.
| TimestampedAzOverlapState carma::antenna::ovro::Drive::getAzOverlapState | ( | ) | const |
Retrieve boolean indicating if azimuth is in the overlap region.
Overlap is the angular position from roughly 0 to -80 degrees where the positive-only encoder readings 'overlap'.
| bool carma::antenna::ovro::Drive::getControllerOvertemp | ( | ) | const |
Retrieve boolean indicating if any of the three drive controllers shows an overtemp fault.
|
virtual |
Get map of half second monitor points processed by this class.
Implements carma::canbus::Device.
|
virtual |
Get map of slow monitor points processed by this class.
Reimplemented from carma::canbus::devices::XacDevice.
| bool carma::antenna::ovro::Drive::isAtHwLimit | ( | ) | const |
Retrieve boolean indicating if drive is at a hw limit.
Note this is a 'processed' limit boolean - in certain cases all drive limits may report true, even though no hardware limit exists. These conditions are when the drive system is disabled or the local/remote/off switch is in the OFF state. In these instances, this routine returns false.
| bool carma::antenna::ovro::Drive::isDriveEnabled | ( | ) | const |
Retrieve boolean indicating if drive is enabled.
| bool carma::antenna::ovro::Drive::isInEngineeringMode | ( | ) | const |
Is module in engineering mode?
| void carma::antenna::ovro::Drive::processMsg | ( | carma::canbus::msgType | messageId, |
| ::std::vector< carma::canbus::byteType > & | data, | ||
| bool | sim | ||
| ) |
Process CAN message.
| void carma::antenna::ovro::Drive::setAzElDriveRates | ( | double | azRateInRadPerS, |
| double | elRateInRadPerS, | ||
| const carma::services::Angle & | elevation | ||
| ) |
Set azimuth and elevation drive rates.
| azRateInRadPerS | Requested azimuth drive rate in rad/s. |
| elRateInRadPerS | Requested elevation drive rate rad/s. |
| elevation | Current elevation in radians. |
| void carma::antenna::ovro::Drive::setEngineeringMode | ( | bool | enable | ) |
Set engineering mode.
| enable | True to enable engineering mode, false to disable. |
| void carma::antenna::ovro::Drive::setRawDriveVoltages | ( | float | azRawVolts, |
| float | elRawVolts | ||
| ) |
Set raw drive voltages for engineering purposes.
Use with caution. DC offsets are not applied in this mode.
| azRawVolts | Raw azimuth voltage in volts. |
| elRawVolts | Raw elevation voltage in volts. |
|
virtual |
| void carma::antenna::ovro::Drive::stop | ( | ) |
Stop the drives This is just a shortcut for enabling the drives followed by seting the drive rates to 0.
| void carma::antenna::ovro::Drive::updateConfDataFromFile | ( | ) |
Update configuration parameters from conf file.
The location of the configuration file is specified as a constructor parameter to this class.
| carma::util::FileNotFoundException | if config file isn't found. |
| carma::util::IllegalStateException | if file is corrupt. |
| void carma::antenna::ovro::Drive::writeMonitorData | ( | ) |
Write monitor data.
Write CANbus independent monitor data, this is data which is either calculated or updated from control commands rather than events received from the CANBus.