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 //Mycomp A has two ports and MycompB has two ports.
18 module Sem_0901_Communication_ports_005{
20 type port myport message {
22 } with {extension "internal"}
25 type component Mysystem
28 port myport messagePort1, messagePort2;
31 function fsend() runs on Mysystem {
37 [] messagePort1.receive(3) {
40 [] messagePort1.receive {
49 [] messagePort2.receive(4) {
52 [] messagePort2.receive {
64 function frec() runs on Mysystem {
68 [] messagePort1.receive(1) {
72 [] messagePort1.receive {
81 [] messagePort2.receive(2) {
85 [] messagePort2.receive {
95 testcase TC_Sem_0901_Communication_ports_005() runs on Mysystem {
99 MyCompA:=Mysystem.create;
100 MyCompB:=Mysystem.create;
101 connect(MyCompA:messagePort1,MyCompB:messagePort1);
102 connect(MyCompB:messagePort2,MyCompA:messagePort2);
105 MyCompB.start(frec());
106 MyCompA.start(fsend());
108 MyCompB.done; // reciever need to wait
115 execute(TC_Sem_0901_Communication_ports_005());