-- TTCN3 module extracted from ITU-T Z.165 (03/2011)

module triScenario3 { signature MyProc ( in float par1, inout float par2) exception(MyExceptionType); type record MyExceptionType { FieldType1 par1, FieldType2 par2 }; type port PortTypeProc procedure { in MyProc }; type component MyComponent { port PortTypeProc MyPort; timer MyTimer = 3; }; testcase scenario3(integer x) runs on MyComponent { MyPort.start; MyTimer.start; alt { [] MyPort.getcall(MyProc:{5.0, 6.0}) { MyTimer.stop; } [x>5] MyTimer.timeout { MyPort.reply(MyProc:{, 30.0}); } [x<=5] MyTimer.timeout { MyPort.raise(MyProc, MyExceptionType:{p1, p2} ); } } MyPort.stop; }; control { execute( scenario3(4) ); }; };