/****************************************************************************** * Copyright (c) 2000-2014 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ module Test340T { import from Test340A all; type integer MyIntegerType2 // AS A CONSTANT ********************************************* const MyIntegerType2 myIntegerValue2 := myIntegerValue1 type port MyPort message { inout MyType } with { extension "internal" } type record MyType { integer field1 } template MyType myMessage(integer par_integer) := { field1 := par_integer } type component MyMainComponent { port MyPort M_PCO; } type component MyParallelComponent { port MyPort P_PCO; } function handle_msg_on_ptc() runs on MyParallelComponent { // AS A PARAMETER ********************************************* P_PCO.receive (myMessage(myIntegerValue1)) setverdict ( pass ); } testcase Test() runs on MyMainComponent { // AS A VARIABLE ********************************************* var MyIntegerType2 myIntegerValue3 := myIntegerValue1 var MyParallelComponent myparallelcomponent := MyParallelComponent.create; connect ( mtc:M_PCO, myparallelcomponent: P_PCO ); myparallelcomponent.start(handle_msg_on_ptc()); // AS A PARAMETER ********************************************* M_PCO.send(myMessage(myIntegerValue1)) myparallelcomponent.done; } control { execute (Test()) } }