1 /******************************************************************************
2 * Copyright (c) 2000-2015 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 ******************************************************************************/
10 import from Test307A all;
12 type charstring MyStringType2
14 // AS A CONSTANT *********************************************
15 const MyStringType2 myStringValue2 := myNumericStringValue1
16 const MyNumericStringType1 myStringValue3 := "123 45 67 89"
17 // AS A CONSTANT *********************************************
20 type port MyPort message
23 } with { extension "internal" }
30 template MyType myMessage(charstring par_String) :=
35 template MyType myMessage2(MyNumericStringType1 par_String) :=
40 type component MyMainComponent
45 type component MyParallelComponent
51 function handle_msg_on_ptc() runs on MyParallelComponent
54 // AS A PARAMETER *********************************************
55 P_PCO.receive (myMessage(myNumericStringValue1))
56 P_PCO.receive (myMessage2("123 45 67 89"))
57 // AS A PARAMETER *********************************************
61 testcase Test() runs on MyMainComponent
64 // AS A VARIABLE *********************************************
65 var MyStringType2 myStringValue30 := myNumericStringValue1
66 var MyNumericStringType1 myStringValue4 := "123 45 67 89"
67 // AS A VARIABLE *********************************************
69 var MyParallelComponent myparallelcomponent := MyParallelComponent.create;
70 connect ( mtc:M_PCO, myparallelcomponent: P_PCO );
71 myparallelcomponent.start(handle_msg_on_ptc());
73 // AS A PARAMETER *********************************************
74 M_PCO.send(myMessage(myNumericStringValue1))
75 M_PCO.send(myMessage2("123 45 67 89"))
76 // AS A PARAMETER *********************************************
78 myparallelcomponent.done;