How to reset a subsystem with trigger type "function call" in unit test?

Hello everyone,
just I need to do an unit test for a subsystem with stateflow-charts. I have generated a test harness (test sequence) and tried to add some test cases.
However, I found I could not reset the subsystem. After running some test cases, the subsystem could not go back to initialization.
The subsystem has a trigger with following setting:
Trigger type: function-call; States when enabling: held; Propagate sizes of variable-size signals: During execution; Sample time type: triggered
This subsystem comes from a customer. Therefore, I hope that I don't need to change any thing in this subsystem.
A function-call scheduler was generated with send(trigger) automatically.
My question is:
how to reset the subsystem for each test case? I would like to know solutions for "test sequence" and "signal builder".
Thanks for your attention!
Best regards, XiC

1 件のコメント

Eeshan Mitra
Eeshan Mitra 2017 年 10 月 2 日
If the "function-call" subsystem is driven by the stateflow chart, have you tried wrapping it inside a resettable subsystem?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSchedule Model Components についてさらに検索

質問済み:

XiC
2017 年 9 月 27 日

コメント済み:

2017 年 10 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by