Examples are specified at: "Examples.AsynchronousCommunication" and "Examples.InteractingComponents".
We use messages to model asynchronous communication between different state graphs. Message defines the type of asynchronous messages.
A message has parameters that transfer information from its sender to its receiver. The signature of the message type defines which parameter the message has. The parameters have a call by value semantics. The sender transition binds concrete values to the parameters that can be accessed by the receiver transition. In StateGraph2 models, the defined messages can be used as raise messages by a sender transition. A raise message is a message which is raised when a transition fires. A raise message is sent via the associated output delegation port of the State Graph2 class. This port is connected to an input delegation port which itself has a StateGraph2 model and a receiver mailbox and a receiver transition.
In StateGraph2 models, we use the messages defined within the receiver input delegation port, mailbox and receiver transition as trigger messages. A trigger message is a message which can enable a transition when it is available and all other required conditions for enabling a transition are true.
The mailbox of the StateGraph2 model stores incoming messages. The mailbox is a FIFO queue. The queue size is determined by the parameter queueSize.
Furthermore, the user must specify how many Integer, Boolean, and Real parameters the messages have. Therefore, the parameters numberofMessageIntegers, numberOfMessageBooleans, and numberOfMessageReals must be set.
When a transition uses a message to fire then this message is dispatched and deleted from the mailbox.
For each message only one transition can fire and dispatch the message. Messages have no specified duration of life. This means, they remain in the mailbox until they are dispatched or the mailbox is full. The handling of a mailbox overflow is handled by a assert function.
The receiver transition must set the check box use_messageReceive.