![]() |
VR-Forces 4.0.4 Class Documentation
|
Class which manages the sending of sensor contact information to the GUI from one particular sensor on an entity. More...
Public Member Functions | |
| DtObjectSensorMonitor (DtVrfObject *hostObject, const DtSensorContactInfoList *contactInfoList, const DtString &sensorName, int sensorType) | |
| constructor | |
| virtual | ~DtObjectSensorMonitor () |
| destructor | |
| virtual bool | init () |
| Calls registerMessageCallbacks(). | |
| virtual void | registerMessageCallbacks () |
| Registers for sensorDataRequest and sensorDataUnsubscribe messages. | |
| virtual void | processSensorDataRequest (DtSimMessage *msg) |
| virtual void | processSensorDataUnsubscribe (DtSimMessage *msg) |
| virtual void | createAndSendSensorDataMessage () |
| Constructs a DtSensorData message based on the current state of the sensor PSR, and sends it to the network. | |
| virtual void | notifyTargetsChanged () |
| Called by the object sensor whenever the target list in the PSR has changed. | |
Static Public Member Functions | |
| static void | sensorDataRequestCallback (DtSimMessage *msg, void *usrData) |
| static void | sensorDataUnsubscribeCallback (DtSimMessage *msg, void *usrData) |
Protected Types | |
| typedef std::list < DtSimulationAddress > | DtSubscriberList |
Protected Member Functions | |
| virtual bool | onSubscriberList (const DtSimulationAddress &add) const |
| Returns true if this address is on the current subscriber list. | |
| virtual void | addToSubscriberList (const DtSimulationAddress &add) |
| virtual void | removeFromSubscriberList (const DtSimulationAddress &add) |
| virtual int | numberOfSubscribers () |
| returns the number of subscribers. | |
Protected Attributes | |
| DtVrfObject * | myHostObject |
| const DtSensorContactInfoList * | mySensorContactInfoList |
| int | mySensorType |
| DtString | mySensorName |
| DtSubscriberList | mySubscriberList |
Private Member Functions | |
| DtObjectSensorMonitor () | |
| default constructor; not implemented | |
| DtObjectSensorMonitor (const DtObjectSensorMonitor &orig) | |
| copy constructor; not implemented | |
| const DtObjectSensorMonitor & | operator= (const DtObjectSensorMonitor &orig) |
| assignment operator; not implemented | |
Class which manages the sending of sensor contact information to the GUI from one particular sensor on an entity.
typedef std::list<DtSimulationAddress> DtObjectSensorMonitor::DtSubscriberList [protected] |
| DtObjectSensorMonitor::DtObjectSensorMonitor | ( | ) | [private] |
default constructor; not implemented
| DtObjectSensorMonitor::DtObjectSensorMonitor | ( | const DtObjectSensorMonitor & | orig | ) | [private] |
copy constructor; not implemented
| DtObjectSensorMonitor::DtObjectSensorMonitor | ( | DtVrfObject * | hostObject, |
| const DtSensorContactInfoList * | contactInfoList, | ||
| const DtString & | sensorName, | ||
| int | sensorType | ||
| ) |
constructor
| virtual DtObjectSensorMonitor::~DtObjectSensorMonitor | ( | ) | [virtual] |
destructor
| const DtObjectSensorMonitor& DtObjectSensorMonitor::operator= | ( | const DtObjectSensorMonitor & | orig | ) | [private] |
assignment operator; not implemented
| virtual bool DtObjectSensorMonitor::init | ( | ) | [virtual] |
Calls registerMessageCallbacks().
| virtual void DtObjectSensorMonitor::registerMessageCallbacks | ( | ) | [virtual] |
Registers for sensorDataRequest and sensorDataUnsubscribe messages.
| static void DtObjectSensorMonitor::sensorDataRequestCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static] |
| virtual void DtObjectSensorMonitor::processSensorDataRequest | ( | DtSimMessage * | msg | ) | [virtual] |
| static void DtObjectSensorMonitor::sensorDataUnsubscribeCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static] |
| virtual void DtObjectSensorMonitor::processSensorDataUnsubscribe | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtObjectSensorMonitor::createAndSendSensorDataMessage | ( | ) | [virtual] |
Constructs a DtSensorData message based on the current state of the sensor PSR, and sends it to the network.
| virtual void DtObjectSensorMonitor::notifyTargetsChanged | ( | ) | [virtual] |
Called by the object sensor whenever the target list in the PSR has changed.
This triggers sensorData messages to be sent out, if anyone is currently subscribed.
| virtual bool DtObjectSensorMonitor::onSubscriberList | ( | const DtSimulationAddress & | add | ) | const [protected, virtual] |
Returns true if this address is on the current subscriber list.
| virtual void DtObjectSensorMonitor::addToSubscriberList | ( | const DtSimulationAddress & | add | ) | [protected, virtual] |
| virtual void DtObjectSensorMonitor::removeFromSubscriberList | ( | const DtSimulationAddress & | add | ) | [protected, virtual] |
| virtual int DtObjectSensorMonitor::numberOfSubscribers | ( | ) | [protected, virtual] |
returns the number of subscribers.
DtVrfObject* DtObjectSensorMonitor::myHostObject [protected] |
const DtSensorContactInfoList* DtObjectSensorMonitor::mySensorContactInfoList [protected] |
int DtObjectSensorMonitor::mySensorType [protected] |
DtString DtObjectSensorMonitor::mySensorName [protected] |