The operation belongs to the family of procedure-based communication operations. It is used to specify that a test component accepts a procedure calls from the system under test or from another test component.
Related keywords:
port_reference.getcall [ ( template_instance ) ] [ from address_reference ] [ -> assignment_part ]; |
port_reference points out the port where the procedure call is accepted at.
the keywords any port may be used to indicate that procedure calls at any ports will be accepted (see the example 4).
The getcall keyword introduces the procedure call acceptance.
template_instance may be one of the following (when omitted, the call on the top of the incoming port queue (if any) will be removed):
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 more of the following:
Example 1: in-line signature template and parameter redirect
signature S_MyProc (out integer pl_MyPar1, inout boolean pl_MyPar2, in charset pl_MyPar3) noblock;
MujPort_PCO.getcall(S_MyProc:{ ?, ?, "estanco"}) from system -> param (vl_MyPar1, vl_MyPar2, vl_MyPar3);
The signature S_MyProc suitable for non-blocking communication is defined in the first line. It has three parameters (pl_MyPar1, pl_MyPar2 and pl_MyPar3).
In the second line, the procedure call is accepted at the port MujPort_PCO. The port is connected to several components, but communication is restricted to one component, here to the test system
interface. The value of the first two parameters does not matter, but the third one must be equal to "estanco" for the call to be accepted. The parameter values are sotred in the variables
vl_MyPar1, vl_MyPar2 and vl_MyPar3, respectively.
Example 2: signature template and address redirect
template S_MyProc t_NiaTemplate (boolean pl_param) := {
field1 := 16,
field2 := pl_param,
field3 := "massepain"
}
MujPort_PCO.getcall (t_NiaTemplate(true)) -> sender v_address;
The parameterized template (t_NiaTemplate) has three fields. Procedure calls are accepted where the first parameter is don't care because it is defined as an out parameter, the second and the third must have the values true and "massepain", respectively . The address of the component calling the procedure is stored in the variable v_address.
Example 3: modified signature template
MujPort_PCO.getcall (modifies t_NiaTemplate(false) := {field3 := "pate d'amande"});
The template defined in example 2 is modified. The procedure call is now accepted when the second and the third parameters have the values false and ""pate d'amande", respectively.
Example 4: receive on any port
any port.getcall (t_NiaTemplate(true));
The procedure call matching the template t_NiaTemplate will be accepted on any port.
Example 5: Accepting any call
MujPort_PCO.getcall;
Removes the top call from MujPort_PCO.
BNF definition of getcall