blob: 9b93e79230fb4b7010f00f7fd7330ebfe25190c3 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2019 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 //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_Variable_Test_Functions
//
// Purpose:
// This module contains the test functions of generic EPTF Variable.
//
// Module depends on:
// <EPTF_Variable_Test_Definitions>
// <EPTF_CLL_Variable_Definitions>
// <EPTF_CLL_Variable_Functions>
// <EPTF_CLL_Base_Functions>
// <EPTF_CLL_Common_Definitions>
//
//
// Current Owner:
// Balazs Barcsik (EBALBAR)
//
// Last Review Date:
// 2007-xx-xx
//
// Detailed Comments:
// -
//
///////////////////////////////////////////////////////////////
module EPTF_Variable_Test_Functions {
//=========================================================================
// Import part
//=========================================================================
import from EPTF_Variable_Test_Definitions all;
import from EPTF_CLL_Variable_Definitions all;
import from EPTF_CLL_Variable_Functions all;
import from EPTF_CLL_Base_Functions all;
import from EPTF_CLL_Common_Definitions all;
//=========================================================================
// Calculating Functions
//=========================================================================
function f_calculationInt(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {intVal:=2*f_EPTF_Var_getIntValue(pl_argList[0])};
}
function f_calculationFloat(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {floatVal:=2.0*f_EPTF_Var_getFloatValue(pl_argList[0])};
}
function f_calculationBoolean(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
if (f_EPTF_Var_getBoolValue(pl_argList[0]) == true) {pl_retVal:= {boolVal:=false};}
else {pl_retVal:= {boolVal:=true};}
}
function f_calculationCharstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {charstringVal:=f_EPTF_Var_getCharstringValue(pl_argList[0])&f_EPTF_Var_getCharstringValue(pl_argList[0])};
}
function f_calculationOctetstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {octetstringVal:=f_EPTF_Var_getOctetstringValue(pl_argList[0])&f_EPTF_Var_getOctetstringValue(pl_argList[0])};
}
function f_calculationHexstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {hexstringVal:=f_EPTF_Var_getHexstringValue(pl_argList[0])&f_EPTF_Var_getHexstringValue(pl_argList[0])};
}
function f_calculationBitstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {bitstringVal:=f_EPTF_Var_getBitstringValue(pl_argList[0])&f_EPTF_Var_getBitstringValue(pl_argList[0])};
}
function f_calculationIntegerlist(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {integerlistVal:=f_EPTF_Var_getIntegerlistValue(pl_argList[0])};
}
function f_calculationFloatlist(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {floatlistVal:=f_EPTF_Var_getFloatlistValue(pl_argList[0])};
}
function f_calculationCharstringlist(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {charstringlistVal:=f_EPTF_Var_getCharstringlistValue(pl_argList[0])};
}
function f_calculationStatusLED(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal:= {statusLEDVal:=f_EPTF_Var_getStatusLEDValue(pl_argList[0])};
}
function f_calculationSum(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_IntegerList pl_nonVarArgList, inout EPTF_Var_DirectContent pl_retVal) runs on EPTF_Var_CT {
pl_retVal := {intVal := 0};
for(var integer i:=0; i<sizeof(pl_argList); i:=i+1) {
pl_retVal.intVal := pl_retVal.intVal + f_EPTF_Var_getIntValue(pl_argList[i]);
}
}
//=========================================================================
// Guard Functions
//=========================================================================
function f_guard_Int(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var integer vl_value := pl_newContent.intVal;
return (vl_value == 1);
}
function f_guard_Float(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var float vl_value := pl_newContent.floatVal;
return (vl_value == 1.0);
}
function f_guard_Boolean(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var boolean vl_value := pl_newContent.boolVal;
return (vl_value == true);
}
function f_guard_Charstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var charstring vl_value := pl_newContent.charstringVal;
return (vl_value == "1");
}
function f_guard_Octetstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var octetstring vl_value := pl_newContent.octetstringVal;
return (vl_value == '01'O);
}
function f_guard_Hexstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var hexstring vl_value := pl_newContent.hexstringVal;
return (vl_value == '01'H);
}
function f_guard_Bitstring(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var bitstring vl_value := pl_newContent.bitstringVal;
return (vl_value == '01'B);
}
function f_guard_Integerlist(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var EPTF_IntegerList vl_value := pl_newContent.integerlistVal;
return (vl_value == {0,1});
}
function f_guard_Floatlist(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var EPTF_FloatList vl_value := pl_newContent.floatlistVal;
return (vl_value == {0.0,1.0});
}
function f_guard_Charstringlist(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var EPTF_CharstringList vl_value := pl_newContent.charstringlistVal;
return (vl_value == {"0","1"});
}
function f_guard_StatusLED(in integer pl_idx, in EPTF_IntegerList pl_argList, in EPTF_Var_DirectContent pl_newContent) runs on EPTF_Var_CT return boolean {
var EPTF_StatusLED vl_value := pl_newContent.statusLEDVal;
return (vl_value == {led_blue,"1"});
}
//=========================================================================
// PosProc Functions
//=========================================================================
function f_postProc_incrementValue(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on VariableTest_CT {
v_inc := v_inc+1;
}
//=========================================================================
// User Defined Functions
//=========================================================================
function f_setverdictFail(in boolean pl_condition) {
if (pl_condition) {
setverdict(fail);
}
}
function f_sendstatusPort1(in boolean pl_statusPortmsg, in VariableTest_CT pl_remoteCompRef) runs on VariableTest_CT{
statusPort1.send(pl_statusPortmsg) to pl_remoteCompRef;
}
function f_sendstatusPort2(in boolean pl_statusPortmsg, in VariableTest_CT pl_remoteCompRef) runs on VariableTest_CT{
statusPort2.send(pl_statusPortmsg) to pl_remoteCompRef;
}
//This function initalize the provider variables
function f_initVariables() runs on VariableTest_CT{
f_EPTF_Var_newInt("intVar",1, v_intVarIdx);
f_EPTF_Var_CT_LogAll("----- newInt -------");
f_EPTF_Var_Log("--intVar--",v_intVarIdx);
f_EPTF_Var_newFloat("floatVar", 1.0, v_floatVarIdx);
f_EPTF_Var_CT_LogAll("----- newFloat -------");
f_EPTF_Var_Log("--floatVar--",v_floatVarIdx);
f_EPTF_Var_newBool("boolVar", true, v_boolVarIdx);
f_EPTF_Var_CT_LogAll("----- newBool -------");
f_EPTF_Var_Log("--boolVar--",v_boolVarIdx);
f_EPTF_Var_newCharstring("charstringVar", "1.0", v_charstringVarIdx);
f_EPTF_Var_CT_LogAll("----- newCharstring -------");
f_EPTF_Var_Log("--charstringVar--",v_charstringVarIdx);
f_EPTF_Var_newOctetstring("octetstringVar", '01'O, v_octetstringVarIdx);
f_EPTF_Var_CT_LogAll("----- newOctetstring -------");
f_EPTF_Var_Log("--octetstringVar--",v_octetstringVarIdx);
f_EPTF_Var_newHexstring("hexstringVar", '01'H, v_hexstringVarIdx);
f_EPTF_Var_CT_LogAll("----- newHexstring -------");
f_EPTF_Var_Log("--hexstringVar--",v_hexstringVarIdx);
f_EPTF_Var_newBitstring("bitstringVar", '01'B, v_bitstringVarIdx);
f_EPTF_Var_CT_LogAll("----- newBitstring -------");
f_EPTF_Var_Log("--bitstringVar--",v_bitstringVarIdx);
f_EPTF_Var_newIntegerlist("integerlistVar", {0,1}, v_integerlistVarIdx);
f_EPTF_Var_CT_LogAll("----- newIntegerlist -------");
f_EPTF_Var_Log("--integerlistVar--",v_integerlistVarIdx);
f_EPTF_Var_newFloatlist("floatlistVar", {0.0,1.0}, v_floatlistVarIdx);
f_EPTF_Var_CT_LogAll("----- newFloatlist -------");
f_EPTF_Var_Log("--floatlistVar--",v_floatlistVarIdx);
f_EPTF_Var_newCharstringlist("charstringlistVar", {"0","1"}, v_charstringlistVarIdx);
f_EPTF_Var_CT_LogAll("----- newCharstringlist -------");
f_EPTF_Var_Log("--charstringlistVar--",v_charstringlistVarIdx);
f_EPTF_Var_newStatusLED("statusLEDVar", {led_blue,"1"}, v_statusLEDVarIdx);
f_EPTF_Var_CT_LogAll("----- newStatusLED -------");
f_EPTF_Var_Log("--statusLEDVar--",v_statusLEDVarIdx);
f_EPTF_Var_newIntRef("intVarRef",v_intVar,v_intVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newIntRef -------");
f_EPTF_Var_Log("--var--",v_intVarRefIdx);
f_EPTF_Var_newFloatRef("floatVarRef", v_floatVar,v_floatVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newFloatRef -------");
f_EPTF_Var_Log("--var--",v_floatVarRefIdx);
f_EPTF_Var_newBoolRef("boolVarRef", v_boolVar,v_boolVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newBoolRef -------");
f_EPTF_Var_Log("--var--",v_boolVarRefIdx);
f_EPTF_Var_newCharstringRef("charstringVarRef", v_charstringVar,v_charstringVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newCharstringRef -------");
f_EPTF_Var_Log("--var--",v_charstringVarRefIdx);
f_EPTF_Var_newOctetstringRef("octetstringVarRef", v_octetstringVar,v_octetstringVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newOctetstringRef -------");
f_EPTF_Var_Log("--var--",v_octetstringVarRefIdx);
f_EPTF_Var_newHexstringRef("hexstringVarRef", v_hexstringVar,v_hexstringVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newHexstringRef -------");
f_EPTF_Var_Log("--var--",v_hexstringVarRefIdx);
f_EPTF_Var_newBitstringRef("bitstringVarRef", v_bitstringVar,v_bitstringVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newBitstringRef -------");
f_EPTF_Var_Log("--var--",v_bitstringVarRefIdx);
f_EPTF_Var_newIntegerlistRef("integerlistVarRef", v_integerlistVar,v_integerlistVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newIntegerlistRef -------");
f_EPTF_Var_Log("--var--",v_integerlistVarRefIdx);
f_EPTF_Var_newFloatlistRef("floatlistVarRef", v_floatlistVar,v_floatlistVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newFloatlistRef -------");
f_EPTF_Var_Log("--var--",v_floatlistVarRefIdx);
f_EPTF_Var_newCharstringlistRef("charstringlistVarRef", v_charstringlistVar,v_charstringlistVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newCharstringlistRef -------");
f_EPTF_Var_Log("--var--",v_charstringlistVarRefIdx);
f_EPTF_Var_newStatusLEDRef("statusLEDVarRef", v_statusLEDVar,v_statusLEDVarRefIdx);
f_EPTF_Var_CT_LogAll("----- newStatusLEDRef -------");
f_EPTF_Var_Log("--var--",v_statusLEDVarRefIdx);
}
//This function initialize the subscriber variables and subscribe the variables to the providers
function f_subscribeVariables(in VariableTest_CT_List pl_parents, in EPTF_Var_SubscriptionMode pl_buffered ) runs on VariableTest_CT{
f_EPTF_Var_subscribeRemote(pl_parents[0],"intVarRef",pl_buffered, v_remoteIntSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"floatVarRef",pl_buffered, v_remoteFloatSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"boolVarRef",pl_buffered, v_remoteBoolSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"charstringVarRef",pl_buffered, v_remoteCharstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"octetstringVarRef",pl_buffered, v_remoteOctetstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"hexstringVarRef",pl_buffered, v_remoteHexstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"bitstringVarRef",pl_buffered, v_remoteBitstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"integerlistVarRef",pl_buffered, v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"floatlistVarRef",pl_buffered, v_remoteFloatlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"charstringlistVarRef",pl_buffered, v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"statusLEDVarRef",pl_buffered, v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemoteIntRef(v_intVar,pl_parents[0],"intVar",pl_buffered, v_remoteIntSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatRef(v_floatVar,pl_parents[0],"floatVar",pl_buffered, v_remoteFloatSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBoolRef(v_boolVar,pl_parents[0],"boolVar",pl_buffered, v_remoteBoolSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringRef(v_charstringVar,pl_parents[0],"charstringVar",pl_buffered, v_remoteCharstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteOctetstringRef(v_octetstringVar,pl_parents[0],"octetstringVar",pl_buffered, v_remoteOctetstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteHexstringRef(v_hexstringVar,pl_parents[0],"hexstringVar",pl_buffered, v_remoteHexstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBitstringRef(v_bitstringVar,pl_parents[0],"bitstringVar",pl_buffered, v_remoteBitstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteIntegerlistRef(v_integerlistVar,pl_parents[0],"integerlistVar",pl_buffered, v_remoteIntegerlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatlistRef(v_floatlistVar,pl_parents[0],"floatlistVar",pl_buffered, v_remoteFloatlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringlistRef(v_charstringlistVar,pl_parents[0],"charstringlistVar",pl_buffered, v_remoteCharstringlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteStatusLEDValRef(v_statusLEDVar,pl_parents[0],"statusLEDVar",pl_buffered, v_remoteStatusLEDSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
}
//=========================================================================
// Test Functions
//=========================================================================
function f_EPTF_Var_CreateAndModifyTest (in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT -------");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
f_EPTF_Var_newIntRef("intVarRef",v_intVar,v_intVarRefIdx);
vl_intValue := f_EPTF_Var_getIntValue(v_intVarRefIdx);
f_setverdictFail((v_intVar!=1)or(v_intVar!=vl_intValue));
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
vl_intValue := f_EPTF_Var_getIntValue(v_intVarRefIdx);
f_setverdictFail((v_intVar!=2)or(v_intVar!=vl_intValue));
f_EPTF_Var_newInt("intVar",10, v_intVarIdx);
vl_intValue := f_EPTF_Var_getIntValue(v_intVarIdx);
f_setverdictFail((vl_intValue!=10));
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=20});
vl_intValue := f_EPTF_Var_getIntValue(v_intVarIdx);
f_setverdictFail((vl_intValue!=20)or(v_intVar!=2));
f_EPTF_Var_newFloatRef("floatVarRef", v_floatVar,v_floatVarRefIdx);
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarRefIdx);
f_setverdictFail((v_floatVar!=1.0)or(v_floatVar!=vl_floatValue));
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarRefIdx);
f_setverdictFail((v_floatVar!=2.0)or(v_floatVar!=vl_floatValue));
f_EPTF_Var_newFloat("floatVar", 10.0, v_floatVarIdx);
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarIdx);
f_setverdictFail((vl_floatValue!=10.0));
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=20.0});
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarIdx);
f_setverdictFail((vl_floatValue!=20.0)or(v_floatVar!=2.0));
f_EPTF_Var_newBoolRef("boolVarRef", v_boolVar,v_boolVarRefIdx);
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarRefIdx);
f_setverdictFail((v_boolVar!=true)or(v_boolVar!=vl_boolValue));
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarRefIdx);
f_setverdictFail((v_boolVar!=false)or(v_boolVar!=vl_boolValue));
f_EPTF_Var_newBool("boolVar", true, v_boolVarIdx);
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarIdx);
f_setverdictFail((vl_boolValue!=true));
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarIdx);
f_setverdictFail((vl_boolValue!=false)or(v_boolVar!=false));
f_EPTF_Var_newCharstringRef("charstringVarRef", v_charstringVar,v_charstringVarRefIdx);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx);
f_setverdictFail((v_charstringVar!="1.0")or(v_charstringVar!=vl_charstringValue));
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx);
f_setverdictFail((v_charstringVar!="2.0")or(v_charstringVar!=vl_charstringValue));
f_EPTF_Var_newCharstring("charstringVar", "10.0", v_charstringVarIdx);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarIdx);
f_setverdictFail((vl_charstringValue!="10.0"));
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="20.0"});
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarIdx);
f_setverdictFail((vl_charstringValue!="20.0")or(v_charstringVar!="2.0"));
f_EPTF_Var_newOctetstringRef("octetstringVarRef", v_octetstringVar,v_octetstringVarRefIdx);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx);
f_setverdictFail((v_octetstringVar!='01'O)or(v_octetstringVar!=vl_octetstringValue));
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx);
f_setverdictFail((v_octetstringVar!='02'O)or(v_octetstringVar!=vl_octetstringValue));
f_EPTF_Var_newOctetstring("octetstringVar", '10'O, v_octetstringVarIdx);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx);
f_setverdictFail((vl_octetstringValue!='10'O));
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='20'O});
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx);
f_setverdictFail((vl_octetstringValue!='20'O)or(v_octetstringVar!='02'O));
f_EPTF_Var_newHexstringRef("hexstringVarRef", v_hexstringVar,v_hexstringVarRefIdx);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx);
f_setverdictFail((v_hexstringVar!='01'H)or(v_hexstringVar!=vl_hexstringValue));
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx);
f_setverdictFail((v_hexstringVar!='02'H)or(v_hexstringVar!=vl_hexstringValue));
f_EPTF_Var_newHexstring("hexstringVar", '10'H, v_hexstringVarIdx);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarIdx);
f_setverdictFail((vl_hexstringValue!='10'H));
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='20'H});
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarIdx);
f_setverdictFail((vl_hexstringValue!='20'H)or(v_hexstringVar!='02'H));
f_EPTF_Var_newBitstringRef("bitstringVarRef", v_bitstringVar,v_bitstringVarRefIdx);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx);
f_setverdictFail((v_bitstringVar!='01'B)or(v_bitstringVar!=vl_bitstringValue));
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='011'B});
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx);
f_setverdictFail((v_bitstringVar!='011'B)or(v_bitstringVar!=vl_bitstringValue));
f_EPTF_Var_newBitstring("bitstringVar", '10'B, v_bitstringVarIdx);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarIdx);
f_setverdictFail((vl_bitstringValue!='10'B));
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='110'B});
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarIdx);
f_setverdictFail((vl_bitstringValue!='110'B)or(v_bitstringVar!='011'B));
f_EPTF_Var_newIntegerlistRef("integerlistVarRef", v_integerlistVar,v_integerlistVarRefIdx);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx);
f_setverdictFail((v_integerlistVar!={0,1})or(v_integerlistVar!=vl_integerlistValue));
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx);
f_setverdictFail((v_integerlistVar!={0,2})or(v_integerlistVar!=vl_integerlistValue));
f_EPTF_Var_newIntegerlist("integerlistVar", {1,0}, v_integerlistVarIdx);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx);
f_setverdictFail((vl_integerlistValue!={1,0}));
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={2,0}});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx);
f_setverdictFail((vl_integerlistValue!={2,0})or(v_integerlistVar!={0,2}));
f_EPTF_Var_newFloatlistRef("floatlistVarRef", v_floatlistVar,v_floatlistVarRefIdx);
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx);
f_setverdictFail((v_floatlistVar!={0.0,1.0})or(v_floatlistVar!=vl_floatlistValue));
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx);
f_setverdictFail((v_floatlistVar!={0.0,2.0})or(v_floatlistVar!=vl_floatlistValue));
f_EPTF_Var_newFloatlist("floatlistVar", {1.0,0.0}, v_floatlistVarIdx);
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx);
f_setverdictFail((vl_floatlistValue!={1.0,0.0}));
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={2.0,0.0}});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx);
f_setverdictFail((vl_floatlistValue!={2.0,0.0})or(v_floatlistVar!={0.0,2.0}));
f_EPTF_Var_newCharstringlistRef("charstringlistVarRef", v_charstringlistVar,v_charstringlistVarRefIdx);
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx);
f_setverdictFail((v_charstringlistVar!={"0","1"})or(v_charstringlistVar!=vl_charstringlistValue));
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx);
f_setverdictFail((v_charstringlistVar!={"0","2"})or(v_charstringlistVar!=vl_charstringlistValue));
f_EPTF_Var_newCharstringlist("charstringlistVar", {"1","0"}, v_charstringlistVarIdx);
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx);
f_setverdictFail((vl_charstringlistValue!={"1","0"}));
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"2","0"}});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx);
f_setverdictFail((vl_charstringlistValue!={"2","0"})or(v_charstringlistVar!={"0","2"}));
f_EPTF_Var_newStatusLEDRef("statusLEDVarRef", v_statusLEDVar,v_statusLEDVarRefIdx);
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx);
f_setverdictFail((v_statusLEDVar!={led_blue,"1"})or(v_statusLEDVar!=vl_statusLEDValue));
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx);
f_setverdictFail((v_statusLEDVar!={led_black,"2"})or(v_statusLEDVar!=vl_statusLEDValue));
f_EPTF_Var_newStatusLED("statusLEDVar", {led_yellow,"10"}, v_statusLEDVarIdx);
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx);
f_setverdictFail((vl_statusLEDValue!={led_yellow,"10"}));
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_green,"20"}});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx);
f_setverdictFail((vl_statusLEDValue!={led_green,"20"})or(v_statusLEDVar!={led_black,"2"}));
f_EPTF_Base_stop(pass);
}
function f_EPTF_Var_SubscribeTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT -------");
//Create the provider variables
f_initVariables();
//Send ready message to the subscriber component
f_sendstatusPort1(true,pl_parents[0]);
//Waiting for a ready message from the subscriber component
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {}
}
//Modify the values of the provider varibles
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='10'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {}
}
//Send a ready message to the subscriber component
f_sendstatusPort1(true,pl_parents[0]);
//Waiting to exit timeout
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_SubscribeTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents, in EPTF_Var_SubscriptionMode pl_subscriptionMode := realtime) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Waiting to the creation of the provider variables on the provider component
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,pl_subscriptionMode);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {}
}
//Send ready message to the provider component
f_sendstatusPort1(true,pl_parents[0]);
//Waiting for the modification
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Define local variables storing the results of the get methods
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and check the new values of the subscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=3);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=4);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=4.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="4.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='04'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='04'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='10'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,4});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,4.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","4"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_AdjustTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
//Send statusPort1 message after the creation
f_sendstatusPort1(true,pl_parents[0]);
//Waiting for the subscribers
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Define local variables storing the results of the get methods
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and check the values of the variables
vl_intValue := f_EPTF_Var_getIntValue(v_intVarRefIdx);
f_setverdictFail((v_intVar!=2)or(v_intVar!=vl_intValue));
vl_intValue := f_EPTF_Var_getIntValue(v_intVarIdx);
f_setverdictFail((vl_intValue!=3));
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarRefIdx);
f_setverdictFail((v_floatVar!=2.0)or(v_floatVar!=vl_floatValue));
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarIdx);
f_setverdictFail((vl_floatValue!=3.0));
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarRefIdx);
f_setverdictFail((v_boolVar!=false)or(v_boolVar!=vl_boolValue));
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarIdx);
f_setverdictFail((vl_boolValue!=true));
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx);
f_setverdictFail((v_charstringVar!="2.0")or(v_charstringVar!=vl_charstringValue));
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarIdx);
f_setverdictFail((vl_charstringValue!="3.0"));
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx);
f_setverdictFail((v_octetstringVar!='02'O)or(v_octetstringVar!=vl_octetstringValue));
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx);
f_setverdictFail((vl_octetstringValue!='03'O));
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx);
f_setverdictFail((v_hexstringVar!='02'H)or(v_hexstringVar!=vl_hexstringValue));
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarIdx);
f_setverdictFail((vl_hexstringValue!='03'H));
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx);
f_setverdictFail((v_bitstringVar!='11'B)or(v_bitstringVar!=vl_bitstringValue));
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarIdx);
f_setverdictFail((vl_bitstringValue!='10'B));
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx);
f_setverdictFail((v_integerlistVar!={0,2})or(v_integerlistVar!=vl_integerlistValue));
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx);
f_setverdictFail((vl_integerlistValue!={0,3}));
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx);
f_setverdictFail((v_floatlistVar!={0.0,2.0})or(v_floatlistVar!=vl_floatlistValue));
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx);
f_setverdictFail((vl_floatlistValue!={0.0,3.0}));
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx);
f_setverdictFail((v_charstringlistVar!={"0","2"})or(v_charstringlistVar!=vl_charstringlistValue));
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx);
f_setverdictFail((vl_charstringlistValue!={"0","3"}));
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx);
f_setverdictFail((v_statusLEDVar!={led_black,"2"})or(v_statusLEDVar!=vl_statusLEDValue));
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx);
f_setverdictFail((vl_statusLEDValue!={led_blue,"1"}));
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_AdjustTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents, in EPTF_Var_SubscriptionMode pl_subscriptionMode := realtime) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Waiting to the creation of the provider variables on the first component
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,pl_subscriptionMode);
//Adjust the value of the variables
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=true});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='10'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_blue,"1"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {}
}
//Send ready message to the first component
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_UnsubscribeTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
//Send ready message to the second component
f_sendstatusPort1(true,pl_parents[0]);
//Waiting for sync
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Modify the values
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='10'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO REFRESING -------");
}
}
//Send a ready message to the second component
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_UnsubscribeTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Waiting to the creation of the provider variables on the first component
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Unsubscribe from the variables on the first component
f_EPTF_Var_unsubscribe(v_remoteIntSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteFloatSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteBoolSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteCharstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteOctetstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteHexstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteBitstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteFloatlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteIntSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteFloatSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteBoolSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteCharstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteOctetstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteHexstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteBitstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteIntegerlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteFloatlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteCharstringlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteStatusLEDSubscrIdxRef);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {}
}
//Send a ready message to the first component
f_sendstatusPort1(true,pl_parents[0]);
//Waiting to the modification of the local variables on the first component
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=1);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=1);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=1.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=1.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="1.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="1.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_GuardfunctionTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
log("Add guard function to the variables");
f_EPTF_Var_addGuardFn(v_intVarRefIdx,{refers(f_guard_Int),{}});
f_EPTF_Var_addGuardFn(v_floatVarRefIdx,{refers(f_guard_Float),{}});
f_EPTF_Var_addGuardFn(v_boolVarRefIdx,{refers(f_guard_Boolean),{}});
f_EPTF_Var_addGuardFn(v_charstringVarRefIdx,{refers(f_guard_Charstring),{}});
f_EPTF_Var_addGuardFn(v_octetstringVarRefIdx,{refers(f_guard_Octetstring),{}});
f_EPTF_Var_addGuardFn(v_hexstringVarRefIdx,{refers(f_guard_Hexstring),{}});
f_EPTF_Var_addGuardFn(v_bitstringVarRefIdx,{refers(f_guard_Bitstring),{}});
f_EPTF_Var_addGuardFn(v_integerlistVarRefIdx,{refers(f_guard_Integerlist),{}});
f_EPTF_Var_addGuardFn(v_floatlistVarRefIdx,{refers(f_guard_Floatlist),{}});
f_EPTF_Var_addGuardFn(v_charstringlistVarRefIdx,{refers(f_guard_Charstringlist),{}});
f_EPTF_Var_addGuardFn(v_statusLEDVarRefIdx,{refers(f_guard_StatusLED),{}});
f_EPTF_Var_addGuardFn(v_intVarIdx,{refers(f_guard_Int),{}});
f_EPTF_Var_addGuardFn(v_floatVarIdx,{refers(f_guard_Float),{}});
f_EPTF_Var_addGuardFn(v_boolVarIdx,{refers(f_guard_Boolean),{}});
f_EPTF_Var_addGuardFn(v_charstringVarIdx,{refers(f_guard_Charstring),{}});
f_EPTF_Var_addGuardFn(v_octetstringVarIdx,{refers(f_guard_Octetstring),{}});
f_EPTF_Var_addGuardFn(v_hexstringVarIdx,{refers(f_guard_Hexstring),{}});
f_EPTF_Var_addGuardFn(v_bitstringVarIdx,{refers(f_guard_Bitstring),{}});
f_EPTF_Var_addGuardFn(v_integerlistVarIdx,{refers(f_guard_Integerlist),{}});
f_EPTF_Var_addGuardFn(v_floatlistVarIdx,{refers(f_guard_Floatlist),{}});
f_EPTF_Var_addGuardFn(v_charstringlistVarIdx,{refers(f_guard_Charstringlist),{}});
f_EPTF_Var_addGuardFn(v_statusLEDVarIdx,{refers(f_guard_StatusLED),{}});
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
log("Get the modified values");
vl_intValue := f_EPTF_Var_getIntValue(v_intVarRefIdx);
f_setverdictFail(vl_intValue!=1);
vl_intValue := f_EPTF_Var_getIntValue(v_intVarIdx);
f_setverdictFail(vl_intValue!=1);
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarRefIdx);
f_setverdictFail(vl_floatValue!=1.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarIdx);
f_setverdictFail(vl_floatValue!=1.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarRefIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarIdx);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx);
f_setverdictFail(vl_charstringValue!="1.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarIdx);
f_setverdictFail(vl_charstringValue!="1.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarIdx);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarIdx);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
log("Remove the guard functions");
f_EPTF_Var_removeGuardFn(v_intVarRefIdx,{refers(f_guard_Int),{}});
f_EPTF_Var_removeGuardFn(v_floatVarRefIdx,{refers(f_guard_Float),{}});
f_EPTF_Var_removeGuardFn(v_boolVarRefIdx,{refers(f_guard_Boolean),{}});
f_EPTF_Var_removeGuardFn(v_charstringVarRefIdx,{refers(f_guard_Charstring),{}});
f_EPTF_Var_removeGuardFn(v_octetstringVarRefIdx,{refers(f_guard_Octetstring),{}});
f_EPTF_Var_removeGuardFn(v_hexstringVarRefIdx,{refers(f_guard_Hexstring),{}});
f_EPTF_Var_removeGuardFn(v_bitstringVarRefIdx,{refers(f_guard_Bitstring),{}});
f_EPTF_Var_removeGuardFn(v_integerlistVarRefIdx,{refers(f_guard_Integerlist),{}});
f_EPTF_Var_removeGuardFn(v_floatlistVarRefIdx,{refers(f_guard_Floatlist),{}});
f_EPTF_Var_removeGuardFn(v_charstringlistVarRefIdx,{refers(f_guard_Charstringlist),{}});
f_EPTF_Var_removeGuardFn(v_statusLEDVarRefIdx,{refers(f_guard_StatusLED),{}});
f_EPTF_Var_removeGuardFn(v_intVarIdx,{refers(f_guard_Int),{}});
f_EPTF_Var_removeGuardFn(v_floatVarIdx,{refers(f_guard_Float),{}});
f_EPTF_Var_removeGuardFn(v_boolVarIdx,{refers(f_guard_Boolean),{}});
f_EPTF_Var_removeGuardFn(v_charstringVarIdx,{refers(f_guard_Charstring),{}});
f_EPTF_Var_removeGuardFn(v_octetstringVarIdx,{refers(f_guard_Octetstring),{}});
f_EPTF_Var_removeGuardFn(v_hexstringVarIdx,{refers(f_guard_Hexstring),{}});
f_EPTF_Var_removeGuardFn(v_bitstringVarIdx,{refers(f_guard_Bitstring),{}});
f_EPTF_Var_removeGuardFn(v_integerlistVarIdx,{refers(f_guard_Integerlist),{}});
f_EPTF_Var_removeGuardFn(v_floatlistVarIdx,{refers(f_guard_Floatlist),{}});
f_EPTF_Var_removeGuardFn(v_charstringlistVarIdx,{refers(f_guard_Charstringlist),{}});
f_EPTF_Var_removeGuardFn(v_statusLEDVarIdx,{refers(f_guard_StatusLED),{}});
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
vl_intValue := f_EPTF_Var_getIntValue(v_intVarRefIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_intVarIdx);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarRefIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarRefIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarIdx);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarIdx);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_GuardfunctionTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
log("Modify the values");
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='111'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_blue,"1"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=1);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=1);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=1.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=1.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="1.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="1.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Adjust the variables");
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='111'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_black,"2"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_CalculationfunctionTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_CalculationfunctionTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
var integer v_intValue := 1;
var float v_floatValue := 1.0;
var boolean v_boolValue := true;
var charstring v_charstringValue := "1.0";
var octetstring v_octetstringValue := '01'O;
var hexstring v_hexstringValue := '01'H;
var bitstring v_bitstringValue := '01'B;
var EPTF_IntegerList v_integerlistValue := {0,1};
var EPTF_FloatList v_floatlistValue := {0.0,1.0};
var EPTF_CharstringList v_charstringlistValue := {"0","1"};
var EPTF_StatusLED v_statusLEDValue := {led_blue,"1"};
f_EPTF_Var_newInt("intVar",0, v_intVarIdx);
f_EPTF_Var_newIntRef("intVarRef",v_intValue,v_intVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalInt := {calcFn:={
funcRef := refers(f_calculationInt),
argList := {v_remoteIntSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalIntRef := {calcFn:={
funcRef := refers(f_calculationInt),
argList := {v_remoteIntSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_intVarRefIdx,vl_providerLocalInt);
f_setverdictFail((f_EPTF_Var_getIntValue(v_intVarRefIdx)!=2));
f_EPTF_Var_subscribeLocal(v_intVarIdx,vl_providerLocalIntRef);
f_setverdictFail((f_EPTF_Var_getIntValue(v_intVarIdx)!=2));
f_EPTF_Var_newFloat("floatVar", 0.0, v_floatVarIdx);
f_EPTF_Var_newFloatRef("floatVarRef",v_floatValue,v_floatVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalFloat := {calcFn:={
funcRef := refers(f_calculationFloat),
argList := {v_remoteFloatSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalFloatRef := {calcFn:={
funcRef := refers(f_calculationFloat),
argList := {v_remoteFloatSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_floatVarRefIdx,vl_providerLocalFloat);
f_setverdictFail((f_EPTF_Var_getFloatValue(v_floatVarRefIdx)!=2.0));
log("----- FLOATREF ERROR -------",f_EPTF_Var_getFloatValue(v_floatVarRefIdx));
f_EPTF_Var_subscribeLocal(v_floatVarIdx,vl_providerLocalFloatRef);
f_setverdictFail((f_EPTF_Var_getFloatValue(v_floatVarIdx)!=2.0))
log("----- FLOAT ERROR -------",f_EPTF_Var_getFloatValue(v_floatVarIdx));
f_EPTF_Var_newBool("boolVar", false, v_boolVarIdx);
f_EPTF_Var_newBoolRef("boolVarRef", v_boolValue,v_boolVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalBool := {calcFn:={
funcRef := refers(f_calculationBoolean),
argList := {v_remoteBoolSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalBoolRef := {calcFn:={
funcRef := refers(f_calculationBoolean),
argList := {v_remoteBoolSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_boolVarRefIdx,vl_providerLocalBool);
f_setverdictFail((f_EPTF_Var_getBoolValue(v_boolVarRefIdx)!=false));
f_EPTF_Var_subscribeLocal(v_boolVarIdx,vl_providerLocalBoolRef);
f_setverdictFail((f_EPTF_Var_getBoolValue(v_boolVarIdx)!=false));
f_EPTF_Var_newCharstring("charstringVar", "0.0", v_charstringVarIdx);
f_EPTF_Var_newCharstringRef("charstringVarRef", v_charstringValue,v_charstringVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalCharstring := {calcFn:={
funcRef := refers(f_calculationCharstring),
argList := {v_remoteCharstringSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalCharstringRef := {calcFn:={
funcRef := refers(f_calculationCharstring),
argList := {v_remoteCharstringSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_charstringVarRefIdx,vl_providerLocalCharstring);
f_setverdictFail((f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx)!="1.01.0"));
f_EPTF_Var_subscribeLocal(v_charstringVarIdx,vl_providerLocalCharstringRef);
f_setverdictFail((f_EPTF_Var_getCharstringValue(v_charstringVarIdx)!="1.01.0"));
f_EPTF_Var_newOctetstring("octetstringVar", '00'O, v_octetstringVarIdx);
f_EPTF_Var_newOctetstringRef("octetstringVarRef", v_octetstringValue,v_octetstringVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalOctetstring := {calcFn:={
funcRef := refers(f_calculationOctetstring),
argList := {v_remoteOctetstringSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalOctetstringRef := {calcFn:={
funcRef := refers(f_calculationOctetstring),
argList := {v_remoteOctetstringSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_octetstringVarRefIdx,vl_providerLocalOctetstring);
f_setverdictFail((f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx)!='0101'O));
f_EPTF_Var_subscribeLocal(v_octetstringVarIdx,vl_providerLocalOctetstringRef);
f_setverdictFail((f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx)!='0101'O));
f_EPTF_Var_newHexstring("hexstringVar", '00'H, v_hexstringVarIdx);
f_EPTF_Var_newHexstringRef("hexstringVarRef", v_hexstringValue,v_hexstringVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalHexstring := {calcFn:={
funcRef := refers(f_calculationHexstring),
argList := {v_remoteHexstringSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalHexstringRef := {calcFn:={
funcRef := refers(f_calculationHexstring),
argList := {v_remoteHexstringSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_hexstringVarRefIdx,vl_providerLocalHexstring);
f_setverdictFail((f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx)!='0101'H));
f_EPTF_Var_subscribeLocal(v_hexstringVarIdx,vl_providerLocalHexstringRef);
f_setverdictFail((f_EPTF_Var_getHexstringValue(v_hexstringVarIdx)!='0101'H));
f_EPTF_Var_newBitstring("bitstringVar", '00'B, v_bitstringVarIdx);
f_EPTF_Var_newBitstringRef("bitstringVarRef", v_bitstringValue,v_bitstringVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalBitstring := {calcFn:={
funcRef := refers(f_calculationBitstring),
argList := {v_remoteBitstringSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalBitstringRef := {calcFn:={
funcRef := refers(f_calculationBitstring),
argList := {v_remoteBitstringSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_bitstringVarRefIdx,vl_providerLocalBitstring);
f_setverdictFail((f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx)!='0101'B));
f_EPTF_Var_subscribeLocal(v_bitstringVarIdx,vl_providerLocalBitstringRef);
f_setverdictFail((f_EPTF_Var_getBitstringValue(v_bitstringVarIdx)!='0101'B));
f_EPTF_Var_newIntegerlist("integerlistVar", {0,2}, v_integerlistVarIdx);
f_EPTF_Var_newIntegerlistRef("integerlistVarRef", v_integerlistValue,v_integerlistVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalIntegerlist := {calcFn:={
funcRef := refers(f_calculationIntegerlist),
argList := {v_remoteIntegerlistSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalIntegerlistRef := {calcFn:={
funcRef := refers(f_calculationIntegerlist),
argList := {v_remoteIntegerlistSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_integerlistVarRefIdx,vl_providerLocalIntegerlist);
f_setverdictFail((f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx)!={0,1}));
f_EPTF_Var_subscribeLocal(v_integerlistVarIdx,vl_providerLocalIntegerlistRef);
f_setverdictFail((f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx)!={0,1}));
f_EPTF_Var_newFloatlist("floatlistVar", {0.0,2.0}, v_floatlistVarIdx);
f_EPTF_Var_newFloatlistRef("FloatlistVarRef", v_floatlistValue,v_floatlistVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalFloatlist := {calcFn:={
funcRef := refers(f_calculationFloatlist),
argList := {v_remoteFloatlistSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalFloatlistRef := {calcFn:={
funcRef := refers(f_calculationFloatlist),
argList := {v_remoteFloatlistSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_floatlistVarRefIdx,vl_providerLocalFloatlist);
f_setverdictFail((f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx)!={0.0,1.0}));
f_EPTF_Var_subscribeLocal(v_floatlistVarIdx,vl_providerLocalFloatlistRef);
f_setverdictFail((f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx)!={0.0,1.0}));
f_EPTF_Var_newCharstringlist("charstringlistVar", {"0","2"}, v_charstringlistVarIdx);
f_EPTF_Var_newCharstringlistRef("charstringlistVarRef", v_charstringlistValue,v_charstringlistVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalCharstringlist := {calcFn:={
funcRef := refers(f_calculationCharstringlist),
argList := {v_remoteCharstringlistSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalCharstringlistRef := {calcFn:={
funcRef := refers(f_calculationCharstringlist),
argList := {v_remoteCharstringlistSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_charstringlistVarRefIdx,vl_providerLocalCharstringlist);
f_setverdictFail((f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx)!={"0","1"}));
f_EPTF_Var_subscribeLocal(v_charstringlistVarIdx,vl_providerLocalCharstringlistRef);
f_setverdictFail((f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx)!={"0","1"}));
f_EPTF_Var_newStatusLED("statusLEDVar", {led_black,"2"}, v_statusLEDVarIdx);
f_EPTF_Var_newStatusLEDRef("statusLEDVarRef", v_statusLEDValue,v_statusLEDVarRefIdx);
var EPTF_Var_ProviderLocal vl_providerLocalStatusLED := {calcFn:={
funcRef := refers(f_calculationStatusLED),
argList := {v_remoteStatusLEDSubscrIdx},
nonVarArgList := {}
}};
var EPTF_Var_ProviderLocal vl_providerLocalStatusLEDRef := {calcFn:={
funcRef := refers(f_calculationStatusLED),
argList := {v_remoteStatusLEDSubscrIdxRef},
nonVarArgList := {}
}};
f_EPTF_Var_subscribeLocal(v_statusLEDVarRefIdx,vl_providerLocalStatusLED);
f_setverdictFail((f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx)!={led_blue,"1"}));
f_EPTF_Var_subscribeLocal(v_statusLEDVarIdx,vl_providerLocalStatusLEDRef);
f_setverdictFail((f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx)!={led_blue,"1"}));
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_PostprocfunctionTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_EPTF_Var_addPostProcFn(v_intVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_floatVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_boolVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_charstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_octetstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_hexstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_bitstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_integerlistVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_floatlistVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_charstringlistVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_statusLEDVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_intVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_floatVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_boolVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_charstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_octetstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_hexstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_bitstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_integerlistVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_floatlistVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_charstringlistVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_addPostProcFn(v_statusLEDVarIdx, {refers(f_postProc_incrementValue),{}});
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
if (v_inc != 22) {setverdict(fail)}
f_EPTF_Var_removePostProcFn(v_intVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_floatVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_boolVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_charstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_octetstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_hexstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_bitstringVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_integerlistVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_floatlistVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_charstringlistVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_statusLEDVarRefIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_intVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_floatVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_boolVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_charstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_octetstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_hexstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_bitstringVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_integerlistVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_floatlistVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_charstringlistVarIdx, {refers(f_postProc_incrementValue),{}});
f_EPTF_Var_removePostProcFn(v_statusLEDVarIdx, {refers(f_postProc_incrementValue),{}});
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
if (v_inc != 22) {setverdict(fail)}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_PostprocfunctionTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
log("Modify the values");
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_black,"2"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=true});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='10'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=true});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='10'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_blue,"1"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_BufferedVariableTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_setSyncInterval(0.4);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='1111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='10'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=5});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=5.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="5.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='05'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='05'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,5}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,5.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","5"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_BufferedVariableTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents, timeLine);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=3);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=5);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=5.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="5.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='05'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='05'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='10'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,5});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,5.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","5"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
var EPTF_Var_TimeLine vl_timeLine;
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_LongBufferedVariableTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_setSyncInterval(0.9);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
for(var integer i:=2; i<=650; i := i +1){
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=i});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=i-1});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=int2float(i)});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=int2float(i-1)});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:=int2oct(i,6)});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:=int2oct(i-1,6)});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:=int2hex(i,6)});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:=int2hex(i-1,6)});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,i}});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,i-1}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,int2float(i)}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,int2float(i-1)}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0",int2str(i)}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0",int2str(i-1)}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
}
for(var integer i:=2; i<=127; i := i +1){
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:=int2char(i)});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:=int2char(i-1)});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:=int2bit(i,8)});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:=int2bit(i-1,8)});
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
}
timer T_WAIT2 := 16.0;
T_WAIT2.start;
alt {
[] T_WAIT2.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_LongBufferedVariableTest_SubscriberComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,timeLine);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=650);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=649);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=int2float(650));
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=int2float(649));
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!=int2char(127));
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!=int2char(126));
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!=int2oct(650,6));
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!=int2oct(649,6));
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!=int2hex(650,6));
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!=int2hex(649,6));
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!=int2bit(127,8));
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!=int2bit(126,8));
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,650});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,649});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,650.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,649.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","650"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","649"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
var EPTF_Var_TimeLine vl_timeLine;
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=126);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=126);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=126);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=126);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=649);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexSubscribeTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexSubscribeTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_sendstatusPort2(true,pl_parents[1]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexSubscribeTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"intVarRef",realtime, v_remoteIntSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatVarRef",realtime, v_remoteFloatSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"boolVarRef",realtime, v_remoteBoolSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringVarRef",realtime, v_remoteCharstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"octetstringVarRef",realtime, v_remoteOctetstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"hexstringVarRef",realtime, v_remoteHexstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"bitstringVarRef",realtime, v_remoteBitstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"integerlistVarRef",realtime, v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatlistVarRef",realtime, v_remoteFloatlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringlistVarRef",realtime, v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"statusLEDVarRef",realtime, v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemoteIntRef(v_intVar,pl_parents[0],"test1."&"intVar",realtime, v_remoteIntSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatRef(v_floatVar,pl_parents[0],"test1."&"floatVar",realtime, v_remoteFloatSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBoolRef(v_boolVar,pl_parents[0],"test1."&"boolVar",realtime, v_remoteBoolSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringRef(v_charstringVar,pl_parents[0],"test1."&"charstringVar",realtime, v_remoteCharstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteOctetstringRef(v_octetstringVar,pl_parents[0],"test1."&"octetstringVar",realtime, v_remoteOctetstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteHexstringRef(v_hexstringVar,pl_parents[0],"test1."&"hexstringVar",realtime, v_remoteHexstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBitstringRef(v_bitstringVar,pl_parents[0],"test1."&"bitstringVar",realtime, v_remoteBitstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteIntegerlistRef(v_integerlistVar,pl_parents[0],"test1."&"integerlistVar",realtime, v_remoteIntegerlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatlistRef(v_floatlistVar,pl_parents[0],"test1."&"floatlistVar",realtime, v_remoteFloatlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringlistRef(v_charstringlistVar,pl_parents[0],"test1."&"charstringlistVar",realtime, v_remoteCharstringlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteStatusLEDValRef(v_statusLEDVar,pl_parents[0],"test1."&"statusLEDVar",realtime, v_remoteStatusLEDSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexAdjustTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and check the values of the variables
vl_intValue := f_EPTF_Var_getIntValue(v_intVarRefIdx);
f_setverdictFail((v_intVar!=2)or(v_intVar!=vl_intValue));
vl_intValue := f_EPTF_Var_getIntValue(v_intVarIdx);
f_setverdictFail((vl_intValue!=3));
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarRefIdx);
f_setverdictFail((v_floatVar!=2.0)or(v_floatVar!=vl_floatValue));
vl_floatValue := f_EPTF_Var_getFloatValue(v_floatVarIdx);
f_setverdictFail((vl_floatValue!=3.0));
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarRefIdx);
f_setverdictFail((v_boolVar!=false)or(v_boolVar!=vl_boolValue));
vl_boolValue := f_EPTF_Var_getBoolValue(v_boolVarIdx);
f_setverdictFail((vl_boolValue!=true));
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarRefIdx);
f_setverdictFail((v_charstringVar!="2.0")or(v_charstringVar!=vl_charstringValue));
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_charstringVarIdx);
f_setverdictFail((vl_charstringValue!="3.0"));
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarRefIdx);
f_setverdictFail((v_octetstringVar!='02'O)or(v_octetstringVar!=vl_octetstringValue));
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_octetstringVarIdx);
f_setverdictFail((vl_octetstringValue!='03'O));
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarRefIdx);
f_setverdictFail((v_hexstringVar!='02'H)or(v_hexstringVar!=vl_hexstringValue));
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_hexstringVarIdx);
f_setverdictFail((vl_hexstringValue!='03'H));
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarRefIdx);
f_setverdictFail((v_bitstringVar!='11'B)or(v_bitstringVar!=vl_bitstringValue));
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_bitstringVarIdx);
f_setverdictFail((vl_bitstringValue!='111'B));
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarRefIdx);
f_setverdictFail((v_integerlistVar!={0,2})or(v_integerlistVar!=vl_integerlistValue));
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_integerlistVarIdx);
f_setverdictFail((vl_integerlistValue!={0,3}));
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarRefIdx);
f_setverdictFail((v_floatlistVar!={0.0,2.0})or(v_floatlistVar!=vl_floatlistValue));
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_floatlistVarIdx);
f_setverdictFail((vl_floatlistValue!={0.0,3.0}));
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarRefIdx);
f_setverdictFail((v_charstringlistVar!={"0","2"})or(v_charstringlistVar!=vl_charstringlistValue));
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_charstringlistVarIdx);
f_setverdictFail((vl_charstringlistValue!={"0","3"}));
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarRefIdx);
f_setverdictFail((v_statusLEDVar!={led_black,"2"})or(v_statusLEDVar!=vl_statusLEDValue));
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_statusLEDVarIdx);
f_setverdictFail((vl_statusLEDValue!={led_blue,"1"}));
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexAdjustTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexAdjustTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"intVarRef",realtime, v_remoteIntSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatVarRef",realtime, v_remoteFloatSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"boolVarRef",realtime, v_remoteBoolSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringVarRef",realtime, v_remoteCharstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"octetstringVarRef",realtime, v_remoteOctetstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"hexstringVarRef",realtime, v_remoteHexstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"bitstringVarRef",realtime, v_remoteBitstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"integerlistVarRef",realtime, v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatlistVarRef",realtime, v_remoteFloatlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringlistVarRef",realtime, v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"statusLEDVarRef",realtime, v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemoteIntRef(v_intVar,pl_parents[0],"test1."&"intVar",realtime, v_remoteIntSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatRef(v_floatVar,pl_parents[0],"test1."&"floatVar",realtime, v_remoteFloatSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBoolRef(v_boolVar,pl_parents[0],"test1."&"boolVar",realtime, v_remoteBoolSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringRef(v_charstringVar,pl_parents[0],"test1."&"charstringVar",realtime, v_remoteCharstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteOctetstringRef(v_octetstringVar,pl_parents[0],"test1."&"octetstringVar",realtime, v_remoteOctetstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteHexstringRef(v_hexstringVar,pl_parents[0],"test1."&"hexstringVar",realtime, v_remoteHexstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBitstringRef(v_bitstringVar,pl_parents[0],"test1."&"bitstringVar",realtime, v_remoteBitstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteIntegerlistRef(v_integerlistVar,pl_parents[0],"test1."&"integerlistVar",realtime, v_remoteIntegerlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatlistRef(v_floatlistVar,pl_parents[0],"test1."&"floatlistVar",realtime, v_remoteFloatlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringlistRef(v_charstringlistVar,pl_parents[0],"test1."&"charstringlistVar",realtime, v_remoteCharstringlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteStatusLEDValRef(v_statusLEDVar,pl_parents[0],"test1."&"statusLEDVar",realtime, v_remoteStatusLEDSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
log("Modify the values");
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=true});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='111'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_blue,"1"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexBufferedVariableTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_setSyncInterval(0.4);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='1111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='10'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=5});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=5.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="5.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='05'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='05'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,5}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,5.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","5"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexBufferedVariableTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,timeLine);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort2(true,pl_parents[1]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexBufferedVariableTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"intVarRef",realtime, v_remoteIntSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatVarRef",realtime, v_remoteFloatSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"boolVarRef",realtime, v_remoteBoolSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringVarRef",realtime, v_remoteCharstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"octetstringVarRef",realtime, v_remoteOctetstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"hexstringVarRef",realtime, v_remoteHexstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"bitstringVarRef",realtime, v_remoteBitstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"integerlistVarRef",realtime, v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatlistVarRef",realtime, v_remoteFloatlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringlistVarRef",realtime, v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"statusLEDVarRef",realtime, v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemoteIntRef(v_intVar,pl_parents[0],"test1."&"intVar",realtime, v_remoteIntSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatRef(v_floatVar,pl_parents[0],"test1."&"floatVar",realtime, v_remoteFloatSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBoolRef(v_boolVar,pl_parents[0],"test1."&"boolVar",realtime, v_remoteBoolSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringRef(v_charstringVar,pl_parents[0],"test1."&"charstringVar",realtime, v_remoteCharstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteOctetstringRef(v_octetstringVar,pl_parents[0],"test1."&"octetstringVar",realtime, v_remoteOctetstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteHexstringRef(v_hexstringVar,pl_parents[0],"test1."&"hexstringVar",realtime, v_remoteHexstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBitstringRef(v_bitstringVar,pl_parents[0],"test1."&"bitstringVar",realtime, v_remoteBitstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteIntegerlistRef(v_integerlistVar,pl_parents[0],"test1."&"integerlistVar",realtime, v_remoteIntegerlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatlistRef(v_floatlistVar,pl_parents[0],"test1."&"floatlistVar",realtime, v_remoteFloatlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringlistRef(v_charstringlistVar,pl_parents[0],"test1."&"charstringlistVar",realtime, v_remoteCharstringlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteStatusLEDValRef(v_statusLEDVar,pl_parents[0],"test1."&"statusLEDVar",realtime, v_remoteStatusLEDSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=3);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=5);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=5.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="5.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='05'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='05'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='10'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,5});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,5.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","5"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexDoubleBufferedVariableTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_setSyncInterval(0.4);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='1111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='10'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=5});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=5.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="5.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='05'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='05'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,5}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,5.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","5"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexDoubleBufferedVariableTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_setSyncInterval(0.4);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,timeLine);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort2(true,pl_parents[1]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexDoubleBufferedVariableTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"intVarRef",timeLine, v_remoteIntSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatVarRef",timeLine, v_remoteFloatSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"boolVarRef",timeLine, v_remoteBoolSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringVarRef",timeLine, v_remoteCharstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"octetstringVarRef",timeLine, v_remoteOctetstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"hexstringVarRef",timeLine, v_remoteHexstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"bitstringVarRef",timeLine, v_remoteBitstringSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"integerlistVarRef",timeLine, v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"floatlistVarRef",timeLine, v_remoteFloatlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"charstringlistVarRef",timeLine, v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemote(pl_parents[0],"test1."&"statusLEDVarRef",timeLine, v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET -------");
f_EPTF_Var_subscribeRemoteIntRef(v_intVar,pl_parents[0],"test1."&"intVar",timeLine, v_remoteIntSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatRef(v_floatVar,pl_parents[0],"test1."&"floatVar",timeLine, v_remoteFloatSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBoolRef(v_boolVar,pl_parents[0],"test1."&"boolVar",timeLine, v_remoteBoolSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringRef(v_charstringVar,pl_parents[0],"test1."&"charstringVar",timeLine, v_remoteCharstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteOctetstringRef(v_octetstringVar,pl_parents[0],"test1."&"octetstringVar",timeLine, v_remoteOctetstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteHexstringRef(v_hexstringVar,pl_parents[0],"test1."&"hexstringVar",timeLine, v_remoteHexstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteBitstringRef(v_bitstringVar,pl_parents[0],"test1."&"bitstringVar",timeLine, v_remoteBitstringSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteIntegerlistRef(v_integerlistVar,pl_parents[0],"test1."&"integerlistVar",timeLine, v_remoteIntegerlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteFloatlistRef(v_floatlistVar,pl_parents[0],"test1."&"floatlistVar",timeLine, v_remoteFloatlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteCharstringlistRef(v_charstringlistVar,pl_parents[0],"test1."&"charstringlistVar",timeLine, v_remoteCharstringlistSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
f_EPTF_Var_subscribeRemoteStatusLEDValRef(v_statusLEDVar,pl_parents[0],"test1."&"statusLEDVar",timeLine, v_remoteStatusLEDSubscrIdxRef,"");
f_EPTF_Var_CT_LogAll("----- REMOTE PROVIDER SET FOR REF -------");
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=3);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=5);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=5.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="5.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='05'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='05'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='10'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,5});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,5.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","5"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
var EPTF_Var_TimeLine vl_timeLine;
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelAdjustTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelAdjustTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Adjust the value of the variables
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdx,{intVal:=2});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdx,{floatVal:=2.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdx,{boolVal:=false});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdx,{charstringVal:="2.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdx,{octetstringVal:='02'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdx,{hexstringVal:='02'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdx,{bitstringVal:='11'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdx,{integerlistVal:={0,2}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_adjustContent(v_remoteIntSubscrIdxRef,{intVal:=3});
f_EPTF_Var_adjustContent(v_remoteFloatSubscrIdxRef,{floatVal:=3.0});
f_EPTF_Var_adjustContent(v_remoteBoolSubscrIdxRef,{boolVal:=true});
f_EPTF_Var_adjustContent(v_remoteCharstringSubscrIdxRef,{charstringVal:="3.0"});
f_EPTF_Var_adjustContent(v_remoteOctetstringSubscrIdxRef,{octetstringVal:='03'O});
f_EPTF_Var_adjustContent(v_remoteHexstringSubscrIdxRef,{hexstringVal:='03'H});
f_EPTF_Var_adjustContent(v_remoteBitstringSubscrIdxRef,{bitstringVal:='111'B});
f_EPTF_Var_adjustContent(v_remoteIntegerlistSubscrIdxRef,{integerlistVal:={0,3}});
f_EPTF_Var_adjustContent(v_remoteFloatlistSubscrIdxRef,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_adjustContent(v_remoteCharstringlistSubscrIdxRef,{charstringlistVal:={"0","3"}});
f_EPTF_Var_adjustContent(v_remoteStatusLEDSubscrIdxRef,{statusLEDVal:={led_blue,"1"}});
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelAdjustTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelSubscribeTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelSubscribeTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelSubscribeTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelUnsubscribeTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='1111'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=5});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=5.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="5.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='05'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='05'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,5}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,5.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","5"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelUnsubscribeTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
//Unsubscribe from the variables on the first component
f_EPTF_Var_unsubscribe(v_remoteIntSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteFloatSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteBoolSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteCharstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteOctetstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteHexstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteBitstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteFloatlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteIntSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteFloatSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteBoolSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteCharstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteOctetstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteHexstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteBitstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteIntegerlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteFloatlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteCharstringlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteStatusLEDSubscrIdxRef);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=2);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=3);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=2.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=3.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=false);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="2.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="3.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='02'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='02'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='11'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,2});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,2.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","2"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelUnsubscribeTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
//Unsubscribe from the variables on the first component
f_EPTF_Var_unsubscribe(v_remoteIntSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteFloatSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteBoolSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteCharstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteOctetstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteHexstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteBitstringSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteFloatlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_unsubscribe(v_remoteIntSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteFloatSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteBoolSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteCharstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteOctetstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteHexstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteBitstringSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteIntegerlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteFloatlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteCharstringlistSubscrIdxRef);
f_EPTF_Var_unsubscribe(v_remoteStatusLEDSubscrIdxRef);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=1);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=1);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=1.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=1.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=true);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="1.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="1.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='01'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='01'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='01'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,1});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,1.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
//Re-Subscribe
f_EPTF_Var_resubscribeRemote(pl_parents[0],"intVarRef",realtime, v_remoteIntSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"floatVarRef",realtime, v_remoteFloatSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"boolVarRef",realtime, v_remoteBoolSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"charstringVarRef",realtime, v_remoteCharstringSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"octetstringVarRef",realtime, v_remoteOctetstringSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"hexstringVarRef",realtime, v_remoteHexstringSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"bitstringVarRef",realtime, v_remoteBitstringSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"integerlistVarRef",realtime, v_remoteIntegerlistSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"floatlistVarRef",realtime, v_remoteFloatlistSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"charstringlistVarRef",realtime, v_remoteCharstringlistSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"statusLEDVarRef",realtime, v_remoteStatusLEDSubscrIdx);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"intVar",realtime, v_remoteIntSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"floatVar",realtime, v_remoteFloatSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"boolVar",realtime, v_remoteBoolSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"charstringVar",realtime, v_remoteCharstringSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"octetstringVar",realtime, v_remoteOctetstringSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"hexstringVar",realtime, v_remoteHexstringSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"bitstringVar",realtime, v_remoteBitstringSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"integerlistVar",realtime, v_remoteIntegerlistSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"floatlistVar",realtime, v_remoteFloatlistSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"charstringlistVar",realtime, v_remoteCharstringlistSubscrIdxRef);
f_EPTF_Var_resubscribeRemote(pl_parents[0],"statusLEDVar",realtime, v_remoteStatusLEDSubscrIdxRef);
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Get and Check the values of the unsubscribed variables
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=4);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=5);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=4.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=5.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="4.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="5.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='04'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='05'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='04'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='05'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='1111'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,4});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,5});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,4.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,5.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","4"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","5"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelBufferedTest_ProviderComponent(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_setSyncInterval(0.4);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
//Create the provider variables
f_initVariables();
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=2});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=2.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="2.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='02'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='02'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='11'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,2}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,2.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","2"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_black,"2"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=4});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=4.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="4.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='04'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='04'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='1111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,4}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,4.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","4"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_blue,"1"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
log("Modify the values");
f_EPTF_Var_setContent(v_intVarRefIdx,{intVal:=3});
f_EPTF_Var_setContent(v_floatVarRefIdx,{floatVal:=3.0});
f_EPTF_Var_setContent(v_boolVarRefIdx,{boolVal:=true});
f_EPTF_Var_setContent(v_charstringVarRefIdx,{charstringVal:="3.0"});
f_EPTF_Var_setContent(v_octetstringVarRefIdx,{octetstringVal:='03'O});
f_EPTF_Var_setContent(v_hexstringVarRefIdx,{hexstringVal:='03'H});
f_EPTF_Var_setContent(v_bitstringVarRefIdx,{bitstringVal:='10'B});
f_EPTF_Var_setContent(v_integerlistVarRefIdx,{integerlistVal:={0,3}});
f_EPTF_Var_setContent(v_floatlistVarRefIdx,{floatlistVal:={0.0,3.0}});
f_EPTF_Var_setContent(v_charstringlistVarRefIdx,{charstringlistVal:={"0","3"}});
f_EPTF_Var_setContent(v_statusLEDVarRefIdx,{statusLEDVal:={led_blue,"1"}});
f_EPTF_Var_setContent(v_intVarIdx,{intVal:=5});
f_EPTF_Var_setContent(v_floatVarIdx,{floatVal:=5.0});
f_EPTF_Var_setContent(v_boolVarIdx,{boolVal:=false});
f_EPTF_Var_setContent(v_charstringVarIdx,{charstringVal:="5.0"});
f_EPTF_Var_setContent(v_octetstringVarIdx,{octetstringVal:='05'O});
f_EPTF_Var_setContent(v_hexstringVarIdx,{hexstringVal:='05'H});
f_EPTF_Var_setContent(v_bitstringVarIdx,{bitstringVal:='11111'B});
f_EPTF_Var_setContent(v_integerlistVarIdx,{integerlistVal:={0,5}});
f_EPTF_Var_setContent(v_floatlistVarIdx,{floatlistVal:={0.0,5.0}});
f_EPTF_Var_setContent(v_charstringlistVarIdx,{charstringlistVal:={"0","5"}});
f_EPTF_Var_setContent(v_statusLEDVarIdx,{statusLEDVal:={led_black,"2"}});
log("Send the modification");
f_EPTF_Var_refreshContent(v_intVarRefIdx);
f_EPTF_Var_refreshContent(v_floatVarRefIdx);
f_EPTF_Var_refreshContent(v_boolVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringVarRefIdx);
f_EPTF_Var_refreshContent(v_octetstringVarRefIdx);
f_EPTF_Var_refreshContent(v_hexstringVarRefIdx);
f_EPTF_Var_refreshContent(v_bitstringVarRefIdx);
f_EPTF_Var_refreshContent(v_integerlistVarRefIdx);
f_EPTF_Var_refreshContent(v_floatlistVarRefIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarRefIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarRefIdx);
f_EPTF_Var_refreshContent(v_intVarIdx);
f_EPTF_Var_refreshContent(v_floatVarIdx);
f_EPTF_Var_refreshContent(v_boolVarIdx);
f_EPTF_Var_refreshContent(v_charstringVarIdx);
f_EPTF_Var_refreshContent(v_octetstringVarIdx);
f_EPTF_Var_refreshContent(v_hexstringVarIdx);
f_EPTF_Var_refreshContent(v_bitstringVarIdx);
f_EPTF_Var_refreshContent(v_integerlistVarIdx);
f_EPTF_Var_refreshContent(v_floatlistVarIdx);
f_EPTF_Var_refreshContent(v_charstringlistVarIdx);
f_EPTF_Var_refreshContent(v_statusLEDVarIdx);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
f_sendstatusPort2(true,pl_parents[1]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort2.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelBufferedTest_SubscriberComponent1(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,timeLine);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=3);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=5);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=5.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="5.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='05'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='05'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='10'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,5});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,5.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","5"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
var EPTF_Var_TimeLine vl_timeLine;
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBoolSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteOctetstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteHexstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteBitstringSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteIntegerlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteFloatlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteCharstringlistSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdx, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_EPTF_Var_getTimeLine(v_remoteStatusLEDSubscrIdxRef, vl_timeLine);
f_setverdictFail(vl_timeLine.size!=2);
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_complexParalelBufferedTest_SubscriberComponent2(in charstring pl_selfName, in VariableTest_CT_List pl_parents) runs on VariableTest_CT
{
//Initialize the Component
f_EPTF_Var_CT_LogAll("----- START -------");
f_EPTF_Var_init_CT(pl_selfName);
f_EPTF_Var_CT_LogAll("----- INIT statusPort1 -------");
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
//Subscribe to the variables on the provider component
f_subscribeVariables(pl_parents,realtime);
//Waiting for sync
T_WAIT.start;
alt {
[] T_WAIT.timeout {
f_EPTF_Var_CT_LogAll("----- WAIT TO EXIT TIMEOUT -------");
}
}
f_sendstatusPort1(true,pl_parents[0]);
T_WAITResp.start;
alt {
[] T_WAITResp.timeout {}
[] statusPort1.receive(true) {f_EPTF_Var_CT_LogAll("Next Step"); T_WAITResp.stop; }
}
log("Get the modified values");
var integer vl_intValue;
var float vl_floatValue;
var boolean vl_boolValue;
var charstring vl_charstringValue;
var octetstring vl_octetstringValue;
var hexstring vl_hexstringValue;
var bitstring vl_bitstringValue;
var EPTF_IntegerList vl_integerlistValue;
var EPTF_FloatList vl_floatlistValue;
var EPTF_CharstringList vl_charstringlistValue;
var EPTF_StatusLED vl_statusLEDValue;
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdx);
f_setverdictFail(vl_intValue!=3);
vl_intValue := f_EPTF_Var_getIntValue(v_remoteIntSubscrIdxRef);
f_setverdictFail(vl_intValue!=5);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdx);
f_setverdictFail(vl_floatValue!=3.0);
vl_floatValue := f_EPTF_Var_getFloatValue(v_remoteFloatSubscrIdxRef);
f_setverdictFail(vl_floatValue!=5.0);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdx);
f_setverdictFail(vl_boolValue!=true);
vl_boolValue := f_EPTF_Var_getBoolValue(v_remoteBoolSubscrIdxRef);
f_setverdictFail(vl_boolValue!=false);
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdx);
f_setverdictFail(vl_charstringValue!="3.0");
vl_charstringValue := f_EPTF_Var_getCharstringValue(v_remoteCharstringSubscrIdxRef);
f_setverdictFail(vl_charstringValue!="5.0");
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdx);
f_setverdictFail(vl_octetstringValue!='03'O);
vl_octetstringValue := f_EPTF_Var_getOctetstringValue(v_remoteOctetstringSubscrIdxRef);
f_setverdictFail(vl_octetstringValue!='05'O);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdx);
f_setverdictFail(vl_hexstringValue!='03'H);
vl_hexstringValue := f_EPTF_Var_getHexstringValue(v_remoteHexstringSubscrIdxRef);
f_setverdictFail(vl_hexstringValue!='05'H);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdx);
f_setverdictFail(vl_bitstringValue!='10'B);
vl_bitstringValue := f_EPTF_Var_getBitstringValue(v_remoteBitstringSubscrIdxRef);
f_setverdictFail(vl_bitstringValue!='11111'B);
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdx);
f_setverdictFail(vl_integerlistValue!={0,3});
vl_integerlistValue := f_EPTF_Var_getIntegerlistValue(v_remoteIntegerlistSubscrIdxRef);
f_setverdictFail(vl_integerlistValue!={0,5});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdx);
f_setverdictFail(vl_floatlistValue!={0.0,3.0});
vl_floatlistValue := f_EPTF_Var_getFloatlistValue(v_remoteFloatlistSubscrIdxRef);
f_setverdictFail(vl_floatlistValue!={0.0,5.0});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdx);
f_setverdictFail(vl_charstringlistValue!={"0","3"});
vl_charstringlistValue := f_EPTF_Var_getCharstringlistValue(v_remoteCharstringlistSubscrIdxRef);
f_setverdictFail(vl_charstringlistValue!={"0","5"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdx);
f_setverdictFail(vl_statusLEDValue!={led_blue,"1"});
vl_statusLEDValue := f_EPTF_Var_getStatusLEDValue(v_remoteStatusLEDSubscrIdxRef);
f_setverdictFail(vl_statusLEDValue!={led_black,"2"});
f_sendstatusPort1(true,pl_parents[0]);
f_EPTF_Base_cleanup_CT();
setverdict(pass);
}
function f_EPTF_Var_SimpleHashMap() runs on VariableTest_CT
{
//Create the provider variables
f_initVariables();
//Test the not reference type variables
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("intVar"))!="intVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("floatVar"))!="floatVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("boolVar"))!="boolVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("charstringVar"))!="charstringVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("octetstringVar"))!="octetstringVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("hexstringVar"))!="hexstringVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("bitstringVar"))!="bitstringVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("integerlistVar"))!="integerlistVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("floatlistVar"))!="floatlistVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("charstringlistVar"))!="charstringlistVar");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("statusLEDVar"))!="statusLEDVar");
//Test the reference type variables
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("intVarRef"))!="intVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("floatVarRef"))!="floatVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("boolVarRef"))!="boolVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("charstringVarRef"))!="charstringVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("octetstringVarRef"))!="octetstringVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("hexstringVarRef"))!="hexstringVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("bitstringVarRef"))!="bitstringVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("integerlistVarRef"))!="integerlistVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("floatlistVarRef"))!="floatlistVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("charstringlistVarRef"))!="charstringlistVarRef");
f_setverdictFail(f_EPTF_Var_getName(f_EPTF_Var_getId("statusLEDVarRef"))!="statusLEDVarRef");
f_setverdictFail(f_EPTF_Var_intCompRef2Id(v_intVar)!=v_intVarRefIdx);
f_setverdictFail(f_EPTF_Var_floatCompRef2Id(v_floatVar)!=v_floatVarRefIdx);
f_setverdictFail(f_EPTF_Var_boolCompRef2Id(v_boolVar)!=v_boolVarRefIdx);
f_setverdictFail(f_EPTF_Var_charstringCompRef2Id(v_charstringVar)!=v_charstringVarRefIdx);
f_setverdictFail(f_EPTF_Var_octetstringCompRef2Id(v_octetstringVar)!=v_octetstringVarRefIdx);
f_setverdictFail(f_EPTF_Var_hexstringCompRef2Id(v_hexstringVar)!=v_hexstringVarRefIdx);
f_setverdictFail(f_EPTF_Var_bitstringCompRef2Id(v_bitstringVar)!=v_bitstringVarRefIdx);
f_setverdictFail(f_EPTF_Var_integerlistCompRef2Id(v_integerlistVar)!=v_integerlistVarRefIdx);
f_setverdictFail(f_EPTF_Var_floatlistCompRef2Id(v_floatlistVar)!=v_floatlistVarRefIdx);
f_setverdictFail(f_EPTF_Var_charstringlistCompRef2Id(v_charstringlistVar)!=v_charstringlistVarRefIdx);
f_setverdictFail(f_EPTF_Var_statusLEDCompRef2Id(v_statusLEDVar)!=v_statusLEDVarRefIdx);
setverdict(pass);
}
function f_EPTF_Var_Test_remoteIntSubscr_PostProc(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on Var_Test_SubscribeWithCustomPeriod_CT {
var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
if (v_remoteIntSubscr_PrevTime>0.0) {
if (v_remoteIntSubscr_Period<0.0) {
v_remoteIntSubscr_Period := vl_currentTime - v_remoteIntSubscr_PrevTime;
} else {
v_remoteIntSubscr_Period := 0.7*(vl_currentTime - v_remoteIntSubscr_PrevTime)+0.3*v_remoteIntSubscr_Period;
}
}
v_remoteIntSubscr_PrevTime := vl_currentTime;
}
function f_EPTF_Var_Test_intVarRefreshA_10_PostProc(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on Var_Test_SubscribeWithCustomPeriod_CT {
var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
if (v_intVarRefreshA_10_PrevTime>0.0) {
if (v_intVarRefreshA_10_Period<0.0) {
v_intVarRefreshA_10_Period := vl_currentTime - v_intVarRefreshA_10_PrevTime;
} else {
v_intVarRefreshA_10_Period := 0.7*(vl_currentTime - v_intVarRefreshA_10_PrevTime)+0.3*v_intVarRefreshA_10_Period;
}
}
v_intVarRefreshA_10_PrevTime := vl_currentTime;
}
function f_EPTF_Var_Test_intVarRefreshB_10_PostProc(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on Var_Test_SubscribeWithCustomPeriod_CT {
var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
if (v_intVarRefreshB_10_PrevTime>0.0) {
if (v_intVarRefreshB_10_Period<0.0) {
v_intVarRefreshB_10_Period := vl_currentTime - v_intVarRefreshB_10_PrevTime;
} else {
v_intVarRefreshB_10_Period := 0.7*(vl_currentTime - v_intVarRefreshB_10_PrevTime)+0.3*v_intVarRefreshB_10_Period;
}
}
v_intVarRefreshB_10_PrevTime := vl_currentTime;
}
function f_EPTF_Var_Test_intVarRefresh_20_PostProc(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on Var_Test_SubscribeWithCustomPeriod_CT {
var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
if (v_intVarRefresh_20_PrevTime>0.0) {
if (v_intVarRefresh_20_Period<0.0) {
v_intVarRefresh_20_Period := vl_currentTime - v_intVarRefresh_20_PrevTime;
} else {
v_intVarRefresh_20_Period := 0.7*(vl_currentTime - v_intVarRefresh_20_PrevTime)+0.3* v_intVarRefresh_20_Period;
}
}
v_intVarRefresh_20_PrevTime := vl_currentTime;
}
altstep as_EPTF_Var_Test_subscribeWithCustomPeriod_updateVars() runs on Var_Test_SubscribeWithCustomPeriod_CT {
[] t_updateVars.timeout {
v_currentValue := v_currentValue + 1;
f_EPTF_Var_adjustContent(v_intVarRefreshB_10Idx,{intVal := v_currentValue});
t_updateVars.start;
repeat;
}
}
function f_getDifference(in float pl_value, in float pl_expectedValue) return float {
var float vl_difference := pl_value - pl_expectedValue;
if (vl_difference<0.0) {
vl_difference := -1.0*vl_difference;
}
return vl_difference;
}
function f_EPTF_Var_Test_intVarRefreshB_10_Content_PostProc(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on Var_Test_SubscribeWithCustomPeriod_CT {
var EPTF_Var_TimeLine vl_timeLine;
var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
var integer vl_int := f_EPTF_Var_getIntValue(f_EPTF_Var_getId("intVarRefreshB_10"));
//action("10 Act. value: ", vl_int, " Prev. value: ", v_intVarRefreshB_10_PrevContent);
if ( f_EPTF_Var_checkSubscriptionMode(pl_idx,realtime)){
if (vl_int != v_intVarRefreshB_10_PrevContent + 1 and v_intVarRefreshB_10_PrevContent != 0){
setverdict(fail, "Incorrect value in intVarRefreshB_10: ",vl_int, ", should be: ", v_intVarRefreshB_10_PrevContent + 1);
}
} else {
if (vl_int != v_intVarRefreshB_10_PrevContent + 10 and v_intVarRefreshB_10_PrevContent != 0){
setverdict(fail, "Incorrect value in intVarRefreshB_10: ",vl_int, ", should be: ", v_intVarRefreshB_10_PrevContent + 10);
}
if (float2int(vl_currentTime) mod 10 != 0){
setverdict(fail, "Incorrect Refresh rate: ",float2int(vl_currentTime));
}
}
f_EPTF_Var_getTimeLine(pl_idx, vl_timeLine);
if (f_EPTF_Var_checkSubscriptionMode(pl_idx,timeLine)){
for(var integer vl_i := 0; vl_i < vl_timeLine.size; vl_i := vl_i + 1){
if (ischosen(vl_timeLine.timeLineData[vl_i].content.intVal)) {
if (vl_timeLine.timeLineData[vl_i].content.intVal != v_intVarRefreshB_10_PrevContent + vl_i + 1) {
action("Not equal ", vl_timeLine.timeLineData[vl_i].content.intVal, " ", v_intVarRefreshB_10_PrevContent + vl_i + 1);
setverdict(fail, "Timeline not correct");
}
} else { setverdict(fail, "Not integers in the timeline, programming error")}
}
}
v_intVarRefreshB_10_PrevContent := vl_int;
}
function f_EPTF_Var_Test_intVarRefresh_20_Content_PostProc(in integer pl_idx, in EPTF_IntegerList pl_argList) runs on Var_Test_SubscribeWithCustomPeriod_CT {
var float vl_currentTime := f_EPTF_Base_getRelTimeInSecs();
var EPTF_Var_TimeLine vl_timeLine;
var integer vl_int := f_EPTF_Var_getIntValue(f_EPTF_Var_getId("intVarRefresh_20"));
//action("20 Act. value: ", vl_int, " Prev. value: ", v_intVarRefresh_20_PrevContent);
if ( f_EPTF_Var_checkSubscriptionMode(pl_idx,realtime)){
if (vl_int != v_intVarRefresh_20_PrevContent + 1 and v_intVarRefresh_20_PrevContent != 0){
setverdict(fail, "Incorrect value in intVarRefresh_20: ",vl_int, ", should be: ", v_intVarRefresh_20_PrevContent + 1);
}
} else {
if (vl_int != v_intVarRefresh_20_PrevContent + 20 and v_intVarRefresh_20_PrevContent != 0){
setverdict(fail, "Incorrect value in intVarRefresh_20: ",vl_int, ", should be: ", v_intVarRefresh_20_PrevContent + 20);
}
if (float2int(vl_currentTime) mod 20 != 0){
setverdict(fail, "Incorrect Refresh rate: ",float2int(vl_currentTime));
}
}
f_EPTF_Var_getTimeLine(pl_idx, vl_timeLine);
if (f_EPTF_Var_checkSubscriptionMode(pl_idx,timeLine)){
for(var integer vl_i := 0; vl_i < vl_timeLine.size; vl_i := vl_i + 1){
if (ischosen(vl_timeLine.timeLineData[vl_i].content.intVal)) {
if (vl_timeLine.timeLineData[vl_i].content.intVal != v_intVarRefresh_20_PrevContent + vl_i + 1) {
action("Not equal", vl_timeLine.timeLineData[vl_i].content.intVal, " ", v_intVarRefresh_20_PrevContent + vl_i + 1);
setverdict(fail, "Timeline not correct");
}
} else { setverdict(fail, "Not integers in the timeline, programming error")}
}
}
v_intVarRefresh_20_PrevContent := vl_int;
}
altstep as_EPTF_Var_Test_subscribeWithCustomPeriod_Content_updateVars() runs on Var_Test_SubscribeWithCustomPeriod_CT {
[] t_updateVars.timeout {
v_currentValue := v_currentValue + 1;
f_EPTF_Var_adjustContent(v_intVarRefresh_20Idx,{intVal := v_currentValue});
//f_EPTF_Var_adjustContent(v_intVarRefreshB_10Idx,{intVal := v_currentValue});
t_updateVars.start;
repeat;
}
}
function f_EPTF_Var_Test_subscribeWithCustomPeriod_checkContentChange(in EPTF_Var_SubscriptionMode pl_subscriptionMode, in boolean pl_chained := false) runs on Var_Test_SubscribeWithCustomPeriod_CT {
f_EPTF_Var_init_CT("EPTF_Var_Test");
var default vl_def := activate(as_EPTF_Var_Test_subscribeWithCustomPeriod_Content_updateVars());
f_EPTF_Var_newInt("intVar1",1,vl_intVarIdx);
// set default sync period to 3.0 sec
f_EPTF_Var_setSyncInterval(3.0);
// set elementary period to 1.0 sec
f_EPTF_Var_setMinSyncInterval(1.0);
t_updateVars.start;
f_EPTF_Var_subscribeRemote(self,"intVar1",pl_subscriptionMode, v_intVarRefreshB_10Idx,"intVarRefreshB_10",10);
if (pl_chained) {
if (pl_subscriptionMode==sampledAtSync) {
pl_subscriptionMode := sampled;
}
f_EPTF_Var_subscribeRemote(self,"intVarRefreshB_10",pl_subscriptionMode, v_intVarRefresh_20Idx,"intVarRefresh_20",20);
} else {
f_EPTF_Var_subscribeRemote(self,"intVar1",pl_subscriptionMode, v_intVarRefresh_20Idx,"intVarRefresh_20",20);
}
timer t_wait;
t_wait.start(5.0); t_wait.timeout;
f_EPTF_Var_addPostProcFn(v_intVarRefreshB_10Idx, {refers(f_EPTF_Var_Test_intVarRefreshB_10_Content_PostProc), {}});
f_EPTF_Var_addPostProcFn(v_intVarRefresh_20Idx, {refers(f_EPTF_Var_Test_intVarRefresh_20_Content_PostProc), {}});
// start an alt for 35 secs.
t_wait.start(35.5); t_wait.timeout;
if (v_intVarRefreshB_10_PrevContent != 0 and v_intVarRefresh_20_PrevContent != 0)
{ setverdict(pass); } else {setverdict(fail, "Content did not change! No event arrived.");}
f_EPTF_Base_cleanup_CT();
}
}// end of module