-- TTCN3 module extracted from ITU-T Z.165 (05/2012)
module triScenario2
{
signature MyProc ( in float par1, inout float par2)
exception(MyExceptionType);
type record MyExceptionType { FieldType1 par1, FieldType2 par2 }
type port PortTypeProc procedure { out MyProc }
type component MyComponent {
port PortTypeProc MyPort;
timer MyTimer = 7
}
testcase scenario2() runs on MyComponent
{
var float MyVar;
MyPort.clear;
MyPort.start;
MyTimer.start;
MyVar := MyTimer.read;
if (MyVar>5.0) {
MyPort.call (MyProc:{MyVar, 5.7}, 5);
alt {
[] MyPort.getreply(MyProc:{ ,MyVar*5}) {}
[] MyPort.catch (MyProc, MyExceptionType:* ) {}
[] MyPort.catch (timeout) {}
}
}
MyTimer.stop;
MyPort.stop;
}
control {
execute( scenario2() );
}
}