|
|
|
|
|
|
Re: recall timeouts? [message #1776186 is a reply to message #1776184] |
Mon, 13 November 2017 14:06 |
|
Sorry for the multiple replies... It seems that Chrome resent the message when my internet connection became intermittent... (I switched network, hopefully this will only go out once...
/Charles Rivet
|
|
|
|
Re: recall timeouts? [message #1776199 is a reply to message #1776193] |
Mon, 13 November 2017 16:26 |
Peter Cigehn Messages: 49 Registered: September 2014 |
Member |
|
|
Ernesto Posse wrote on Mon, 13 November 2017 15:31It is possible that the RTS is incomplete, but checking a bit closer, in umlrttimerprotocol.hh I can see that UMLRTTimerProtocol_baserole does inherit from UMLRTProtocol, which means it should be possible to invoke "recall" and other normal protocol operations, but it turns out that UMLRTProtocol is inherited using *protected* inheritance, hence those operations are not visible to clients. I do not know why Barry made such decision. I'll drop him a line and ask.
@Peter: Just to confirm, it should be possible to do normal protocol operations (like recall) on timers, right?
Yes, I would expect that you should be able to recall a timeout protocol message as I indicated in my previous code example.
When I checked this earlier I was only considering the recall for a specific protocol message, i.e. doing it explicitly on the timeout protocol message. For that case the method timeout() that should return an UMLRTInSignal is missing.
But now you remind me of the case where you recall any deferred message on a specific port, in which case you simply do port.recall() seem to be what is "blocked" by the protected inheritance that you have identified.
For the timer case this does not matter, since there is only the timeout protocol message. But I would expect that it should be aligned with user-defined protocols and that you should be able to perform the recall both on port level and on protocol message level.
I have tested both cases, i.e. timing.timeout().recall() and timing.recall() with the legacy code-generator and run-time, and it works as one would expect.
/Peter Cigéhn
|
|
|
|
Re: recall timeouts? [message #1776231 is a reply to message #1776201] |
Tue, 14 November 2017 08:36 |
Peter Cigehn Messages: 49 Registered: September 2014 |
Member |
|
|
Ernesto Posse wrote on Mon, 13 November 2017 17:14I checked umlrtinsignal.hh/.cc and recall, recallAll, recallAt, recallAllAt, purge and purgeAt are all implemented.
So Juergen, instead of using
you could use
timerPort.timeout().recall()
Try it and let us know if it works for you.
I guess I was a bit unclear in my previous replies. The problem is that if you do the latter, then you get a compilation error like this:
/home/cigehpet/workspaces/ws125/DeferRecallTest_CDTProject/src/Capsule1.cc: In member function 'void Capsule_Capsule1::transitionaction_____transition2(const UMLRTMessage*)':
/home/cigehpet/workspaces/ws125/DeferRecallTest_CDTProject/src/Capsule1.cc:109:12: error: 'class UMLRTTimerProtocol_baserole' has no member named 'timeout'
timing.timeout().recall();
^
Yes, the UMLRTInSignal has all the methods for recalling (and purging), but if the UMLRTTimeProtocol_baserole does not have a method timeout() that returns a UMLRTInSignal, then you cannot perform the recall anyway.
So something like this needs to be added to UMLRTTimerProtocol_baserole (including its implementation):
UMLRTInSignal timeout() const;
The legacy run-time library have such a corresponding method.
/Peter Cigéhn
|
|
|
|
Re: recall timeouts? [message #1776269 is a reply to message #1776263] |
Tue, 14 November 2017 16:13 |
Juergen Dingel Messages: 42 Registered: January 2015 |
Member |
|
|
Thank you, Ernesto and Peter, for the clarification.
It is not a big deal. I'll just keep this in mind, when I teach my class next term.
On the plus side, I've been working with v1.0 quite intensely over the past week,
and created about 30 models that exhibit different UML-RT features, and this is
one of the few issues I ran into. Basically, the feeling is that whatever I try does
work! Great job! I'm looking forward to my class!
Juergen
PS: Ernesto, can I ask you to submit the bug? You will know better how to write the
report in the most descriptive, succinct form. Thanks!
|
|
|
|
Powered by
FUDForum. Page generated in 0.04919 seconds