VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtSimComponent Class Reference

The DtSimComponent class is the base class for the entire simulation model component hierarchy. More...

Inheritance diagram for DtSimComponent:
Inheritance graph
[legend]

Classes

class  ComponentCriticalSection
 Scoped guard for use in component tick functions. More...

Public Member Functions

 DtSimComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
virtual ~DtSimComponent ()
 destructor
void setParentSystem (DtComponentSystem *system)
 Sets the parent system of this component.
virtual bool init ()
 Calls createPorts and createPortGroups Initializes myLastTickSimTime.
virtual bool postAddComponentsInit ()
 Called after all components have been created, initialized and added to the component manager.
virtual void registerAttributeFunctions ()
 Called to register functions that provide system attribute values.
virtual void preFirstTickInit ()
 This function can be overridden to initialize a component before it is ticked for the first time.
virtual void tick ()
 This gives the thread of control to the component.
virtual void postTick ()
 This function is called immediately after tick() is called.
virtual void timedTick ()
 This version of tick checks to see if the time to tick has arrived.
virtual void setMinTickPeriod (double minTickPeriod)
 specifies a minimum tick period (which can also be thought of as
virtual double minTickPeriod () const
 access the minimum tick period
virtual void setMinTickPeriodVariance (double minTickPeriodVariance)
 set the variance in the minimum tick time
virtual double minTickPeriodVariance () const
 access the variance in the minimum tick period
virtual void setNextTickTime (double nextTickTime)
 The next tick time is normally calculated internally.
virtual double nextTickTime () const
 access the next tick time
virtual double calculateNextTickTime () const
 The next tick time is equal to mySimManager->exerciseClock()-> approximateElapsedRealTime() + myMinTickPeriod + a random # between -myMinTickPeriodVariance/2.
virtual double calculateFirstTickTime () const
 Returns the first time value that the component should tick at.
virtual const chartype () const =0
 Returns a string identifies the class type of component.
virtual void setEntity (DtVrfObject *entity)
 The entity's state repository is the place that actuator components make updates and other components look to see our current state.
virtual DtSimComponentnextComponent ()
 List management functions.
virtual DtSimComponentprevComponent ()
virtual void setListItem (DtListItem *item)
 Used by DtComponentList.
virtual DtListItem * listItem ()
virtual void putData (std::string &fp, int indentLevel=0)
 putData writes our type, which is provided by the virtual type accessor of the deriving class.
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 getData is just used to get us past the type in the data stream, since it's not actual stored.
virtual void addInputPort (DtInputPort *port)
 Adds this input port to the components input port list so that other components can look it up and attach to it.
virtual void removeInputPort (DtInputPort *port)
virtual DtInputPortlookupInputPort (const DtString &portName)
 Returns a pointer to the input port registered on this component with the specified name.
virtual DtList inputPortList () const
 Returns the list of DtInputPorts registered on this component.
virtual void addOutputPort (DtOutputPort *port)
 Adds this output port to the components output port list so that other components can look it up and attach to it.
virtual void removeOutputPort (DtOutputPort *port)
virtual DtOutputPortlookupOutputPort (const DtString &portName)
 Returns a pointer to the output port registered on this component with the specified name.
virtual DtList outputPortList () const
 Returns the list of DtOutputPorts registered on this component.
virtual void addInputPortGroup (DtInputPortGroup *group)
 Adds this input port to the components input port list so that other components can look it up and attach to it.
virtual void removeInputPortGroup (DtInputPortGroup *group)
virtual DtInputPortGrouplookupInputPortGroup (const DtString &groupName)
 Returns a pointer the input port group registered on this component with the specified name.
virtual DtList inputPortGroupList () const
 Returns the list of DtInputPortGroups registered on this component.
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 Adds this output port group to the components output port group list so that other components can look it up and attach to it.
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
virtual DtOutputPortGrouplookupOutputPortGroup (const DtString &groupName)
 Returns a pointer the output port group registered on this component with the specified name.
virtual DtList outputPortGroupList () const
 Returns the list of DtOutputPortGroups registered on this component.
virtual int priority () const
 Return the current connection priority for this component.
virtual void setPriority (int priority)
 Sets a new connection priority for this component, and changes all current outgoing connections from this component to the new value.
double dT () const
 This is the delta-t for this component, which may or may not be the same as the exerciseClock dT.
virtual void setDT (double deltaT)
 Note that while dT is calculated internally, this makes it possible to 'lie' to the component about dT if necessary.
virtual void setComponentDescriptor (DtComponentDescriptor *componentDescriptor)
 The component descriptor specified in the order of battle file or parameter file that was used to create this component.
virtual const
DtComponentDescriptor
componentDescriptor () const
virtual bool tickWhileDestroyed () const
 If the component returns true here, it will be ticked regardless of the destroyed state of the host entity.
DtVrfProcessStateRepositoryManagerpsrManager ()
virtual DtString componentFullName () const
virtual DtPhysicalWorldphysicalWorld ()
 Gets the physical world that this component's entity exists in.
virtual const DtPhysicalWorldphysicalWorld () const
virtual DtAttachedTerrainterrainAttachedTo ()
 Gets the terrain that this component's entity is attached to, if any.
virtual const DtAttachedTerrainterrainAttachedTo () const
virtual DtVrfObjectentity ()
 Gets the entity.
virtual const DtVrfObjectentity () const
virtual DtSimManagersimManager ()
 Gets the sim manager.
virtual const DtSimManagersimManager () const
virtual const Coordinate_SystemcoordinateSystem () const
 Gets the coordinate system, as it should always exist if the physical world is in a valid state!
virtual Coordinate_SystemcoordinateSystem ()
virtual
DtVrfObjectStateRepository
localStateRepository ()
 Gets the local state repository.
virtual const
DtVrfObjectStateRepository
localStateRepository () const
virtual DtTaskVisualizationMaptaskVisualizations ()
 Returns the list of task visualizations for this component.
virtual bool taskVisualizationsActive () const
 Returns true if task visualizations are currently active for this component.
virtual bool taskVisualizationsEnabled () const
 Returns true if task visualizations are enabled for this component.
virtual bool isThreadSafe () const
 Returns true if this component is marked as being thread safe.
virtual void addVRLinkDeferredJob (const boost::function< void()> &callback)
 Adds a deferred job to the VRLink job queue in the DtParallelTickManager, but only if this component is marked at thread safe.
virtual void onRestore ()
 Called whenever a component is restored. Default is no-op.
virtual void enable ()
 Is this component enabled or not.
virtual void disable ()
virtual bool isEnabled ()
virtual void setIsEnabled (bool yesNo)
virtual DtOutputStream & objectConsoleDebug (const DtString &channel="") const
virtual DtOutputStream & objectConsoleVerbose (const DtString &channel="") const
virtual DtOutputStream & objectConsoleInfo (const DtString &channel="") const
virtual DtOutputStream & objectConsoleWarn (const DtString &channel="") const
virtual DtOutputStream & objectConsoleError (const DtString &channel="") const
virtual DtSimResourceManagerresourceManager ()
virtual const
DtSimResourceManager
resourceManager () const
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 default constructor
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 real constructor Setting the readonly flag prevents object from writing itself to the stream.
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 pseudo-copy constructor
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 assignment operator
bool operator== (const DtReaderWriter &) const
 Equivalence operator.
bool operator!= (const DtReaderWriter &rhs)
virtual ~DtReaderWriter ()
 destructor
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Top level call to write itself to file.
virtual void postPutSelf ()
 Called after either version of put self (file or environment). Default is no-op.
virtual void prePutSelf ()
 Called before either version of put self (file or environment). Default is no-op.
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Top level to read itself from an input stream.
virtual void postGetSelf ()
 Called after either version of getSelf (mtl or environment). Default is no-op.
virtual void preGetSelf ()
 Called before either version of get self (file or environment). Default is no-op.
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry.
virtual DtSymbolString name () const
 Accessor for name of this readable/writable object.
virtual void addAlias (const DtSymbolString &alias)
 Add an alias as an alternative name for this object.
virtual void addAlias (const DtString &alias)
virtual bool hasAlias (const DtSymbolString &alias)
virtual const aliasContaineraliases () const
virtual void setReadonly (bool flag)
 Set read-only flag.
bool isReadonly () const
virtual void reset ()
 For those reader/writer items that support it, resets the reader/writer value to original state Default is no-op.
virtual int alignment () const
 For those items that are sent over the network via HLA, this will give the network alignment.
virtual bool variableIsBound () const
virtual void unbindVariable ()
 Sets the myVariableIsBound flag to false.
virtual void setName (const DtString &)
 Set the name of the object.
virtual const charreaderWriterType () const
 Used to supply a string type that this reader writer type is.
virtual const charxmlType () const
virtual DtString prettyPrint () const
 Routine to return a human readable form of the reader/writer variable.
std::string debugText () const
virtual void bindVariables (DtVariableBindingsList variableBindings)
 Runs a variable binding pass on this reader writer and any of its children.
virtual std::list
< DtVariableNameType
unboundVariables () const
bool invalid () const
virtual bool hasChild (const DtReaderWriter *p) const
 Returns true if this variable has a child p in it's chain.
virtual bool hasVariableReference () const
 Returns true if this item or any item in the registry (recursive) is a variable reference.
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 Checks to see if this RW object is a variable reference that can be bound using the provided bindings.
virtual void recordUpdateTime () const
 Can be implemented in subclasses to stamp the time when updated.
virtual bool wasUpdatedSince (DtTime t) const
 Can be implemented in subclasses to return true if an update occurred after the specified time.
virtual bool changedSinceLastChecked ()
 Returns true if this objects value has changed since the last time this function was called.
virtual bool peekChangedSinceLastChecked () const
 Returns the value that changedSinceLastChecked would return but does not reset the internal flag.
virtual void setValueSpecified (bool specified, bool recurse=false)
 The specified flags are used for optional values.
virtual bool valueSpecified () const
virtual bool isVariableReference () const
 Specifies whether or not this reader writer is really a variable that is specified elsewhere.
virtual void setIsVariableReference (bool value)
virtual void clearAllVariableReferenceFlags ()
 Clears out all variable reference flags from all readerwriter items in registry recursively.
virtual DtSymbolString variableName () const
 The variable name, if this object is a variable reference.
virtual void setVariableName (const DtSymbolString variableName)
virtual const DtReaderWriterdefaultRWValue () const
 The default value to use if the reader/writer object is a variable and that variable is not specified.
virtual DtReaderWriterdefaultRWValue ()
virtual void setDefaultRWValue (DtReaderWriter *)
 Previous default value, if exists, will be removed and replaced with a clone of the supplied variable.
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Give the stream, if the stream contains a default value then set it here.
const DtReaderWriterRegistryregistry () const
 Collection of child DtReaderWriter nodes owned by this object.
DtReaderWriterRegistryregistry ()
virtual DtPropertyInterfaceproperty ()
virtual const DtPropertyInterfaceproperty () const
virtual DtString toXml () const
virtual DtRwVariableBindingsgenerateVariableBindings () const
 Iterates over the registry (recursively) and returns a variable bindings object that contains all the variables that are contained in this read/writer class.
virtual bool toXml (const DtFilename &) const
 Writes contents of xml result to the given filename.
virtual bool fromXml (const DtString &)
 Restores object from given xml string. Returns true if valid.
virtual bool fromXmlFile (const DtFilename &)
 Restores object from given xml file.
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 Override to add attributes of actual data.
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 Called when the item is a variable reference.
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 Gets data from the environment value.
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 Called when the xml reader tries to parse an unknown reader/writer item. Default is a no-op.
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 Called when the item is a variable reference.

Static Public Member Functions

static DtSimComponentMarkThreadSafe (DtSimComponent *)
 Marks an instance of a component as being thread safe.
static DtSimComponentFactoryfactory ()
 A DtSimComponentFactory is allocated by the DtSimCreator, and this pointer is set.
static void setFactory (DtSimComponentFactory *factory)
static DtSimComponentcreateComponent (const DtString &name, const DtString &type, DtVrfObject *owner, DtSimManager *simManager, DtComponentSystem *parentSystem, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 Creates a DtSimComponent using the factory, then initializes it via the MTL stream.
static void addSimComponentCreatorFcn (const DtString &type, DtSimComponentCreatorFcn fcn)
 Adds a DtSimComponent creation function to the DtSimComponentFactory, using the given type as the key.
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
static const
DtVariableBindingsList
nullVariableReference ()
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
static void setPutIndent (bool)
static bool putIndent ()
static const chartheXmlType ()
 The type that is used when archiving to an XML stream.
static const DtFilename & appPath ()
 Gets the current working directory.
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 Sets the function to create the DtReaderWriterFactory.
static void createReaderWriterFactory ()
static void cleanupFactory ()
static void setOutputStream (DtOutputStream *stream)
static DtOutputStream & outputStream ()
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 Given a filename, returns a newly created reader/writer object from the object found within.
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 Given a xml string, returns a newly created reader/writer object from the object found within.
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 Given a xml environment, returns a newly created reader/writer object from the object found within.
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 Gets the named attribute from a DtEnvValueSP.
- Static Public Member Functions inherited from DtObjectDebugger< DtSimComponent >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()

Protected Types

typedef std::map< DtString,
DtInputPort * > 
DtInputPortMap
typedef std::map< DtString,
DtOutputPort * > 
DtOutputPortMap
typedef std::map< DtString,
DtInputPortGroup * > 
DtInputPortGroupMap
typedef std::map< DtString,
DtOutputPortGroup * > 
DtOutputPortGroupMap

Protected Member Functions

virtual double computeCurrentTime ()
 Compute current time and myDT.
bool testInvariant () const
virtual bool createPortGroups ()
 Called by init.
virtual bool createPorts ()
 Called by init.
DtVrfProcessStateRepositorycreateComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true)
 Creates a PSR for this component and registers it with the PSR manager.
virtual void updateTaskVisualizations ()
 Called to update task visualizations after every tick.
virtual void destroyTaskVisualizations ()
 Destroys all task visualizations for this component.
virtual void destroyTaskVisualization (const DtString &name)
 Destroys an existing task visualization.
virtual DtPointTaskVisualizationPtr pointTaskVisualization (const DtString &name)
 Finds an existing or creates a new point task visualization with the given name.
virtual DtLineTaskVisualizationPtr lineTaskVisualization (const DtString &name)
 Finds an existing or creates a new line task visualization with the given name.
virtual DtAreaTaskVisualizationPtr areaTaskVisualization (const DtString &name)
 Finds an existing or creates a new area task visualization with the given name.
virtual DtTextTaskVisualizationPtr textTaskVisualization (const DtString &name)
 Finds an existing or creates a new text task visualization with the given name.
double calculateNextTaskVisTickTime () const
 Determines the next time the task visualizations should be ticked.
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 Copies values from the specified DtReaderWriter.
- Protected Member Functions inherited from DtObjectDebugger< DtSimComponent >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()

Protected Attributes

DtVrfObjectmyEntity
DtVrfObjectStateRepositorymyLocalStateRepository
DtSimManagermySimManager
DtComponentSystemmySystem
 Pointer to the DtComponentSystem that this component belongs.
DtListItem * myListItem
DtInputPortMap myInputPortList
DtOutputPortMap myOutputPortList
DtInputPortGroupMap myInputPortGroupList
DtOutputPortGroupMap myOutputPortGroupList
int myPriority
double myMinTickPeriod
double myMinTickPeriodVariance
double myNextTickTime
double myLastTickSimTime
double myDT
bool myIsEnabled
 Indicates whether this component should be enabled for ticking or not.
bool myFirstTick
 Initialized to true in the constructor, set to false by the first call to postTick.
bool myIsThreadSafe
 Whether this component can be use the DtCriticalSection versions of the tick functions and be ticked in parallel with other components Defaults to false.
const DtComponentDescriptormyComponentDescriptor
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 List of PSRs made using createComponentPsr() that will be deleted by this component when it is destroyed.
bool myTickEveryFrame
 Flag indicating that tickPeriod is set to 0, and the component will tick every frame.
DtTaskVisualizationMap myTaskVisualizations
 The visualization objects to be drawn for this component.
double myNextTaskVisTickTime
 The next tick time for updating the task visualizations.
__itt_string_handlemyTickITTStringHandle
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
DtReaderWriterRegistry myRegistry
DtReaderWriterRegistrymyParentRegistry
bool myValueSpecified
bool myReadOnlyFlag
bool myIsVariableReference
DtSymbolString myVariableName
bool myVariableIsBound
DtReaderWritermyDefaultValue
aliasContainer myAliases
 Container for the aliases which represent alternative names for the object.
bool myInvalid
 Set to true if there is a problem reading this item.
bool myChangedFlag
 Set to true when value changes Set to false when value checked with changedSinceLastChecked.

Static Protected Attributes

static DtSimComponentFactorymyFactory
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
static DtGetSelfCallbackInfo thePostGetSelfCallback
static DtPutSelfCallbackInfo thePrePutSelfCallback
static const DtVariableBindingsList theEmptyVariableBindingsList
static bool theCreatorFcnSet
static DtReaderWriterFactorytheFactory
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
static bool thePutIndent
static DtOutputStream * theOutputStream

Private Member Functions

 DtSimComponent ()
 default constructor; should not be called.
 DtSimComponent (const DtSimComponent &orig)
 copy constructor, not implemented
DtSimComponentoperator= (const DtSimComponent &orig)
 assignment operator, not implemented

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
typedef std::vector< DtFilename > SearchPaths
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()

Detailed Description

The DtSimComponent class is the base class for the entire simulation model component hierarchy.

****** NOTE of API change for version 3.7 ****** Due to a performance enhancement change, the myComponentDescriptor member variable is now defined to be const and all access to this descriptor (including the componentDescriptor() method) have been changed to be const access. If you have used this descriptor to modify values within the descriptor (either in the original descriptor or a derived descriptor class), this modification will effect all entities that share this descriptor as this descriptor now points to the original parameter database entry.

If you currently modify member variables in a descriptor class, it is suggested to instead make those member variables part of the component that uses them and modify them there. If you must modify the entries in the component descriptor, instead of using the supplied descriptor pointer, you will need to clone the descriptor entry and work with that clone. You will also need to delete this clone in your component destructor to avoid a memory leak.

Related examples
Other uses in examples

Member Typedef Documentation

typedef std::map<DtString, DtInputPort*> DtSimComponent::DtInputPortMap
protected
typedef std::map<DtString, DtOutputPort*> DtSimComponent::DtOutputPortMap
protected

Constructor & Destructor Documentation

DtSimComponent::DtSimComponent ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)
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).
virtual DtSimComponent::~DtSimComponent ( )
virtual

