|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmanager.Advancer
public abstract class Advancer
A class which encapsulates the management of time advance with the RTI. Provides facilities to make time-advance requests in a blocking or non-blocking manner.
Advancer13
Constructor Summary | |
---|---|
Advancer()
|
Method Summary | |
---|---|
abstract void |
advanceTo(double time,
boolean block)
Request this advancer to advance to the given time. |
abstract double |
getTime()
Gives the current local time. |
abstract void |
grantTo(double newTime)
Called when the RTI has granted advance to the specified time. |
abstract void |
initialise()
Perform any setup steps (eg. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Advancer()
Method Detail |
---|
public abstract void initialise() throws hla.rti13.java1.RTIexception
RTIambassador.tick()
which may re-enter the local
federate code and (potentially) re-enter this Advancer object itself
(eg. to notifying time-regulating).
If such a re-entrant call were placed in a constructor, the thread
would attempt to use a null variable.
hla.rti13.java1.RTIexception
public abstract void advanceTo(double time, boolean block) throws hla.rti13.java1.RTIexception
getTime()
will clear this up).
A blocking call will request the RTI to advance to the given time and
will repeatedly make the call and give the RTI time on the thread until
it is succesfully granted to the requested time. This will result in
receipt of all external events with earlier timestamps than the requested
time and may take a large amount of real time if other federates are
doing considerable processing
time
- the time to which the federate wants to advanceblock
- if true, the method will return only once the local time is
equal to 'time', if false, the method will return immediately after
requesting advance with the RTI, the requested time may have been reached
or not.
hla.rti13.java1.RTIexception
- barring catastrophic RTI failure, the most likely
cause would be a request to advance to a time < the current local timepublic abstract double getTime()
public abstract void grantTo(double newTime)
Advancer13
class for an example of this).
grantTo
in interface LogicalTimeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |