Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » eTrice » ETrice Timing(Display Time in Sequence Chart / Simulated time)
ETrice Timing [message #1713706] Fri, 06 November 2015 07:10 Go to next message
Klaus Popp is currently offline Klaus PoppFriend
Messages: 3
Registered: November 2015
Junior Member
Hi,

I want to use ROOM/Etrice to validate architectural concepts.

I have the following questions:
1. Is it possible to Show the current time in the sequence Charts? (i.e. a timeline)?

2. Can I use a simulated time instead of the real time? I.e. if I set a timeout of 5 seconds, can I tell the Simulator to do it as quickly as possible.

3. Can I instruct PTimer to use Timings below 1ms?

Thanks, Klaus


Re: ETrice Timing [message #1713828 is a reply to message #1713706] Fri, 06 November 2015 18:41 Go to previous messageGo to next message
Thomas Jung is currently offline Thomas JungFriend
Messages: 8
Registered: May 2015
Junior Member
Hi Klaus,

1. Is it possible to Show the current time in the sequence Charts? (i.e. a timeline)?

In general we are using the open source tool Trace2UML to visualize MSCs. From our model point of view we have all the information and we could add it to the trace output. But the Trace2UML tool is currently unable to display the Information. However we could ask the developer of trace2UML to add this feature.
What is your concrete need?


2. Can I use a simulated time instead of the real time? I.e. if I set a timeout of 5 seconds, can I tell the Simulator to do it as quickly as possible.

First of all, what you see is not a simulator. The MSCs you see is the real trace Output from the real generated code that is deployed on the PC as a normal target.

Manipulating the time is no big deal but requires some explanations.
I assume you are running on a target with OS (PC with Linux or Windows).
In this case you could write your own "getTimeFromTarget" (you will find in etrice.rutime.c/platforms/MT_WIN_MinGW/etTime.c). Here you can return a simulated time that will be used from the model as timebase. Additionally you have to maintain (increment) the time on a regular basis (e.g. seperate thread).


3. Can I instruct PTimer to use Timings below 1ms?

The model time is internally maintained in seconds and nanoseconds. For simplicity we start timers on a millisecond basis but it is very simple to add shorter times as well. Take look at the TimingService.room file. Here you will find the protocoll that defines the messages to start timers. Here you can simply add new messages (e.g. startTimeoutUs). To handle the message correctly, you just have to add the appropriate transition (Take the same code from the startTime(out) transition and just change the calculation of the expiration time.
Make sure that the thread on which the timing service is running will be triggered fast enough.


Did i answere your questions?
Please let us know if you need further assistance.

Thomas
Re: ETrice Timing [message #1713941 is a reply to message #1713828] Sun, 08 November 2015 20:14 Go to previous messageGo to next message
Klaus Popp is currently offline Klaus PoppFriend
Messages: 3
Registered: November 2015
Junior Member
Hi Thomas,

thanks for your detailed reply.

Before going into Details: Indeed, I want to use etrice as a simulator. Wouldn't it be nice to have this possibility in etrice?
One of my use cases is the modelling of distributed Systems. One actor is an embedded Controller coupled through a fieldbus to a fieldbus IO. This fieldbus IO itself contains several controlllers which are all separate actors coupled through Serial busses. From my Point of view etrice would provide an ideal platform to model the behaviour of the different actors. However, using the real time of the Simulation PC makes no sense. Instead I would need a simulated time.

Do you have any plans to provide this feature in etrice? I'm afraid I will not have enough time to do the changes by my own.
Thanks, Klaus
Re: ETrice Timing [message #1715630 is a reply to message #1713941] Tue, 24 November 2015 19:22 Go to previous messageGo to next message
Thomas Jung is currently offline Thomas JungFriend
Messages: 8
Registered: May 2015
Junior Member
Hi Klaus,

the main focus of eTrice is to provide a modelling language for distributed, concurrent realtime systems with code generation for embedded targets or the host system. In fact eTrice implements a DSL for such systems, very similar to the UML-RT profile.
We prefere backanotation to create e.g. MSCs from a running model instead of simulating a model. This is from our point of view the more valuable alternative in the SW development process.

Maybe you can think about using eTrice for your SW development for your distributed system. It is well suited for such kind of systems.

Thomas
Re: ETrice Timing [message #1754507 is a reply to message #1713706] Sun, 19 February 2017 09:35 Go to previous message
Klaus Popp is currently offline Klaus PoppFriend
Messages: 3
Registered: November 2015
Junior Member
As I did not found a suitable simulator, I wrote my own. If you are looking for a lightweight, opensource discrete event simulator that can generate sequence diagrams, look at this:
https://github.com/KlausPopp/Moddy
Previous Topic:[announce] Eclipse eTrice 1.1.1 maintenance release ready
Next Topic:Tutorial
Goto Forum:
  


Current Time: Thu Apr 25 04:40:38 GMT 2024

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

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

Back to the top