destructor

DtSimComponent::DtSimComponent ( )
private

default constructor; should not be called.

Here because the compiler will generate an unprotected one otherwise.

DtSimComponent::DtSimComponent ( const DtSimComponent orig)
private

copy constructor, not implemented

Member Function Documentation

static DtSimComponent* DtSimComponent::MarkThreadSafe ( DtSimComponent )
static

Marks an instance of a component as being thread safe.

Components which are thread safe will have their tick functions called with the global mutex state set to UNLOCKED. They can then change the state themselves as needed. Non-thread safe components will have their tick functions called in EXCLUSIVE mode. This function should only be called from the component creator factory function.

void DtSimComponent::setParentSystem ( DtComponentSystem system)

Sets the parent system of this component.

This is called before init() when the component is created. Non-virtual since this will probably be moved to the constructor some day, and we don't want to have users overriding this method.

virtual bool DtSimComponent::init ( )
virtual

Calls createPorts and createPortGroups Initializes myLastTickSimTime.

Reimplemented in DtSurfaceEntityPilotController, DtTargetSelectionController, DtRoadMovementController, DtDisaggregatedFormationController, DtDisaggregatedMoveAlongController, DtObjectSensor, DtSimpleProximitySensor, DtDamageAdjudicationActuator, DtDiGuyController, DtSurfaceEntityStopController, DtSpawnController, DtFixedWingEmbarkationController, DtRailPathController, DtWeaponController, DtNavalMineSetController, DtRadarObjectSensor, DtActuatorComponent, DtEmitterComponent, DtLauncherController, DtTacticalGraphicSetController, DtSpotReportGeneratorController, DtBallisticGunController, DtMunitionLaunchController, DtEngagementReportGeneratorController, DtSurfaceEntityFollowEntityController, DtDisaggregatedEmbarkationController, DtDynamicFeaturesController, DtJammerController, DtSignatureObjectSensor, DtWeaponActuator, DtConvoyTaskController, DtDisaggregatedMoveIntoFormationController, DtMissileDistractionController, DtSurfaceEntityActuator, DtDynamicTerrainController, DtFixedWingActuatorComponent, DtObstructionSensor, DtWarheadDetonationActuator, DtDetonationController, DtDisaggregatedOccupancyDirectorController, DtFixedWingMoveAlongController, DtHumanMovementActuator, DtLookAtActuator, DtDisaggregatedMoveToLocationController, DtDisaggregatedPatrolAlongController, DtFixedWingTakeoffController, DtSurfaceEntityMoveAlongController, DtSurfaceEntitySimpleActuator, DtScriptReactiveTaskController, DtAutomotiveActuatorComponent, DtFixedWingPilotController, DtGroundMovementChooserController, DtLaunchExpendableResourceController, DtLasingController, DtLaunchSmokeController, DtSubSurfaceDepthController, DtSuppressionActuator, DtAggregatedMovementActuator, DtAggregatedMoveToController, DtBallisticGun, DtHumanPatrolController, DtParabolicTrajectoryActuator, DtResupplyController, DtTurretSlewController, DtHumanFollowController, DtHumanMoveToController, DtLimitExistenceController, DtOccupancyDirectorController, DtPassiveSonarSensor, DtReleaseBombController, DtContactFusionController, DtMultipleHitDamageActuator, DtOrganizationController, DtRotaryWingActuatorComponent, DtSpotReportReceiver, DtAirVehicleWeaponHoldController, DtEmbarkationController, DtHumanCollisionAvoidanceController, DtHumanMoveAlongController, DtParachuteActuator, DtAggregatedPatrolController, DtGroundCollisionAvoidanceController, DtHumanDamageActuator, DtIndirectFireController, DtIndirectFireWeaponController, DtLaserGuidedLauncherController, DtLauncherActuator, DtMissileManeuverActComponent, DtSwingingPartActuator, DtFallingFromSkyActuatorComponent, DtFixedWingLandingController, DtGroundMoveToDestinationControllerComponent, DtLasingMissileTrackController, DtRotaryWingPilotController, DtSensorGimbalActuator, DtUnderFireDeterminationSensor, DtActiveSonarSensor, DtIntegratedLaserGuidedLauncherController, DtMissileControllerComponent, DtMovementBasedTerrainPreloadController, DtNavigationPreferenceController, DtShapeBasedTerrainPreloadController, DtTopLevelOrganizationController, DtTurretScanController, DtBombController, DtGroundMoveDirectionController, DtHumanCoverPointController, DtRotaryWingWaitController, DtSensorGimbalController, DtSimpleRotaryWingPilot, DtSubSurfaceEntitySimpleActuator, DtWaitController, DtControllerComponent, DtBombActuator, DtDisaggregatedPatrolBetweenController, DtFixedWingFlightCommandController, DtHumanPostureController, DtMissileCollisionActuator, DtParachuteController, DtTDLMessageGeneratorController, DtAggregateModelResolutionController, DtBaseWeaponController, DtCombatRangeController, DtCruiseMissileDefaultController, DtEnvironmentalActivationController, DtFixedWingDefaultController, DtFixedWingGunneryController, DtHumanCrosswalkController, DtHumanFleeController, DtIndirectArtilleryComponent, DtTranslatablePartActuator, DtAggregateIndirectFireController, DtDefaultLandingGearController, DtGroundAutoControllerComponent, DtHumanLauncherAcquireController, DtHumanUseDoorController, DtNavTagTraversalController, DtRotaryWingEncumberedFlightActuator, DtRotaryWingFlightCommandController, DtAggregateAntiAirController, DtAutoAggregateDisaggregateController, DtGroundVehicleTrailingEffectController, DtLocalEntitySetController, DtNbcSensor, DtRotaryWingMoveAlongControllerComponent, DtSendRadioMessageController, DtEngineeringObjectSensor, DtGlobalEnvironmentActuator, DtTagVolumeDimensionsController, DtDisaggregatedSetController, DtSimTerrainVisualizationController, DtAggregatedMoveAlongController, DtAggregateReleaseBombController, DtRotaryWingJoyFlightController, DtRotaryWingTaskController, DtTerrainProximityIndicator, DtVrfObjectDataMessenger, DtAimWeaponController, DtHumanEyepointController, DtHumanTurnToController, DtRemoteSensorSpotReportReceiver, DtRotaryWingLandingGearController, DtUpdateRepositoryActuator, DtTimeKeeperComponent, DtAggregateFollowController, DtBreachDetector, DtHumanAcquireController, DtIffControllerComponent, DtMultiTaskControllerComponent, DtEncumbranceActuator, DtGroundMoveAlongControllerComponent, DtScriptedMovementController, DtDiGuyGestureController, DtEmbeddedEntitiesController, DtFrictionlessGravityCollisionsActuator, DtLaserDetector, DtMissileTargetController, DtHumanFaceTargetController, DtHumanStopMovingController, DtIndividualLifeFormDamageAdjudicationActuator, DtLookAtPointController, vrfAddSetEncumbranceExample::DtManualRotaryWingEncumberedFlightActuator, DtAggregateCombatAdjustmentController, DtAggregateLoadoutController, DtAirborneAggregatedMovementActuator, DtStatePropertyInitializationController, DtAimAtPointController, DtEngineeringObjectSetController, DtSimFeaturesVisualizationController, DtSystemSwitcherComponent, DtRadarJammer, DtSimpleRadarWarningReceiver, DtCreateEngineeringObjectController, DtRadarWarningReceiver, DtScriptMultiTaskController, DtSpawnObjectWarheadActuator, DtAffectEngineeringObjectController, DtDestroyEngineeringObjectController, DtBreachObstacleController, DtDieWhenHitActuator, DtOrbitActuator, DtFascamController, MyActuatorComponent, and DtCompatibilityController.

