CARMA C++
|
Carma Wideband Downconverter CAN Master class. More...
#include <carma/downconverter/wideband/WbdcMaster.h>
Public Member Functions | |
carma::downconverter::BlockDownconverterControl_ptr | BlockDownconverter (CORBA::Short inputNo) |
carma::downconverter::DownconverterControl_ptr | Downconverter (short input, short band) |
carma::downconverter::BlockDownconverterControl_ptr | GlobalBlockDownconverter () |
carma::downconverter::DownconverterControl_ptr | GlobalDownconverter () |
carma::downconverter::LoMonitorControl_ptr | GlobalLoMonitor () |
carma::downconverter::NoiseSourceControl_ptr | GlobalNoiseSource () |
carma::downconverter::QuadModControl_ptr | GlobalQuadMod () |
bool | isDone () |
Query to see if the System::quit() method has been invoked. More... | |
carma::downconverter::SldcLoControl_ptr | LoControl () |
carma::downconverter::LoMonitorControl_ptr | LoMonitor () |
carma::downconverter::NoiseSourceControl_ptr | NoiseSource () |
carma::downconverter::QuadModControl_ptr | QuadMod (short input) |
void | quit () |
void | reset () |
void | selectFilter (carma::downconverter::DownconverterControl::FilterType filter, CORBA::UShort bandNo) |
void | selectSidebandFrequency (carma::downconverter::DownconverterControl::SidebandType sideband, CORBA::Double lofreq, CORBA::UShort bandNo) |
void | setPsys (CORBA::Float psys, CORBA::UShort inputNo, CORBA::UShort bandNo) |
void | setPsysPreset (CORBA::UShort inputNo, CORBA::UShort bandNo) |
void | softReset () |
carma::downconverter::SpectralDownconverterControl_ptr | SpectralDownconverter (CORBA::Short input, CORBA::Short band) |
WbdcMaster (carma::corba::Server &server, carma::monitor::WbdcSubsystem &mon) | |
Default constructor for emulation. More... | |
WbdcMaster (carma::corba::Server &server, int modulBusNo, int slotNo, carma::monitor::WbdcSubsystem &mon) | |
Wideband Downconverter Master constructor. More... | |
WbdcMaster (carma::corba::Server &server, int modulBusNo, carma::monitor::WbdcSubsystem &mon) | |
Wideband Downconverter Master constructor. More... | |
virtual | ~WbdcMaster () |
Destructor. More... | |
![]() | |
Master (bool simOfflineNodes=true) | |
Default constructor for emulation. More... | |
Master (int boardId, bool simOfflineNodes=false, bool reset=false, bool terminate=true) | |
Master constructor. More... | |
Master (int boardId, int modulbusId, bool simOfflineNodes=false, bool reset=false, bool terminate=true) | |
Master constructor. More... | |
Master (const ::std::vector< DevTermPair > &devTermPairs, bool simOfflineNodes=false, bool reset=false) | |
Constructor for arbitrary number of CanDio ports. More... | |
void | run () |
Run the Master. More... | |
void | stop () |
Stop running internal Master threads. More... | |
virtual | ~Master () |
Master destructor. More... | |
![]() | |
CanDio () | |
Default constructor. More... | |
CanDio (int boardId, bool reset=true, bool terminate=true) | |
Constructor to control both CAN busses on a single board. More... | |
CanDio (int boardId, int slotId, bool reset=true, bool terminate=true) | |
Constructor to control a single CAN bus. More... | |
CanDio (const std::vector< DevTermPair > &devTermPairs, bool reset=true) | |
Constructor to control arbitrary number of CAN busses. More... | |
void | echoAll (bool enable) |
Enable or disable echoing sent messages back through the read interface. More... | |
std::map< busIdType, carma::canbus::busStatusType > | getBusStatus () |
carma::canbus::Message | getMessage () |
Retrieve a CAN message. More... | |
bool | isTerminated () |
Return termination state. More... | |
void | postMessage (const carma::canbus::Message &msg, carma::canbus::txPriorityType prio=carma::canbus::NORMAL) |
Post a CAN message. More... | |
void | reset () |
Reset. More... | |
![]() | |
virtual BusStatusMap | getBusStatus () const |
Retrieve bus statistics. More... | |
virtual | ~CanIo () |
Virtual destructor. More... | |
Protected Member Functions | |
void | updateStatus () |
Update the status of the Cwdc CAN Master. More... | |
![]() | |
void | addDevice (Device *device) |
Add a device to the master. More... | |
virtual std::map< msgType, std::string > | getControls () const |
Get controls. More... | |
Device * | getDevice (apiType api, nodeType node) |
Get pointer to a device. More... | |
int | getDonglelessPacketCount () const |
Get 'Dongleless node' packet count This routine returns the number of Dongleless node packets detected by Master. More... | |
unsigned int | getLatePacketCount () |
Get combined late packet count from all devices. More... | |
int | getOfflineNodeCount () const |
Get number of offline nodes. More... | |
int | getOnlineNodeCount () const |
Get number of online nodes. More... | |
int | getUnknownPacketCount () const |
Get number of unknown packets This method returns the number of CAN packets that canbus::Master does not recognize. More... | |
Master (const Master &) | |
Master & | operator= (const Master &) |
void | removeDevice (apiType api, nodeType node) |
Remove a device. More... | |
virtual void | runReadThread () |
Thread to read and process incoming CAN messages. More... | |
void | runTimerThread () |
Timer thread. More... | |
virtual void | setTime () |
Send a time sync message. More... | |
void | softwareReset () |
Send a software reset command to all modules. More... | |
void | updateDevicesStates () |
Update the devices states. More... | |
![]() | |
void | clearReadQueue () |
Clear any underlying read buffers. More... | |
void | queueMessage (const Message &msg) |
Queue CAN message to be read for simulation purposes. More... | |
void | setTimestampEchoLatency (int tsLatency, busIdType busId) |
Set timestamp echo latency. More... | |
Additional Inherited Members | |
![]() | |
typedef ::std::pair< int, int > | BoardSlotPair |
Pair containing boardId (first) and slotId (second). More... | |
typedef ::std::pair < BoardSlotPair, bool > | DevTermPair |
Pair for board & slot (first) and termination setting (second). More... | |
![]() | |
static void * | readThreadEntry (void *arg) |
Entry point for main thread. More... | |
static void * | timerThreadEntry (void *arg) |
Entry point for timer thread. More... | |
![]() | |
pthread_mutex_t | deviceMutex_ |
std::map< keyType, Device * > | devices_ |
int | nDonglelessPackets_ |
int | nOfflineNodes_ |
int | nOnlineNodes_ |
int | nUnknownPackets_ |
pthread_t | readThreadId_ |
bool | running_ |
carma::util::PthreadMutex | runningMutex_ |
const int | simOfflineNodes_ |
pthread_t | timerThreadId_ |
![]() | |
std::auto_ptr < carma::canbus::CanIo > | cio_ |
std::auto_ptr< carma::canbus::Dio > | dio_ |
const long | pulseWidth_ |
Reset pulsewidth. More... | |
const bool | terminate_ |
Carma Wideband Downconverter CAN Master class.
This class realizes the carma::canbus::Master class for the Carma Wideband Downconverter CANbus system. It instantiates 128 Downconverter devices, 8 QuadratureModulator devices and a NoiseSource device which reside on the Wideband Downconverter CAN network. It is then responsible for managing them, placing device and CANbus monitor data into the monitor stream and simulating OFFLINE devices.
It simultaneously incarnates the CORBA server for the carma::downconverter::System interface. This interface is documented extensively in the Downconverter Control Interface.
Definition at line 83 of file WbdcMaster.h.
carma::downconverter::WbdcMaster::WbdcMaster | ( | carma::corba::Server & | server, |
carma::monitor::WbdcSubsystem & | mon | ||
) |
Default constructor for emulation.
This constructor is for emulation only when it is not desired or not possible to communicate with the underlying Janz hardware (i.e. the Janz hardware doesn't exist on the system). In this mode all DOs are still published, and remote method invocations are still possible. However, CANbus writes will go to /dev/null rather than the CANbus.
server | Reference to corba::Server instance. |
mon | Reference to WbdcSubsystem. |
carma::downconverter::WbdcMaster::WbdcMaster | ( | carma::corba::Server & | server, |
int | modulBusNo, | ||
int | slotNo, | ||
carma::monitor::WbdcSubsystem & | mon | ||
) |
Wideband Downconverter Master constructor.
Constructor for use with a single CANbus. This constructor should only be used during initial integration and testing when there are not yet enough CAN modules to utilize two busses.
server | Reference to corba::Server instance. |
modulBusNo | Janz modulBus board designator (0 - 15). |
slotNo | Janz modulBus slot # of CAN card to use (0 or 1). |
mon | Reference to WbdcSubsystem. |
carma::downconverter::WbdcMaster::WbdcMaster | ( | carma::corba::Server & | server, |
int | modulBusNo, | ||
carma::monitor::WbdcSubsystem & | mon | ||
) |
Wideband Downconverter Master constructor.
Constructor for use with two CANbusses. This constructor should be used with the final wideband downconverter implementation. It controls both CANbusses on the Carma specialized Janz Can/Dio board.
server | Reference to corba::Server instance. |
modulBusNo | Janz modulBus board designator (0 - 15). |
mon | Reference to WbdcSubsystem. |
|
virtual |
Destructor.
By declaring the WbdcMaster destructor as protected we force a user to only allocate it on the heap. This is done in order for proper use with CORBA reference counting.
bool carma::downconverter::WbdcMaster::isDone | ( | ) |
Query to see if the System::quit() method has been invoked.
This routine is for DEBUG USE ONLY to explicitly determine if a user has invoked the carma::downconverter::System::quit() method (defined in the Downconverter API).
|
protectedvirtual |
Update the status of the Cwdc CAN Master.
This routine is responsible for retrieving values specific to the state of the CanMaster object and the CANbus(ses) themselves such as number of online nodes, CANbus errors, etc. It retrieves these values and places them into the monitor stream. The method is called internally my the canbus::Master base class every half second as described in carma::canbus::Master.
Implements carma::canbus::Master.