Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » recall timeouts?
recall timeouts? [message #1776125] Sun, 12 November 2017 16:08 Go to next message
Juergen Dingel is currently offline Juergen DingelFriend
Messages: 42
Registered: January 2015
Member
Hi,

I tried defer/recall on timeouts, but the compilation fails with a
> 'int UMLRTProtocol::recallAll()' is inaccessible
message.

Can timeouts not be recalled?

Thanks

Juergen
Re: recall timeouts? [message #1776155 is a reply to message #1776125] Mon, 13 November 2017 09:50 Go to previous messageGo to next message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Hi,

I checked this a bit closer, and it looks like the representation of the TIming protocol in the run-time library is not complete. It is missing the timeout() method, which should return an UMLRTInSignal so that it can be recalled.

You did not provide the details exactly how you perform the recall to get the compilation error you got, but to follow the pattern for recalling user-defined protocol messages you should be able to do like this:

timing.timeout().recall();


But since the timeout() method is not available you cannot perform the recall.

I suggest that you write a bug in Bugzilla for tracking this.

/Peter Cigéhn
Re: recall timeouts? [message #1776181 is a reply to message #1776155] Mon, 13 November 2017 14:02 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

And if you can submit a patch for that bug, it would be even better!

/Charles Rivet
Re: recall timeouts? [message #1776182 is a reply to message #1776155] Mon, 13 November 2017 14:03 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

And if you can submit a patch for that bug, it would be even better!

/Charles Rivet
Re: recall timeouts? [message #1776183 is a reply to message #1776155] Mon, 13 November 2017 14:03 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

And if you can submit a patch for that bug, it would be even better!

/Charles Rivet
Re: recall timeouts? [message #1776184 is a reply to message #1776155] Mon, 13 November 2017 14:04 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

And if you can submit a patch for that bug, it would be even better!

/Charles Rivet
Re: recall timeouts? [message #1776186 is a reply to message #1776184] Mon, 13 November 2017 14:06 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

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 #1776193 is a reply to message #1776155] Mon, 13 November 2017 15:31 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
It 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?


Re: recall timeouts? [message #1776199 is a reply to message #1776193] Mon, 13 November 2017 16:26 Go to previous messageGo to next message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Ernesto Posse wrote on Mon, 13 November 2017 15:31
It 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 #1776201 is a reply to message #1776199] Mon, 13 November 2017 17:14 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
I checked umlrtinsignal.hh/.cc and recall, recallAll, recallAt, recallAllAt, purge and purgeAt are all implemented.

So Juergen, instead of using

timerPort.recall()


you could use

timerPort.timeout().recall()


Try it and let us know if it works for you.

Thanks
Re: recall timeouts? [message #1776231 is a reply to message #1776201] Tue, 14 November 2017 08:36 Go to previous messageGo to next message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Ernesto Posse wrote on Mon, 13 November 2017 17:14
I checked umlrtinsignal.hh/.cc and recall, recallAll, recallAt, recallAllAt, purge and purgeAt are all implemented.

So Juergen, instead of using

timerPort.recall()


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 #1776263 is a reply to message #1776231] Tue, 14 November 2017 15:07 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
@Peter: You are right. I missed that. Definitely a bug.

Indeed, looking at umlrttimerprotocol.hh we have:

class UMLRTTimerProtocol
{
public:
//...
    class InSignals {  };
//...


So there is no timeout method at all.

@Juergen: unfortunately it doesn't seem currently possible. Did you open a bug for it, or should I?



Re: recall timeouts? [message #1776269 is a reply to message #1776263] Tue, 14 November 2017 16:13 Go to previous messageGo to next message
Juergen Dingel is currently offline Juergen DingelFriend
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!
Re: recall timeouts? [message #1776271 is a reply to message #1776269] Tue, 14 November 2017 17:03 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
I've opened Bug 527261.

Good to know that it's working well for you!
Previous Topic:Method for determining whether a capsule part is plugin
Next Topic:Submodel
Goto Forum:
  


Current Time: Fri Oct 11 03:41:40 GMT 2024

Powered by FUDForum. Page generated in 0.04919 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top