VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtObjectSensorMonitor Class Reference

Class which manages the sending of sensor contact information to the GUI from one particular sensor on an entity. More...

List of all members.

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

DtVrfObjectmyHostObject
const DtSensorContactInfoListmySensorContactInfoList
int mySensorType
DtString mySensorName
DtSubscriberList mySubscriberList

Private Member Functions

 DtObjectSensorMonitor ()
 default constructor; not implemented
 DtObjectSensorMonitor (const DtObjectSensorMonitor &orig)
 copy constructor; not implemented
const DtObjectSensorMonitoroperator= (const DtObjectSensorMonitor &orig)
 assignment operator; not implemented

Detailed Description

Class which manages the sending of sensor contact information to the GUI from one particular sensor on an entity.


Member Typedef Documentation

typedef std::list<DtSimulationAddress> DtObjectSensorMonitor::DtSubscriberList [protected]

Constructor & Destructor Documentation

default constructor; not implemented

copy constructor; not implemented

DtObjectSensorMonitor::DtObjectSensorMonitor ( DtVrfObject hostObject,
const DtSensorContactInfoList contactInfoList,
const DtString sensorName,
int  sensorType 
)

constructor

destructor


Member Function Documentation

const DtObjectSensorMonitor& DtObjectSensorMonitor::operator= ( const DtObjectSensorMonitor orig) [private]

assignment operator; not implemented

virtual bool DtObjectSensorMonitor::init ( ) [virtual]

Registers for sensorDataRequest and sensorDataUnsubscribe messages.

static void DtObjectSensorMonitor::sensorDataRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtObjectSensorMonitor::sensorDataUnsubscribeCallback ( DtSimMessage msg,
void *  usrData 
) [static]

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.


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)