Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Use externally defined structure in a signal(How to use an externally defined structure as a parameter in a PapyrusRT message)
Use externally defined structure in a signal [message #1803501] Fri, 01 March 2019 17:34 Go to next message
Dimo Ditchev is currently offline Dimo DitchevFriend
Messages: 33
Registered: September 2018
Member
I am looking for an example how to use a custom defined type (structured data) as a parameter in a message.
Re: Use externally defined structure in a signal [message #1803595 is a reply to message #1803501] Tue, 05 March 2019 08:52 Go to previous messageGo to next message
Nicolas Hili is currently offline Nicolas HiliFriend
Messages: 40
Registered: March 2017
Member
Hi Dimo,

You can have some information in this thread.

Basically, you have two options:

  1. You want to define your structure inside your UML-RT model: you can create a passive class in your UML-RT model (in the model explorer, right-click on the top-level element, select "New UML-RT Child / Class"). Then, you can add attributes and operations to the class using the same way.
  2. You want to use externally defined structures (e.g., available through a library you want to link): you can follow the instructions from this thread to import it in your model.

Not sure if there are some examples available online, but it should be straightforward to do it.

Cheers,

Nicolas
Re: Use externally defined structure in a signal [message #1803697 is a reply to message #1803501] Thu, 07 March 2019 01:09 Go to previous message
Dimo Ditchev is currently offline Dimo DitchevFriend
Messages: 33
Registered: September 2018
Member
Nicolas,

I practiced both this approaches and they worked.
It was a little harder to use an external Class/Struct as a parameter in a function signature - the parser errored.
I found that the way around is to wrap any external Class/Struct in a PapyrusRT Passive class. Then I can typedef the custom identifier as a member of the Passive Class.

Thank you.
Dimo
Previous Topic:Multiple instances of an attribute (Capsule/StateMachine)
Next Topic:AnsiCLibrary does not seem to be loaded
Goto Forum:
  


Current Time: Mon Dec 16 12:26:35 GMT 2019

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

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

Back to the top