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

4 ビュー (過去 30 日間)
G36wox
G36wox 2016 年 3 月 31 日
コメント済み: G36wox 2016 年 4 月 14 日
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

回答 (1 件)

sam0037
sam0037 2016 年 4 月 13 日
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 件のコメント
G36wox
G36wox 2016 年 4 月 14 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by