Le 05/05/2020 à 20:17, Moritz Gütlein a écrit :
Hello everybody,
Hello Moritz
I hope this is the right place to ask for help, I didn't find
something like a user-list:
This is the good place, wa are using only this list.
So, I am trying to transfer the ownership of an object between two
federates, while updating an attribute. Both federates are running the
following snippet in an infinite loop.
while(true){
if(!currentlyOwning)
{
fed->rtiamb->attributeOwnershipAcquisition(...);
while(!fed->rtiamb->isAttributeOwnedByFederate(...)){ >
evokeMultipleCallbacks(...);
} // else{
fed->rtiamb->updateAttributeValues(...);
while(!shouldDivest){
evokeMultipleCallbacks(...);
}
fed->responseToOwnershipReleaseRequest( amb->releaseObject,
amb->releaseAttributes );
}
advanceTime(...);
}
From my understanding this should be alright, but the whole thing
works only if I replace the evokeMultipleCallbacks(...) with
timeAdvance(...) calls. Could you please tell me, if I am doing
something wrong? Is it really necessary to call timeAdvance(...) in
the inner loops?
The callback is processed (I have not reviewed the code before to
answer) like a RO (Receive Order) message,
these messages are (by default) delivered during a time advancing phase.
You can change this behavior by invoking the enableAsynchronousDelivery
service.
Are you working with 1.3 or 1516-2010 ?
Bien cordialement,
Pierre
Thank you! Best,
Moritz