Last sync 2016.04.01
[deliverable/titan.core.git] / regression_test / ASN1 / Test344 / Test344T.ttcn
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
7 *
8 * Contributors:
9 * Balasko, Jeno
10 * Kulcsar, Endre
11 * Szabados, Kristof
12 *
13 ******************************************************************************/
14 module Test344T
15 {
16 import from Test344A all;
17
18 type objid MyObjectIdentifierType2
19
20 // AS A CONSTANT *********************************************
21 const MyObjectIdentifierType2 myObjectIdentifierValue2 := myObjectIdentifierValue1
22
23 type port MyPort message
24 {
25 inout MyType
26 } with { extension "internal" }
27
28 type record MyType
29 {
30 objid field1
31 }
32
33 template MyType myMessage(objid par_objid) :=
34 {
35 field1 := par_objid
36 }
37
38 type component MyMainComponent
39 {
40 port MyPort M_PCO;
41 }
42
43 type component MyParallelComponent
44 {
45 port MyPort P_PCO;
46 }
47
48 function handle_msg_on_ptc() runs on MyParallelComponent
49 {
50
51 // AS A PARAMETER *********************************************
52 P_PCO.receive (myMessage(myObjectIdentifierValue1))
53 setverdict ( pass );
54 }
55
56 testcase Test() runs on MyMainComponent
57 {
58
59 // AS A VARIABLE *********************************************
60 var MyObjectIdentifierType2 myObjectIdentifierValue3 := myObjectIdentifierValue1
61
62 var MyParallelComponent myparallelcomponent := MyParallelComponent.create;
63 connect ( mtc:M_PCO, myparallelcomponent: P_PCO );
64 myparallelcomponent.start(handle_msg_on_ptc());
65
66 // AS A PARAMETER *********************************************
67 M_PCO.send(myMessage(myObjectIdentifierValue1))
68 myparallelcomponent.done;
69 }
70
71 control
72 {
73 execute (Test())
74 }
75 }
76
This page took 0.033071 seconds and 5 git commands to generate.