virtual bool DtSimComponent::postAddComponentsInit ( )
inlinevirtual
virtual void DtSimComponent::registerAttributeFunctions ( )
inlinevirtual

Called to register functions that provide system attribute values.

Empty in this class. Overridden in different components to add attribute provider functions.

Reimplemented in DtLauncherController, DtMunitionLaunchController, DtIndirectFireWeaponController, and DtIffControllerComponent.

virtual void DtSimComponent::enable ( )
virtual

Is this component enabled or not.

If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).

Reimplemented in DtEmbarkationController, DtDisaggregatedFormationController, DtTaskControllerComponent, DtAggregateModelResolutionController, DtWaitController, DtAggregatedSetController, DtSystemSwitcherComponent, and DtSetController.

virtual void DtSimComponent::disable ( )
virtual
virtual bool DtSimComponent::isEnabled ( )
virtual
virtual void DtSimComponent::setIsEnabled ( bool  yesNo)
virtual

Reimplemented in DtObjectSensor, and DtAggregatedSetController.

virtual void DtSimComponent::preFirstTickInit ( )
virtual

This function can be overridden to initialize a component before it is ticked for the first time.

The implementation for this function is empty. It is called by timedTick if myFirstTick is true.

Reimplemented in DtTargetSelectionController, DtHumanFleeController, DtActiveSonarSensor, DtSpawnController, DtHumanCoverPointController, DtAggregatedMoveToController, DtConvoyTaskController, DtObjectSensor, DtDiGuyController, DtRoadMovementController, DtSimpleProximitySensor, DtRailPathController, DtRadarObjectSensor, DtOccupancyDirectorController, DtEmbarkationController, DtLauncherController, DtScriptedMovementController, DtFixedWingLandingController, DtSignatureObjectSensor, DtBallisticGunController, DtDynamicTerrainController, DtEmitterComponent, DtBallisticGun, DtDetonationController, DtFixedWingMoveAlongController, DtReleaseBombController, DtHumanMovementActuator, DtLaserGuidedLauncherController, DtLasingController, DtObstructionSensor, DtMissileTargetController, DtSurfaceEntityMoveAlongController, DtMultipleHitDamageActuator, DtHumanMoveAlongController, DtLaunchExpendableResourceController, DtAggregateModelResolutionController, DtScriptReactiveTaskController, DtIndirectFireWeaponController, DtIndirectFireActuator, DtEnvironmentalActivationController, DtNavigationPreferenceController, DtSensorGimbalActuator, DtScenarioEventController, DtShapeBasedTerrainPreloadController, DtCruiseMissileDefaultController, DtAggregatedMoveAlongController, DtFrictionlessGravityActuator, DtGroundMoveAlongControllerComponent, DtAggregateAntiAirController, DtAggregateIndirectFireController, DtSimTerrainVisualizationController, DtTagVolumeDimensionsController, DtAggregateReleaseBombController, DtIffControllerComponent, DtTerrainProximityIndicator, DtAirborneAggregatedMovementActuator, DtEmbeddedEntitiesController, DtPropulsionNoiseGenerator, DtAggregateLoadoutController, DtFrictionlessGravityCollisionsActuator, DtStatePropertyInitializationController, DtAggregateCombatAdjustmentController, DtNbcWeaponController, DtSimFeaturesVisualizationController, DtRadarJammer, DtRadarWarningReceiver, and DtScriptMultiTaskController.

