Skip to main content



      Home
Home » Eclipse Projects » Papyrus for Real Time » How to use thread in papyrus-rt application and are there more samples projects?(about how to use threads in papyrus-rt application and sample projects)
How to use thread in papyrus-rt application and are there more samples projects? [message #1737922] Thu, 14 July 2016 03:55 Go to next message
Eclipse UserFriend
I've try the papyrus-rt application in "Combining Papyrus RT with normal Code" topic. But seem the thread configuration in Top.Controller were not used in the output of C++ Code Genearation. (I attached the generated C++ code, seems no threads used in it)

there are 3 threads in Top.Controller,

Top = MainThread
Top.ledInterface = LEDInterfaceThread
Top.switchInterface = SwitchInterfaceThread

1. Could you tell me how to assgin capsule to these thread? and Are there any conceptions of logical thread and physical thread(like in RSARTE)?

2. Where can I get more samples projects and documentations for learning ?



Best Regards
Xiaoyu
Re: How to use thread in papyrus-rt application and are there more samples projects? [message #1737999 is a reply to message #1737922] Thu, 14 July 2016 15:34 Go to previous message
Eclipse UserFriend
I already provided an answer to those question to your previous question. I'm reproducing them here for completeness.

Note that the Top.Controller file is a temporary measure until we implement threading support within the Papyrus-RT. It is provided for experimentation only and it will be replaced once with implement a better thread mapping capability.

The Top.Controller file is used to map a capsule role to an OS thread.
The syntax within that file is "[capsule|capsulePart] = OSThreadName". Each assignment needs to be on its own line.
For example:
Top = TopController => The runtime creates the "TopController" OS thread and assigns the Top capsule it.
Top.pinger = =PingerController => The runtime creates the "PingerController" OS thread and assigns the "pinger" capsule part from the Top capsule to it.

The "LEDEmbedded" model was meant to illustrate a design pattern to interface to hardware and was not meant to be executable.

We have not yet decided how we will approach the concept of "logical threads" and handle its migration to Papyrus-RT. This will be implemented as part of the "thread mapping" capability mentioned above.
Previous Topic:Java reverse engineering?
Next Topic:How to use thread in papyrus-rt application and are there more samples projects?
Goto Forum:
  


Current Time: Sat May 17 12:31:58 EDT 2025

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

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

Back to the top