VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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...

Public Member Functions

 DtObjectSensorMonitor (DtVrfObject *hostObject, const DtSensorContactInfoList *contactInfoList, const DtString &sensorName, int sensorType, DtObjectSensorPSR *psr)
 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
DtObjectSensorPSRmySensorPSR
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

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,
DtObjectSensorPSR psr 
)

constructor

virtual DtObjectSensorMonitor::~DtObjectSensorMonitor ( )
virtual

destructor

Member Function Documentation

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

assignment operator; not implemented

virtual bool DtObjectSensorMonitor::init ( )
virtual
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
protectedvirtual

Returns true if this address is on the current subscriber list.

virtual void DtObjectSensorMonitor::addToSubscriberList ( const DtSimulationAddress &  add)
protectedvirtual
virtual void DtObjectSensorMonitor::removeFromSubscriberList ( const DtSimulationAddress &  add)
protectedvirtual
virtual int DtObjectSensorMonitor::numberOfSubscribers ( )
protectedvirtual

returns the number of subscribers.

Member Data Documentation

DtVrfObject* DtObjectSensorMonitor::myHostObject
protected
DtObjectSensorPSR* DtObjectSensorMonitor::mySensorPSR
protected
const DtSensorContactInfoList* DtObjectSensorMonitor::mySensorContactInfoList
protected
int DtObjectSensorMonitor::mySensorType
protected
DtString DtObjectSensorMonitor::mySensorName
protected
DtSubscriberList DtObjectSensorMonitor::mySubscriberList
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)