virtual void DtSimComponent::tick ( )
virtual

This gives the thread of control to the component.

The component is ticked once each simulation from by the component list it's on. This base class tick has no functionality.

Reimplemented in DtBaseWeaponController, DtTargetSelectionController, DtDamageAdjudicationActuator, DtRailPathController, DtGroundFollowEntityController, DtSpawnController, DtObjectSensor, DtConvoyTaskController, DtSurfaceEntityPilotController, DtDisaggregatedMoveAlongController, DtSurfaceEntityActuator, DtLocalEntitySetController, DtDisaggregatedEmbarkationController, DtDiGuyController, DtRoadMovementController, DtRotaryWingFollowEntityController, DtSignatureObjectSensor, DtRadarObjectSensor, DtAggregatedSetController, DtSurfaceEntityFollowEntityController, DtDisaggregatedFormationController, DtSurfaceEntityMoveToLocationController, DtSuppressionActuator, DtSurfaceEntitySimpleActuator, DtRetreatController, DtMunitionLaunchController, DtOccupancyDirectorController, DtSurfaceEntityPatrolBetweenController, DtSurfaceEntityStopController, DtWeaponController, DtEmbarkationController, DtLauncherController, DtWarheadDetonationActuator, DtFixedWingTakeoffController, DtFixedWingLandingController, DtDynamicTerrainController, DtHumanJoystickMovementController, DtReleaseBombController, DtTurretAcquireController, DtSpotReportGeneratorController, DtBallisticGun, DtBallisticGunController, DtLasingController, DtObstructionSensor, DtEngagementReportGeneratorController, DtMissileDistractionController, DtVrfObjectDataMessenger, DtFixedWingMoveAlongController, DtDetonationController, DtParabolicTrajectoryActuator, DtWeaponActuator, DtFixedWingActuatorComponent, DtHumanMoveAlongController, DtSubSurfaceEntitySimpleActuator, DtUnderFireDeterminationSensor, DtHumanObstructionSensor, DtNavalMineSetController, DtLaserGuidedLauncherController, DtTurretActuatorComponent, DtHumanMovementActuator, DtDisaggregatedMoveIntoFormationController, DtDynamicFeaturesController, DtLaunchExpendableResourceController, DtSubSurfaceDepthController, DtCombatRangeController, DtAggregatedMovementActuator, DtAggregateModelResolutionController, DtAutomotiveActuatorComponent, DtBallisticGunJoyController, DtHumanFollowController, DtIndirectFireController, DtTurretSlewController, DtHumanCollisionAvoidanceController, DtScriptReactiveTaskController, DtContactFusionController, DtDisaggregatedPatrolAlongController, DtFixedWingPilotController, DtGroundCollisionAvoidanceController, DtAggregatedMoveToController, DtBombController, DtDisaggregatedPatrolBetweenController, DtGroundMoveToDestinationControllerComponent, DtIndirectFireWeaponController, DtOrganizationController, DtSwingingPartActuator, DtBaseMountingController, DtEmitterComponent, DtHumanMoveToController, DtRotaryWingActuatorComponent, DtSensorGimbalActuator, DtAirVehicleWeaponHoldController, DtIndirectArtilleryComponent, DtLaunchSmokeController, DtLimitExistenceController, DtSpotReportReceiver, DtActiveSonarSensor, DtAggregateOrganizationController, DtFallingFromSkyActuatorComponent, DtMissileManeuverActComponent, DtParachuteActuator, DtRotaryWingWaitController, DtWaitController, DtCruiseMissileLaunchController, DtHumanDamageActuator, DtSimpleRotaryWingPilot, DtTopLevelOrganizationController, DtBombActuator, DtFixedWingGunneryController, DtHumanGunActuator, DtSensorGimbalController, DtTranslatablePartActuator, DtCruiseMissileDefaultController, DtJammerController, DtMissileCollisionActuator, DtTDLMessageGeneratorController, DtBallisticGunJoy, DtGroundMoveDirectionController, DtHumanAcquireController, DtHumanCoverPointController, DtNbcSensor, DtSurfaceEntityTurnMoveController, DtGroundMoveAlongControllerComponent, DtHumanPostureController, DtRotaryWingPilotController, DtAggregatedMoveAlongController, DtDefaultLandingGearController, DtDynamicTerrainMunitionDamageController, DtEngineeringObjectSensor, DtFixedWingFlightCommandController, DtHumanCrosswalkController, DtHumanFleeController, DtIndividualLifeFormDamageAdjudicationActuator, DtIntegratedLaserGuidedLauncherController, DtRotaryWingEncumberedFlightActuator, DtSimpleProximitySensor, DtTurretScanController, DtAutoAggregateDisaggregateController, DtEmbeddedEntitiesController, DtHumanUseDoorController, DtLaserDetector, DtNavTagTraversalController, DtAimWeaponController, DtFixedWingFollowEntityController, DtParachuteController, DtTimeKeeperComponent, DtAggregateIndirectFireController, DtEnvironmentalActivationController, DtFixedWingDefaultController, DtHumanWeaponStateActuator, DtSimTerrainVisualizationController, DtTurretAimController, DtAggregateFollowController, DtLookAtActuator, DtMountingAzimuthActuator, DtRotaryWingTurnToHeadingController, DtScriptedMovementController, DtTurretReturnToHeadingController, DtSimpleRadarWarningReceiver, DtAggregateReleaseBombController, DtDiGuyGestureController, DtDisaggregatedDamageActuator, DtEncumbranceActuator, DtIffControllerComponent, DtMissileMoveToControllerComponent, DtMissileTargetController, DtMountingElevationActuator, DtRotaryWingFlightCommandController, DtRotaryWingLandingController, DtRotaryWingLandingGearController, DtRotaryWingMoveAlongControllerComponent, DtDisaggregatedActuator, DtFixedWingMoveToController, DtHumanEyepointController, DtHumanTurnToController, DtRotaryWingPatrolBetweenController, DtSendRadioMessageController, DtTacticalSmokeActuator, DtAffectEngineeringObjectController, DtEventTriggerController, DtGlobalEnvironmentActuator, DtDisaggregatedMoveToController, DtDisaggregatedSetController, DtSinkToDepthActuator, DtTerrainProximityIndicator, DtGroundStopMovingControllerComponent, DtBreachDetector, DtGroundVehicleTrailingEffectController, DtHumanFaceTargetController, DtHumanStopMovingController, DtLookAtPointController, DtPropulsionNoiseGenerator, vrfAddSetEncumbranceExample::DtManualRotaryWingEncumberedFlightActuator, DtGroundTurnToControllerComponent, DtRotaryWingLoiterControllerComponent, DtSimFeaturesVisualizationController, DtAimAtPointController, DtRotaryWingMoveToControllerComponent, DtSystemSwitcherComponent, DtSimpleRadarWarningResponse, DtScenarioEventController, DtUpdateRepositoryActuator, DtScriptEnableByAggregatePostureController, DtScriptMultiTaskController, DtDieWhenHitActuator, DtOrbitActuator, MyActuatorComponent, DtRadarWarningReceiver, DtRadarJammer, and MyParallelTickComponent.

