| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // 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_CLL_ExecCtrl_DSFunctions |
| // |
| // Purpose: |
| // This module contains the implementation of EPTF_CLL_ExecCtrl_DSFunctions functions. |
| // |
| // Module depends on: |
| // <EPTF_CLL_Common_Definitions> |
| // <EPTF_CLL_ExecCtrl_Definitions> |
| // <EPTF_CLL_DataSource_Definitions> |
| // <EPTF_CLL_DataSource_Functions> |
| // <EPTF_CLL_DataSourceClient_Functions> |
| // <EPTF_CLL_ExecCtrl_LoggingFunctions> |
| // <EPTF_CLL_Variable_Definitions> |
| // <EPTF_CLL_Variable_Functions> |
| // <EPTF_CLL_StatHandler_Functions> |
| // <EPTF_CLL_Base_Functions> |
| // |
| // Module Parameters: |
| // |
| // Current Owner: |
| // Jozsef Gyurusi (ethjgi) |
| // |
| // Last Review Date: |
| // 2011-05-02 |
| // |
| // Detailed Comments: |
| // |
| // Public functions: |
| // - |
| // |
| // All other functions in this module are private! |
| // |
| /////////////////////////////////////////////////////////////// |
| |
| module EPTF_CLL_ExecCtrl_DSFunctions { |
| |
| //========================================================================= |
| // Import Part |
| //========================================================================= |
| import from EPTF_CLL_ExecCtrl_Functions all; |
| import from EPTF_CLL_Common_Definitions all; |
| import from EPTF_CLL_ExecCtrl_Definitions all; |
| //import from EPTF_CLL_ExecCtrlUIHandler_Definitions all; |
| import from EPTF_CLL_DataSource_Definitions all; |
| import from EPTF_CLL_DataSource_Functions all; |
| import from EPTF_CLL_DataSourceClient_Functions all; |
| import from EPTF_CLL_ExecCtrl_LoggingFunctions all; |
| import from EPTF_CLL_Variable_Definitions all; |
| import from EPTF_CLL_Variable_Functions all; |
| import from EPTF_CLL_ExecCtrl_ScenarioFunctions all; |
| import from EPTF_CLL_ExecCtrl_PhaseDefinitions all; |
| import from EPTF_CLL_ExecCtrl_PhaseFunctions all; |
| import from EPTF_CLL_HashMapStr2Int_Functions all; |
| //import from EPTF_CLL_ExecCtrlUIHandler_Functions all; |
| import from EPTF_CLL_LGenBase_ConfigFunctions all; |
| import from EPTF_CLL_StatHandler_Functions all; |
| import from EPTF_CLL_ExecCtrl_ScenarioDefinitions all; |
| import from EPTF_CLL_Base_Functions all; |
| import from EPTF_CLL_Common_Functions all; |
| import from EPTF_CLL_StatHandler_Definitions all; |
| |
| friend module EPTF_CLL_ExecCtrl_Functions; |
| //========================================================================= |
| // Functions |
| //======================================================================== |
| |
| /////////////////////////////////////////////////////////// |
| // Group: EPTF_ExecCtrl |
| // |
| // Purpose: |
| // Functions related to EPTF_ExecCtrl feature |
| // |
| /////////////////////////////////////////////////////////// |
| group DataSourceClient { |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_ExecCtrl_createIteratorVars |
| // |
| // Purpose: |
| // Creates the iterator variables that are needed for the implementation of the ExecCtrl DataSourceClient feature. |
| // Called from f_EPTF_ExecCtrl_UIHandler_createGUI, before GUIDone has been sent to the LGens |
| // Parameters: |
| // - |
| // |
| // Return Value: |
| // - |
| // |
| // Errors & assertions: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_ExecCtrl_createIteratorVars() |
| runs on EPTF_ExecCtrl_CT{ |
| |
| var EPTF_CharstringList vl_cList := {}, vl_cList2 := {}, vl_cList3 := {} |
| var integer vl_idx := 0; |
| //EntityGroups |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_entityGroups); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_entityGroups[i].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorEntityGroups_varName, vl_cList ,vl_idx); |
| |
| //Lgens |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_lgens); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_lgens[i].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorLGens_varName, vl_cList ,vl_idx); |
| |
| |
| //Regulators |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_EPTF_ExecCtrl_RegulatorNames); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_EPTF_ExecCtrl_RegulatorNames[i]; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorRegulators_varName, vl_cList ,vl_idx); |
| |
| |
| //ScenarioGroups |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_ScenarioGroupInstanceDB.data[i].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarioGroups_varName, vl_cList ,vl_idx); |
| |
| //PhaseLists |
| vl_cList := {}; |
| var boolean vl_insert; |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_PhaseListDeclaratorDB.data); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_PhaseListDeclaratorDB.data[i].name; |
| //SCGoupsOfPhaseList |
| vl_cList2 := {}; |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data); j := j + 1){ |
| for(var integer k := 0; k < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists); k := k + 1){ |
| if(v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[k].name == v_ExecCtrl_PhaseListDeclaratorDB.data[i].name) { |
| vl_insert := true; |
| for(var integer l := 0; l < sizeof(vl_cList2); l := l + 1){ |
| if(vl_cList2[l] == v_ExecCtrl_ScenarioGroupInstanceDB.data[j].name) { |
| vl_insert := false; |
| } |
| } |
| if(vl_insert) { |
| vl_cList2[sizeof(vl_cList2)] := v_ExecCtrl_ScenarioGroupInstanceDB.data[j].name; |
| } |
| } |
| } |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & v_ExecCtrl_PhaseListDeclaratorDB.data[i].name & "." & c_ExecCtrl_iteratorScenarioGroups_varName, vl_cList2 ,vl_idx); |
| |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhaseLists, vl_cList ,vl_idx); |
| |
| //Phases |
| vl_cList := {} |
| vl_cList2 := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_PhaseListDeclaratorDB.data); i := i + 1){ |
| vl_cList2 := {}; |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_PhaseListDeclaratorDB.data[i].phases); j := j + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_PhaseListDeclaratorDB.data[i].phases[j].name; |
| vl_cList2[sizeof(vl_cList2)] := v_ExecCtrl_PhaseListDeclaratorDB.data[i].phases[j].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName&v_ExecCtrl_PhaseListDeclaratorDB.data[i].name, vl_cList2 ,vl_idx); |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName, vl_cList ,vl_idx); |
| |
| //ScenarioOfScGroup |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data); j := j + 1){ |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarios); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarios[i].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarioGroups_varName & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].name, vl_cList ,vl_idx); |
| } |
| |
| //LGensForEntityGroup |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_entityGroups); j := j + 1){ |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_entityGroups[j].lgenList); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_lgens[v_ExecCtrl_entityGroups[j].lgenList[i].lgenIdx].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorLGens_varName & "." & v_ExecCtrl_entityGroups[j].name, vl_cList ,vl_idx); |
| } |
| |
| //Scenarios |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_entityGroups); j := j + 1){ |
| vl_cList := {} |
| vl_cList2 := {} |
| vl_cList3 := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_entityGroups[j].scenarios); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[i]].scData.name; |
| if(v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[i]].scData.trafficType == originating) { |
| vl_cList2[sizeof(vl_cList2)] := v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[i]].scData.name; |
| } |
| if(v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[i]].scData.trafficType == terminating) { |
| vl_cList3[sizeof(vl_cList3)] := v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[i]].scData.name; |
| } |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarios_varName & "." & v_ExecCtrl_entityGroups[j].name, vl_cList ,vl_idx); |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarios_varName & "." & v_ExecCtrl_entityGroups[j].name & ".originating", vl_cList2 ,vl_idx); |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarios_varName & "." & v_ExecCtrl_entityGroups[j].name & ".terminating", vl_cList3 ,vl_idx); |
| } |
| |
| //TrafficCases |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_entityGroups); j := j + 1){ |
| for(var integer k := 0; k < sizeof(v_ExecCtrl_entityGroups[j].scenarios); k := k + 1){ |
| vl_cList := {} |
| var integer vl_scIdx := v_ExecCtrl_entityGroups[j].scenarios[k]; |
| for(var integer i:=0; i<sizeof(v_ExecCtrl_scenarios[vl_scIdx].scData.tcList);i:=i+1) { |
| vl_cList[sizeof(vl_cList)] := f_EPTF_LGenBase_tcNameOfTcOfSc(v_ExecCtrl_scenarios[vl_scIdx].scData,i); |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorTrafficCases_varName & "." & v_ExecCtrl_entityGroups[j].name & "." & v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[k]].scData.name, vl_cList ,vl_idx); |
| } |
| } |
| //PhasesOfScGrp |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data); j := j + 1){ |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists); i := i + 1){ |
| vl_cList := {} |
| for(var integer k := 0; k < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[i].phases); k := k + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[i].phases[k].name; |
| } |
| if(f_EPTF_Var_getId(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].name & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[i].name) == -1 ) { |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].name & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[i].name, vl_cList ,vl_idx); |
| } |
| if(f_EPTF_Var_getId(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[i].name) == -1 ) { |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[j].scenarioPhaseLists[i].name, vl_cList ,vl_idx); |
| } |
| } |
| } |
| |
| |
| //EntityGroups - Lgens param |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_lgens); j := j + 1){ |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_lgens[j].eGroups); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_entityGroups[v_ExecCtrl_lgens[j].eGroups[i].eGrpIdx].name; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorEntityGroups_varName & "." & v_ExecCtrl_lgens[j].name, vl_cList ,vl_idx); |
| } |
| |
| //EntityTypes - Lgens param |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_lgens); j := j + 1){ |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_lgens[j].resourceList); i := i + 1){ |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_lgens[j].resourceList[i].eType; |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorEntityTypesForLGen_varName & "." & v_ExecCtrl_lgens[j].name, vl_cList ,vl_idx); |
| } |
| |
| //Regulated items |
| vl_cList := {} |
| for(var integer i := 0; i < sizeof(v_EPTF_ExecCtrl_RegulatedItems); i := i + 1){ |
| if (ischosen(v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TC)) { |
| vl_cList[sizeof(vl_cList)] := v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TC.eGrpName |
| &"."&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TC.scName |
| &"."&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TC.tcName; |
| } |
| if (ischosen(v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SC)) { |
| vl_cList[sizeof(vl_cList)] := v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SC.eGrpName |
| &"."&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SC.scName; |
| } |
| if (ischosen(v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TCInPhase)) { |
| vl_cList[sizeof(vl_cList)] := v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TCInPhase.eGrpName |
| &"."&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TCInPhase.scName |
| &"."&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TCInPhase.tcName |
| &"@"&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_TCInPhase.phase; |
| } |
| if (ischosen(v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SCInPhase)) { |
| vl_cList[sizeof(vl_cList)] := v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SCInPhase.eGrpName |
| &"."&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SCInPhase.scName |
| &"@"&v_EPTF_ExecCtrl_RegulatedItems[i].idName.cps_SCInPhase.phase; |
| } |
| } |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorRegulatedItems_varName, vl_cList ,vl_idx); |
| |
| //Tc statistics |
| f_EPTF_Var_newCharstringlist(c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorTcStats_varName, c_EPTF_ExecCtrl_tcStatNames ,vl_idx); |
| |
| //FSM statistics |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_entityGroups); j := j + 1){ |
| for(var integer k := 0; k < sizeof(v_ExecCtrl_entityGroups[j].scenarios); k := k + 1){ |
| var integer vl_scIdx := v_ExecCtrl_entityGroups[j].scenarios[k]; |
| for(var integer i:=0; i<sizeof(v_ExecCtrl_scenarios[vl_scIdx].scData.tcList);i:=i+1) { |
| |
| vl_cList := {} |
| // get FSM stats for this TC: |
| for(var integer f:=0; f<sizeof(v_ExecCtrl_FSMStats); f:=f+1) { |
| if ( |
| v_ExecCtrl_entityGroups[j].name == v_ExecCtrl_FSMStats[f].entityGroup and |
| v_ExecCtrl_scenarios[v_ExecCtrl_entityGroups[j].scenarios[k]].scData.name==v_ExecCtrl_FSMStats[f].scenario and |
| f_EPTF_LGenBase_tcNameOfTcOfSc(v_ExecCtrl_scenarios[vl_scIdx].scData,i)==v_ExecCtrl_FSMStats[f].tc |
| ) { |
| for (var integer st:=0; st<sizeof(v_ExecCtrl_FSMStats[f].stats); st:=st+1) { |
| vl_cList[sizeof(vl_cList)] := v_ExecCtrl_FSMStats[f].stats[st].declaredName; |
| } |
| } |
| } |
| |
| f_EPTF_Var_newCharstringlist( |
| c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorFSMStats_varName & "." |
| & v_ExecCtrl_entityGroups[j].name & "." |
| & v_ExecCtrl_scenarios[vl_scIdx].scData.name & "." |
| & f_EPTF_LGenBase_tcNameOfTcOfSc(v_ExecCtrl_scenarios[vl_scIdx].scData,i), vl_cList ,vl_idx); |
| } |
| } |
| } |
| |
| //ScGroup of Scenario |
| for(var integer j := 0; j < sizeof(v_ExecCtrl_entityGroups); j := j + 1){ |
| for(var integer k := 0; k < sizeof(v_ExecCtrl_entityGroups[j].scenarios); k := k + 1){ |
| var integer vl_scIdx := v_ExecCtrl_entityGroups[j].scenarios[k]; |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| var EPTF_ExecCtrl_ScenarioGroup_Instance vl_instance; |
| //f_EPTF_ExecCtrl_ScenarioGroup_get_byIndex(vl_scGrpIdx, vl_instance); |
| |
| if (vl_scGrpIdx > -1 and vl_scGrpIdx < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data)) |
| { |
| f_EPTF_Var_newCharstring(c_ExecCtrl_DS_externalDataVar_prefix & "ScGroupOfSc_" & int2str(vl_scIdx), v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].name, |
| vl_idx); |
| } |
| } |
| } |
| } |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_ExecCtrl_DSProcessData |
| // |
| // Purpose: |
| // Processes the incoming Data requests - iterators and external data elements - and gives back a variable name. |
| // It should be registered in the ExecCtrl_init_CT. Type function fcb_EPTF_DataSourceClient_dataHandler |
| // |
| // Parameters: |
| // *out charstring pl_dataVarName* - this variable contains the value of the data or the iterator result |
| // *in charstring pl_source* - the name of the data source 'feature' |
| // *in charstring pl_ptcName* - the name of the ptc (ID of the PTC) |
| // *in charstring pl_element* - the name of the data element |
| // *in* <EPTF_DataSource_Params> *pl_params* - the parameters |
| // of the data for the dataElement |
| // |
| // Return Value: |
| // integer - error code (0 of OK, non zero if unsuccessful: e.g. invalid parameters given in pl_params) |
| // |
| // Detailed Comments: |
| // When this function is called in the first time it creates the variable that contains the |
| // names of the variables that store the values of the elements of the data or the iterator. This variable name |
| // is returned in pl_dataVarName. |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_ExecCtrl_DSProcessData(out charstring pl_dataVarName, |
| in charstring pl_source, |
| in charstring pl_ptcName, |
| in charstring pl_element, |
| in EPTF_DataSource_Params pl_params) |
| runs on EPTF_ExecCtrl_CT return integer{ |
| |
| var EPTF_CharstringList vl_cList := {} |
| var EPTF_CharstringList pl_result := {} |
| var EPTF_Var_SubscriptionMode vl_subscriptionModeForVars := sampled; |
| if (v_ExecCtrl_usePullModeForStats) { |
| vl_subscriptionModeForVars := pull; |
| } |
| |
| var integer vl_idx := 0; |
| pl_dataVarName := ""; |
| select(pl_element){ |
| case(c_ExecCtrl_iteratorEntityTypesForLGen){ |
| vl_cList := {} |
| var charstring vl_LGenName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params,{c_ExecCtrl_paramNameLGen}, pl_result)){ |
| vl_LGenName := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_lgensHash, vl_LGenName, vl_key)){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorEntityTypesForLGen_varName & "." & vl_LGenName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameLGen & ": " & vl_LGenName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case(c_ExecCtrl_iteratorRegulatedItems){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorRegulatedItems_varName; |
| } else { |
| pl_dataVarName := log2str(%definitionId, ": Datasource Parameter not needed." ); |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case(c_ExecCtrl_iteratorEntityGroups){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorEntityGroups_varName |
| } else { |
| // Lgen bemeno param kell - c_ExecCtrl_paramNameLGen |
| vl_cList := {} |
| var charstring vl_LGenName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameLGen}, pl_result)){ |
| vl_LGenName := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_lgensHash, vl_LGenName, vl_key)){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorEntityGroups_varName & "." & vl_LGenName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameLGen & ": " & vl_LGenName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| case(c_ExecCtrl_iteratorRegulators){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorRegulators_varName |
| } else { |
| pl_dataVarName := log2str(%definitionId, ": Datasource Parameter not needed." ); |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case(c_ExecCtrl_iteratorScenarioGroups){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarioGroups_varName |
| } else if(sizeof(pl_params) == 1) { |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNamePhaseList}, pl_result)){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & pl_result[0] & "." & c_ExecCtrl_iteratorScenarioGroups_varName |
| } |
| } else { |
| pl_dataVarName := log2str(%definitionId, ": Datasource Parameter not needed." ); |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| |
| case(c_ExecCtrl_iteratorPhaseLists){ |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {}, pl_result)){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhaseLists; |
| } else { |
| pl_dataVarName := log2str(%definitionId, ": Datasource Parameter not needed." ); |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| |
| case(c_ExecCtrl_iteratorPhases){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName |
| } else if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNamePhaseList}, pl_result, true)) { |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & pl_result[0]; |
| } else if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameScenarioGroup,c_ExecCtrl_paramNamePhaseList}, pl_result, true)){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & pl_result[0] & "." & pl_result[1]; |
| } else if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, pl_result)){ |
| vl_cList := {} |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if (vl_scIdx!=-1) { |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx != -1){ |
| for(var integer i := 0; i < sizeof(v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].scenarios); i := i + 1) { |
| if(v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].scenarios[i].idx == vl_scIdx) { |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorPhases_varName & "." & v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].scenarioPhaseLists[i].name; |
| break; |
| } |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario is not in scenarioGroup: "& vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario doesn't exist: "& vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case(c_ExecCtrl_iteratorLGens){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorLGens_varName |
| } else { |
| vl_cList := {} |
| var charstring vl_entityGrpName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameEntityGroup}, pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| if(vl_eGrpIdx > -1){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorLGens_varName & "." & vl_entityGrpName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName ; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| |
| |
| case(c_ExecCtrl_iteratorScenarios){ |
| vl_cList := {} |
| var charstring vl_scenarioGrpName := ""; |
| // this if is needed to avoid false warning if the second param version is used: |
| if (sizeof(pl_params)==1 and pl_params[0].paramName == c_ExecCtrl_paramNameScenarioGroup) { |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameScenarioGroup}, pl_result)){ |
| vl_scenarioGrpName := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_ScenarioGroupInstanceDB.hashRef, vl_scenarioGrpName, vl_key)){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarioGroups & "." & vl_scenarioGrpName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameScenarioGroup & ": " & vl_scenarioGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } else if (sizeof(pl_params)==2 and (pl_params[0].paramName == c_ExecCtrl_paramNameTrafficType or pl_params[1].paramName == c_ExecCtrl_paramNameTrafficType)) { |
| var charstring vl_trafficType := ""; |
| if(pl_params[0].paramValue == "originating" or pl_params[0].paramValue == "terminating") { |
| vl_trafficType := pl_params[0].paramValue; |
| } else if (pl_params[1].paramValue == "originating" or pl_params[1].paramValue == "terminating") { |
| vl_trafficType := pl_params[1].paramValue; |
| } |
| if(vl_trafficType != "") { |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameTrafficType}, pl_result)){ |
| var charstring vl_entityGrpName := ""; |
| vl_entityGrpName := pl_result[0]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| if(vl_eGrpIdx > -1){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarios_varName & "." & vl_entityGrpName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarios_varName & "." & vl_entityGrpName & "." & vl_trafficType; |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameTrafficType & ": " & pl_params[0].paramValue & " It can be only originating or terminating"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } else { |
| var charstring vl_entityGrpName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNameEntityGroup}, pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| if(vl_eGrpIdx > -1){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorScenarios_varName & "." & vl_entityGrpName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter(s) is/are wrong. The iterator " & c_ExecCtrl_iteratorScenarios & " either has no parameters or has only one, EntityGroup."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case(c_ExecCtrl_iteratorTrafficCases){ |
| vl_cList := {} |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params,{c_ExecCtrl_paramNameEntityGroup,c_ExecCtrl_paramNameScenario}, pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if(vl_eGrpIdx > -1 and vl_scIdx > -1){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorTrafficCases_varName & "." & vl_entityGrpName & "." & vl_scName; |
| } else { |
| if( vl_scIdx > -1){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenarioGroup & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } else if(0 == f_EPTF_ExecCtrl_getParams(pl_params,{c_ExecCtrl_paramNameScenarioInstance}, pl_result)){ |
| var charstring vl_scInstanceName := pl_result[0]; |
| var integer vl_scInstIdx := f_EPTF_ExecCtrl_getScenarioIdxByInstanceName(vl_scInstanceName); |
| |
| if (vl_scInstIdx==-1) { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenarioInstance & ": " & vl_scInstanceName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| |
| vl_entityGrpName := f_EPTF_ExecCtrl_eGrp_name(f_EPTF_ExecCtrl_getScenarioEGroupIdx(vl_scInstIdx)); |
| vl_scName := f_EPTF_ExecCtrl_getScenarioName(vl_scInstIdx); |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if(vl_eGrpIdx > -1 and vl_scIdx > -1){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorTrafficCases_varName & "." & vl_entityGrpName & "." & vl_scName; |
| } else { |
| if( vl_scIdx > -1){ |
| pl_dataVarName := (%definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName ); |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenarioGroup & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| } |
| case(c_ExecCtrl_iteratorTcStats){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorTcStats_varName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case(c_ExecCtrl_iteratorFSMStats){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_eGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_eGrpName,vl_scName,vl_tcName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_eGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdx){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorFSMStats_varName & "." & vl_eGrpName & "." & vl_scName & "." & vl_tcName; |
| } |
| } |
| } |
| case(c_ExecCtrl_iteratorGlobalStats){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_ExecCtrl_DS_iteratorVar_prefix & c_ExecCtrl_iteratorGlobalStats_varName; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| |
| // DATAELEMENTS: |
| |
| case (c_ExecCtrl_dataElementProgressbar){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".notif.progressbar"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementProgressbarText){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".notif.progressbar.text"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementGlobalProgressbar){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".notif.globalProgressbar"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementExit){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_Exit; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementEndOfConfig){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := "EPTF_ExecCtrl.EventStatus.EndOfConfig"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementReadyToRun){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := "EPTF_ExecCtrl.EventStatus.ReadyToRun"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementGUIDone){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := "EPTF_ExecCtrl.EventStatus.GUIDone"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementEndOfTest){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := "EPTF_ExecCtrl.EventStatus.EndOfTest"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementTimeElapsed){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_TimeElapsed; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementStart){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_Start; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementStop){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_Stop; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementTerminate){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_Terminate; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementSnapshot){ |
| if(sizeof(pl_params) == 0){ |
| pl_dataVarName := c_EPTF_ExecCtrl_Snapshot; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter not needed."; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| case (c_ExecCtrl_dataElementEGrpType){ |
| var charstring vl_entityGrpName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| pl_dataVarName := "EntityType."&int2str(vl_eGrpIdx); |
| } |
| } |
| case (c_ExecCtrl_dataElementEGrpSize){ |
| var charstring vl_entityGrpName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| pl_dataVarName := "EntityNum."&int2str(vl_eGrpIdx); |
| } |
| } |
| case (c_ExecCtrl_dataElementNofMaxAvailEntitiesForLGen){ |
| var charstring vl_lGenName := ""; |
| var charstring vl_eTypeName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameLGen, c_ExecCtrl_paramNameEntityType}, |
| pl_result)){ |
| vl_lGenName := pl_result[0]; |
| vl_eTypeName := pl_result[1]; |
| var integer vl_lGenIdx := f_EPTF_ExecCtrl_getLGenIdx(vl_lGenName); |
| if(vl_lGenIdx != -1){ |
| var integer vl_eIdx := f_EPTF_ExecCtrl_getLGenResourceListETypeIdx(vl_lGenIdx,vl_eTypeName); |
| if(vl_eIdx != -1){ |
| pl_dataVarName := "Resource.EntityAvailNum."&int2str(vl_lGenIdx)&"."&int2str(vl_eIdx); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityType & ": " & vl_eTypeName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameLGen & ": " & vl_lGenName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementNofCurrentAvailEntitiesForLGen){ |
| var charstring vl_lGenName := ""; |
| var charstring vl_eTypeName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameLGen, c_ExecCtrl_paramNameEntityType}, |
| pl_result)){ |
| vl_lGenName := pl_result[0]; |
| vl_eTypeName := pl_result[1]; |
| var integer vl_lGenIdx := f_EPTF_ExecCtrl_getLGenIdx(vl_lGenName); |
| if(vl_lGenIdx != -1){ |
| var integer vl_eIdx := f_EPTF_ExecCtrl_getLGenResourceListETypeIdx(vl_lGenIdx,vl_eTypeName); |
| if(vl_eIdx != -1){ |
| pl_dataVarName := "Resource.EntityAllocNum."&int2str(vl_lGenIdx)&"."&int2str(vl_eIdx); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityType & ": " & vl_eTypeName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameLGen & ": " & vl_lGenName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementEGrpSizeForLGen){ |
| var charstring vl_lGenName := ""; |
| var charstring vl_eGrpName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameLGen}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_lGenName := pl_result[1]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_eGrpName); |
| var integer vl_lGenIdx := f_EPTF_ExecCtrl_getLGenIdx(vl_lGenName); |
| var integer vl_lGenIdxInList := -1; |
| for(var integer vl_i := 0; vl_i < sizeof(v_ExecCtrl_entityGroups[vl_eGrpIdx].lgenList) ;vl_i := vl_i + 1){ |
| if(v_ExecCtrl_entityGroups[vl_eGrpIdx].lgenList[vl_i].lgenIdx == vl_lGenIdx){ |
| vl_lGenIdxInList := vl_i; |
| } |
| } |
| if (vl_lGenIdxInList > -1){ |
| pl_dataVarName := "EGrpDistr.ECount."&int2str(vl_eGrpIdx)&"."&int2str(vl_lGenIdxInList); |
| } else { |
| pl_dataVarName := %definitionId& ": EntityGroup is not on LGen: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_eGrpName & |
| "\n" & c_ExecCtrl_paramNameLGen & ": " & vl_lGenName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementEGrpOffsetForLGen){ |
| var charstring vl_lGenName := ""; |
| var charstring vl_eGrpName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameLGen}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_lGenName := pl_result[1]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_eGrpName); |
| var integer vl_lGenIdx := f_EPTF_ExecCtrl_getLGenIdx(vl_lGenName); |
| var integer vl_lGenIdxInList := -1; |
| for(var integer vl_i := 0; vl_i < sizeof(v_ExecCtrl_entityGroups[vl_eGrpIdx].lgenList) ;vl_i := vl_i + 1){ |
| if(v_ExecCtrl_entityGroups[vl_eGrpIdx].lgenList[vl_i].lgenIdx == vl_lGenIdx){ |
| vl_lGenIdxInList := vl_i; |
| } |
| } |
| if (vl_lGenIdxInList > -1){ |
| pl_dataVarName := "EGrpDistr.EOffset."&int2str(vl_eGrpIdx)&"."&int2str(vl_lGenIdxInList); |
| } else { |
| pl_dataVarName := %definitionId& ": EntityGroup is not on LGen: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_eGrpName & |
| "\n" & c_ExecCtrl_paramNameLGen & ": " & vl_lGenName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| } |
| } |
| case (c_ExecCtrl_dataElementScStatusForLGen){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_lGenName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameLGen}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_lGenName := pl_result[2]; |
| |
| pl_dataVarName := "StatusLED.Scenario.LGenStatus."&vl_lGenName&"."&vl_eGrpName&"."&vl_scTypeName; |
| } |
| } |
| case (c_ExecCtrl_dataElementScIsWeighted){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| |
| pl_dataVarName := "Traffic.ScenarioType." & vl_eGrpName&"."& int2str(vl_scIdx); |
| } |
| } |
| case (c_ExecCtrl_dataElementScStatus){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| |
| pl_dataVarName := "ExecCtrl.scenarioStatus."&vl_eGrpName&"."&vl_scName |
| } |
| } |
| case (c_ExecCtrl_dataElementScStart){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| |
| pl_dataVarName := "ExecCtrl.startScenario."&vl_eGrpName&"."&vl_scName; |
| } |
| } |
| case (c_ExecCtrl_dataElementScStop){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| |
| pl_dataVarName := "ExecCtrl.stopScenario."&vl_eGrpName&"."&vl_scName; |
| } |
| } |
| case (c_ExecCtrl_dataElementScCPS){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if (0 == f_EPTF_ExecCtrl_getParams(pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| |
| if (not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := %definitionId&": Scenario "&vl_eGrpName&"."&vl_scName&" is not weighted, only weighted scenario has ScCPS.\n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if (f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := "Traffic.ScenarioCPS."&vl_eGrpName&"."&int2str(vl_scIdx); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStart){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdx){ |
| pl_dataVarName := "ExecCtrl.startTC." & vl_entityGrpName & "." & vl_scName & "." & vl_tcName; |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStop){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdx){ |
| pl_dataVarName := "ExecCtrl.stopTC." & vl_entityGrpName & "." & vl_scName & "." & vl_tcName; |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcResetStats){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdx){ |
| pl_dataVarName := "ExecCtrl.resetStatsTC." & vl_entityGrpName & "." & vl_scName & "." & vl_tcName; |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcResetFSMStats){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdx){ |
| pl_dataVarName := "ExecCtrl.resetFSMStatsTC." & vl_entityGrpName & "." & vl_scName & "." & vl_tcName; |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementAllTcResetStats){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == sizeof(pl_params)){ |
| pl_dataVarName := "ExecCtrl.resetStatsAllTC"; |
| } |
| } |
| case (c_ExecCtrl_dataElementAllTcResetFSMStats){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == sizeof(pl_params)){ |
| pl_dataVarName := "ExecCtrl.resetFSMStatsAllTC"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStartDelay){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| var integer vl_tcIdxRel := f_EPTF_ExecCtrl_getTcOfScenarioIdx(vl_tcIdx); |
| |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdxRel){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if (f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := %definitionId&": Scenario "&vl_entityGrpName&"."&vl_scName&" is weighted, only non-weighted scenario has TcStartDelay.\n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdxRel and not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)){ |
| pl_dataVarName := "Traffic.TCDelay." & vl_entityGrpName & "." & int2str(vl_scIdx) & "." & int2str(vl_tcIdxRel) |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcTargetCPSOrWeight){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| var integer vl_tcOfScIdx := f_EPTF_ExecCtrl_getTcOfScenarioIdx(vl_tcIdx); |
| if( -1 == vl_tcOfScIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else if(-1 != vl_eGrpIdx and -1 != vl_scIdx){ |
| pl_dataVarName := "Traffic.TCCPS." & vl_entityGrpName & "." & int2str(vl_scIdx) & "." & int2str(vl_tcOfScIdx) |
| } |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcTimeProfile){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| var integer vl_tcOfScIdx := f_EPTF_ExecCtrl_getTcOfScenarioIdx(vl_tcIdx); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcOfScIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| if (f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx) and vl_tcOfScIdx != 0 ) { |
| pl_dataVarName := %definitionId&": Scenario can have TimeProfile only in the case of scenario is non-weighted or if scenario is weighted and tc is the first within scenario .\n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcOfScIdx and ((not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx) ) or |
| (f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx) and vl_tcOfScIdx == 0) ) ){ |
| pl_dataVarName := "Traffic.TimeProfile." & vl_entityGrpName & "." & int2str(vl_scIdx) & "." & int2str(vl_tcOfScIdx) |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcRegulator){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; //optional |
| if(sizeof(pl_params) == 2){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if (f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := %definitionId&": Scenario "&vl_entityGrpName&"."&vl_scName&" is weighted, it cannot have a TC regulator.\n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)){ |
| pl_dataVarName := "Traffic.Regulator." & vl_entityGrpName & "." & int2str(vl_scIdx); |
| } |
| } |
| } else { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| var integer vl_eGrpIdx := f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName); |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| var integer vl_tcIdx := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_entityGrpName,vl_scName,vl_tcName); |
| var integer vl_tcIdxRel := -1; |
| if( -1 != vl_tcIdx){ |
| vl_tcIdxRel := v_ExecCtrl_trafficCases[vl_tcIdx].tcOfScenarioIdx; |
| } |
| if( -1 == vl_eGrpIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if (f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := %definitionId&": Scenario "&vl_entityGrpName&"."&vl_scName&" is weighted, it cannot have a TC regulator.\n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 == vl_tcIdxRel){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameTrafficCase & ": " & vl_tcName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if(-1 != vl_eGrpIdx and -1 != vl_scIdx and -1 != vl_tcIdxRel){ |
| pl_dataVarName := "Traffic.Regulator." & vl_entityGrpName & "." & int2str(vl_scIdx) & "." & int2str(vl_tcIdxRel) |
| } |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatedItemType){ |
| var charstring vl_regulatedItemId := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatedItemId}, |
| pl_result)){ |
| vl_regulatedItemId := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_regulatedItemsHash, vl_regulatedItemId, vl_key)){ |
| pl_dataVarName := "RegulatedItemType." & int2str(vl_key); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatedItemId & ": " & vl_regulatedItemId; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatedItemName){ |
| var charstring vl_regulatedItemId := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatedItemId}, |
| pl_result)){ |
| vl_regulatedItemId := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_regulatedItemsHash, vl_regulatedItemId, vl_key)){ |
| pl_dataVarName := "RegulatedItemName." & int2str(vl_key); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatedItemId & ": " & vl_regulatedItemId; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatorName){ |
| var charstring vl_regulatedItemId := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatedItemId}, |
| pl_result)){ |
| vl_regulatedItemId := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_regulatedItemsHash, vl_regulatedItemId, vl_key)){ |
| pl_dataVarName := f_EPTF_ExecCtrl_getRegulatorNameVarName(v_EPTF_ExecCtrl_RegulatedItems[vl_key].idName, vl_key); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatedItemId & ": " & vl_regulatedItemId; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatedItemWeight){ |
| var charstring vl_regulatedItemId := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatedItemId}, |
| pl_result)){ |
| vl_regulatedItemId := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_regulatedItemsHash, vl_regulatedItemId, vl_key)){ |
| pl_dataVarName := "RegulatedItemWeight." & int2str(vl_key); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatedItemId & ": " & vl_regulatedItemId; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatedItemEnabled){ |
| var charstring vl_regulatedItemId := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatedItemId}, |
| pl_result)){ |
| vl_regulatedItemId := pl_result[0]; |
| var integer vl_key := -1; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_regulatedItemsHash, vl_regulatedItemId, vl_key)){ |
| pl_dataVarName := "RegulatedItemEnabled." & int2str(vl_key); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatedItemId & ": " & vl_regulatedItemId; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatorTotalValue){ |
| var charstring vl_regulatorName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatorName}, |
| pl_result)){ |
| vl_regulatorName := pl_result[0]; |
| var integer vl_regulatorId := f_EPTF_ExecCtrl_Regulator_getRegulatorId(vl_regulatorName); |
| if(vl_regulatorId != -1){ |
| pl_dataVarName := f_EPTF_Var_getName(f_EPTF_ExecCtrl_Regulator_getRegulatorTotalValueIdxByRegulatorId(vl_regulatorId)); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatorName & ": " & vl_regulatorName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatorTargetLoad){ |
| var charstring vl_regulatorName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatorName}, |
| pl_result)){ |
| vl_regulatorName := pl_result[0]; |
| var integer vl_regulatorId := f_EPTF_ExecCtrl_Regulator_getRegulatorId(vl_regulatorName); |
| if(vl_regulatorId != -1){ |
| pl_dataVarName := f_EPTF_Var_getName(f_EPTF_ExecCtrl_Regulator_getRegulatorTargetLoadIdxByRegulatorId(vl_regulatorId)); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatorName & ": " & vl_regulatorName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatorCurrentLoad){ |
| var charstring vl_regulatorName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatorName}, |
| pl_result)){ |
| vl_regulatorName := pl_result[0]; |
| var integer vl_regulatorId := f_EPTF_ExecCtrl_Regulator_getRegulatorId(vl_regulatorName); |
| if(vl_regulatorId != -1){ |
| pl_dataVarName := f_EPTF_Var_getName(f_EPTF_ExecCtrl_Regulator_getRegulatorCurrentLoadIdxByRegulatorId(vl_regulatorId)); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatorName & ": " & vl_regulatorName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementRegulatorStatus){ |
| var charstring vl_regulatorName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameRegulatorName}, |
| pl_result)){ |
| vl_regulatorName := pl_result[0]; |
| var integer vl_regulatorId := f_EPTF_ExecCtrl_Regulator_getRegulatorId(vl_regulatorName); |
| if(vl_regulatorId != -1){ |
| pl_dataVarName := f_EPTF_Var_getName(f_EPTF_ExecCtrl_Regulator_getRegulatorStatusIdxByRegulatorId(vl_regulatorId)); |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameRegulatorName & ": " & vl_regulatorName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementNofDeployedLGens){ |
| // this if is needed to avoid false warning if the second param version is used: |
| if (sizeof(pl_params)==1 and pl_params[0].paramName == c_ExecCtrl_paramNameEntityGroup) { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup}, |
| pl_result)){ |
| var charstring vl_entityGrpName := ""; |
| vl_entityGrpName := pl_result[0]; |
| if( -1 != f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName)){ |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_entityGrpName&".nofLGens" |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } else { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameScenarioInstance}, |
| pl_result)){ |
| var charstring vl_scInstanceName := pl_result[0]; |
| var integer vl_scenarioIdx := f_EPTF_ExecCtrl_getScenarioIdxByInstanceName(vl_scInstanceName); |
| if( -1 != vl_scenarioIdx ){ |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&v_ExecCtrl_entityGroups[v_ExecCtrl_scenarios[vl_scenarioIdx].eGroupIdx].name&".nofLGens" |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameScenarioInstance & ": " & vl_scInstanceName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| } |
| |
| } |
| } |
| case (c_ExecCtrl_dataElementNofActiveEntities){ |
| var charstring vl_entityGrpName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| if( -1 != f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName)){ |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_entityGrpName&".nofActiveEntities" |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementScStatus){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| if( -1 == f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 != vl_scIdx ){ |
| var charstring vl_scTypeName := v_ExecCtrl_scenarios[vl_scIdx].scData.name; |
| pl_dataVarName := "ExecCtrl.scenarioStatus."& vl_entityGrpName &"." & vl_scTypeName |
| } |
| } |
| |
| } |
| case (c_ExecCtrl_dataElementScTargetCPS){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| if( -1 == f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 != vl_scIdx ){ |
| if (not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := %definitionId&"Warning: Scenario "&vl_entityGrpName&"."&vl_scName&" is not weighted \n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| pl_dataVarName := "Traffic.ScenarioCPS."& vl_entityGrpName &"." & int2str(vl_scIdx) |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementScRegulatorName){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| if( -1 == f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| if( -1 != vl_scIdx ){ |
| if (not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx)) { |
| pl_dataVarName := %definitionId&"Warning: Scenario "&vl_entityGrpName&"."&vl_scName&" is not weighted \n"; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| pl_dataVarName := "Traffic.Regulator."& vl_entityGrpName &"." & int2str(vl_scIdx) |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpCurrentPhase){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioGroup}, pl_result, true)){ |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_getIdx(pl_result[0]) |
| pl_dataVarName := "Var."& "Execution_Control.PhaseLists.tabbox"&"."&v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].groupPhaseList.name&".tab" & |
| "." & pl_result[0] & ".GroupPhase"; |
| } else if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)) |
| { |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| if( -1 == f_EPTF_ExecCtrl_getEntityGroupIdx(vl_entityGrpName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameEntityGroup & ": " & vl_entityGrpName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if( -1 == vl_scIdx){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong."& |
| "\n" & c_ExecCtrl_paramNameScenario & ": " & vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if( -1 != vl_scGrpIdx ){ |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & ".GroupPhase" |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| //ethjgy |
| case (c_ExecCtrl_dataElementScGrpMode){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioGroup}, pl_result, true)){ |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_getIdx(pl_result[0]) |
| pl_dataVarName := "Var."& "Execution_Control.PhaseLists.tabbox"&"."&v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].groupPhaseList.name&".tab" & |
| "." & pl_result[0] & ".GroupMode"; |
| } else if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)) |
| { |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx!=-1) { |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & ".GroupMode"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpStatus){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioGroup}, pl_result, true)){ |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_getIdx(pl_result[0]) |
| pl_dataVarName := "Var."& "Execution_Control.PhaseLists.tabbox"&"."&v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].groupPhaseList.name&".tab" & |
| "." & pl_result[0] & ".GroupStatus"; |
| } else if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)) |
| { |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx!=-1) { |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & ".GroupStatus"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpStart){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioGroup}, pl_result, true)){ |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_getIdx(pl_result[0]) |
| pl_dataVarName := "Var."& "Execution_Control.PhaseLists.tabbox"&"."&v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].groupPhaseList.name&".tab" & |
| "." & pl_result[0] & ".GroupStart"; |
| } else if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)) |
| { |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx!=-1) { |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & ".GroupStart"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpTerminate){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx!=-1) { |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & ".TerminateGroup"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpReset){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioGroup}, pl_result, true)){ |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_getIdx(pl_result[0]) |
| pl_dataVarName := "Var."& "Execution_Control.PhaseLists.tabbox"&"."&v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].groupPhaseList.name&".tab" & |
| "." & pl_result[0] & ".GroupReset"; |
| } else if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)) |
| { |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx!=-1) { |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & ".GroupReset"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpScStatus){ |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioGroup, c_ExecCtrl_paramNameScenarioInstance}, pl_result, true)){ |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_getIdx(pl_result[0]) |
| pl_dataVarName := "Var."& "Execution_Control.PhaseLists.tabbox"&"."&v_ExecCtrl_ScenarioGroupInstanceDB.data[vl_scGrpIdx].groupPhaseList.name&".tab" & |
| "." & pl_result[0] & "." & pl_result[1] & ".ScenarioStatus"; |
| } else |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)) |
| { |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if(vl_scIdx != -1){ |
| var charstring vl_scInstanceName := f_EPTF_ExecCtrl_getScenarioInstanceName(vl_scIdx); |
| if(vl_scGrpIdx != -1){ |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx) & "." & vl_scInstanceName & ".ScenarioStatus"; |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be in a group: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementScStartButton){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".ControlButtons.Start"; |
| } |
| } |
| case (c_ExecCtrl_dataElementScStopButton){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".ControlButtons.Stop"; |
| } |
| } |
| case (c_ExecCtrl_dataElementScReset){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".ControlButtons.Reset"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStartButton){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&".ControlButtons.Start"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStopButton){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&".ControlButtons.Stop"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcGroupFinishStatus){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&".GroupFinishStatusLED"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStatus){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := "ExecCtrl.trafficCaseStatus."&vl_eGrpName&"."&vl_scTypeName&"."&vl_tcName; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcGrpFinishStatus){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| var charstring vl_statName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase, c_ExecCtrl_paramNameCondition}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| vl_statName := pl_result[3] |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."& |
| vl_tcName&".GroupFinishCondStatusLED."&vl_statName; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcExecTime){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."& |
| vl_scTypeName&".TC."&vl_tcName&".ExecTime"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcGoS){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| |
| var charstring vl_nofSuccVarName,vl_nofFailVarName,vl_nofTimeoutVarName,vl_nofErrorVarName; |
| vl_nofSuccVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&"."&c_EPTF_ExecCtrl_tcStatNames[c_EPTF_ExecCtrl_tcStatId_Success] |
| vl_nofFailVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&"."&c_EPTF_ExecCtrl_tcStatNames[c_EPTF_ExecCtrl_tcStatId_Fail] |
| vl_nofErrorVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&"."&c_EPTF_ExecCtrl_tcStatNames[c_EPTF_ExecCtrl_tcStatId_Error] |
| vl_nofTimeoutVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scTypeName&".TC."&vl_tcName&"."&c_EPTF_ExecCtrl_tcStatNames[c_EPTF_ExecCtrl_tcStatId_Timeout] |
| var integer vl_tcId := f_EPTF_ExecCtrl_getTrafficCaseIdx(vl_eGrpName,vl_scTypeName,vl_tcName); |
| var charstring vl_statManagerPTCName := f_EPTF_Base_selfName(); |
| if (v_EPTF_ExecCtrl_nofExternalStatHandlers>0) { |
| vl_statManagerPTCName := "ExecCtrl_ExternalStatHandler_Comp_"&log2str(vl_tcId mod v_EPTF_ExecCtrl_nofExternalStatHandlers) |
| } |
| // forward request to StatManager: |
| if (0 != f_EPTF_DataSourceClient_getData( |
| pl_dataVarName := pl_dataVarName, |
| pl_source := "StatManager", |
| pl_ptcName := vl_statManagerPTCName, |
| pl_element := "GoS", |
| pl_params := { |
| {paramName := "SuccessVarName", paramValue := vl_nofSuccVarName}, |
| {paramName := "FailVarName", paramValue := vl_nofFailVarName}, |
| {paramName := "TimeoutVarName", paramValue := vl_nofTimeoutVarName}, |
| {paramName := "ErrorVarName", paramValue := vl_nofErrorVarName} |
| } |
| )) { |
| pl_dataVarName := "GoS does not exist" |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementTcSingleShotEntityIdx){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."& |
| vl_scTypeName&".TC."&vl_tcName&".SingleShotTc.EIdx"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcSingleShotEnableLog){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."& |
| vl_scTypeName&".TC."&vl_tcName&".SingleShotTc.EnableLog"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcSingleShotStart){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_tcName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| pl_dataVarName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."& |
| vl_scTypeName&".TC."&vl_tcName&".SingleShotTc.Start"; |
| } |
| } |
| case (c_ExecCtrl_dataElementPhaseListEnablePhase){ |
| var charstring vl_phaseListName := ""; |
| var charstring vl_phaseName := ""; |
| //v_ExecCtrl_PhaseListDeclaratorDB.data[pl_declaratorIdx].phases[pl_phaseIdx].enabled |
| if(0 == f_EPTF_ExecCtrl_getParams(pl_params, {c_ExecCtrl_paramNamePhaseList, c_ExecCtrl_paramNamePhase}, pl_result)) { |
| vl_phaseListName := pl_result[0]; |
| vl_phaseName := pl_result[1]; |
| pl_dataVarName := "Var." & "Execution_Control.PhaseLists.tabbox"&"."& vl_phaseListName &".tab" & ".mainTable." & vl_phaseName; |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpEnablePhase){ |
| var charstring vl_scGrpName := ""; |
| var charstring vl_phaseName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameScenarioGroup, c_ExecCtrl_paramNamePhase}, |
| pl_result) |
| ) { |
| |
| vl_scGrpName := pl_result[0]; |
| vl_phaseName := pl_result[1]; |
| var integer vl_scGrpIdx; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_ScenarioGroupInstanceDB.hashRef, vl_scGrpName, vl_scGrpIdx)) { |
| var charstring p_phaseListDeclaratorName := f_EPTF_ExecCtrl_getScenarioGroupInstanceGroupPhaseListName(vl_scGrpIdx); |
| var integer p_idx; |
| if (f_EPTF_str2int_HashMap_Find(v_ExecCtrl_PhaseListDeclaratorDB.hashRef, p_phaseListDeclaratorName, p_idx)) { |
| //"Var."&f_EPTF_ExecCtrl_UIVars_getPhaseListTabName_FromPhaseListDB(p_idx)& |
| //".mainTable."&f_EPTF_ExecCtrl_getPhaseListDeclaratorPhaseName(p_idx,i) |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getPhaseListTabName_FromPhaseListDB(p_idx)& |
| ".mainTable."&vl_phaseName; |
| }; |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementScGrpScEnablePhase){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scTypeName := ""; |
| var charstring vl_phaseName := ""; |
| // this if is needed to avoid false warning if the second param version is used: |
| if (sizeof(pl_params)==3) { |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNamePhase}, |
| pl_result) |
| ) { |
| |
| vl_eGrpName := pl_result[0]; |
| vl_scTypeName := pl_result[1]; |
| vl_phaseName := pl_result[2]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scTypeName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scIdx!=-1 and vl_scGrpIdx!=-1) { |
| var charstring vl_scInstanceName := f_EPTF_ExecCtrl_getScenarioInstanceName(vl_scIdx); |
| //"Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(p_idx)&"."& |
| // f_EPTF_ExecCtrl_getScenarioGroupInstanceScenarioName(p_idx,j)&"."& |
| // f_EPTF_ExecCtrl_getScenarioGroupInstanceScenarioPhaseListPhaseName(p_idx,j,i) |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx)&"."& |
| vl_scInstanceName&"."& |
| vl_phaseName; |
| } |
| } |
| } else { |
| if(0 == f_EPTF_ExecCtrl_getParams( |
| pl_params, |
| {c_ExecCtrl_paramNameScenarioInstance, c_ExecCtrl_paramNamePhase}, |
| pl_result) |
| ) { |
| var charstring vl_scInstanceName := pl_result[0]; |
| vl_phaseName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdxByInstanceName(vl_scInstanceName); |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scIdx!=-1 and vl_scGrpIdx!=-1) { |
| pl_dataVarName := "Var."&f_EPTF_ExecCtrl_UIVars_getScenarioGroupTableName_FromScenarioGroupDB(vl_scGrpIdx)&"."& |
| vl_scInstanceName&"."& |
| vl_phaseName; |
| } |
| } |
| } |
| } |
| //eptebal |
| case (c_ExecCtrl_dataElementEGrpOffset){ |
| var charstring vl_entityGrpName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| pl_dataVarName := "EPTF_ExecCtrl.Statistics.EG."&vl_entityGrpName&".eOffset"; |
| } |
| } |
| case (c_ExecCtrl_dataElementEGrpLGenPool){ |
| var charstring vl_entityGrpName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| pl_dataVarName := "EPTF_ExecCtrl.Statistics.EG."&vl_entityGrpName&".LGenPool"; |
| } |
| } |
| case (c_ExecCtrl_dataElementScInstanceName){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| pl_dataVarName := "EPTF_ExecCtrl.Statistics.EG."&vl_entityGrpName&".SC."&vl_scName&".instanceName"; |
| } |
| } |
| case (c_ExecCtrl_dataElementScPhaseListName){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| pl_dataVarName := "EPTF_ExecCtrl.Statistics.EG."&vl_entityGrpName&".SC."&vl_scName&".phaseListName"; |
| } |
| } |
| case (c_ExecCtrl_dataElementScScGrpName){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| pl_dataVarName := "EPTF_ExecCtrl.Statistics.EG."&vl_entityGrpName&".SC."&vl_scName&".scGrpName"; |
| } |
| } |
| case (c_ExecCtrl_dataElementTcStat){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| var charstring vl_tcStatName := ""; |
| |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase, c_ExecCtrl_paramNameStatistic}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| vl_tcStatName := pl_result[3]; |
| |
| var charstring vl_statName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_entityGrpName&".SC."&vl_scName&".TC."&vl_tcName&"."&vl_tcStatName; |
| if (vl_tcStatName == c_EPTF_ExecCtrl_tcStatNames[c_EPTF_ExecCtrl_tcStatId_ExecTime]) { |
| pl_dataVarName := vl_statName; |
| } else { |
| var EPTF_StatHandler_CT vl_statHandler := f_EPTF_ExecCtrl_findStatHandler(vl_statName); |
| if (vl_statHandler == null ) { |
| pl_dataVarName := %definitionId& ": StatHandler is not found for statistic: "&vl_statName; |
| f_EPTF_ExecCtrl_debug(pl_dataVarName); |
| } else { |
| if (vl_statHandler!=self) { |
| f_EPTF_Var_subscribeRemote( |
| pl_remoteCompRef := vl_statHandler, |
| pl_remoteProviderVarName := vl_statName, |
| pl_subscriptionMode := vl_subscriptionModeForVars, |
| pl_idx := vl_idx, |
| pl_localName := vl_statName&"_Local" |
| ); |
| if (vl_idx==-1) { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_statName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| pl_dataVarName := f_EPTF_Var_getName(vl_idx); |
| } |
| } else { |
| if (not f_EPTF_StatHandler_getVarNameByStatName(vl_statName, pl_dataVarName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_statName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| } |
| } |
| // {Delta statistics}: for LGen Variables |
| case (c_ExecCtrl_dataElementTcStatDelta){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| var charstring vl_tcStatName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase, c_ExecCtrl_paramNameStatistic}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| vl_tcStatName := pl_result[3]; |
| |
| var charstring vl_varDeltaName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_entityGrpName&".SC."&vl_scName&".TC."&vl_tcName&"."&vl_tcStatName&".delta"; |
| var integer vl_varDeltaId := f_EPTF_Var_getId(vl_varDeltaName); |
| if(0<=vl_varDeltaId){ |
| pl_dataVarName := vl_varDeltaName; |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementCurrentCPS){ |
| var charstring vl_entityGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_entityGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_entityGrpName, vl_scName); |
| if( not f_EPTF_ExecCtrl_isWeightedScenario(vl_scIdx) ){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario should be weighted: "&vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| var charstring vl_statName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_entityGrpName&".SC."&vl_scName&".CurrentCPS"; |
| var EPTF_StatHandler_CT vl_statHandler := f_EPTF_ExecCtrl_findStatHandler(vl_statName); |
| if (vl_statHandler == null ) { |
| pl_dataVarName := %definitionId& ": StatHandler is not found for statistic: "&vl_statName; |
| f_EPTF_ExecCtrl_debug(pl_dataVarName); |
| } else { |
| if (vl_statHandler!=self) { |
| f_EPTF_Var_subscribeRemote( |
| pl_remoteCompRef := vl_statHandler, |
| pl_remoteProviderVarName := vl_statName, |
| pl_subscriptionMode := vl_subscriptionModeForVars, |
| pl_idx := vl_idx |
| ); |
| if (vl_idx==-1) { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_statName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| pl_dataVarName := f_EPTF_Var_getName(vl_idx); |
| } |
| } else { |
| if (not f_EPTF_StatHandler_getVarNameByStatName(vl_statName, pl_dataVarName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_statName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementFSMStat){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| var charstring vl_tcName := ""; |
| var charstring vl_fsmStatName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario, c_ExecCtrl_paramNameTrafficCase, c_ExecCtrl_paramNameStatistic}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| vl_tcName := pl_result[2]; |
| vl_fsmStatName := pl_result[3]; |
| |
| var charstring vl_statName := c_EPTF_ExecCtrl_statisticsRoot&".EG."&vl_eGrpName&".SC."&vl_scName&".TC."&vl_tcName&".FSMStats."&vl_fsmStatName; |
| var EPTF_StatHandler_CT vl_statHandler := f_EPTF_ExecCtrl_findStatHandler(vl_statName); |
| if (vl_statHandler == null ) { |
| pl_dataVarName := %definitionId& ": StatHandler is not found for statistic: "&vl_statName; |
| f_EPTF_ExecCtrl_debug(pl_dataVarName); |
| } else { |
| if (vl_statHandler!=self) { |
| f_EPTF_Var_subscribeRemote( |
| pl_remoteCompRef := vl_statHandler, |
| pl_remoteProviderVarName := vl_statName, |
| pl_subscriptionMode := vl_subscriptionModeForVars, |
| pl_idx := vl_idx |
| ); |
| if (vl_idx==-1) { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_statName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } else { |
| pl_dataVarName := f_EPTF_Var_getName(vl_idx); |
| } |
| } else { |
| if (not f_EPTF_StatHandler_getVarNameByStatName(vl_statName, pl_dataVarName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_statName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| } |
| case(c_ExecCtrl_dataElementScGroupOfSc){ |
| var charstring vl_eGrpName := ""; |
| var charstring vl_scName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameEntityGroup, c_ExecCtrl_paramNameScenario}, |
| pl_result)){ |
| vl_eGrpName := pl_result[0]; |
| vl_scName := pl_result[1]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdx(vl_eGrpName, vl_scName); |
| if (vl_scIdx!=-1) { |
| var integer vl_scGrpIdx := f_EPTF_ExecCtrl_ScenarioGroup_get_byScIndex(vl_scIdx); |
| if (vl_scGrpIdx != -1){ |
| pl_dataVarName := c_ExecCtrl_DS_externalDataVar_prefix & "ScGroupOfSc_" & int2str(vl_scIdx) |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario is not in scenarioGroup: "& vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } else { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Scenario doesn't exist: "& vl_scName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| case (c_ExecCtrl_dataElementGlobalStat){ |
| var charstring vl_globalStatName := ""; |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, |
| {c_ExecCtrl_paramNameStatistic}, |
| pl_result)){ |
| vl_globalStatName := pl_result[0]; |
| var charstring vl_globalStatNameFull := c_EPTF_ExecCtrl_statisticsRoot&"."&vl_globalStatName; |
| var EPTF_StatHandler_CT vl_statHandler := f_EPTF_ExecCtrl_findStatHandler(vl_globalStatNameFull); |
| if (vl_statHandler == null ) { |
| pl_dataVarName := %definitionId& ": StatHandler is not found for statistic: "&vl_globalStatNameFull; |
| f_EPTF_ExecCtrl_debug(pl_dataVarName); |
| } else { |
| if (vl_statHandler!=self) { |
| f_EPTF_Var_subscribeRemote( |
| pl_remoteCompRef := vl_statHandler, |
| pl_remoteProviderVarName := vl_globalStatNameFull, |
| pl_subscriptionMode := vl_subscriptionModeForVars, |
| pl_idx := vl_idx |
| ); |
| if (vl_idx==-1) { |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_globalStatNameFull; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| pl_dataVarName := f_EPTF_Var_getName(vl_idx); |
| } else { |
| if (not f_EPTF_StatHandler_getVarNameByStatName(vl_globalStatNameFull, pl_dataVarName)){ |
| pl_dataVarName := %definitionId& ": Datasource Parameter is wrong. Statistic doesn't exist: "&vl_globalStatNameFull; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| } |
| } |
| } |
| } |
| } |
| case else { //error, no rule for that |
| pl_dataVarName := %definitionId& ": unhandled element: "& pl_element; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| return -1; |
| } |
| } |
| |
| var integer vl_iteratorVarIdx := f_EPTF_Var_getId(pl_dataVarName); |
| if(vl_iteratorVarIdx == -1){ |
| pl_dataVarName := %definitionId&": Invalid DataSource parameter: Invalid iterator or externalData or parameter: "& |
| "\nSource: "&pl_source& |
| "\nPTC : "&pl_ptcName & |
| "\nElement Name : " &pl_element& |
| "\nParams: " & log2str(pl_params)& |
| "\nReason: "&pl_dataVarName; |
| f_EPTF_ExecCtrl_warning(pl_dataVarName); |
| return -2; |
| } |
| return 0; |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_ExecCtrl_DSProcessDataValue |
| // |
| // Purpose: |
| // Processes the incoming DataValue requests - iterators and external data elements - and gives back the value. |
| // It should be registered in the ExecCtrl_init_CT. Type function fcb_EPTF_DataSourceClient_dataValueHandler |
| // |
| // Parameters: |
| // *out *<EPTF_Var_DirectContent>* pl_dataValue* - the value of the data or the iterator result |
| // *in charstring pl_source* - the name of the data source 'feature' |
| // *in charstring pl_ptcName* - the name of the ptc (ID of the PTC) |
| // *in charstring pl_element* - the name of the data element |
| // *in* <EPTF_DataSource_Params> *pl_params* - the parameters |
| // of the data for the dataElement |
| // |
| // Return Value: |
| // integer - error code (0 of OK, non zero if unsuccessful: e.g. invalid parameters given in pl_params) |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_ExecCtrl_DSProcessDataValue(out EPTF_Var_DirectContent pl_dataValue, |
| in charstring pl_source, |
| in charstring pl_ptcName, |
| in charstring pl_element, |
| in EPTF_DataSource_Params pl_params) |
| runs on EPTF_ExecCtrl_CT return integer{ |
| var integer vl_errorCode := -1; |
| var EPTF_CharstringList pl_result := {}; |
| pl_dataValue := {unknownVal := {omit}}; // set it to invalid |
| select( pl_element ) |
| { |
| case(c_EPTF_DataSource_dataElement_Help) { |
| vl_errorCode := f_EPTF_DataSource_handleHelp(pl_dataValue,pl_source,pl_params,c_EPTF_ExecCtrl_help); |
| } |
| case(c_EPTF_DataSource_dataElement_isWritable) { |
| var charstring vl_source; |
| var charstring vl_ptcName; |
| var charstring vl_element; |
| var EPTF_DataSource_Params vl_params; |
| |
| vl_errorCode := f_EPTF_DataSource_getRequestPartsFromParams(pl_params, vl_source, vl_ptcName, vl_element, vl_params); |
| if (vl_errorCode == 0) { |
| if (vl_element == c_ExecCtrl_dataElementRestart) { |
| pl_dataValue := {boolVal := true}; |
| } else { |
| vl_errorCode := -1; |
| } |
| } |
| } |
| case(c_ExecCtrl_dataElementEntityGroupOfScenarioInstance) { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioInstance}, pl_result, true)){ |
| var charstring vl_scInstanceName := pl_result[0]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdxByInstanceName(vl_scInstanceName); |
| if (vl_scIdx==-1) { |
| var charstring vl_errorMsg := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenarioInstance & ": " & vl_scInstanceName; |
| pl_dataValue:={charstringVal := vl_errorMsg} |
| vl_errorCode := 2; |
| } else { |
| var integer vl_eGrpIdx := v_ExecCtrl_scenarios[vl_scIdx].eGroupIdx; |
| var charstring vl_eGrpName := v_ExecCtrl_entityGroups[vl_eGrpIdx].name; |
| pl_dataValue:={charstringVal := vl_eGrpName} |
| vl_errorCode := 0; |
| } |
| } else { |
| var charstring vl_errorMsg := %definitionId& ": Wrong parameters are given. Parameter is missing: "& c_ExecCtrl_paramNameScenarioInstance; |
| pl_dataValue:={charstringVal := vl_errorMsg} |
| vl_errorCode := 1; |
| } |
| } |
| case(c_ExecCtrl_dataElementScenarioTypeNameOfScenarioInstance) { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameScenarioInstance}, pl_result, true)){ |
| var charstring vl_scInstanceName := pl_result[0]; |
| var integer vl_scIdx := f_EPTF_ExecCtrl_getScenarioIdxByInstanceName(vl_scInstanceName); |
| if (vl_scIdx==-1) { |
| var charstring vl_errorMsg := %definitionId& ": Datasource Parameter is wrong: "& |
| "\n" & c_ExecCtrl_paramNameScenarioInstance & ": " & vl_scInstanceName; |
| pl_dataValue:={charstringVal := vl_errorMsg} |
| vl_errorCode := 2; |
| } else { |
| var charstring vl_scTypeName := v_ExecCtrl_scenarios[vl_scIdx].scData.name; |
| pl_dataValue:={charstringVal := vl_scTypeName} |
| vl_errorCode := 0; |
| } |
| } else { |
| var charstring vl_errorMsg := %definitionId& ": Wrong parameters are given. Parameter is missing: "& c_ExecCtrl_paramNameScenarioInstance; |
| pl_dataValue:={charstringVal := vl_errorMsg} |
| vl_errorCode := 1; |
| } |
| } |
| case(c_ExecCtrl_iteratorEGrpsOnClients) { |
| var integer vl_egrpsSize := sizeof(v_ExecCtrl_entityGroups); |
| var EPTF_CharstringList vl_result := {}; |
| for (var integer i := 0; i < vl_egrpsSize; i := i + 1) { |
| var integer vl_clientsSize := sizeof(v_ExecCtrl_entityGroups[i].lgenList); |
| for (var integer j := 0; j < vl_clientsSize; j := j + 1) { |
| vl_result[sizeof(vl_result)] := int2str(i) & "." & int2str(j); |
| } |
| } |
| pl_dataValue.charstringlistVal := vl_result; |
| vl_errorCode := 0; |
| } |
| case(c_ExecCtrl_dataElementEntityGroupOfEGrpOnClient) { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameEGrpOnClient}, pl_result, true)){ |
| var charstring vl_lgenInstanceName := pl_result[0]; |
| var EPTF_CharstringList vl_instanceParts := f_EPTF_Common_splitString(vl_lgenInstanceName, "."); |
| if (sizeof(vl_instanceParts) == 2) { |
| var integer vl_egrpIndex := str2int(vl_instanceParts[0]); |
| if (vl_egrpIndex < sizeof(v_ExecCtrl_entityGroups)) { |
| pl_dataValue.charstringVal := v_ExecCtrl_entityGroups[vl_egrpIndex].name; |
| vl_errorCode := 0; |
| } else { |
| var charstring vl_errorMsg := %definitionId& ": " & c_ExecCtrl_paramNameEGrpOnClient & " is wrong: nonexistent EntityGroup."; |
| pl_dataValue:={charstringVal := vl_errorMsg}; |
| vl_errorCode := 3; |
| } |
| } else { |
| var charstring vl_errorMsg := %definitionId& ": " & c_ExecCtrl_paramNameEGrpOnClient & " is wrong."; |
| pl_dataValue:={charstringVal := vl_errorMsg}; |
| vl_errorCode := 2; |
| } |
| } else { |
| var charstring vl_errorMsg := %definitionId& ": Wrong parameters are given. Parameter is missing: "& c_ExecCtrl_paramNameEGrpOnClient; |
| pl_dataValue:={charstringVal := vl_errorMsg}; |
| vl_errorCode := 1; |
| } |
| } |
| case(c_ExecCtrl_dataElementClientOfEGrpOnClient) { |
| if(0 == f_EPTF_ExecCtrl_getParams( pl_params, {c_ExecCtrl_paramNameEGrpOnClient}, pl_result, true)){ |
| var charstring vl_lgenInstanceName := pl_result[0]; |
| var EPTF_CharstringList vl_instanceParts := f_EPTF_Common_splitString(vl_lgenInstanceName, "."); |
| if (sizeof(vl_instanceParts) == 2) { |
| var integer vl_egrpIndex := str2int(vl_instanceParts[0]); |
| var integer vl_clientIndex := str2int(vl_instanceParts[1]); |
| if (vl_egrpIndex < sizeof(v_ExecCtrl_entityGroups) and vl_clientIndex < sizeof(v_ExecCtrl_entityGroups[vl_egrpIndex].lgenList)) { |
| pl_dataValue.charstringVal := v_ExecCtrl_lgens[v_ExecCtrl_entityGroups[vl_egrpIndex].lgenList[vl_clientIndex].lgenIdx].name; |
| vl_errorCode := 0; |
| } else { |
| var charstring vl_errorMsg := %definitionId& ": " & c_ExecCtrl_paramNameEGrpOnClient & " is wrong: nonexistent EntityGroup or LGen."; |
| pl_dataValue:={charstringVal := vl_errorMsg}; |
| vl_errorCode := 3; |
| } |
| } else { |
| var charstring vl_errorMsg := |