certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] Ownership Transfer


From: Moritz Gütlein
Subject: Re: [certi-dev] Ownership Transfer
Date: Wed, 6 May 2020 17:30:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Great, it works! Thank you! I am working with 1516-2010.
I am curious about another thing: evokeMultipleCallbacks(min,max) returns instantly (at least earlier than "min"). Does the call to enableAsynchronousDelivery switch the whole thing to the HLA_IMMEDIATE callback model? Or why is there no waiting for the minimum waiting time?

Thanks again,
Moritz

Am 06.05.20 um 09:17 schrieb Pierre Siron:

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]