Main Content

forward

Forward message

Description

forward(message_in_name,message_out_name) forwards a valid input or local message to a local queue or an output port. After a chart forwards a message, it can remove another message from the queue in the same time step.

example

Examples

expand all

Check the input queue for message M_in. If a message is present, remove the message from the queue and forward it to the output port M_out.

on M_in:
   forward(M_in,M_out);

Stateflow chart that uses the forward operator in a state.

Check the local queue for message M_local. If a message is present, transition from state A to state B. Remove the message from the M_local message queue and forward it to the output port M_out.

M_local{forward(M_local,M_out)}

Stateflow chart that uses the forward operator in a transition.

Version History

Introduced in R2015b