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

DtEmitterComponent maintains an electromagnetic emissions publisher for a single system with one or more beams. More...

Inheritance diagram for DtEmitterComponent:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtEmitterComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtEmitterComponent ()
 destructor
virtual void tick ()
 Tick the publisher if the component is on.
virtual bool tickWhileDestroyed () const
bool init ()
 Calls createPublisher.
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void registerSetRequestMsgCallbacks ()
 Registers its interest in setEmitter and setTarget messages.
virtual void processSetEmitterRequestMessage (DtSimMessage *msg)
virtual void processSetRadarModeRequestMessage (DtSimMessage *msg)
virtual void processRequestRadarModesAdmin (DtString receiver, DtString sender, bool isEchelonId, const DtVrfObjectMessage *msg)
virtual void processSetTargetRequestMessage (DtSimMessage *msg)
virtual void setSystemName (DtEmitterSysName nameEnum)
 Accessor and mutators for properties of the beam and emitter system.
virtual DtEmitterSysName systemName () const
virtual void setSystemFunction (DtEmissionFunc functionEnum)
virtual DtEmissionFunc systemFunction () const
virtual void setMountLocation (const DtVector &location)
virtual DtVector mountLocation () const
virtual void setTargetingCapable (bool onOff)
 If true, setTargetRequest messages sent to this entity will cause this emitter system to set all tracking beams to target only the entity listed in the targeting request message.
virtual bool targetingCapable () const
virtual void setOn (bool onOff)
 When true, EM Emissions PDUs are published as normal.
virtual bool on () const
virtual void addTrackTarget (const DtGlobalObjectDesignator &globalId)
 All beams in the system which are tracking beams will have this entity added to their track/jam lists.
virtual void removeTrackTarget (const DtGlobalObjectDesignator &globalId)
 All beams in the system which are tracking beams will have this entity removed from their track/jam lists.
virtual void clearTrackTargets ()
 All beams will have their track/jam lists emptied.
virtual DtEmitterBeamRepositoryaddBeam (DtU8 id)
 Adds a new beam if the ID does not already exist and returns a pointer to the beam repository.
virtual void removeBeam (DtU8 id)
 Removes a beam from this system.
virtual DtEmitterBeamRepositorybeam (DtU8 id=0)
 Returns a pointer to the beam repository of this beam, of NULL if there is no beam of this id in the system.
virtual int numBeams () const
 Returns total number of beams in this system.
virtual DtList * beamList ()
 Returns list to the beam repositories.
virtual DtVrfEmitterSystememitterSystem ()
 Returns the DtVrfEmitterSystem that is implementing the publishing of emitter beams.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
static void setEmitterRequestCallback (DtSimMessage *msg, void *usrData)
static void setRadarModeRequestCallback (DtSimMessage *msg, void *usrData)
static void requestRadarModesAdminCallback (const DtVrfObjectMessage *msg, void *usr)
static void setTargetRequestCallback (DtSimMessage *msg, void *usrData)

Protected Member Functions

virtual void setRadio (DtSimBaseRadio *radio)
virtual DtSimBaseRadioradio ()
 The radio this component is listening to.
virtual bool createAndInitEmitterSystem ()
 Creates a new DtVrfEmitterSystem and assigns it to myEmitterSystem.
virtual void updateFromDescriptor ()
 copies data from this components descriptor into the state repository.
virtual bool createPSR ()
 Creates myProcessState data member, and adds it to our process state repository manager.

Protected Attributes

DtSimBaseRadiomyRadio
bool myTargetingCapable
DtVrfEmitterSystemmyEmitterSystem
DtEmitterPSRmyProcessState
 Holds the saveable state.
bool myStateRestored
 Set to true once previously checkpointed state (if any) is restored.
DtU8 myEmitterSystemId

Private Member Functions

 DtEmitterComponent ()
 Default constructor; not implemented.
 DtEmitterComponent (const DtEmitterComponent &orig)
 copy constructor; not implemented.
const DtEmitterComponentoperator= (const DtEmitterComponent &orig)
 assignment operator; not implemented.

Detailed Description

DtEmitterComponent maintains an electromagnetic emissions publisher for a single system with one or more beams.

End User Description: All elements of the beam characteristics (azimuth, elevation, etc.) are settable through the emitter-component-descriptor. All of these parameters are static. If the user desires dynamic beam characteristics (i.e. radar sweeps), they must derive from this class to provide that functionallity. API calls for that type of interaction are provided. The DtEmitterComponent does provide for turning the component on and off. When off, the component will publish the emitter system only, with 0 beams attached to it. DtEmitterComponent also provides for some simple target tracking. Since this component is independent from any sensing logic, it cannot provide realistic target tracking. It does provide an API for adding and removing targets from all beams in the system, and can be set to "Targeting Capable" mode in which the component will automatically set the beams to track any entity that is specified as the "Target" through the "set-target" radio message. This calss uses the DtVrfEmitterSystem class internally to simulate the emitter.

