-- TTCN3 module extracted from ITU-T Z.165 (05/2012)

module triScenario1 { external function MyFunction(); type port PortTypeMsg message { inout integer } type component MyComponent { port PortTypeMsg MyPort; timer MyTimer } type component MyTSI { port PortTypeMsg PCO1; } testcase scenario1() runs on MyComponent system MyTSI { MyPort.clear; MyPort.start; MyTimer.start(2); map(MyComponent: MyPort, system: PCO1); MyPort.send (integer : 5); if (MyTimer.running) { MyPort.receive(integer:7); } else { MyFunction(); } unmap(MyComponent: MyPort, system:PCO1); MyPort.stop; } control { execute( scenario1() ); } }