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

DtRadarObjectSensor extends the DtSignatureObjectSensor with the capability of publishing an emitter system. More...

Inheritance diagram for DtRadarObjectSensor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtRadarObjectSensor (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtRadarObjectSensor ()
 destructor
virtual bool init ()
 Calls createPSR(), createDetectableObjectList(), createAndInitSensorMonitor() and initSensorGeometry().
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual int sensorType () const
 Returns DtSensorTypeRadar.
virtual void tick ()
 Turns on the emitter system in the first tick, as indicated in

myRadarSensorPSR.


Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual bool detectObject (DtVrfObject *object, DtRwSensorContactInfo *contactInfo)
 Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off.
virtual bool continueDetectingObject (DtVrfObject *object, DtRwSensorContactInfo *contactInfo, bool &contactInfoModified)
 Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off.
virtual const char * defaultPSRType () const
virtual void createAndInitEmitterSystem ()
 Creates a new DtVrfEmitterSystem and assigns it to myEmitterSystem.
virtual void destroyEmitterSystem ()
 Removes the emitter system.
virtual void processSetEmitterRequestMessage (DtSimMessage *msg)
 Calls setEmitterSystemOn() with the value specified in the message if the message matches our emitter system ID.
virtual void processSetRadarModeRequestMessage (DtSimMessage *msg)
virtual void processRequestRadarModesAdmin (DtString receiver, DtString sender, bool isEchelonId, const DtVrfObjectMessage *msg)
virtual void setEmitterSystemOn (bool onOff)
 Changes the on/off state of myEmitterSystem, and changes the emitter system on value in the PSR.

Static Protected Member Functions

static void setEmitterRequestCallback (DtSimMessage *msg, void *usrData)
 Static callback method for setEmitter messages.
static void setRadarModeRequestCallback (DtSimMessage *msg, void *usrData)
static void requestRadarModesAdminCallback (const DtVrfObjectMessage *msg, void *usr)

Protected Attributes

const
DtRadarObjectSensorDescriptor
myRadarObjectSensorDescriptor
DtVrfEmitterSystemmyEmitterSystem
DtRadarObjectSensorPSRmyRadarSensorPSR
 DtObjectSensor's myProcessState cast to our PSR type.
bool myFirstTick
 Flag for knowing the first tick of this component. Needed to initialize from PSR.
DtU8 myEmitterSystemId

Private Member Functions

 DtRadarObjectSensor ()
 default constructor; not implemented
 DtRadarObjectSensor (const DtRadarObjectSensor &orig)
 copy constructor; not implemented
const DtRadarObjectSensoroperator= (const DtRadarObjectSensor &orig)
 assignment operator; not implemented

Detailed Description

DtRadarObjectSensor extends the DtSignatureObjectSensor with the capability of publishing an emitter system.

End User Description: This sensor has all the functionality of the DtSignatureObjectSensor, but additionally publishes an emitter system to the network. The sensing functionality is exactly the same as the DtSignatureObjectSensor. The emitter system can be toggled on and off using DtSetEmitter messages, which are accessible in the GUI. When the emitter system is toggled off, the sensor will no longer detect any objects.

Note:
The emitter beams published by this component to not have any actual effect on what objects the sensor can detect. All detection is done by the dtSignatureObjectSystem parent class.

Uses Descriptor Type: DtRadarObjectSensorDescriptor


Constructor & Destructor Documentation

default constructor; not implemented

copy constructor; not implemented

DtRadarObjectSensor::DtRadarObjectSensor ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor


Member Function Documentation

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

assignment operator; not implemented

virtual bool DtRadarObjectSensor::init ( ) [virtual]

Calls createPSR(), createDetectableObjectList(), createAndInitSensorMonitor() and initSensorGeometry().

This must be called after construction and before the sensor is used on an entity.

Reimplemented from DtSignatureObjectSensor.

virtual DtString DtRadarObjectSensor::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtRadarObjectSensorType

Reimplemented from DtSignatureObjectSensor.

virtual int DtRadarObjectSensor::sensorType ( ) const [virtual]

Returns DtSensorTypeRadar.

Reimplemented from DtSignatureObjectSensor.

virtual void DtRadarObjectSensor::tick ( ) [virtual]

Turns on the emitter system in the first tick, as indicated in

myRadarSensorPSR.

When it is time for the next detection attempt (cached in myRadarSensorPSR), calls DtSignatureObjectSensor::tick() and computes and stores time to next detection attempt in myRadarSensorPSR. If entity is destroyed, calls destroyEmitterSystem(). If entity has been restored, calls createAndInitEmitterSystem(). Calls emitter system's tick().

Reimplemented from DtSignatureObjectSensor.

static DtSimComponent* DtRadarObjectSensor::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

Reimplemented from DtSignatureObjectSensor.

virtual bool DtRadarObjectSensor::detectObject ( DtVrfObject object,
DtRwSensorContactInfo contactInfo 
) [protected, virtual]

Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off.

Returns:
DtSignatureObjectSensor::dectedObject() if beam is on, otherwise false.

Reimplemented from DtSignatureObjectSensor.

virtual bool DtRadarObjectSensor::continueDetectingObject ( DtVrfObject object,
DtRwSensorContactInfo contactInfo,
bool contactInfoModified 
) [protected, virtual]

Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off.

Returns:
DtSignatureObjectSensor::continueDetectingObject() if beam is on, otherwise false.

Reimplemented from DtSignatureObjectSensor.

virtual const char* DtRadarObjectSensor::defaultPSRType ( ) const [protected, virtual]
Returns:
DtVrfRadarObjectSensorProcessStateRepositoryType.

Reimplemented from DtObjectSensor.

virtual void DtRadarObjectSensor::createAndInitEmitterSystem ( ) [protected, virtual]

Creates a new DtVrfEmitterSystem and assigns it to myEmitterSystem.

Sets the emitter system data from the descriptor. Registers for setEmitter message callbacks.

virtual void DtRadarObjectSensor::destroyEmitterSystem ( ) [protected, virtual]

Removes the emitter system.

static void DtRadarObjectSensor::setEmitterRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static, protected]

Static callback method for setEmitter messages.

Calls processSetEmitterRequestMessage().

virtual void DtRadarObjectSensor::processSetEmitterRequestMessage ( DtSimMessage msg) [protected, virtual]

Calls setEmitterSystemOn() with the value specified in the message if the message matches our emitter system ID.

static void DtRadarObjectSensor::setRadarModeRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static, protected]
virtual void DtRadarObjectSensor::processSetRadarModeRequestMessage ( DtSimMessage msg) [protected, virtual]
static void DtRadarObjectSensor::requestRadarModesAdminCallback ( const DtVrfObjectMessage msg,
void *  usr 
) [static, protected]
virtual void DtRadarObjectSensor::processRequestRadarModesAdmin ( DtString  receiver,
DtString  sender,
bool  isEchelonId,
const DtVrfObjectMessage msg 
) [protected, virtual]
virtual void DtRadarObjectSensor::setEmitterSystemOn ( bool  onOff) [protected, virtual]

Changes the on/off state of myEmitterSystem, and changes the emitter system on value in the PSR.


Member Data Documentation

DtObjectSensor's myProcessState cast to our PSR type.

This class with not new or delete this object. Base class does that.

Flag for knowing the first tick of this component. Needed to initialize from PSR.


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)