CARMA C++
|
Telemetry Device class implementation. More...
#include <carma/antenna/bima/Telemetry.h>
Public Member Functions | |
bool | assertDataAndSize (std::vector< carma::canbus::byteType > &data) |
void | emulateReaderThread (void) |
void | emulateWriterThread (void) |
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, double rxMJD, std::vector< carma::canbus::byteType > data, bool sim) |
Process a CAN message. More... | |
void | readerThread (void) |
void | resetNode () |
Engineering commands. More... | |
void | run (void) |
carma::canbus::Message | simulateMsg (carma::canbus::msgType mid) |
Produce a simulated CAN message for a given msgType. More... | |
Telemetry (int canbusBoardNo, int canbusSlotNo, Configuration &config, SharedMemory *shm) | |
Constructor. More... | |
void | writerThread (void) |
virtual | ~Telemetry () |
Destructor. More... | |
Static Public Member Functions | |
static carma::canbus::apiType | getApiId () |
Staticly retrieve the API Id. More... | |
static void * | startEmulateReaderThread (void *arg) |
static void * | startEmulateWriterThread (void *arg) |
static void * | startReaderThread (void *arg) |
static void * | startWriterThread (void *arg) |
Static Public Attributes | |
static const carma::canbus::msgType | CLEARLOG = 0x3F4 |
static const carma::canbus::msgType | DOWNLOAD = 0x3FD |
static const carma::canbus::msgType | QUERYLOG = 0x3F0 |
static const carma::canbus::msgType | READSPACEQRY = 0x004 |
static const carma::canbus::msgType | RESET = 0x000 |
static const carma::canbus::msgType | SERIALDISABLE = 0x3F2 |
static const carma::canbus::msgType | SERIALENABLE = 0x3F1 |
static const carma::canbus::msgType | SETBITS = 0x007 |
static const carma::canbus::msgType | TMTYDISABLE = 0x005 |
static const carma::canbus::msgType | TMTYENABLE = 0x006 |
static const carma::canbus::msgType | TOGGLEBIT = 0x002 |
static const carma::canbus::msgType | VMEWRITE = 0x001 |
static const carma::canbus::msgType | WRITESPACEQRY = 0x003 |
Telemetry Device class implementation.
Server stub for Telemetry Documentation for the Telemetry API may be found at tbd
This class implements the carma::canbus::Device base class for Carma CAN API 144 describing the Telemetry CAN device.
The canbus interface for the Telemetry systems is documented in the CANBus API No. 144.
Definition at line 111 of file Telemetry.h.
carma::antenna::bima::Telemetry::Telemetry | ( | int | canbusBoardNo, |
int | canbusSlotNo, | ||
Configuration & | config, | ||
SharedMemory * | shm | ||
) |
Constructor.
Creates a Telemetry device with the given node id.
node | Node id of device. |
io | Reference to CanOutput class. |
|
virtual |
Destructor.
|
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.
std::map<carma::canbus::msgType, std::string> carma::antenna::bima::Telemetry::getHalfSecMonitors | ( | ) | const |
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.
std::map<carma::canbus::msgType, std::string> carma::antenna::bima::Telemetry::getSlowMonitors | ( | ) | const |
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.
void carma::antenna::bima::Telemetry::processMsg | ( | carma::canbus::msgType | mid, |
double | rxMJD, | ||
std::vector< carma::canbus::byteType > | 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. |
void carma::antenna::bima::Telemetry::resetNode | ( | ) |
Engineering commands.
carma::canbus::Message carma::antenna::bima::Telemetry::simulateMsg | ( | carma::canbus::msgType | mid | ) |
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 Loberotator::getSlowMonitors and Loberotator::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. |