Skip to main content



      Home
Home » Eclipse Projects » Papyrus for Real Time » Exchanging messages between capsules in different controllers(How to connect capsules in different controllers)
Exchanging messages between capsules in different controllers [message #1797607] Fri, 02 November 2018 12:20 Go to next message
Eclipse UserFriend
Let's create 2 capsules (for example Pinger and Ponger) in a Top capsule. The Top capsule will be assigned a Default controller.
Then let's select each capsule as Top and create Controller for each.
So under Linux we will have 2 executables, one for each Capsule.
How can we run both executables in a Linux shell and exchange messages (pings) between them.
Does anyone know how to do it?
Is there a similar example?

Thanks,
Dimo

[Updated on: Fri, 02 November 2018 12:55] by Moderator

Re: Exchanging messages between capsules in different controllers [message #1797614 is a reply to message #1797607] Fri, 02 November 2018 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Currently the Papyrus-RT runtime is single process, so when you assign different capsule instances to different controllers, they run in different threads but on the same OS process. Hence, when you compile the generated code you get only one executable for that single process.

Multi-process models, running either in the same CPU or distributed has not been implemented, although it is in the roadmap.

Nevertheless, there is a research group at Queen's University in Canada which has developed an extension of Papyrus-RT supporting multi-processes which communicate via the MQTT protocol. Their website is http://flux.cs.queensu.ca/mase/. You may try to contact Karim Jahed for information on this extension.
Re: Exchanging messages between capsules in different controllers [message #1797619 is a reply to message #1797614] Fri, 02 November 2018 14:37 Go to previous messageGo to next message
Eclipse UserFriend
Thank you
Re: Exchanging messages between capsules in different controllers [message #1797621 is a reply to message #1797614] Fri, 02 November 2018 14:40 Go to previous messageGo to next message
Eclipse UserFriend
In addition to what Ernesto posted with the use of MQTT at Queen's University, you can also use any IPC mechanism supported by your platform, e.g.

  • Named Pipes,
  • SysV/PoSiX Message Queues
  • SysV/POSIX Message Queues
  • Shared Memory
  • etc.


What you have to do, in this case, then, is to wrap their interface implementation within a capsule providing a port that implements the protocol that defined for this exchange. This could be a service service provider point (SPP). Any capsule requiring that communication functionality would just need to have a service access point (SAP). SAP's and SPP's are connected based on their name, so they do not need connectors.
Note that the SPP would have to be on its own thread so as to not block the rest of the application when it runs!
Re: Exchanging messages between capsules in different controllers [message #1797727 is a reply to message #1797621] Mon, 05 November 2018 12:43 Go to previous message
Eclipse UserFriend
Thank you, I will share you input and suggestions with the team.
We had considered some of these options.
The major concern is how to preserve the framework principles, more specifically RTC of the state machines when distributing the threads into multiple processes (which will ease the development of the teams).
Building comms on top of the framework without good knowledge of its details inherits the danger of breaking it and introducing bugs.
Previous Topic:Customize generated code folder
Next Topic:Papyrus-rt and conformance/compatibility to UML version and UML profile
Goto Forum:
  


Current Time: Fri Jul 04 11:52:00 EDT 2025

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

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

Back to the top