Titan Core Initial Contribution
[deliverable/titan.core.git] / regression_test / ASN1 / Test342 / Test342T.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2014 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
7 ******************************************************************************/
8 module Test342T
9 {
10 import from Test342A all;
11
12 type float MyRealType2
13
14 // AS A CONSTANT *********************************************
15 const MyRealType2 myRealValue2 := myRealValue1
16
17 type port MyPort message
18 {
19 inout MyType
20 } with { extension "internal" }
21
22 type record MyType
23 {
24 float field1
25 }
26
27 template MyType myMessage(float par_float) :=
28 {
29 field1 := par_float
30 }
31
32 type component MyMainComponent
33 {
34 port MyPort M_PCO;
35 }
36
37 type component MyParallelComponent
38 {
39 port MyPort P_PCO;
40 }
41
42 function handle_msg_on_ptc() runs on MyParallelComponent
43 {
44
45 // AS A PARAMETER *********************************************
46 P_PCO.receive (myMessage(myRealValue1))
47 setverdict ( pass );
48 }
49
50 testcase Test() runs on MyMainComponent
51 {
52
53 // AS A VARIABLE *********************************************
54 var MyRealType2 myRealValue3 := myRealValue1
55
56 var MyParallelComponent myparallelcomponent := MyParallelComponent.create;
57 connect ( mtc:M_PCO, myparallelcomponent: P_PCO );
58 myparallelcomponent.start(handle_msg_on_ptc());
59
60 // AS A PARAMETER *********************************************
61 M_PCO.send(myMessage(myRealValue1))
62 myparallelcomponent.done;
63 }
64
65 control
66 {
67 execute (Test())
68 }
69 }
70
This page took 0.036129 seconds and 5 git commands to generate.