I have HLA simulation in Java using pRTI with two federates. I want to advance time of my simulation. As far I know, following method is used for this purpose:
_ambassador.timeAdvanceRequest(time);
, where ambassador
is an RTI ambassador.
My question is what to pass into time
parameter? I assume it should be the time I want my simulation advance to, but how to get this one?
Ok, I figured it out.
It is neccessary to use one of LogicalTime interface implementations, for example using TimeFactory:
calling
timeAdvanceRequest()
will send request to RTI. The, if time was advanced, the timeAdvanceGrant() will be called on federate.Further info here.