[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [certi-dev] Ownership Transfer
From: |
Pierre Siron |
Subject: |
Re: [certi-dev] Ownership Transfer |
Date: |
Wed, 6 May 2020 09:17:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
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