virtual void DtSimComponent::postTick ( )
virtual

This function is called immediately after tick() is called.

Implementation in this class just ticks task visualizations if taskVisualizationsActive() returns true.

Reimplemented in DtMultiTaskControllerComponent, and DtSingleTaskControllerComponent.

virtual void DtSimComponent::timedTick ( )
virtual

This version of tick checks to see if the time to tick has arrived.

It checks to see if myNextTickTime <= currentTime, where current time is either exerciseClock()->approximateElapsedRealTime() or exerciseClock()->simTime() depending on the tick-period-uses-real-time parameter. If true, it calls tick(), then calls postTick(), and then recalculates the next time to call timedTick() (myNextTickTime) by calling calculateNextTickTime().

Reimplemented in DtSpotReportGeneratorController, and DtActiveSonarSensor.

virtual void DtSimComponent::setMinTickPeriod ( double  minTickPeriod)
virtual

specifies a minimum tick period (which can also be thought of as

  1. / maximum tick rate). This is specified in seconds.
virtual double DtSimComponent::minTickPeriod ( ) const
virtual

access the minimum tick period

virtual void DtSimComponent::setMinTickPeriodVariance ( double  minTickPeriodVariance)
virtual

set the variance in the minimum tick time

virtual double DtSimComponent::minTickPeriodVariance ( ) const
virtual

access the variance in the minimum tick period

virtual void DtSimComponent::setNextTickTime ( double  nextTickTime)
virtual

The next tick time is normally calculated internally.

setNextTickTime can be used to force a tick (set nextTickTime to exerciseClock()-> approximateElapsedRealTime())

virtual double DtSimComponent::nextTickTime ( ) const
virtual

access the next tick time

virtual double DtSimComponent::calculateNextTickTime ( ) const
virtual

The next tick time is equal to mySimManager->exerciseClock()-> approximateElapsedRealTime() + myMinTickPeriod + a random # between -myMinTickPeriodVariance/2.

and +myMinTickPeriodVariance/2. If the exercise clock is paused, the variance is always set to zero to insure that the extra calls to DtFRand() don't prevent repeatability.

virtual double DtSimComponent::calculateFirstTickTime ( ) const
virtual

Returns the first time value that the component should tick at.

This is a randomized interval from the current time up to the tick period of the component. Returns either real time or sim time, depending on the value of the tickPeriodUsesRealTime flag in the descriptor.

virtual const char* DtSimComponent::type ( ) const
pure 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. Warning: this function should always return the same pointer and it should be valid forever. This means the data should be static.