Uses Descriptor Type: DtEmitterComponentDescriptor


Constructor & Destructor Documentation

DtEmitterComponent::DtEmitterComponent ( 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

Default constructor; not implemented.

copy constructor; not implemented.


Member Function Documentation

virtual void DtEmitterComponent::tick ( ) [virtual]

Tick the publisher if the component is on.

Reimplemented from DtSimComponent.

virtual bool DtEmitterComponent::tickWhileDestroyed ( ) const [virtual]
Returns:
true. Necessary in order to stop publishing emitter system when entity is destroyed.

Reimplemented from DtSimComponent.

Calls createPublisher.

Reimplemented from DtSimComponent.

virtual DtString DtEmitterComponent::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:
DtEmitterComponentType

Reimplemented from DtSimComponent.

static DtSimComponent* DtEmitterComponent::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.

Registers its interest in setEmitter and setTarget messages.

static void DtEmitterComponent::setEmitterRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtEmitterComponent::setRadarModeRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtEmitterComponent::requestRadarModesAdminCallback ( const DtVrfObjectMessage msg,
void *  usr 
) [static]
virtual void DtEmitterComponent::processRequestRadarModesAdmin ( DtString  receiver,
DtString  sender,
bool  isEchelonId,
const DtVrfObjectMessage msg 
) [virtual]
static void DtEmitterComponent::setTargetRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static]
virtual void DtEmitterComponent::setSystemName ( DtEmitterSysName  nameEnum) [virtual]

Accessor and mutators for properties of the beam and emitter system.

virtual DtEmitterSysName DtEmitterComponent::systemName ( ) const [virtual]
virtual void DtEmitterComponent::setSystemFunction ( DtEmissionFunc  functionEnum) [virtual]
virtual DtEmissionFunc DtEmitterComponent::systemFunction ( ) const [virtual]
virtual void DtEmitterComponent::setMountLocation ( const DtVector location) [virtual]
virtual DtVector DtEmitterComponent::mountLocation ( ) const [virtual]
virtual void DtEmitterComponent::setTargetingCapable ( bool  onOff) [virtual]

If true, setTargetRequest messages sent to this entity will cause this emitter system to set all tracking beams to target only the entity listed in the targeting request message.

Aditionally, all beams created by the desciptor will be created at tracking beams when this is set to true.

virtual bool DtEmitterComponent::targetingCapable ( ) const [virtual]
virtual void DtEmitterComponent::setOn ( bool  onOff) [virtual]

When true, EM Emissions PDUs are published as normal.

Otherwise, the emitter system is still published, but without any beams.

virtual bool DtEmitterComponent::on ( ) const [virtual]
virtual void DtEmitterComponent::addTrackTarget ( const DtGlobalObjectDesignator &  globalId) [virtual]

All beams in the system which are tracking beams will have this entity added to their track/jam lists.

virtual void DtEmitterComponent::removeTrackTarget ( const DtGlobalObjectDesignator &  globalId) [virtual]

All beams in the system which are tracking beams will have this entity removed from their track/jam lists.

virtual void DtEmitterComponent::clearTrackTargets ( ) [virtual]

All beams will have their track/jam lists emptied.

virtual DtEmitterBeamRepository* DtEmitterComponent::addBeam ( DtU8  id) [virtual]

Adds a new beam if the ID does not already exist and returns a pointer to the beam repository.

virtual void DtEmitterComponent::removeBeam ( DtU8  id) [virtual]

Removes a beam from this system.

virtual DtEmitterBeamRepository* DtEmitterComponent::beam ( DtU8  id = 0) [virtual]

Returns a pointer to the beam repository of this beam, of NULL if there is no beam of this id in the system.

virtual int DtEmitterComponent::numBeams ( ) const [virtual]

Returns total number of beams in this system.

virtual DtList* DtEmitterComponent::beamList ( ) [virtual]

Returns list to the beam repositories.

Returns the DtVrfEmitterSystem that is implementing the publishing of emitter beams.

When possible, use the other interface methods in this component instead of calling down to the emitter system directly.

virtual void DtEmitterComponent::setRadio ( DtSimBaseRadio radio) [protected, virtual]
virtual DtSimBaseRadio* DtEmitterComponent::radio ( ) [protected, virtual]

The radio this component is listening to.

virtual bool DtEmitterComponent::createAndInitEmitterSystem ( ) [protected, virtual]

Creates a new DtVrfEmitterSystem and assigns it to myEmitterSystem.

virtual void DtEmitterComponent::updateFromDescriptor ( ) [protected, virtual]

copies data from this components descriptor into the state repository.

virtual bool DtEmitterComponent::createPSR ( ) [protected, virtual]

Creates myProcessState data member, and adds it to our process state repository manager.

Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.

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

assignment operator; not implemented.


Member Data Documentation

Holds the saveable state.

Container for state data associated with this component. This state is saved and restored as part of a scenario (or checkpoint).

Set to true once previously checkpointed state (if any) is restored.


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)