PROCSEND
System Testing Test Script Language.
Syntax
PROCSEND <message_type> : <msg> ON <commtype> : <id>
END PROCSEND
Description
The PROCSEND instruction allows you to define a message-sending procedure. The SEND statement uses this instruction.
<message_type> is declared with the MESSAGE instruction.
<msg> is the input parameter of <message_type> that describes the message to be sent.
<commtype> is the communication method for sending messages.
Use the <id> formal input parameter to specify the connection on which a message has to be sent.
You must declare the message-sending procedure in the first part of the test script, before the first scenario.
Declare <commtype> with the instruction COMMTYPE.
Declare <message_type> with the instruction MESSAGE.
You only need to declare one message-sending procedure a message and communication type pair.
If the structured C <message_type> contains unions, you should declare the field of the union that you want to use. For this purpose, a structured variable is implicitly defined. Its name adds ATL_ before the name of the <message_type>. An attribute selected for each union lets you define the field.
Example
typedef enum { e_name, e_id, e_balance } client_kind_t ;
typdef struct {
client_kind_t kind ;
union {
char name[50];
int id ;
float balance ;
} my_union
} client_info_t;
COMMTYPE socket IS socket_id_t
CHANNEL socket: ch
MESSAGE client_info_t: msg
#socket_id_t id;
PROCSEND message_t: msg ON appl_comm: id
...
CALL socket (sock_type, SOCK_DGRAM, 0) @ 0
...
END PROCSEND
SCENARIO Principal
...
ADD_ID(ch,id)
...
SEND (msg,ch)
...
END SCENARIO
Related Topics
COMMTYPE | MESSAGE | SEND | VIRTUAL PROCSEND