CARMA C++
|
Downconverter Device class implementation. More...
#include <carma/downconverter/common/Downconverter.h>
Public Member Functions | |
::CORBA::Boolean | checkIfOutputPower (::CORBA::Float power,::CORBA::Float delta) |
void | disableCommandLogging () |
Disable command logging. More... | |
Downconverter (carma::canbus::nodeType node, carma::canbus::CanOutput &io, carma::monitor::WbdcSubsystem &wbdcSubsys) | |
Constructor. More... | |
void | enableCommandLogging () |
Enable command logging. More... | |
void | enableIfOutAlc (::CORBA::Boolean enable) |
void | enableRfInputAmp (::CORBA::Boolean enable) |
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 > | getSlowMonitors () const |
Retrieve a map of this devices slow monitor points. More... | |
void | processMsg (carma::canbus::msgType mid, carma::canbus::DataVector &data, bool sim) |
Process a CAN message. More... | |
void | setIfOut (::CORBA::Float ifout) |
void | setIfOutAtten (::CORBA::Float atten) |
void | setIfOutPreset () |
void | setPsys (::CORBA::Float psys) |
void | setPsysAtten (::CORBA::Float atten) |
void | setPsysPreset () |
carma::canbus::Message | simulateMsg (carma::canbus::msgType mid) |
Produce a simulated CAN message for a given msgType. More... | |
void | updateFrameData () |
Update data on a frame time scale This routine is called automatically by carma::canbus::Master every half second. More... | |
virtual | ~Downconverter () |
Destructor. More... | |
![]() | |
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... | |
![]() | |
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... | |
Static Public Member Functions | |
static carma::canbus::nodeType | calculateNodeId (short input, short band) |
Helper routine to calculate a downconverter node id from an input and band id. More... | |
static carma::canbus::apiType | getApiId () |
Staticly retrieve the API Id. More... | |
![]() | |
static keyType | createKey (apiType api, nodeType node) |
Additional Inherited Members | |
![]() | |
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 |
![]() | |
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... | |
![]() | |
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 bool | isSystemMonitorPacket (carma::canbus::msgType) |
Check that input message type is a system monitor packet. More... | |
![]() | |
const apiType | api_ |
CanOutput & | io_ |
Reference to CanOutput object. More... | |
const keyType | key_ |
const nodeType | node_ |
![]() | |
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 |
Downconverter Device class implementation.
This class implements the carma::canbus::Device base class for Carma CAN API 130 describing the Wideband Downconverter CAN device.
Definition at line 35 of file Downconverter.h.
carma::downconverter::Downconverter::Downconverter | ( | carma::canbus::nodeType | node, |
carma::canbus::CanOutput & | io, | ||
carma::monitor::WbdcSubsystem & | wbdcSubsys | ||
) |
Constructor.
Creates a Downconverter device with the given node id.
node | Node id of device. |
io | Reference to CanOutput class. |
|
virtual |
Destructor.
|
static |
Helper routine to calculate a downconverter node id from an input and band id.
Note that both input parameters are ids not indices thus they both start from 1 (input 1 - 8, band 1 - 16).
input | Input (antenna) id (1-8). |
band | Band id (1-16) - not the index. |
void carma::downconverter::Downconverter::disableCommandLogging | ( | ) |
Disable command logging.
void carma::downconverter::Downconverter::enableCommandLogging | ( | ) |
Enable command logging.
|
static |
Staticly retrieve the API Id.
This is a helper routine and does the same thing as the getApi member function with the exception that it can be called staticly.
|
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.
Implements carma::canbus::Device.
|
virtual |
Retrieve 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.
Reimplemented from carma::canbus::devices::XacDevice.
void carma::downconverter::Downconverter::processMsg | ( | carma::canbus::msgType | mid, |
carma::canbus::DataVector & | data, | ||
bool | sim | ||
) |
Process a CAN message.
This routine is responsible for processing all CAN messages addressed to this device.
mid | the 10bit message id (carma::canbus::msgType) |
data | reference to the byte vector containing the raw data. |
|
virtual |
Produce a simulated CAN message for a given msgType.
This routine creates a Message with simulated data for the input message id. The returned message is automatically placed in the CAN message queue for retrieval and processing by the Master class. When this device is OFFLINE, it is called for each message type returned from Downconverter::getSlowMonitors and Downconverter::getHalfSecMonitors and thus tests the processMsg() method and monitor system. Note that this routine is called by the carma::canbus::Master base class automatically.
mid | Message id of CAN message to simulate. |
Implements carma::canbus::Device.
|
virtual |
Update data on a frame time scale This routine is called automatically by carma::canbus::Master every half second.
It is used to set the state monitor point.
Reimplemented from carma::canbus::Device.