How to add Stateflow event listeners?
1 view (last 30 days)
Ajay krishna Vasanthakumar on 9 Dec 2020
For Simulink blocks we add add_exec_event_listener to obtain the run time object of block
In similar way do matlab have provision to add the listener for states and transitions?
Can someone help me out?
V. Ajay Krishna
Ntiana Sakioti on 1 Jul 2021
If you are interested in identifying when a state has been entered and exited you can use implicit events enter("stateName") and exit("stateName") as listed in this documentation page. You can also identify when a transition is being taken by using "send(TransitionTaken)" as a transition action, where "TransitionTaken" is an event.
Hope this helps.