![]() |
VR-Forces 4.7 Class Documentation
|
DtHlaClock is a clock that is capable of supporting HLA the time management concepts time-constrained and time-regulating. More...

Public Member Functions | |
| DtHlaExerciseClock (DtSimManager *simManager, DtExerciseConn *exerciseConn) | |
| constructor | |
| virtual | ~DtHlaExerciseClock () |
| destructor | |
| virtual void | init () |
| Initializes the clock - must be called before any other member functions are called. | |
| virtual void | tick () |
| If in time constrained mode, call advanceFedTime() to advance federation (logical) time by my_dT. | |
| virtual DtTime | fedTime () const |
| HLA federation (logical) time. | |
| virtual DtTime | lookahead () const |
| virtual DtTime | effectiveSimTime () const |
| virtual void | setInitialSimTime (DtTime time) |
| Set the initial simulation time (time recorded in a scenario file). | |
| virtual bool | enableTimeManagementMode (DtTime lookaheadInterval) |
| Returns whether or not exercise clock is in HLA time management mode (i.e. | |
| virtual bool | disableTimeManagementMode () |
| virtual bool | isInTimeManagementMode () const |
Public Member Functions inherited from DtExerciseClock | |
| DtExerciseClock () | |
| default constructor | |
| DtExerciseClock (DtSimManager *simManager) | |
| useful constructor | |
| DtExerciseClock (const DtExerciseClock &orig) | |
| copy constructor | |
| DtExerciseClock & | operator= (const DtExerciseClock &orig) |
| assignment operator | |
| virtual | ~DtExerciseClock () |
| destructor | |
| virtual void | reset () |
| Initialize the clock to 00:00:00 elapsed time. | |
| virtual void | pause () |
| Tell tick() not to advance simulation time. | |
| virtual void | resume () |
| Tells tick() to resume advancing simluation time. | |
| virtual bool | isPaused () const |
| Returns true if system is paused, false otherwise. | |
| virtual void | setFixedFrameMode (DtTime dT) |
| Tells the exercise clock to use a best effort fixed frame (constant dT). | |
| virtual bool | isFixedFrameMode () |
| virtual void | setRunToCompleteFrameMode () |
| Go into variable frame (run to complete) mode. | |
| virtual bool | isRunToCompleteFrameMode () |
| virtual void | setHybridFrameMode (DtTime dT) |
| Go into a hybrid mode of fixed dT run-to complete. | |
| virtual bool | isHybridFrameMode () |
| virtual void | setFixedFrameRate (DtTime dT) |
| Change the value to be used in fixed frame or hybrid frame mode. | |
| virtual DtTime | fixedFrameRate () |
| Get the curent rate if in fixed frame or hybrid frame mode; otherwise, returns 0.0. | |
| virtual void | setTimeMultiplier (DtFloat64 timeMultiplier) |
| Set faster or slower than real-time operation (the range of values for which the system will perform in a rational manner have yet to be determined.) | |
| virtual DtFloat64 | timeMultiplier () const |
| Returns time multiplier, a real scalar. | |
| virtual void | setFastForwardSettings (const DtFastForwardSettings &settings) |
| Sets the fast forward settings. | |
| virtual DtString & | elapsedSimTimeString (DtString &strBuffer) const |
| Returns elapsed time as a string in the form ddd:hh:mm:ss. | |
| virtual void | setExerciseStartTime (DtTime time) |
| Set exercise start time in seconds. | |
| virtual DtTime | exerciseStartTime () const |
| Use this to get the time the exercise started, expressed in seconds. | |
| virtual DtString & | exerciseStartTimeString (DtString &strBuffer) const |
| virtual DtTime | exerciseTime () const |
| Returns current exercise time (exercise start time + elapsed time). | |
| virtual DtString & | exerciseTimeString (DtString &strBuffer) const |
| virtual void | setExerciseConnectionClockTime (double) |
| virtual void | set_dT (DtTime dT) |
| Force a dT value (if called after tick!); note - this does not update elapsed time. | |
| virtual DtTime | dT () const |
| Returns dT, in seconds. | |
| virtual void | setTimeStampType (DtTimeStampType) |
| DtTimeStampType | timeStampType () const |
| virtual double | simTimeScale () const |
| virtual void | addTimeMultiplierUpdateCallback (DtCallbackList< DtFloat64 >::DtCallbackFunctionType, void *usr) |
| Adds a callback to be called when the time multiplier changes. | |
| virtual void | removeTimeMultiplierUpdateCallback (DtCallbackList< DtFloat64 >::DtCallbackFunctionType fcn, void *usr) |
| Removes a callback to be called when the time multiplier changes. | |
| virtual void | registerInterfaceCallbacks () |
| Register callbacks on the sim manager's interface message executive. | |
Public Member Functions inherited from DtSimClock | |
| DtSimClock () | |
| DtSimClock (const DtSimClock &orig) | |
| DtSimClock & | operator= (const DtSimClock &orig) |
| virtual | ~DtSimClock () |
Static Public Member Functions | |
| static void | timeAdvanceGrantedCb (DtTimeManagementControl *tmControl, void *usr) |
| Called when time advance request is granted by RTI. | |
Static Public Member Functions inherited from DtExerciseClock | |
| static void | setTimeMultiplierCallback (DtSimMessage *msg, void *usr) |
| Callback registered on the simManager's Message executive. | |
| static void | frameModeCallback (DtSimMessage *msg, void *usr) |
| Callback registered on the simManager's Message executive. | |
Static Public Member Functions inherited from DtSimClock | |
| static DtTime | stringToSeconds (const DtString &timeString) |
| static conversion functions | |
| static DtString & | secondsToElapsedTimeString (DtTime seconds, DtString &strBuffer) |
| static DtString & | secondsToExerciseTimeString (DtTime seconds, DtString &strBuffer) |
| static void | secondsToDaysHoursMinutesSeconds (DtTime secondsInput, int &days, int &hours, int &minutes, DtTime &seconds) |
| static DtTime | daysHoursMinutesSecondsToSeconds (DtTime days, DtTime hours, DtTime minutes, DtTime seconds) |
| static bool | processElapsedTimeString (const char *input, int &numDigitsFound, int &value1, int &value2, int &value3, int &value4) |
Protected Member Functions | |
| virtual bool | startRegulatingTime (DtTime lookaheadInterval) |
| HLA time regulating mode. | |
| virtual bool | stopRegulatingTime () |
| virtual bool | isTimeRegulating () const |
| virtual bool | enableTimeConstrainedMode () |
| HLA time constrained mode. | |
| virtual bool | disableTimeConstrainedMode () |
| virtual bool | isTimeConstrained () const |
| virtual RTI::FedTime * | createFederationTime (DtTime time=0.0) const |
| virtual RTI::FedTime * | createFederationTimeInterval (DtTime time=0.0) const |
| virtual DtTimeManagementControl * | createTimeManagementControl () const |
| Called by init() to create myTimeManagementControl member. | |
| virtual void | processTimeAdvanceGrantedCb (DtTimeManagementControl *tmControl) |
| Updates myEffectiveFederationTime and sets this new time in the exercise connection. | |
| virtual void | processSetTimeMultiplier (const DtIfSetTimeMultiplier &timeMultiplerData) |
| Sets time multiplier with value given in message. | |
Protected Attributes | |
| DtExerciseConn * | myExerciseConn |
| DtTimeManagementControl * | myTimeManagementControl |
| RTI::FedTime * | myInitialFederationTime |
| This time is set when simulation start time is set. | |
| DtTime | myInitialSimTime |
| RTI::FedTime * | myFederationTime |
| RTI::FedTime * | myEffectiveFederationTime |
| RTI::FedTime * | myLookahead |
Protected Attributes inherited from DtExerciseClock | |
| enum DtExerciseClock::FrameMode | myFrameMode |
| bool | myFirstFrame |
| bool | myPaused |
| DtTime | myLastRealTime |
| DtTime | my_dT |
| DtFloat64 | myTimeMultiplier |
| DtSimManager * | mySimManager |
| DtTime | myFixedFrameRate |
| DtTime | myExerciseStartTime |
| double | mySimTimeScale |
| DtTime | myLastSetSimTime |
| int | myFrameSinceOverrunPrintCount |
| int | myFrameOverrunCount |
| double | myMaxOverrunTime |
| DtTimeStampType | myTimeStampType |
| double | myExerciseConnectionClockTime |
| bool | myUsingFastForwardFrameSettings |
| FrameMode | myDefaultFrameMode |
| DtTime | myDefaultFixedFrameRate |
| DtFastForwardSettings | myFastForwardSettings |
| DtCallbackList< DtFloat64 > | myTimeMultiplierUpdateCallbacks |
Private Member Functions | |
| DtHlaExerciseClock (const DtHlaExerciseClock &orig) | |
| copy constructor - not implemented | |
| DtHlaExerciseClock & | operator= (const DtHlaExerciseClock &orig) |
| assignment operator - not implemented | |
Additional Inherited Members | |
Protected Types inherited from DtExerciseClock | |
| enum | FrameMode { FmRunToComplete, FmFixed, FmHybrid } |
DtHlaClock is a clock that is capable of supporting HLA the time management concepts time-constrained and time-regulating.
| DtHlaExerciseClock::DtHlaExerciseClock | ( | DtSimManager * | simManager, |
| DtExerciseConn * | exerciseConn | ||
| ) |
constructor
|
virtual |
destructor
|
private |
copy constructor - not implemented
|
virtual |
Initializes the clock - must be called before any other member functions are called.
Reimplemented from DtExerciseClock.
|
virtual |
If in time constrained mode, call advanceFedTime() to advance federation (logical) time by my_dT.
Reimplemented from DtExerciseClock.
|
virtual |
HLA federation (logical) time.
|
virtual |
|
virtual |
|
virtual |
Set the initial simulation time (time recorded in a scenario file).
Initializes myInitialSimTime and myInitialFederationTime (if in time management mode). Then calls down to base class setSimTime().
Returns whether or not exercise clock is in HLA time management mode (i.e.
is time regulating and constrained).
|
virtual |
|
virtual |
|
static |
Called when time advance request is granted by RTI.
HLA time regulating mode.
Applications that expect to send interactions in time management mode should be time regulating.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
HLA time constrained mode.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Called by init() to create myTimeManagementControl member.
|
protectedvirtual |
Updates myEffectiveFederationTime and sets this new time in the exercise connection.
|
protectedvirtual |
Sets time multiplier with value given in message.
Override to disable and re-enable time management mode if necessary.
Reimplemented from DtExerciseClock.
|
private |
assignment operator - not implemented
|
protected |
|
protected |
|
protected |
This time is set when simulation start time is set.
Used to compute the current simulation time.
|
protected |
|
protected |
|
protected |
|
protected |