Implemented in DtDisaggregatedConvoyFormationController, DtDamageAdjudicationActuator, DtTargetSelectionController, DtObjectSensor, DtSurfaceEntityPilotController, DtDisaggregatedFormationController, DtRailPathController, DtSuppressionActuator, DtRoadMovementController, DtDiGuyController, DtDisaggregatedMoveAlongController, DtHumanCollisionAvoidanceController, DtObstructionSensor, DtGroundCollisionAvoidanceController, DtWarheadDetonationActuator, DtFixedWingMoveAlongController, DtMultipleHitDamageActuator, DtSignatureObjectSensor, DtEmitterComponent, DtRadarObjectSensor, DtDynamicTerrainController, DtLauncherController, DtSpotReportGeneratorController, DtTurretAcquireController, DtEngagementReportGeneratorController, DtVrfObjectDataMessenger, DtWeaponController, DtParabolicTrajectoryActuator, DtWeaponActuator, DtConvoyTaskController, DtIndirectFireActuator, DtMissileDistractionController, DtSurfaceEntityActuator, DtUnderFireDeterminationSensor, DtBallisticGun, DtFixedWingActuatorComponent, DtFixedWingPilotController, DtSurfaceEntityPatrolRouteController, DtTurretActuatorComponent, DtBombController, DtFixedWingTakeoffController, DtGroundMoveToDestinationControllerComponent, DtBallisticGunController, DtHumanMovementActuator, DtDynamicFeaturesController, DtGroundMovementChooserController, DtMunitionLaunchController, DtSurfaceEntitySimpleActuator, DtTaskControllerComponent, DtSurfaceEntityFollowEntityController, DtRetreatController, DtAggregatedMovementActuator, DtAutomotiveActuatorComponent, DtDisaggregatedMoveIntoFormationController, DtLasingController, DtCruiseMissileDefaultController, DtTurretSlewController, DtAggregatedMoveToController, DtBaseWeaponController, DtOccupancyDirectorController, DtPassiveSonarSensor, DtSurfaceEntityPatrolBetweenController, DtSwingingPartActuator, DtAggregateModelResolutionController, DtContactFusionController, DtFixedWingFlyIntoController, DtHumanMoveToController, DtOrganizationController, DtRotaryWingActuatorComponent, DtRotaryWingPilotController, DtSensorGimbalActuator, DtSpotReportReceiver, DtScriptReactiveTaskController, DtAirVehicleWeaponHoldController, DtDetonationController, DtDisaggregatedMoveToLocationController, DtEmbarkationController, DtFixedWingFlightCommandController, DtFixedWingLandingController, DtHumanMoveAlongController, DtIndirectArtilleryComponent, DtParachuteActuator, DtSurfaceEntityMoveAlongController, DtAirVehicleSetController, DtDisaggregatedPatrolAlongController, DtHumanDamageActuator, DtIndirectFireController, DtLauncherActuator, DtMissileManeuverActComponent, DtShapeBasedTerrainPreloadController, DtCulturalFeatureSetController, DtFallingFromSkyActuatorComponent, DtParachuteController, DtSensorGimbalController, DtSimpleRotaryWingPilot, DtActiveSonarSensor, DtDisaggregatedEmbarkationController, DtFixedWingDefaultController, DtMissileControllerComponent, DtMovementBasedTerrainPreloadController, DtSurfaceEntityMoveToLocationController, DtTopLevelOrganizationController, DtTranslatablePartActuator, DtAggregateOrganizationController, DtCruiseMissileLaunchController, DtGroundMoveDirectionController, DtHumanAcquireController, DtJammerController, DtRotaryWingTurnToHeadingController, DtSubSurfaceDepthController, DtSubSurfaceEntitySimpleActuator, DtSurfaceEntityTurnMoveController, DtBombActuator, DtDisaggregatedPatrolBetweenController, DtHumanCoverPointController, DtHumanFollowController, DtHumanPatrolController, DtIffControllerComponent, DtMissileCollisionActuator, DtMissileMoveToControllerComponent, DtRotaryWingFlightCommandController, DtRotaryWingLandingController, DtRotaryWingMoveAlongControllerComponent, DtSurfaceEntityStopController, DtTDLMessageGeneratorController, DtFixedWingMoveToController, DtGroundMoveToControllerComponent, DtHumanPostureController, DtLimitExistenceController, DtRotaryWingPatrolBetweenController, DtTagVolumeDimensionsController, DtDefaultLandingGearController, DtDisaggregatedWaitController, DtDynamicTerrainMunitionDamageController, DtGlobalEnvironmentActuator, DtGroundAutoControllerComponent, DtHumanCrosswalkController, DtHumanFleeController, DtHumanLauncherAcquireController, DtIndirectFireWeaponController, DtMissileTrackEntityController, DtRotaryWingEncumberedFlightActuator, DtSimpleProximitySensor, DtAimWeaponController, DtAutoAggregateDisaggregateController, DtBaseMountingController, DtDisaggregatedMoveToController, DtFixedWingEntitySetController, DtFixedWingPatrolRouteController, DtGroundFollowEntityController, DtHumanUseDoorController, DtLocalEntitySetController, DtNavTagTraversalController, DtNbcSensor, DtRotaryWingPatrolRouteController, DtSpawnController, DtTerrainProximityIndicator, DtAggregatedPatrolController, DtEngineeringObjectSensor, DtGroundStopMovingControllerComponent, DtLaserGuidedLauncherController, DtLasingMissileTrackController, DtRotaryWingFollowEntityController, DtTDLContactMessageGeneratorController, DtTurretScanController, DtDisaggregatedTurnToHeadingController, DtTurretAimController, DtActivityController, DtDisaggregatedOccupancyDirectorController, DtFixedWingFollowEntityController, DtFixedWingPatrolBetweenController, DtGroundPatrolBetweenController, DtGroundPatrolRouteController, DtGroundTurnToControllerComponent, DtIntegratedLaserGuidedLauncherController, DtLookAtActuator, DtMountingAzimuthActuator, DtRotaryWingJoyFlightController, DtRotaryWingLoiterControllerComponent, DtRotaryWingWaitController, DtScriptedMovementController, DtTurretReturnToHeadingController, DtWaitController, DtControllerComponent, DtAggregatedMoveAlongController, DtHumanEyepointController, DtLaserDetector, DtMissileTargetController, DtMountingElevationActuator, DtReleaseBombController, DtRemoteSensorSpotReportReceiver, DtRotaryWingLandingGearController, DtRotaryWingMoveToControllerComponent, DtRotaryWingTaskController, DtAffectEngineeringObjectController, DtBallisticGunJoy, DtCruiseMissileMoveAlongController, DtFixedWingGunneryController, DtFrictionlessGravityCollisionsActuator, DtHumanSetController, DtHumanTurnToController, DtHumanWeaponStateActuator, DtSurfaceEntityMoveToController, DtSurfaceEntitySetController, DtTacticalSmokeActuator, DtAggregateIndirectFireController, DtDisaggregatedDamageActuator, DtEncumbranceActuator, DtGroundMoveAlongControllerComponent, DtHumanJoystickMovementController, DtAggregateAntiAirController, DtBeaconRadarObjectSensor, DtCreateEngineeringObjectController, DtDisaggregatedActuator, DtHumanGunActuator, DtSendRadioMessageController, DtTacticalGraphicSetController, MyJoystickControllerComponenet, DtSimpleRadarWarningReceiver, DtBallisticGunJoyController, DtDestroyEngineeringObjectController, DtDisaggregatedSetController, DtFixedWingEmbarkationController, DtGroundMoveToLocationControllerComponent, DtHumanFaceTargetController, DtIndividualLifeFormDamageAdjudicationActuator, DtLaunchExpendableResourceController, DtLaunchSmokeController, DtLookAtPointController, DtSimTerrainVisualizationController, ExampleTDLMessageGeneratorController, DtAggregateDynamicFeaturesController, DtBreachObstacleController, DtGroundVehicleTrailingEffectController, DtHumanStopMovingController, DtPropulsionNoiseGenerator, DtAggregateReleaseBombController, DtAimAtPointController, DtAirborneAggregatedMovementActuator, DtFixedWingJoyFlightController, DtFrictionlessGravityActuator, DtNavigationPreferenceController, DtRadarJammer, DtBreachDetector, DtEventTriggerController, DtFixedWingMoveToLocationController, DtGroundJoyMoveController, DtGroundJoyTurretController, DtHumanObstructionSensor, DtMountingController, DtNavalMineSetController, DtRadarWarningReceiver, DtSystemSwitcherComponent, DtTDLPPLIMessageGeneratorController, DtTDLStatusMessageGeneratorController, DtTimeKeeperComponent, DtAggregateFollowController, DtScriptEnableController, DtVerticalLauncherController, DtCombatRangeController, DtFascamController, DtMoppEnableController, DtNbcWeaponController, DtRotaryWingEmbarkationController, DtRotaryWingMoveToLocationControllerComponent, DtSimpleRadarWarningResponse, DtEmbeddedEntitiesController, DtEnvironmentalActivationController, DtResupplyController, DtScenarioEventController, DtUpdateRepositoryActuator, DtDiGuyGestureController, DtPseudoAggregatedSetController, DtSinkToDepthActuator, DtSpawnObjectWarheadActuator, DtAggregateCombatAdjustmentController, DtAggregateLoadoutController, DtSimFeaturesVisualizationController, DtStatePropertyInitializationController, DtDieWhenHitActuator, DtOrbitActuator, DtScriptMultiTaskController, DtAggregatedSubsurfaceMovementActuator, MyActuatorComponent, MyParallelTickComponent, and DtCompatibilityController.

virtual void DtSimComponent::setEntity ( DtVrfObject entity)
virtual

The entity's state repository is the place that actuator components make updates and other components look to see our current state.

This provides a basic communication mechanism between components. Having the entity changeable makes it possible to migrate a component from one entity to another... A local copy of the entity's state repository is also made by this call for ease of use.

Reimplemented in DtLaserDetector, and DtSimpleRadarWarningReceiver.

virtual DtSimComponent* DtSimComponent::nextComponent ( )
virtual

List management functions.

virtual DtSimComponent* DtSimComponent::prevComponent ( )
virtual
virtual void DtSimComponent::setListItem ( DtListItem *  item)
virtual

Used by DtComponentList.

virtual DtListItem* DtSimComponent::listItem ( )
virtual
virtual void DtSimComponent::putData ( std::string &  fp,
int  indentLevel = 0 
)
virtual

putData writes our type, which is provided by the virtual type accessor of the deriving class.

Reimplemented from DtReaderWriter.

virtual DtlObjPtr DtSimComponent::getData ( DtlObjPtr  args,
const DtReaderWriter::SearchPaths searchPaths,
const DtVariableBindingsList variableBindings 
)
virtual

getData is just used to get us past the type in the data stream, since it's not actual stored.

Reimplemented from DtReaderWriter.

virtual void DtSimComponent::addInputPort ( DtInputPort port)
virtual

Adds this input port to the components input port list so that other components can look it up and attach to it.

virtual void DtSimComponent::removeInputPort ( DtInputPort port)
virtual
virtual DtInputPort* DtSimComponent::lookupInputPort ( const DtString portName)
virtual

Returns a pointer to the input port registered on this component with the specified name.

portName can specify a group and port in the form "groupname:portname" which will cause this function to look for the port inside the specified group.

virtual DtList DtSimComponent::inputPortList ( ) const
virtual

Returns the list of DtInputPorts registered on this component.

virtual void DtSimComponent::addOutputPort ( DtOutputPort port)
virtual

Adds this output port to the components output port list so that other components can look it up and attach to it.

virtual void DtSimComponent::removeOutputPort ( DtOutputPort port)
virtual
virtual DtOutputPort* DtSimComponent::lookupOutputPort ( const DtString portName)
virtual

Returns a pointer to the output port registered on this component with the specified name.

portName can specify a group and port in the form "groupname:portname" which will cause this function to look for the port inside the specified group.

virtual DtList DtSimComponent::outputPortList ( ) const
virtual

Returns the list of DtOutputPorts registered on this component.

virtual void DtSimComponent::addInputPortGroup ( DtInputPortGroup group)
virtual

Adds this input port to the components input port list so that other components can look it up and attach to it.

virtual void DtSimComponent::removeInputPortGroup ( DtInputPortGroup group)
virtual
virtual DtInputPortGroup* DtSimComponent::lookupInputPortGroup ( const DtString groupName)
virtual

