This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

send

Broadcast message or event

Syntax

send(message_name)
send(output_event_name)
send(local_event_name,state_name)
send(state_name.local_event_name)

Description

example

send(message_name) sends a local or output message.

example

send(output_event_name) sends an output event.

example

send(local_event_name,state_name) broadcasts a local event to state_name and any offspring of that state in the hierarchy.

example

send(state_name.local_event_name) broadcasts a local event to its parent state state_name and any offspring of that state in the hierarchy.

Examples

expand all

Send a local or output message M with a data value of 3.

M.data = 3;
send(M);

Send an output event e.

send(e);

Send a local event e to state A.A1 and any of its substates.

send(e,A.A1);

Send a local event e to its parent state A and any of its substates.

send(A.e);

Introduced in R2018b