/******************************************************************************
 * Copyright (c) 2000-2025 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *   Kulcsar, Endre
 *   Raduly, Csaba
 *   Szabados, Kristof
 *
 ******************************************************************************/
module Test310T
{
import from Test310A all;

type charstring MyStringType2

// AS A CONSTANT *********************************************
const MyStringType2 myStringValue2 := myVisibleStringValue1
const MyVisibleStringType1 myStringValue3 := "~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"
// AS A CONSTANT *********************************************


type port MyPort message
{
inout MyType
} with { extension "internal" }

type record MyType
{
charstring field1
}

template MyType myMessage(charstring par_String) :=
{
field1 := par_String
}

template MyType myMessage2(MyVisibleStringType1 par_String) :=
{
field1 := par_String
}

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(myVisibleStringValue1))
P_PCO.receive (myMessage2("~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"))
// AS A PARAMETER *********************************************

setverdict ( pass );
}
testcase Test() runs on MyMainComponent
{

// AS A VARIABLE *********************************************
var MyStringType2 myStringValue5 := myVisibleStringValue1
var MyVisibleStringType1 myStringValue4 := "~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"
// AS A VARIABLE *********************************************

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(myVisibleStringValue1))
 M_PCO.send(myMessage2("~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"))
// AS A PARAMETER *********************************************

myparallelcomponent.done;
}

control
    {
    execute (Test())
    }
}

