| Using Stateflow | Search  Help Desk |
Directed Event Broadcasting
You can specify a directed event broadcast in the action language. Using a directed event broadcast, you can broadcast a specific event to a specific receiver state. Directed event broadcasting is a more efficient means of synchronization amongst AND (parallel) states. Using directed event broadcasting improves the efficiency of the generated code. As is true in event broadcasting, recursive event broadcasts can lead to definition of cyclic behavior. The format of the directed broadcast issend(event_name,state_name)
where event_name is broadcast to state_name (and any offspring of that state in the hierarchy). The state_name argument can include a full hierarchy path. For example,
send(event_name, chart_name.state_name1.state_name2)
The state_name specified must be active at the time the send is executed for the state_name to receive and potentially act on the directed event broadcast.
Example: Directed Event Broadcast Using send
This is an example of a directed event broadcast using thesend(event_name,state_name) transition action as a transition action.
Example: Directed Event Broadcast Using Qualified Event Names
This example shows an alternate way to specify the same directed event broadcast as the previous example using a qualified event name.