Titan



receive


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.

Related keywords:


port_reference.receive [ ( value_part ) ] [ from address_reference ] [ -> assignment_part ];  


Example 1: literal value

portibus_PCO.receive (charstring:"abl") from system;

The character string abl is received over the port portibus_PCO from the test system interface. The port is connected to several components.


Example 2: template

portibus_PCO.receive (tr_MeiTemplate);

The template (tr_MeiTemplate) determines what kind of messages will be received.


Example 3: modified template

portibus_PCO.receive (modifies tr_MeiTemplate := {field1 := false});

The modified template (tr_MeiTemplate) determines what kind of messages will be received.


Example 4: any message reception

portibus_PCO.receive;

Any message on port portibus_PCO will be accepted.


Example 5: storing the sender address

portibus_PCO.receive (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.receive (tr_MeiTemplate) -> value v_ReceivedMessage;

The received message is saved in the variable v_ReceivedMessage.


Example 7: receive on any port

any port.receive (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 receive