In a simulation using RPR-FOM, if I get a reflectAttributeValues
with a LogicalTime
time stamp (simulation time) and the OrderType
receive order in my FederateAmbassador
. For dead reckoning algorithms do I use the time stamp supplied by the RTI or the time stamp encoded in the userSuppliedTag
? Using the userSuppliedTag
would be decoded value if absolute and system clock if relative.
To clarify, I get attributes reflected specified receive order from a time managed federate in this call in FederateAmbassador
from the RTI:
void reflectAttributeValues(ObjectInstanceHandle theObject,
AttributeHandleValueMap theAttributes,
byte[] userSuppliedTag,
OrderType sentOrdering,
TransportationTypeHandle theTransport,
LogicalTime theTime,
OrderType receivedOrdering,
MessageRetractionHandle retractionHandle,
SupplementalReflectInfo reflectInfo)
For attributes that were updated Time Stamp Order, I used the
time
parameter to know when the attribute last had been updated and simulation time to dead reckon.For attributes that where updated Receive Order without time stamp, I used the
userSuppliedTag
to know when the attributed last had been updated (value in the tag for absolute and system clock at the time of receiving the attribute for relative) and then using the system clock to dead reckon.Then to dead reckon:
Code here are simplified examples and may not compile, but they capture the solution I managed to come up with.