Download Stateflow User's Guide

Transcript
6
Notations
Keyword
Shorthand
Meaning
exit(state_name)
ex(state_name)
Generates a local event when
the specified state_name is
exited.
in(state_name)
none
A condition function that is
evaluated as true when the
state_name specified as the
argument is active.
on event_name
none
Actions that follow are executed when the event_name
specified as an argument to
the on keyword is broadcast.
send(event_name,state_name)
none
Send the event_name specified to the state_name specified (directed event
broadcasting).
matlab(evalString,arg1,arg2,...)
ml()
Action specifies a call using
MATLAB function notation.
matlab.MATLAB_workspace_data
ml.
Action specifies a call using
the ml name space notation.
Use of these keywords in any way other than their intended meaning within
the rules of the notation will cause unpredictable results.
How Is Hierarchy Represented?
The notation supports the representation of object hierarchy in Stateflow
diagrams. Some of the objects are graphical while others are nongraphical.
An example of a graphical hierarchy is the ability to draw one state within the
boundaries of another state. Such a representation indicates that the inner
state is a substate or child of the outer state or superstate. The outer state is
the parent of the inner state. In the simple case of a Stateflow diagram with a
single state, the Stateflow diagram is that state’s parent. Transitions are
another example of graphical hierarchy. A transition’s hierarchy is represented
6-6