|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmanager.Advancer
manager.Advancer13
public class Advancer13
An implementation of the Advancer
class specific to
the RTI-NG 1.3 DMSO RTI implementation.
Constructor Summary | |
---|---|
Advancer13()
|
Method Summary | |
---|---|
protected void |
advanceTo(byte[] serTime)
|
void |
advanceTo(double time,
boolean block)
Request this advancer to advance to the given time. |
void |
constrain(double time)
|
double |
getTime()
Gives the current local time. |
void |
grantTo(double newTime)
Although Advancers do implement the LogicalTimeListener interface they cannot be used like normal listeners of this type. |
void |
initialise()
Perform any setup steps (eg. |
void |
regulating(double time)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Advancer13() throws hla.rti13.java1.RTIexception
hla.rti13.java1.RTIexception
Method Detail |
---|
public void initialise() throws hla.rti13.java1.RTIexception
Advancer
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.
initialise
in class Advancer
hla.rti13.java1.RTIexception
public void advanceTo(double time, boolean block) throws hla.rti13.java1.RTIexception
Advancer
Advancer.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
advanceTo
in class Advancer
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 timeprotected void advanceTo(byte[] serTime) throws hla.rti13.java1.RTIexception
hla.rti13.java1.RTIexception
public double getTime()
Advancer
getTime
in class Advancer
public void grantTo(double newTime)
Advancers should then occupy a special place in the federate ambassador code, either always shuffling to the end of the listener list, or occupying a separate variable which is always accessed last during any event firing.
grantTo
in interface LogicalTimeListener
grantTo
in class Advancer
public void constrain(double time)
public void regulating(double time)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |