Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Papyrus for Realt Time + Qt GUI + RTOS for full RT application
Papyrus for Realt Time + Qt GUI + RTOS for full RT application [message #1750302] Mon, 19 December 2016 17:40 Go to next message
Milos Petrovic is currently offline Milos PetrovicFriend
Messages: 2
Registered: December 2016
Junior Member
I'm completely new Papyrus-RT user and fresh RT developer, so I'm sorry if I missed some information about Papyrus-RT capabilities.

If I understand correctly, in simple terms, Papyrus-RT provides RT-UML modeling and code generation capabilities, together with run time environment (RTS library) for execution of generated code which effectively simulate modeled system. Also, if I read correctly, RTS is just bridge to RTOS and it is possible to map logical threads ("assigned" to capsules) to (real-time) operating system threads which will bring us to full real-time system. In other words, RTS library by itself is not enough to provide full real-time capabilities (real-time scheduling, priority inversion protocols etc)

Questions:

1) Is it possible to integrate Papyrus-RT generated code with Qt or some other (recommended) GUI framework and is there any tutorial/example/advice that can be helpful in this process?

2) Is it possible or is there any general way to specify temporal parameters and priorities for each (logical and later physical) thread via Papyrus-RT either at model level or even generated code level?

3) Again, if I understand correctly, RTS only exposes underlying (RT)OS constructs such as Semaphores, so topic such as Priority Inversion or FPS/EDF scheduling is completely responsibility of (RT)OS and we will need RTOS for fully real-time performance of application generated by Papyrus-RT?

Again, sorry if I'm a little bit confusing with my questions, but I'm trying to overview effort needed to develop full real-time application with GUI with Papyrus-RT.

Regards,
Milos
Re: Papyrus for Realt Time + Qt GUI + RTOS for full RT application [message #1750313 is a reply to message #1750302] Mon, 19 December 2016 19:55 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 211
Registered: May 2014
Location: Canada
Senior Member

Milos Petrovic wrote on Mon, 19 December 2016 12:40
I'm completely new Papyrus-RT user and fresh RT developer, so I'm sorry if I missed some information about Papyrus-RT capabilities.


<cr>
Hi Milos,
Welcome to the community!
</cr>

Milos Petrovic wrote on Mon, 19 December 2016 12:40

If I understand correctly, in simple terms, Papyrus-RT provides RT-UML modeling and code generation capabilities, together with run time environment (RTS library) for execution of generated code which effectively simulate modeled system.


First, Papyrus-RT implements UML-RT and not RT-UML. I know, it's confusing, but they apply to slightly different approaches in modeling reactive real time systems.

Although, the code generated by Papyrus-RT could be seen used fro simluation, it is really for production use.


Milos Petrovic wrote on Mon, 19 December 2016 12:40
Also, if I read correctly, RTS is just bridge to RTOS and it is possible to map logical threads ("assigned" to capsules) to (real-time) operating system threads which will bring us to full real-time system. In other words, RTS library by itself is not enough to provide full real-time capabilities (real-time scheduling, priority inversion protocols etc)


The RTS is actually more than "just a bridge" to the (RT)OS. it also provides all the infrastructure to implement the UML-RT DSML, such as support for the structural elements (capsules), the behavioral elements (state machines), and the runtime services (message delivery, logging, dynamic capsule capabilities, timing, etc.). The RTS, by itself, is enough to provide "soft" real-time capabilities.

Milos Petrovic wrote on Mon, 19 December 2016 12:40

1) Is it possible to integrate Papyrus-RT generated code with Qt or some other (recommended) GUI framework and is there any tutorial/example/advice that can be helpful in this process?


There are no specific mechanisms in Papyrus-RT to integrate with a GUI. It has been done before, in previous tools implementing UML-RT, by architecturally separating the runtime and GUI parts and defining and using a communication mechanism between the two (e.g., interrupts, named pipes, etc). There are known patterns when trying to interface an embedded application with external applications.

Milos Petrovic wrote on Mon, 19 December 2016 12:40

2) Is it possible or is there any general way to specify temporal parameters and priorities for each (logical and later physical) thread via Papyrus-RT either at model level or even generated code level?


Not at this point. The assignment of priorities is currently planned for MVP3 (we're currently working on MVP2).
As for temporal parameters (e.g., constraints?), they could be specified, for example, by using Papyrus's MARTE additional component, but it would have no effect on code generation.

On the other hand, this is an open source product and you could modify the code generation or runtime to add this capability. Or your company could look into the commercial support and consulting offerings around Papyrus and Papyrus-RT.

Milos Petrovic wrote on Mon, 19 December 2016 12:40

3) Again, if I understand correctly, RTS only exposes underlying (RT)OS constructs such as Semaphores, so topic such as Priority Inversion or FPS/EDF scheduling is completely responsibility of (RT)OS and we will need RTOS for fully real-time performance of application generated by Papyrus-RT?


By default, Papyrus-RT always expects that there is an operating system under which its generated applications will run. In that sense, yes, some of that can be pushed to the (rt)OS. However, when we built the RTS, we tried to ensure tha we would not run into common scheduling issues.

Milos Petrovic wrote on Mon, 19 December 2016 12:40

Again, sorry if I'm a little bit confusing with my questions, but I'm trying to overview effort needed to develop full real-time application with GUI with Papyrus-RT.

Regards,
Milos


Your questions were clear, I hope my answers helped!




/Charles Rivet
Re: Papyrus for Realt Time + Qt GUI + RTOS for full RT application [message #1750379 is a reply to message #1750313] Tue, 20 December 2016 14:14 Go to previous messageGo to next message
Milos Petrovic is currently offline Milos PetrovicFriend
Messages: 2
Registered: December 2016
Junior Member
Charls, thank You very much for Your answers. Yes, there are very helpful for me to grasp some points.

I need to do project on my university which includes UML-RT model of a system, and its implementation with GUI on some desired platform. Given that this project is just for demonstration, I think that soft-real-time characteristics of RTS are enough. Also, there is no specific hardware with RTOS for demonstration, just regular PC.

Charles Rivet wrote on Mon, 19 December 2016 19:55

There are no specific mechanisms in Papyrus-RT to integrate with a GUI. It has been done before, in previous tools implementing UML-RT, by architecturally separating the runtime and GUI parts and defining and using a communication mechanism between the two (e.g., interrupts, named pipes, etc). There are known patterns when trying to interface an embedded application with external applications.


OK I understand, but just for confirmation... If I want to integrate , for example, Qt and Papyurs-RT for demonstration mentioned above on some LInux PC i would need to have Qt runtime as one process, Papyrus-RT runtime as second process, and all communication between those two would be implemented as OS-specific inter-process communication (as long as Papyrus-RT is considered)? In other words there is absolutely nothing like integration of GUI in for examle IBM Rational Rose Real Time (section "Integrating External Classes" in this pdf: ftp://ftp.software.ibm.com/software/rational/docs/v2002_r2/unix/pdf/RoseRT/jguide.pdf)

[Updated on: Tue, 20 December 2016 14:20]

Report message to a moderator

Re: Papyrus for Realt Time + Qt GUI + RTOS for full RT application [message #1750425 is a reply to message #1750379] Tue, 20 December 2016 23:08 Go to previous message
Charles Rivet is currently offline Charles RivetFriend
Messages: 211
Registered: May 2014
Location: Canada
Senior Member

Hi Milos,

Milos Petrovic wrote on Tue, 20 December 2016 09:14

OK I understand, but just for confirmation... If I want to integrate , for example, Qt and Papyurs-RT for demonstration mentioned above on some LInux PC i would need to have Qt runtime as one process, Papyrus-RT runtime as second process, and all communication between those two would be implemented as OS-specific inter-process communication (as long as Papyrus-RT is considered)? In other words there is absolutely nothing like integration of GUI in for examle IBM Rational Rose Real Time (section "Integrating External Classes" in this pdf: ftp://ftp.software.ibm.com/software/rational/docs/v2002_r2/unix/pdf/RoseRT/jguide.pdf)


The document to which you refer is for Java, and we do not currently generate Java code, only C++. I am also not overly familiar with the Java RTS (I'm more of a C/C++ guy).

However, in the C++ version of the document, there are instructions on how to accomplish basically the same thing.

Unfortunately, we do not yet have that capability just yet. As I mentioned, some of that will be developed in MVP3 and it will be finished in MVP4 (see my previous response for the link).

Fortunately, what RoseRT was doing is mainly simplifying the application of patterns that was previously implemented manually (e.g., in ObjecTime Developer). So there are ways to do something similar by developing your components separately and adding them as include in the Papyrus-RT model and as external libraries in the build makefile. Not an elegant solution just yet, and we will be working on making this better!

You could also encapsulate the UI portion into a capsule (on a separate thread), but then I don't know QT and if it is blocking, it would prevent messages to be exchanged with the rest of the Papyrus-RT-based application - so you would still need an inter-process communication mechanism. Note that we also do not yet have the capability to create custom controllers.

That being said, with embedded systems, especially when safety-critical, it is often better to have the UI and real time parts running on separate processes.

So the short answer to your question is that yes, at this point in time, I would recommend two processes and IPCs.

By the way, you are welcome to create a bug on Papyrus-RT in Bugzilla to describe what you are trying to do. This would help us gauge the demand for that capability.

And also, if your company is interested in the future of this product, they might consider looking into the Papyrus Industry Consortium.


/Charles Rivet
Previous Topic:Reuse/extend the UML-RT Capsule Structure Diagram
Next Topic:Creating a custom Capsule
Goto Forum:
  


Current Time: Sat Nov 17 02:24:57 GMT 2018

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

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

Back to the top