![]() |
VR-Forces 4.1 Class Documentation
|
The DtSimComponent class is the base class for the entire simulation model component hierarchy. 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 | 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 DtString | type () const |
| 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 DtSimComponent * | nextComponent () |
| List management functions. | |
| virtual DtSimComponent * | prevComponent () |
| virtual void | setListItem (DtListItem *item) |
| Used by DtComponentList. | |
| virtual DtListItem * | listItem () |
| virtual void | putData (FILE *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 DtFilename &searchPath, 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 DtInputPort * | lookupInputPort (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 DtOutputPort * | lookupOutputPort (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 DtInputPortGroup * | lookupInputPortGroup (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 DtOutputPortGroup * | lookupOutputPortGroup (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. | |
| DtVrfProcessStateRepositoryManager * | psrManager () |
| virtual DtString | componentFullName () const |
| virtual void | enable () |
| Is this component enabled or not. | |
| virtual void | disable () |
| Is this component enabled or not. | |
| virtual bool | isEnabled () |
| Is this component enabled or not. | |
| virtual void | setIsEnabled (bool yesNo) |
| Is this component enabled or not. | |
| virtual DtOutputStream & | objectConsoleDebug () const |
| virtual DtOutputStream & | objectConsoleVerbose () const |
| virtual DtOutputStream & | objectConsoleInfo () const |
| virtual DtOutputStream & | objectConsoleWarn () const |
| virtual DtOutputStream & | objectConsoleError () const |
| virtual DtSimResourceManager & | resourceManager () |
| 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) | |
| copy constructor | |
| DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| assignment operator | |
| virtual | ~DtReaderWriter () |
| destructor | |
| virtual void | putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| Top level call to write itself to file. | |
| virtual void | getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| Top level to read itself from an input stream. | |
| virtual void | writeSelf (FILE *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 bool | hasAlias (const DtSymbolString &alias) |
| virtual const aliasContainer & | aliases () const |
| virtual void | setReadonly (bool flag) |
| Set read-only flag. | |
| virtual bool | isReadonly () const |
| 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 char * | readerWriterType () const |
| Used to supply a string type that this reader writer type is. | |
| virtual DtString | prettyPrint () const |
| Routine to return a human readable form of the reader/writer variable. | |
| 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 void | setValueSpecified (bool specified, bool recurse=false) |
| The specified flags are used for optional values. | |
| virtual bool | valueSpecified () const |
| The specified flags are used for optional values. | |
| 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 DtSymbolString | variableName () const |
| The variable name, if this object is a variable reference. | |
| virtual void | setVariableName (const DtSymbolString variableName) |
| The variable name, if this object is a variable reference. | |
| const DtReaderWriterRegistry & | registry () const |
| Collection of child DtReaderWriter nodes owned by this object. | |
| DtReaderWriterRegistry & | registry () |
| Collection of child DtReaderWriter nodes owned by this object. | |
Static Public Member Functions | |
| static DtSimComponentFactory * | factory () |
| A DtSimComponentFactory is allocated by the DtSimCreator, and this pointer is set. | |
| static void | setFactory (DtSimComponentFactory *factory) |
| static DtSimComponent * | createComponent (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 (FILE *fp, int indentLevel) |
| static const DtVariableBindingsList & | nullVariableReference () |
| static void | setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData) |
| static void | setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData) |
| static const DtFilename & | appPath () |
| Gets the current working directory. | |
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 | |
| bool | testInvariant () const |
| virtual bool | createPortGroups () |
| Called by init. | |
| virtual bool | createPorts () |
| Called by init. | |
| virtual DtPhysicalWorld * | physicalWorld () |
| Gets the physical world that this component's entity exists in. | |
| virtual const DtPhysicalWorld * | physicalWorld () const |
| virtual DtAttachedTerrain * | terrainAttachedTo () |
| Gets the terrain that this component's entity is attached to, if any. | |
| virtual const DtAttachedTerrain * | terrainAttachedTo () const |
| virtual DtVrfObject * | entity () |
| Gets the entity. | |
| virtual const DtVrfObject * | entity () const |
| virtual DtSimManager * | simManager () |
| Gets the sim manager. | |
| virtual const DtSimManager * | simManager () const |
| virtual const Coordinate_System * | coordinateSystem () const |
| Gets the coordinate system, as it should always exist if the physical world is in a valid state! | |
| virtual Coordinate_System * | coordinateSystem () |
| virtual DtVrfObjectStateRepository * | localStateRepository () |
| Gets the local state repository. | |
| virtual const DtVrfObjectStateRepository * | localStateRepository () const |
Protected Member Functions inherited from DtReaderWriter | |
| virtual void | bindToRwAsVariable (const DtReaderWriter *rw) |
| Copies values from the specified DtReaderWriter. | |
| 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. | |
Static Protected Attributes | |
| static DtSimComponentFactory * | myFactory |
Static Protected Attributes inherited from DtReaderWriter | |
| static DtString | theUnspecifiedValue |
| static DtGetSelfCallbackInfo | thePostGetSelfCallback |
| static DtPutSelfCallbackInfo | thePrePutSelfCallback |
| static const DtVariableBindingsList | theEmptyVariableBindingsList |
| static DtReaderWriterFactory | theFactory |
Private Member Functions | |
| DtSimComponent () | |
| default constructor; should not be called. | |
| DtSimComponent (const DtSimComponent &orig) | |
| copy constructor, not implemented | |
| DtSimComponent & | operator= (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::pair < DtSymbolString, DtString > | DtVariableNameType |
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.
|
protected |
|
protected |
|
protected |
|
protected |
| DtSimComponent::DtSimComponent | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
|
virtual |
destructor
|
private |
default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
|
private |
copy constructor, not implemented
| 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 |
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
Reimplemented in DtTargetSelectionController, DtDisaggregatedFormationController, DtDisaggregatedMoveAlongController, DtSurfaceEntityPilotController, DtDamageAdjudicationActuator, BHAVE::DtSpawnController, DtFixedWingEmbarkationController, DtWeaponController, DtDIGuyController, DtRailPathController, BHAVE::DtKynapseGroundPlatformController, DtObjectSensor, DtTurretAcquireController, DtActuatorComponent, DtLauncherController, DtMissileDistractionController, BHAVE::DtBhaveMovementChooserController, DtEmitterComponent, DtSpotReportGeneratorController, DtBallisticGunController, DtDisaggregatedEmbarkationController, DtDisaggregatedMoveIntoFormationController, DtSimpleRotaryWingPilot, DtWeaponActuator, BHAVE::DtKynapseController, BHAVE::DtKynapseLifeformController, DtSurfaceEntityActuator, DtGroundMovementChooserController, DtLaunchExpendableResourceController, DtObstructionSensor, DtRadarObjectSensor, DtSurfaceEntityMoveAlongController, DtWarheadDetonationActuator, DtCruiseMissileLaunchController, DtDetonationController, DtDisaggregatedOccupancyDirectorController, BHAVE::DtBhaveMoveDirectionController, DtDisaggregatedMoveToLocationController, DtDisaggregatedPatrolAlongController, DtFixedWingTakeoffController, DtSignatureObjectSensor, DtAutomotiveActuatorComponent, DtFixedWingActuatorComponent, DtHumanMovementActuator, DtRailMovementController, DtReleaseBombController, DtAggregatedMoveToController, DtAggregatedPatrolController, DtConvoyTaskController, DtFixedWingPilotController, DtHumanPatrolController, DtTurretSlewController, DtHumanMoveAlongController, DtLaunchSmokeController, DtLimitExistenceController, DtOccupancyDirectorController, DtBallisticGun, DtContactFusionController, DtHumanCollisionAvoidanceController, DtLasingController, DtOrganizationController, DtAirVehicleWeaponHoldController, DtDisaggregatedWaitController, DtMultipleHitDamageActuator, DtRotaryWingActuatorComponent, DtSpotReportReceiver, DtEmbarkationController, DtHumanMoveToController, DtLaserGuidedLauncherController, DtLauncherActuator, DtAggregatedSetController, DtFallingFromSkyActuatorComponent, DtFixedWingLandingController, DtGroundCollisionAvoidanceController, DtIndirectFireController, DtUnderFireDeterminationSensor, DtGroundMoveToDestinationControllerComponent, DtHumanFollowController, DtIntegratedLaserGuidedLauncherController, DtLasingMissileTrackController, DtMissileControllerComponent, DtMissileManeuverActComponent, DtTopLevelOrganizationController, DtTurretScanController, DtBombController, DtGroundMoveDirectionController, DtRotaryWingWaitController, DtWaitController, DtBombActuator, DtDisaggregatedPatrolBetweenController, DtFixedWingFlightCommandController, DtHumanPostureController, DtMovementBasedTerrainPreloadController, DtMissileCollisionActuator, DtSwingingPartActuator, DtControllerComponent, DtAggregateModelResolutionController, DtBaseWeaponController, DtCombatRangeController, DtFixedWingDefaultController, DtRotaryWingPilotController, DtShapeBasedTerrainPreloadController, DtDefaultLandingGearController, DtGroundAutoControllerComponent, DtHumanLauncherAcquireController, DtLocalEntitySetController, DtRotaryWingFlightCommandController, DtIndirectArtilleryComponent, DtAutoAggregateDisaggregateController, DtDisaggregatedSetController, DtGlobalEnvironmentActuator, DtSendRadioMessageController, DtTurnAndMoveController, DtRotaryWingTaskController, DtRotaryWingMoveAlongControllerComponent, DtVrfObjectDataMessenger, DtCruiseMissileDefaultController, DtHumanEyepointController, DtRotaryWingJoyFlightController, DtAggregatedMoveAlongController, DtHumanAcquireController, DtIffControllerComponent, DtTimeKeeperComponent, DtHumanTurnToController, DtRotaryWingCollisionAvoidanceController, DtHumanStopMovingController, DtLaserDetector, DtHumanAimWeaponController, DtIndividualLifeFormDamageAdjudicationActuator, DtSimpleRadarWarningReceiver, DtAggregatedMovementActuator, DtMultiTaskControllerComponent, DtSystemSwitcherComponent, DtScriptMultiTaskController, MyActuatorComponent, and DtCompatibilityController.
|
inlinevirtual |
Called after all components have been created, initialized and added to the component manager.
Override this function if you need to do any further initialization after all other components have been created.
Reimplemented in DtFixedWingPilotController, DtSurfaceEntityPilotController, DtGroundAutoControllerComponent, DtMissileControllerComponent, DtHumanAcquireController, DtRotaryWingTaskController, DtBombController, DtFixedWingDefaultController, DtGroundMovementChooserController, DtWeaponActuator, DtSurfaceEntityActuator, DtTurretActuatorComponent, DtFixedWingTakeoffController, DtBallisticGunController, DtIndirectFireController, DtAggregateModelResolutionController, DtAggregatedSetController, DtDetonationController, DtFixedWingLandingController, DtBaseWeaponController, DtSwingingPartActuator, DtBaseMountingController, DtMountingAzimuthActuator, and DtMountingElevationActuator.
|
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, DtTaskControllerComponent, DtDisaggregatedFormationController, DtLocalEntitySetController, DtAggregateModelResolutionController, DtAggregatedSetController, and DtSystemSwitcherComponent.
|
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, DtTaskControllerComponent, DtDisaggregatedFormationController, DtLocalEntitySetController, DtAggregateModelResolutionController, DtAggregatedSetController, and DtSystemSwitcherComponent.
|
virtual |
Is this component enabled or not.
If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
|
virtual |
Is this component enabled or not.
If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
|
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, BHAVE::DtKynapseController, BHAVE::DtSpawnController, DtDIGuyController, DtRailPathController, DtLauncherController, DtOccupancyDirectorController, DtFixedWingLandingController, DtEmbarkationController, DtRadarObjectSensor, DtBallisticGunController, DtDetonationController, DtReleaseBombController, DtBallisticGun, DtLaunchExpendableResourceController, DtLaserGuidedLauncherController, DtObstructionSensor, DtHumanMoveAlongController, DtFixedWingMoveAlongController, DtLasingController, DtMultipleHitDamageActuator, DtAggregateModelResolutionController, DtRailMovementController, DtIndirectFireActuator, DtAggregatedMoveAlongController, DtGroundMoveAlongControllerComponent, DtIffControllerComponent, and DtScriptMultiTaskController.
|
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, DtDamageAdjudicationActuator, DtTargetSelectionController, BHAVE::DtKynapseController, BHAVE::DtSpawnController, DtRailPathController, DtSurfaceEntityFollowEntityController, DtSurfaceEntityActuator, DtDisaggregatedMoveAlongController, DtDisaggregatedEmbarkationController, DtRotaryWingFollowEntityController, DtConvoyTaskController, DtLocalEntitySetController, DtDisaggregatedFormationController, DtDIGuyController, DtSurfaceEntityPilotController, DtObjectSensor, DtRetreatController, DtRadarObjectSensor, DtWeaponController, DtLauncherController, DtOccupancyDirectorController, DtWarheadDetonationActuator, DtFixedWingTakeoffController, DtReleaseBombController, DtFixedWingLandingController, DtMissileDistractionController, DtEmbarkationController, DtCruiseMissileLaunchController, DtSignatureObjectSensor, DtSpotReportGeneratorController, DtSurfaceEntityMoveToController, DtObstructionSensor, DtSimpleRotaryWingPilot, DtBallisticGunController, DtTurretAcquireController, DtVrfObjectDataMessenger, DtTurnAndMoveController, DtHumanMoveAlongController, BHAVE::DtBhaveMovementChooserController, DtDetonationController, DtLasingController, DtWeaponActuator, DtBallisticGun, DtLaunchExpendableResourceController, DtUnderFireDeterminationSensor, DtFixedWingMoveAlongController, DtLaserGuidedLauncherController, DtTurretActuatorComponent, DtDisaggregatedMoveIntoFormationController, DtRailMovementController, DtIndirectFireController, DtCombatRangeController, DtFixedWingActuatorComponent, DtAggregateModelResolutionController, DtAutomotiveActuatorComponent, DtHumanCollisionAvoidanceController, DtTurretSlewController, DtHumanMovementActuator, DtContactFusionController, DtDisaggregatedPatrolAlongController, DtAggregatedMoveToController, DtBombController, DtGroundCollisionAvoidanceController, DtOrganizationController, DtBaseMountingController, DtFixedWingPilotController, DtGroundMoveToDestinationControllerComponent, DtAggregateOrganizationController, DtAirVehicleWeaponHoldController, DtDisaggregatedPatrolBetweenController, DtEmitterComponent, DtHumanFollowController, DtLimitExistenceController, DtRotaryWingActuatorComponent, DtFallingFromSkyActuatorComponent, DtRotaryWingWaitController, DtSpotReportReceiver, DtWaitController, DtHumanMoveToController, DtIndirectArtilleryComponent, DtLaunchSmokeController, DtSwingingPartActuator, DtTopLevelOrganizationController, DtBombActuator, DtMissileManeuverActComponent, DtDisaggregatedWaitController, DtMissileCollisionActuator, DtBallisticGunJoy, DtGroundMoveDirectionController, DtHumanAcquireController, DtHumanPostureController, DtSimpleRadarWarningReceiver, DtDefaultLandingGearController, DtFixedWingFlightCommandController, DtIndividualLifeFormDamageAdjudicationActuator, DtIntegratedLaserGuidedLauncherController, DtTurretScanController, DtLaserDetector, DtAggregatedMoveAlongController, DtAutoAggregateDisaggregateController, DtFixedWingFollowEntityController, DtGroundMoveAlongControllerComponent, DtFixedWingDefaultController, DtHumanWeaponStateActuator, DtRotaryWingPilotController, DtTimeKeeperComponent, DtMountingAzimuthActuator, DtRotaryWingTurnToHeadingController, DtBallisticGunJoyController, DtDisaggregatedDamageActuator, DtIffControllerComponent, DtMountingElevationActuator, DtRotaryWingFlightCommandController, DtRotaryWingLandingController, DtDisaggregatedActuator, DtFixedWingMoveToController, DtHumanEyepointController, DtMissileMoveToControllerComponent, DtRotaryWingPatrolBetweenController, DtGlobalEnvironmentActuator, DtSendRadioMessageController, DtTacticalSmokeActuator, DtCruiseMissileDefaultController, DtDisaggregatedMoveToController, DtFixedWingJoyFlightController, DtHumanTurnToController, DtRotaryWingMoveAlongControllerComponent, DtGroundStopMovingControllerComponent, DtHumanStopMovingController, DtRotaryWingJoyFlightController, DtHumanAimWeaponController, DtAggregatedMovementActuator, DtGroundTurnToControllerComponent, DtRotaryWingCollisionAvoidanceController, DtRotaryWingLoiterControllerComponent, DtSimpleRadarWarningResponse, DtRotaryWingMoveToControllerComponent, DtHumanJoystickMovementController, DtSystemSwitcherComponent, DtGroundJoyMoveController, DtGroundJoyTurretController, DtScriptMultiTaskController, and MyActuatorComponent.
|
virtual |
This function is called immediately after tick() is called.
Implementation in this class does nothing.
Reimplemented in DtTaskControllerComponent, DtMultiTaskControllerComponent, and DtSingleTaskControllerComponent.
|
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().
|
virtual |
specifies a minimum tick period (which can also be thought of as
|
virtual |
access the minimum tick period
|
virtual |
set the variance in the minimum tick time
|
virtual |
access the variance in the minimum tick period
|
virtual |
The next tick time is normally calculated internally.
setNextTickTime can be used to force a tick (set nextTickTime to exerciseClock()-> approximateElapsedRealTime())
|
virtual |
access the next tick time
|
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 |
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 |
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.
Reimplemented in DtDisaggregatedConvoyFormationController, DtDamageAdjudicationActuator, DtTargetSelectionController, DtDisaggregatedFormationController, DtRailPathController, DtSurfaceEntityPilotController, DtHumanCollisionAvoidanceController, DtDisaggregatedMoveAlongController, DtObstructionSensor, DtWarheadDetonationActuator, DtGroundCollisionAvoidanceController, DtMultipleHitDamageActuator, DtObjectSensor, BHAVE::DtKynapseGroundPlatformController, DtFixedWingMoveAlongController, DtLauncherController, DtMissileDistractionController, DtEmitterComponent, DtSpotReportGeneratorController, DtDIGuyController, DtVrfObjectDataMessenger, DtWeaponController, DtSimpleRotaryWingPilot, DtWeaponActuator, DtGroundMovementChooserController, DtSurfaceEntityActuator, DtTurretAcquireController, DtUnderFireDeterminationSensor, BHAVE::DtKynapseController, BHAVE::DtKynapseLifeformController, DtRadarObjectSensor, DtSurfaceEntityMoveAlongController, DtSurfaceEntityPatrolRouteController, DtTurretActuatorComponent, DtBallisticGun, DtBombController, DtFixedWingTakeoffController, DtFixedWingPilotController, DtGroundMoveToDestinationControllerComponent, BHAVE::DtBhaveMoveDirectionController, DtBallisticGunController, DtIndirectFireActuator, DtTaskControllerComponent, DtDisaggregatedMoveIntoFormationController, DtSignatureObjectSensor, DtRetreatController, DtAutomotiveActuatorComponent, DtFixedWingActuatorComponent, DtHumanMovementActuator, DtIndirectFireController, DtConvoyTaskController, DtTurretSlewController, DtAggregatedMoveToController, DtBaseWeaponController, DtHumanMoveAlongController, DtOccupancyDirectorController, DtSurfaceEntityPatrolBetweenController, DtAggregateModelResolutionController, DtContactFusionController, DtFixedWingFlyIntoController, DtLasingController, DtOrganizationController, DtAirVehicleWeaponHoldController, DtCruiseMissileLaunchController, DtDetonationController, DtDisaggregatedMoveToLocationController, DtFixedWingFlightCommandController, DtFixedWingLandingController, DtRotaryWingActuatorComponent, DtRotaryWingCollisionAvoidanceController, DtSpotReportReceiver, DtAirVehicleSetController, DtDisaggregatedPatrolAlongController, DtEmbarkationController, DtLauncherActuator, DtCulturalFeatureSetController, DtFallingFromSkyActuatorComponent, DtHumanMoveToController, DtIndirectArtilleryComponent, DtRailMovementController, DtSwingingPartActuator, DtAggregateOrganizationController, DtDisaggregatedEmbarkationController, DtFixedWingDefaultController, DtMissileControllerComponent, DtMissileManeuverActComponent, DtRotaryWingPilotController, DtTopLevelOrganizationController, DtGroundMoveDirectionController, DtRotaryWingTurnToHeadingController, DtSurfaceEntityMoveToLocationController, DtAggregatedPatrolController, DtBombActuator, DtDisaggregatedPatrolBetweenController, DtHumanAcquireController, DtHumanPatrolController, DtIffControllerComponent, DtMovementBasedTerrainPreloadController, DtMissileCollisionActuator, DtRotaryWingFlightCommandController, DtRotaryWingLandingController, BHAVE::DtSpawnController, DtDisaggregatedWaitController, DtFixedWingMoveToController, DtGroundMoveToControllerComponent, DtHumanPostureController, DtLimitExistenceController, DtMissileMoveToControllerComponent, DtRotaryWingPatrolBetweenController, DtShapeBasedTerrainPreloadController, DtTurnAndMoveController, DtDefaultLandingGearController, DtGlobalEnvironmentActuator, DtGroundAutoControllerComponent, DtHumanLauncherAcquireController, DtLocalEntitySetController, DtMissileTrackEntityController, DtSurfaceEntityFollowEntityController, DtBaseMountingController, DtCruiseMissileDefaultController, DtDisaggregatedMoveToController, DtFixedWingJoyFlightController, DtFixedWingPatrolRouteController, DtFixedWingEntitySetController, DtGroundPatrolRouteController, DtRotaryWingMoveAlongControllerComponent, DtRotaryWingPatrolRouteController, DtAutoAggregateDisaggregateController, DtGroundFollowEntityController, DtGroundStopMovingControllerComponent, DtLaserGuidedLauncherController, DtRotaryWingJoyFlightController, DtTurretScanController, DtDisaggregatedTurnToHeadingController, DtGroundInterceptAndDestroyController, DtHumanFollowController, DtLasingMissileTrackController, DtReleaseBombController, DtSurfaceEntityMoveToController, DtDisaggregatedOccupancyDirectorController, DtFixedWingFollowEntityController, DtFixedWingPatrolBetweenController, DtGroundPatrolBetweenController, DtGroundTurnToControllerComponent, DtIntegratedLaserGuidedLauncherController, DtMountingAzimuthActuator, DtRotaryWingFollowEntityController, DtRotaryWingLoiterControllerComponent, DtRotaryWingWaitController, DtWaitController, DtHumanEyepointController, DtMountingElevationActuator, DtRotaryWingTaskController, DtRotaryWingMoveToControllerComponent, DtControllerComponent, DtBallisticGunJoy, DtCruiseMissileMoveAlongController, DtHumanJoystickMovementController, DtHumanSetController, DtHumanWeaponStateActuator, DtAggregatedMoveAlongController, DtDisaggregatedDamageActuator, DtIndirectFireWeaponController, DtTacticalSmokeActuator, DtBallisticGunJoyController, DtDisaggregatedActuator, DtDisaggregatedSetController, DtHumanTurnToController, DtFixedWingEmbarkationController, DtGroundJoyMoveController, DtGroundMoveToLocationControllerComponent, DtHumanAimWeaponController, DtHumanStopMovingController, DtIndividualLifeFormDamageAdjudicationActuator, DtLaunchExpendableResourceController, DtSendRadioMessageController, DtGroundJoyTurretController, DtGroundMoveAlongControllerComponent, DtAggregatedMovementActuator, DtFrictionlessGravityActuator, DtLaunchSmokeController, DtSimpleRadarWarningResponse, DtFixedWingMoveToLocationController, DtMountingController, DtSystemSwitcherComponent, DtVerticalLauncherController, DtTimeKeeperComponent, DtCombatRangeController, DtHumanObstructionSensor, DtRotaryWingEmbarkationController, DtRotaryWingMoveToLocationControllerComponent, MyActuatorComponent, DtScriptMultiTaskController, and DtCompatibilityController.
|
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 DtSimpleRadarWarningReceiver, and DtLaserDetector.
|
virtual |
List management functions.
|
virtual |
|
virtual |
Used by DtComponentList.
|
virtual |
|
virtual |
putData writes our type, which is provided by the virtual type accessor of the deriving class.
Reimplemented from DtReaderWriter.
|
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 |
Adds this input port to the components input port list so that other components can look it up and attach to it.
|
virtual |
|
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 |
Returns the list of DtInputPorts registered on this component.
|
virtual |
Adds this output port to the components output port list so that other components can look it up and attach to it.
|
virtual |
|
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 |
Returns the list of DtOutputPorts registered on this component.
|
virtual |
Adds this input port to the components input port list so that other components can look it up and attach to it.
|
virtual |
|
virtual |
Returns a pointer the input port group registered on this component with the specified name.
|
virtual |
Returns the list of DtInputPortGroups registered on this component.
|
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 |
|
virtual |
Returns a pointer the output port group registered on this component with the specified name.
|
virtual |
Returns the list of DtOutputPortGroups registered on this component.
|
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 |
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.
|
inline |
|
virtual |
Note that while dT is calculated internally, this makes it possible to 'lie' to the component about dT if necessary.
| Input | |
| deltaT | time in seconds |
|
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 BHAVE::DtKynapseGroundPlatformController, DtWarheadDetonationActuator, BHAVE::DtKynapseController, BHAVE::DtKynapseLifeformController, DtVrfObjectDataMessenger, DtCruiseMissileLaunchController, DtFixedWingFlyIntoController, DtLaserGuidedLauncherController, DtGroundMoveToDestinationControllerComponent, DtBallisticGunJoy, DtBallisticGunJoyController, DtGroundJoyMoveController, DtGroundJoyTurretController, and DtFixedWingJoyFlightController.
|
virtual |
|
virtual |
If the component returns true here, it will be ticked regardless of the destroyed state of the host entity.
Otherwise, tick will only be called when the entity is alive.
Reimplemented in DtDIGuyController, DtObjectSensor, DtOrganizationController, DtAggregateModelResolutionController, DtActuatorComponent, DtUnderFireDeterminationSensor, DtRailMovementController, DtEmitterComponent, DtSpotReportReceiver, and DtFixedWingLandingController.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
| DtVrfProcessStateRepositoryManager* DtSimComponent::psrManager | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
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 |
|
static |
Creates a DtSimComponent using the factory, then initializes it via the MTL stream.
|
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.
| type | Type identifying particular derived type of DtSimComponent |
| fcn | Creation function that instantiates a new DtSimComponent. |
|
protected |
|
protectedvirtual |
Called by init.
Derived classes should override this method to create all their input/output port groups.
Reimplemented in DtAutomotiveActuatorComponent, DtFixedWingPilotController, DtFixedWingActuatorComponent, DtHumanCollisionAvoidanceController, DtGroundMoveToDestinationControllerComponent, DtGroundCollisionAvoidanceController, DtHumanFollowController, DtBallisticGun, DtObstructionSensor, DtIndirectFireController, DtHumanMovementActuator, DtGroundAutoControllerComponent, DtSurfaceEntityActuator, DtSurfaceEntityPilotController, DtAggregatedMoveToController, DtBaseWeaponController, DtHumanMoveToController, DtBaseMountingController, BHAVE::DtKynapseController, DtBallisticGunController, DtMissileControllerComponent, DtWeaponActuator, DtHumanMoveAlongController, DtObjectSensor, DtRotaryWingPilotController, DtAggregatedMoveAlongController, BHAVE::DtKynapseGroundPlatformController, DtRotaryWingActuatorComponent, DtRotaryWingTaskController, BHAVE::DtKynapseLifeformController, DtMountingElevationActuator, DtMountingAzimuthActuator, DtMissileManeuverActComponent, DtAggregatedMovementActuator, DtGroundMoveDirectionController, DtAirVehicleWeaponHoldController, DtHumanEyepointController, DtDefaultLandingGearController, DtHumanTurnToController, DtHumanStopMovingController, DtHumanAimWeaponController, and DtHumanJoystickMovementController.
|
protectedvirtual |
Called by init.
Derived classes should override this method to create all their input/output ports and port groups.
Reimplemented in DtAutomotiveActuatorComponent, DtFixedWingPilotController, DtFixedWingActuatorComponent, DtWeaponController, DtHumanCollisionAvoidanceController, DtGroundMoveToDestinationControllerComponent, DtGroundCollisionAvoidanceController, DtHumanFollowController, DtBallisticGun, DtObstructionSensor, DtSurfaceEntityActuator, DtSurfaceEntityPilotController, DtHumanMovementActuator, DtGroundAutoControllerComponent, DtAggregatedMoveToController, DtSimpleRotaryWingPilot, DtDIGuyController, DtBaseWeaponController, DtLauncherController, DtHumanMoveToController, DtTargetSelectionController, DtIndirectFireActuator, DtBaseMountingController, BHAVE::DtKynapseController, DtGroundInterceptAndDestroyController, DtMissileControllerComponent, DtWeaponActuator, DtDetonationController, DtBallisticGunController, DtGroundFollowEntityController, DtHumanMoveAlongController, DtSpotReportGeneratorController, DtObjectSensor, DtRotaryWingPilotController, DtHumanAcquireController, DtAggregatedMoveAlongController, DtFixedWingLandingController, DtTurretAcquireController, DtTurretSlewController, BHAVE::DtBhaveMovementChooserController, BHAVE::DtKynapseGroundPlatformController, DtTurretActuatorComponent, DtRotaryWingActuatorComponent, DtWarheadDetonationActuator, DtLaserGuidedLauncherController, DtRotaryWingTaskController, DtBallisticGunJoyController, DtLauncherActuator, BHAVE::DtBhaveMoveDirectionController, BHAVE::DtKynapseLifeformController, DtMountingElevationActuator, DtMountingAzimuthActuator, DtMissileManeuverActComponent, DtBombController, DtContactFusionController, DtSpotReportReceiver, DtAirVehicleWeaponHoldController, DtHumanPostureController, DtLaserDetector, DtAggregatedMovementActuator, DtHumanEyepointController, DtSwingingPartActuator, DtGroundMoveDirectionController, DtIndirectFireWeaponController, DtIntegratedLaserGuidedLauncherController, DtSimpleRadarWarningReceiver, DtBombActuator, DtDefaultLandingGearController, DtHumanWeaponStateActuator, DtHumanAimWeaponController, DtSimpleRadarWarningResponse, and DtBallisticGunJoy.
|
protectedvirtual |
Gets the physical world that this component's entity exists in.
|
protectedvirtual |
|
protectedvirtual |
Gets the terrain that this component's entity is attached to, if any.
|
protectedvirtual |
|
protectedvirtual |
Gets the entity.
|
protectedvirtual |
|
protectedvirtual |
Gets the sim manager.
|
protectedvirtual |
|
protectedvirtual |
Gets the coordinate system, as it should always exist if the physical world is in a valid state!
|
protectedvirtual |
|
protectedvirtual |
Gets the local state repository.
|
protectedvirtual |
|
private |
assignment operator, not implemented
|
protected |
|
protected |
|
protected |
|
protected |
Pointer to the DtComponentSystem that this component belongs.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by dT().
|
protected |
Indicates whether this component should be enabled for ticking or not.
|
protected |
Initialized to true in the constructor, set to false by the first call to postTick.
|
protected |