1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:9, Ensure that the the IUT receives the message sent by mycompA
13 ** @verdict pass accept, ttcn3verdict:pass
14 ** @configuration port:broadcast
15 ***************************************************/
17 // Two component mycompA and B message exchange
18 module Sem_0901_Communication_ports_002{
20 type port myport message {
22 } with {extension "internal"}
24 type component Mysystem
27 port myport messagePort;
30 function fsend() runs on Mysystem { //send
34 [] messagePort.receive(3) {
37 [] messagePort.receive {
47 function frec() runs on Mysystem { // recieve
51 [] messagePort.receive(2) {
55 [] messagePort.receive {
65 testcase TC_Sem_0901_Communication_ports_002() runs on Mysystem system Mysystem {
69 MyCompA:=Mysystem.create;
70 MyCompB:=Mysystem.create;
71 connect(MyCompA:messagePort,MyCompB:messagePort);
72 //connect(MyCompB:messagePort,MyCompA:messagePort);
74 log("before RECEIVE");
76 MyCompA.start(fsend());
77 //MyCompA.done; // waits MycompA to finish, finish with inco
78 MyCompB.start(frec());
79 MyCompB.done; // B always committed suicide without done
85 execute(TC_Sem_0901_Communication_ports_002());