Function type:
LIST OF ELEMENT
Sorts a list of hierarchical Statemate elements by level.Note that this function is relevant only for a list of hierarchical elements. If the function is applied to a list of non-hierarchical elements,status
receives the valuestm_elements_not_hierarchical
.
Hierarchical elements in a chart can be ordered by levels. See the following statechart:The set of elements,{S1,S2}
, comprise a level. Assume you perform a “sort_by_level” function on the states in statechartS
. The sorted order would beS
,S1
,S2
,S11
.Note: The order of elements within the same level appear in an arbitrary order in the output. For example,S2
might appear beforeS1
because they are of the same level. However, the order of levels is “top-to-bottom” (here,S
precedesS1
orS2
).