Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:55 Go to next message
xiaoyu qu is currently offline xiaoyu quFriend
Messages: 5
Registered: July 2016
Junior Member
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 19:34 Go to previous message
Charles Rivet is currently offline Charles RivetFriend
Messages: 211
Registered: May 2014
Location: Canada
Senior Member

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.


/Charles Rivet
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: Sun Nov 18 20:59:43 GMT 2018

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

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

Back to the top