Returns a pointer the input port group registered on this component with the specified name.

virtual DtList DtSimComponent::inputPortGroupList ( ) const
virtual

Returns the list of DtInputPortGroups registered on this component.

virtual void DtSimComponent::addOutputPortGroup ( DtOutputPortGroup group)
virtual

Adds this output port group to the components output port group list so that other components can look it up and attach to it.

virtual void DtSimComponent::removeOutputPortGroup ( DtOutputPortGroup group)
virtual
virtual DtOutputPortGroup* DtSimComponent::lookupOutputPortGroup ( const DtString groupName)
virtual

Returns a pointer the output port group registered on this component with the specified name.

virtual DtList DtSimComponent::outputPortGroupList ( ) const
virtual

Returns the list of DtOutputPortGroups registered on this component.

virtual int DtSimComponent::priority ( ) const
virtual

Return the current connection priority for this component.

This value determines which component will take precedence when multiple connections attempts are active on the same input port. Lower numbers will take precedence. By default, component priorities are based on the order they were listed in the OPD entry, starting with 0.

virtual void DtSimComponent::setPriority ( int  priority)
virtual

Sets a new connection priority for this component, and changes all current outgoing connections from this component to the new value.

By default, component priorities are based on the order they were listed in the OPD entry, starting with 0. It is only necessary to use this method if components are being added or removed after object-creation time.

double DtSimComponent::dT ( ) const
inline

This is the delta-t for this component, which may or may not be the same as the exerciseClock dT.

Note that dT() is not virtual, as it is inlined.

Returns
time in seconds

References myDT.

virtual void DtSimComponent::setDT ( double  deltaT)
virtual

Note that while dT is calculated internally, this makes it possible to 'lie' to the component about dT if necessary.

Parameters
Input
deltaTtime in seconds
virtual void DtSimComponent::setComponentDescriptor ( DtComponentDescriptor componentDescriptor)
virtual

The component descriptor specified in the order of battle file or parameter file that was used to create this component.

It may be derived from and hold component-specific parameter information.

Reimplemented in DtWarheadDetonationActuator, DtMunitionLaunchController, DtVrfObjectDataMessenger, DtFixedWingFlyIntoController, DtGroundMoveToDestinationControllerComponent, DtLaserGuidedLauncherController, and DtBallisticGunJoy.

virtual const DtComponentDescriptor* DtSimComponent::componentDescriptor ( ) const
virtual
virtual bool DtSimComponent::tickWhileDestroyed ( ) const
virtual
virtual DtOutputStream& DtSimComponent::objectConsoleDebug ( const DtString channel = "") const
virtual
Returns
The stream that is routed to the owning object's console.
virtual DtOutputStream& DtSimComponent::objectConsoleVerbose ( const DtString channel = "") const
virtual
virtual DtOutputStream& DtSimComponent::objectConsoleInfo ( const DtString channel = "") const
virtual
virtual DtOutputStream& DtSimComponent::objectConsoleWarn ( const DtString channel = "") const
virtual
virtual DtOutputStream& DtSimComponent::objectConsoleError ( const DtString channel = "") const
virtual
DtVrfProcessStateRepositoryManager* DtSimComponent::psrManager ( )
Returns
The PSR manager that should be used by this component. This will be the PSR manager that is owned by the component's parent system. Non-virtual so that it can be used by the destructor.
virtual DtSimResourceManager& DtSimComponent::resourceManager ( )
virtual
Returns
A pointer to the resource manager of the system that this component is part of.
virtual const DtSimResourceManager& DtSimComponent::resourceManager ( ) const
virtual
virtual DtString DtSimComponent::componentFullName ( ) const
virtual
Returns
A string that uniquely names this component on the entity. The name will be composed of the systems containing this component, and the reader-writer name of this component.
static DtSimComponentFactory* DtSimComponent::factory ( )
static

A DtSimComponentFactory is allocated by the DtSimCreator, and this pointer is set.

The DtSimCreator deletes this pointer when it is deleted. This is done this way because we don't allow static initialization.

Reimplemented from DtReaderWriter.

static void DtSimComponent::setFactory ( DtSimComponentFactory factory)
static
static DtSimComponent* DtSimComponent::createComponent ( const DtString name,
const DtString type,
DtVrfObject owner,
DtSimManager simManager,
DtComponentSystem parentSystem,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)
static

Creates a DtSimComponent using the factory, then initializes it via the MTL stream.

static void DtSimComponent::addSimComponentCreatorFcn ( const DtString type,
DtSimComponentCreatorFcn  fcn 
)
static

Adds a DtSimComponent creation function to the DtSimComponentFactory, using the given type as the key.

The type string is one of the types defined in compTypes.h.

Parameters
typeType identifying particular derived type of DtSimComponent
fcnCreation function that instantiates a new DtSimComponent.
virtual DtPhysicalWorld* DtSimComponent::physicalWorld ( )
virtual

Gets the physical world that this component's entity exists in.

virtual const DtPhysicalWorld* DtSimComponent::physicalWorld ( ) const
virtual
virtual DtAttachedTerrain* DtSimComponent::terrainAttachedTo ( )
virtual

Gets the terrain that this component's entity is attached to, if any.

virtual const DtAttachedTerrain* DtSimComponent::terrainAttachedTo ( ) const
virtual
virtual DtVrfObject* DtSimComponent::entity ( )
virtual

Gets the entity.

virtual const DtVrfObject* DtSimComponent::entity ( ) const
virtual
virtual DtSimManager* DtSimComponent::simManager ( )
virtual

Gets the sim manager.

virtual const DtSimManager* DtSimComponent::simManager ( ) const
virtual
virtual const Coordinate_System* DtSimComponent::coordinateSystem ( ) const
virtual

Gets the coordinate system, as it should always exist if the physical world is in a valid state!

Note
If this function is called while the physical world is in an invalid state, the results are undefined.
virtual Coordinate_System* DtSimComponent::coordinateSystem ( )
virtual
virtual DtVrfObjectStateRepository* DtSimComponent::localStateRepository ( )
virtual

Gets the local state repository.

virtual const DtVrfObjectStateRepository* DtSimComponent::localStateRepository ( ) const
virtual
virtual DtTaskVisualizationMap& DtSimComponent::taskVisualizations ( )
virtual

Returns the list of task visualizations for this component.

virtual bool DtSimComponent::taskVisualizationsActive ( ) const
virtual

Returns true if task visualizations are currently active for this component.

Default behavior is to return false. Must be overridden in subclasses to enable task visualizations.

Reimplemented in DtRadarObjectSensor, DtTaskControllerComponent, DtParachuteController, DtHumanUseDoorController, DtRadarJammer, DtSimpleRotaryWingPilot, DtSimTerrainVisualizationController, and DtSimFeaturesVisualizationController.

virtual bool DtSimComponent::taskVisualizationsEnabled ( ) const
virtual

Returns true if task visualizations are enabled for this component.

Task visualizations are usually enabled or disabled by configuration of the SMS. This differs from whether task visualizations are active, as task visualization activation changes at run time based on specific conditions of the entity and component (e.g. is the component currently tasked).

virtual bool DtSimComponent::isThreadSafe ( ) const
virtual

Returns true if this component is marked as being thread safe.

virtual void DtSimComponent::addVRLinkDeferredJob ( const boost::function< void()> &  callback)
virtual

Adds a deferred job to the VRLink job queue in the DtParallelTickManager, but only if this component is marked at thread safe.

Otherwise it is executed immediately.

virtual void DtSimComponent::onRestore ( )
virtual

Called whenever a component is restored. Default is no-op.

Reimplemented in DtControllerComponent.

virtual double DtSimComponent::computeCurrentTime ( )
protectedvirtual

Compute current time and myDT.

bool DtSimComponent::testInvariant ( ) const
protected
Returns
A boolean indicating whether or not the class invariant remains valid or not. Should always be true at the beginning of every public member function, and also at the end of all non-const public member functions.
virtual bool DtSimComponent::createPortGroups ( )
protectedvirtual

Called by init.

Derived classes should override this method to create all their input/output port groups.

