MESSAGE
System Testing Test Script Language.
Syntax
MESSAGE <message_type> : <ref_msg> {[, <ref_msg>]}
Description
The MESSAGE instruction allows you to declare a list of reference messages <ref_msg> of the <message_type> type.
<message_type> is in C and must be defined by a typedef in the interface file, an included file, or the test script.
You must use the MESSAGE instruction at the beginning of the test script, before the first scenario.
The reference messages are global variables. After a WAITTIL instruction, the reference messages used contains the value of the last received message.
Interface file
typedef struct {
int code;
int flight_number;
struct {
char flight_name[8];
unsigned char class_name;
} data;
} aircraft_data_t;
Examples
MESSAGE aircraft_data_t: air_msg
SCENARIO first
DEF_MESSAGE air_msg, EV= {code => FlightReport }
WAITTIL(MATCHING(air_msg), WTIME == 100)
...
IF (air_msg.flight_number == 321) THEN
...
Related Topics