![]() |
![]() |
![]() |
![]() |
![]() |
The asynchronous operation belongs to the family of message-based communication operations. It is used to receive a value from an incoming message port queue. When the first message in the queue matches the criteria described in the value part, the operation works exactly as described under the keyword receive, otherwise the message is discarded.
Related keywords:
port_reference.trigger [ ( value_part ) ] [ from address_reference ] [ -> assignment_part ]; |
port_reference points out the incoming message port.
the keywords any port may be used to indicate that messages from any port will be accepted (see the example 7).
The trigger keyword introduces the message reception.
value_part is one of the following: (rem.: when omitted, any message will be accepted)
TITAN specific restriction compared to the standard:
|
The optional from keyword is used when a port is connected to several entities and restriction to one communication partner is required.
address_reference is one of the following:
assignment_part is one or both of the following:
Example 1: literal value
portibus_PCO.trigger (charstring:"abl") from system;
The character string abl is accepted over the port portibus_PCO from the test system interface. The port is connected to several components.
Example 2: template
portibus_PCO.trigger (tr_MeiTemplate));
The template (tr_MeiTemplate) determines what kind of messages will be accepted.
Example 3: modified template
portibus_PCO.trigger (modifies tr_MeiTemplate := {field1 := false});
The modified template (tr_MeiTemplate) determines what kind of messages will be accepted.
Example 4: any message reception
portibus_PCO.trigger;
Any message on port portibus_PCO will be accepted.
Example 5: storing the sender address
portibus_PCO.trigger (tr_MeiTemplate)) -> sender v_address;
The address of the sender is stored in the variable v_address.
Example 6: storing the received value
portibus_PCO.trigger (tr_MeiTemplate)) -> value v_ReceivedMessage;
The received message is saved in the variable v_ReceivedMessage.
Example 7: receive on any port
any port.trigger (tr_MeiTemplate)) -> value v_ReceivedMessage;
The message matching the template tr_MeiTemplate and received on any port is saved to the variable v_ReceivedMessage.
BNF definition of trigger