Reimplemented in DtFixedWingPilotController, DtAutomotiveActuatorComponent, DtHumanMovementActuator, DtFixedWingActuatorComponent, DtBallisticGun, DtSurfaceEntityPilotController, DtDiGuyController, DtHumanCollisionAvoidanceController, DtSurfaceEntityFollowEntityController, DtGroundMoveToDestinationControllerComponent, DtHumanFollowController, DtGroundCollisionAvoidanceController, DtObstructionSensor, DtObjectSensor, DtGroundAutoControllerComponent, DtBaseMountingController, DtSurfaceEntityActuator, DtAggregatedMoveToController, DtBaseWeaponController, DtHumanMoveToController, DtAggregatedMovementActuator, DtBallisticGunController, DtLasingController, DtMissileControllerComponent, DtWeaponActuator, DtSensorGimbalController, DtScriptedMovementController, DtSurfaceEntitySimpleActuator, DtRotaryWingPilotController, DtTurretAcquireController, DtHumanAcquireController, DtAggregatedMoveAlongController, DtHumanCoverPointController, DtRotaryWingMoveAlongControllerComponent, DtRotaryWingActuatorComponent, DtSensorGimbalActuator, DtRotaryWingTaskController, DtMissileManeuverActComponent, DtMountingElevationActuator, DtMountingAzimuthActuator, DtGroundMoveDirectionController, DtHumanUseDoorController, DtFallingFromSkyActuatorComponent, DtParachuteActuator, DtAirVehicleWeaponHoldController, DtHumanEyepointController, DtHumanFleeController, DtLookAtActuator, DtParachuteController, DtTerrainProximityIndicator, DtAimWeaponController, DtDefaultLandingGearController, DtHumanTurnToController, DtLookAtPointController, DtAimAtPointController, DtHumanCrosswalkController, DtHumanStopMovingController, DtHumanFaceTargetController, DtUpdateRepositoryActuator, DtAggregateFollowController, and DtHumanJoystickMovementController.

virtual bool DtSimComponent::createPorts ( )
protectedvirtual

Called by init.

Derived classes should override this method to create all their input/output ports and port groups.

Reimplemented in DtFixedWingPilotController, DtAutomotiveActuatorComponent, DtHumanMovementActuator, DtFixedWingActuatorComponent, DtBallisticGun, DtSurfaceEntityPilotController, DtDiGuyController, DtHumanCollisionAvoidanceController, DtSurfaceEntityFollowEntityController, DtWeaponController, DtGroundMoveToDestinationControllerComponent, DtHumanFollowController, DtGroundCollisionAvoidanceController, DtObjectSensor, DtLauncherController, DtObstructionSensor, DtGroundAutoControllerComponent, DtBaseMountingController, DtSurfaceEntityActuator, DtAggregatedMoveToController, DtTargetSelectionController, DtBaseWeaponController, DtHumanMoveToController, DtIndirectFireActuator, DtIndirectFireWeaponController, DtAggregatedMovementActuator, DtGroundFollowEntityController, DtBallisticGunController, DtDetonationController, DtLasingController, DtMissileControllerComponent, DtWeaponActuator, DtSensorGimbalController, DtSignatureObjectSensor, DtSurfaceEntitySimpleActuator, DtSpotReportGeneratorController, DtRotaryWingPilotController, DtSwingingPartActuator, DtTurretAcquireController, DtHumanAcquireController, DtFixedWingGunneryController, DtFixedWingLandingController, DtHumanCoverPointController, DtAggregatedMoveAlongController, DtTurretSlewController, DtTurretActuatorComponent, DtRotaryWingMoveAlongControllerComponent, DtRotaryWingActuatorComponent, DtSensorGimbalActuator, DtSubSurfaceDepthController, DtWarheadDetonationActuator, DtLaserGuidedLauncherController, DtRotaryWingTaskController, DtLauncherActuator, DtMissileManeuverActComponent, DtSpotReportReceiver, DtMountingElevationActuator, DtSimpleProximitySensor, DtMountingAzimuthActuator, DtBombController, DtHumanObstructionSensor, DtContactFusionController, DtHumanUseDoorController, DtAirVehicleWeaponHoldController, DtHumanPostureController, DtParachuteActuator, DtBallisticGunJoyController, DtLaserDetector, DtEmbarkationController, DtHumanEyepointController, DtHumanFleeController, DtGroundMoveDirectionController, DtIntegratedLaserGuidedLauncherController, DtLookAtActuator, DtSubSurfaceEntitySimpleActuator, DtAimWeaponController, DtBombActuator, DtParachuteController, DtDefaultLandingGearController, DtHumanTurnToController, DtRotaryWingEncumberedFlightActuator, DtHumanCrosswalkController, DtHumanWeaponStateActuator, DtTurretAimController, DtSimpleRadarWarningReceiver, DtTerrainProximityIndicator, DtEncumbranceActuator, DtLookAtPointController, DtEventTriggerController, DtHumanFaceTargetController, DtHumanGunActuator, DtAimAtPointController, DtSimpleRadarWarningResponse, DtSimpleRotaryWingPilot, DtHumanJoystickMovementController, DtBallisticGunJoy, and DtAggregateFollowController.

DtVrfProcessStateRepository* DtSimComponent::createComponentPsr ( const DtString defaultPsrType,
const DtString defaultPsrName,
bool  useDescriptorParams = true 
)
protected

Creates a PSR for this component and registers it with the PSR manager.

This is typeically called from init() by a derived class if the derived class has a PSR it wishes to use. If the PSR manager already has a PSR of the desired name, that will be returned.

Note
PSRs created with this method will be automatically unregistered and deleted when the component is destroyed.
Parameters
useDescriptorParamsIf true, the PSR Type and Name will be taken from the component descriptor, if available. Otherwise, the default will be used, regardless of descriptor values.
virtual void DtSimComponent::updateTaskVisualizations ( )
inlineprotectedvirtual
virtual void DtSimComponent::destroyTaskVisualizations ( )
protectedvirtual

Destroys all task visualizations for this component.

virtual void DtSimComponent::destroyTaskVisualization ( const DtString name)
protectedvirtual

Destroys an existing task visualization.

virtual DtPointTaskVisualizationPtr DtSimComponent::pointTaskVisualization ( const DtString name)
protectedvirtual

Finds an existing or creates a new point task visualization with the given name.

virtual DtLineTaskVisualizationPtr DtSimComponent::lineTaskVisualization ( const DtString name)
protectedvirtual

Finds an existing or creates a new line task visualization with the given name.

virtual DtAreaTaskVisualizationPtr DtSimComponent::areaTaskVisualization ( const DtString name)
protectedvirtual

Finds an existing or creates a new area task visualization with the given name.

virtual DtTextTaskVisualizationPtr DtSimComponent::textTaskVisualization ( const DtString name)
protectedvirtual

Finds an existing or creates a new text task visualization with the given name.

double DtSimComponent::calculateNextTaskVisTickTime ( ) const
protected

Determines the next time the task visualizations should be ticked.

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

assignment operator, not implemented

Member Data Documentation

DtVrfObject* DtSimComponent::myEntity
protected
DtVrfObjectStateRepository* DtSimComponent::myLocalStateRepository
protected
DtSimManager* DtSimComponent::mySimManager
protected
DtComponentSystem* DtSimComponent::mySystem
protected

Pointer to the DtComponentSystem that this component belongs.

DtListItem* DtSimComponent::myListItem
protected
DtInputPortMap DtSimComponent::myInputPortList
protected
DtOutputPortMap DtSimComponent::myOutputPortList
protected
DtInputPortGroupMap DtSimComponent::myInputPortGroupList
protected
DtOutputPortGroupMap DtSimComponent::myOutputPortGroupList
protected
DtSimComponentFactory* DtSimComponent::myFactory
staticprotected
int DtSimComponent::myPriority
protected
double DtSimComponent::myMinTickPeriod
protected
double DtSimComponent::myMinTickPeriodVariance
protected
double DtSimComponent::myNextTickTime
protected
double DtSimComponent::myLastTickSimTime
protected
double DtSimComponent::myDT
protected

Referenced by dT().

bool DtSimComponent::myIsEnabled
protected

Indicates whether this component should be enabled for ticking or not.

bool DtSimComponent::myFirstTick
protected

Initialized to true in the constructor, set to false by the first call to postTick.

bool DtSimComponent::myIsThreadSafe
protected

Whether this component can be use the DtCriticalSection versions of the tick functions and be ticked in parallel with other components Defaults to false.

const DtComponentDescriptor* DtSimComponent::myComponentDescriptor
protected
std::list<DtVrfProcessStateRepository*> DtSimComponent::myComponentPsrs
protected

List of PSRs made using createComponentPsr() that will be deleted by this component when it is destroyed.

bool DtSimComponent::myTickEveryFrame
protected

Flag indicating that tickPeriod is set to 0, and the component will tick every frame.

DtTaskVisualizationMap DtSimComponent::myTaskVisualizations
protected

The visualization objects to be drawn for this component.

double DtSimComponent::myNextTaskVisTickTime
protected

The next tick time for updating the task visualizations.

__itt_string_handle* DtSimComponent::myTickITTStringHandle
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)