What is the best way to implement Class Diagrams in Simulink&Stateflow ? What is the equivalent of classes representation in Stateflow?

7 Ansichten (letzte 30 Tage)
G36wox
G36wox am 31 Mär. 2016
Kommentiert: G36wox am 14 Apr. 2016
Hey Matlab Community,
What is the best way to implement Class Diagrams in Simulink&Stateflow ?
What ist the equivalent of classes representation in Stateflow?
I want to create several instances of the same object for example: Instance green, red and yellow of the object SMLamp which also includes a StateMachine. Each of the 4 blocks in the following image also includes a StateMachine.
My task is to transform this UML class based model in the Stateflow &Simulink environment.
SMTrafficLight - Block
SMLamp -Block

Antworten (1)

sam0037
sam0037 am 13 Apr. 2016
Hi,
This link talks about Hybrid Software Development with Simulink and UML Tools. This video might be a good starting point to approach this issue.
Hope this helps. All the best!!!
  1 Kommentar
G36wox
G36wox am 14 Apr. 2016
First of all thanks for having a look at my issue.
Although the video example shows the connection of UML arhitectures and Simulink , it doesnt provide any information about changing the development environment from a UML based program to Matlab Simulink Stateflow.
My problem consists in how to model class diagrams in Stateflow and what is an equivalent of classes illustration in the Stateflow environment.
Till now i thought about splitting every class and i have come to the following hierarchy:
Furthermore i have thought about creating a library in Simulink so i use the same object for every representation of green,red,yellow. However i encountered some problems and this might not be a viable solution.
If I wasn't clear enough presenting my current issue please let me know. If you can also direct me to some experts in Stateflow i would be very grateful.
Thanks in advance.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by