|
From: | Christoph Laesche |
Subject: | Re: [certi-dev] Problem with timeAdvanceGrant |
Date: | Tue, 21 Jun 2011 17:13:24 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110326 Lightning/1.0b3pre Thunderbird/3.1.9 |
Hi, I tested my example using the cvs version and it seems to work there. I've now switched to using the cvs version, but I had to fix some issues for which I attached some patches. vector_cvs.patch: my previous patch ported to the cvs-version enabletimeregulation.patch: (ugly) fix for a bug in the enableTimeRegulation function of the rti1516ambasassador (this problem has also existed in the 3.4.0 version) fedtime_windows.patch: fix of CMakeList fixing a linker error on windows libvardata.patch: I moved VarData1516 to an extra library because I found no other way to compile it under windows (linker errors, fixing resulted into circular dependencies) - perhaps there is a better solution. Regards, Christoph On 06/21/2011 09:11 AM, Eric Noulard wrote: > 2011/6/20 Christoph Laesche <address@hidden>: >> Hi, >> >> I have encountered a problem with the timeAdvanceGrant callback. The >> time given in the parameter ob the function is alway 0. Internally, the >> time advance seems to work correctly (I have tested it using two >> federates (both constrained and regulating) for which the time advance >> works if I ignore the parameter and just add a time step to the current >> time). it seems that only the parameter given to the callback is wrong. >> >> Is this a known problem? Do you have any idea, where the problem can be? >> (rtig/rtia/some function) > > Not know. > However I discover a strange (in fact uneeded) auto_ptr usage in many > 1516 callbacks. > > could you try to edit RTI1516ambPrivateRefs.cpp and look for: > > case Message::TIME_ADVANCE_GRANT: > > then change: > > std::auto_ptr < rti1516::LogicalTime > fedTime (new > RTI1516fedTime(msg->getDate().getTime())); > fed_amb->timeAdvanceGrant(*fedTime); > > to > > fed_amb->timeAdvanceGrant(RTI1516fedTime(msg->getDate().getTime())); > > > You can try to print out the msg->getDate().getTime() value conveyed > by the message > in order to check it before it get passed to the federate. >
enabletimeregulation.patch
Description: Text document
fedtime_windows.patch
Description: Text document
libvardata.patch
Description: Text document
vector_cvs.patch
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |