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

DtIffControllerComponent is a controller that manages a IFF publisher for an entity. More...

Inheritance diagram for DtIffControllerComponent:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtIffControllerComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtIffControllerComponent ()
 destructor
virtual bool init ()
 Calls setRadio()
virtual void tick ()
 Calculate new control values.
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void registerSetIffRequestMsgCallbacks ()
 Registers its interest in set IFF request messages.
virtual void processSetIffRequestMessage (DtSimMessage *msg)

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 setIffRequestCallback (DtSimMessage *msg, void *usrData)

Protected Member Functions

 DtIffControllerComponent ()
 Default constructor; should not be called.
 DtIffControllerComponent (const DtIffControllerComponent &orig)
 copy constructor; shallow; does not copy the ports.
const DtIffControllerComponentoperator= (const DtIffControllerComponent &orig)
 assignment operator; see comments on copy constructor!
virtual void setRadio (DtSimBaseRadio *radio)
 Override this so we can register interest in IFF messages.
virtual bool createPublisher ()
virtual void updateFromDescriptor ()
 Updates current state from the descriptor owned by this controller.
virtual void updateFromSetRequest (DtSetIffRequest *setReq, bool updateInPSR=true)
 Updates current state from the specified set iff request message.
virtual void updateDynamicData ()
 Updates data that periodically updates from the entity state (i.e. Mode5 Altitude)
virtual bool needsToTick ()
 Returns true if the publisher should be ticked.
virtual bool createPSR ()
 Creates myProcessState data member, and adds it to our process state repository manager.

Protected Attributes

DtIffPublisher * myIffPublisher
bool myHasBeenTicked
bool myUseAltMode5
 set to true once the IFF is used for the first time.
DtVrfIffPSRmyProcessState
 True if we are currently using alternate mode 5C.
bool myFirstTick

Detailed Description

DtIffControllerComponent is a controller that manages a IFF publisher for an entity.

Uses Descriptor Type: DtIffControllerDescriptor


Constructor & Destructor Documentation

DtIffControllerComponent::DtIffControllerComponent ( 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; should not be called.

Here because the compiler will generate an unprotected one otherwise.

copy constructor; shallow; does not copy the ports.


Member Function Documentation

virtual bool DtIffControllerComponent::init ( ) [virtual]

Calls setRadio()

Reimplemented from DtControllerComponent.

virtual void DtIffControllerComponent::tick ( ) [virtual]

Calculate new control values.

Reimplemented from DtSimComponent.

virtual DtString DtIffControllerComponent::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:
DtIffControllerType

Reimplemented from DtControllerComponent.

static DtSimComponent* DtIffControllerComponent::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 set IFF request messages.

static void DtIffControllerComponent::setIffRequestCallback ( DtSimMessage msg,
void *  usrData 
) [static]
const DtIffControllerComponent& DtIffControllerComponent::operator= ( const DtIffControllerComponent orig) [protected]

assignment operator; see comments on copy constructor!

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

Override this so we can register interest in IFF messages.

Reimplemented from DtControllerComponent.

virtual bool DtIffControllerComponent::createPublisher ( ) [protected, virtual]
virtual void DtIffControllerComponent::updateFromDescriptor ( ) [protected, virtual]

Updates current state from the descriptor owned by this controller.

virtual void DtIffControllerComponent::updateFromSetRequest ( DtSetIffRequest setReq,
bool  updateInPSR = true 
) [protected, virtual]

Updates current state from the specified set iff request message.

virtual void DtIffControllerComponent::updateDynamicData ( ) [protected, virtual]

Updates data that periodically updates from the entity state (i.e. Mode5 Altitude)

virtual bool DtIffControllerComponent::needsToTick ( ) [protected, virtual]

Returns true if the publisher should be ticked.

The publisher is not ticked if all the IFF modes are off, and have never been turned on. Once any mode is turned on, the publisher is always ticked, even if the mode is later turned off.

virtual bool DtIffControllerComponent::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.


Member Data Documentation

DtIffPublisher* DtIffControllerComponent::myIffPublisher [protected]

set to true once the IFF is used for the first time.

True if we are currently using alternate mode 5C.

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


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)