| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // 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_ScenarioDefinitions |
| // |
| // Purpose: |
| // This module contains type definitions for EPTF_CLL_ExecCtrl implementation. |
| // |
| // Module depends on: |
| // <EPTF_CLL_Common_Definitions> |
| // <EPTF_CLL_LGenBase_Definitions> |
| // <EPTF_CLL_LGenBase_ConfigDefinitions> |
| // <EPTF_CLL_LGenBase_TemplateDefinitions> |
| // <EPTF_CLL_Variable_Definitions> |
| // <EPTF_CLL_LGenBaseStats_Definitions> |
| // |
| // Module Parameters: |
| // |
| // Current Owner: |
| // Jozsef Gyurusi (ethjgi) |
| // |
| // Last Review Date: |
| // 2009-02-03 |
| // |
| // Detailed Comments: |
| // This module contains type definitions for EPTF_CLL_ExecCtrl implementation. |
| // |
| /////////////////////////////////////////////////////////////// |
| |
| module EPTF_CLL_ExecCtrl_ScenarioDefinitions { |
| |
| import from EPTF_CLL_Common_Definitions all; |
| import from EPTF_CLL_LGenBase_Definitions all; |
| import from EPTF_CLL_LGenBase_ConfigDefinitions all; |
| import from EPTF_CLL_LGenBase_TemplateDefinitions all; |
| import from EPTF_CLL_Variable_Definitions all; // EPTF_Var_fcb_CalcFn |
| import from EPTF_CLL_LGenBaseStats_Definitions all; // c_EPTF_LGenBaseStats_nameOfTcNrOfStarts, etc. |
| |
| |
| //========================================================================= |
| // Data Types |
| //========================================================================= |
| |
| // hashmap names |
| const charstring c_ExecCtrl_tcTypesHashMapName := "ExecCtrl_tcTypesHashMap"; |
| const charstring c_ExecCtrl_scenarioTypesHashMapName := "ExecCtrl_scenarioTypesHashMap"; |
| const charstring c_ExecCtrl_entityGroupsHashMapName := "ExecCtrl_entityGroupsHashMap"; |
| const charstring c_ExecCtrl_scenariosHashMapName := "ExecCtrl_scenariosHashMap"; |
| const charstring c_ExecCtrl_trafficCasesHashMapName := "ExecCtrl_trafficCasesHashMap"; |
| const charstring c_ExecCtrl_lgensHashMapName := "ExecCtrl_lgensHashMap"; |
| |
| /////////////////////////////////////////////////////////// |
| // Group: EPTF_ExecCtrl_Declarators |
| // |
| // Purpose: |
| // Contains items corresponding to declarators |
| // |
| // Elements: |
| /////////////////////////////////////////////////////////// |
| group EPTF_ExecCtrl_Declarators { |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroupDeclarator |
| // |
| // Purpose: |
| // Alias to <EPTF_LGenBase_EntityGrpDeclarator>. |
| // |
| // Elements: |
| // - name - *charstring* - the name of the entity group |
| // - eType - *charstring* - the type of the entities within the group |
| // - cCount - *integer* - the amount of entities within the group |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type EPTF_LGenBase_EntityGrpDeclarator EPTF_ExecCtrl_EntityGroupDeclarator; |
| |
| // /////////////////////////////////////////////////////////// |
| // // EPTF_LGenBase_EntityGrpDeclarator |
| // // |
| // /////////////////////////////////////////////////////////// |
| // type record EPTF_LGenBase_EntityGrpDeclarator { |
| // charstring name, |
| // charstring eType, |
| // integer eCount |
| // } |
| |
| } //group EPTF_ExecCtrl_Declarators |
| |
| /////////////////////////////////////////////////////////// |
| // Group: EPTF_ExecCtrl_TypeDB |
| // |
| // Purpose: |
| // Contains items corresponding to the type database of ExecCtrl |
| // |
| /////////////////////////////////////////////////////////// |
| group EPTF_ExecCtrl_TypeDB { |
| // Declarators are converted to these types then distributed to the LGens |
| |
| // entity type DB - entity type availability and usage stored in LGenInstances |
| // type record of EPTF_ExecCtrl_EntityType EPTF_ExecCtrl_EntityTypeList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TcTypeList |
| // |
| // Purpose: |
| // traffic case type DB |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_TcType> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_TcType EPTF_ExecCtrl_TcTypeList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioTypeList |
| // |
| // Purpose: |
| // Scenario type DB |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_ScenarioType> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_ScenarioType EPTF_ExecCtrl_ScenarioTypeList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioInstanceTypeList |
| // |
| // Purpose: |
| // Scenario instance type DB (=new scenario to group module parameter type) |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_ScenarioInstanceType> |
| // |
| // Detailed Comments: |
| // Makes <EPTF_LGenBase_TcMgmt_Scenarios2GrpList> obsolete. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_ScenarioInstanceType EPTF_ExecCtrl_ScenarioInstanceTypeList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TcType |
| // |
| // Purpose: |
| // Alias of <EPTF_LGenBase_TcMgmt_tcTypeDeclarator2> |
| // |
| // Elements: |
| // - name - *charstring* - the name of the traffic case type |
| // - fsmName - *charstring* - FSM table name of the TC |
| // - entityType - *charstring* - the type of the entity executing the traffic case |
| // - customEntitySucc - *charstring* - the registered name of |
| // a user-defined function to evaluate the state of the entity |
| // at the end of a traffic. If it's empty, the <f_EPTF_LGenBase_successSucNoFail> will be called. |
| // |
| // Detailed Comments: |
| // Common TrafficCase type in ExecCtrl. |
| /////////////////////////////////////////////////////////// |
| type EPTF_LGenBase_TrafficCaseTypeInternalDeclarator EPTF_ExecCtrl_TcType; |
| |
| // /////////////////////////////////////////////////////////// |
| // // EPTF_LGenBase_TcMgmt_tcTypeDeclarator2 |
| // // |
| // // Used to declare a traffic case type in TITAN config file and in |
| // // <f_EPTF_LGenBase_declareTcType2> function. |
| // // |
| // /////////////////////////////////////////////////////////// |
| // type record EPTF_LGenBase_TcMgmt_tcTypeDeclarator2 { |
| // charstring name, |
| // charstring fsmName, |
| // charstring entityType, |
| // charstring customEntitySucc //if EMPTY then default |
| // } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioInstanceType |
| // |
| // Purpose: |
| // Type to of a Scenario instance. |
| // |
| // Elements: |
| // - scenarioName - *charstring* - name of the scenario type |
| // - eGrpName - *charstring* - name of the Entity Group this scenario is added to |
| // - name - *charstring* *optional* - name of this scenario instance (if omit it is set to: eGrpName + "." + scenarioTypeName) |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_ScenarioInstanceType { |
| charstring scenarioName, // name of the scenario type |
| charstring eGrpName, // name of the Entity Group this scenario is added to |
| charstring name optional // name of this scenario instance (if omit it is set to: eGrpName + "." + scenarioTypeName) |
| } |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenWeightType |
| // |
| // Purpose: |
| // Type to of a lgen with a weight. |
| // |
| // Elements: |
| // - lgenName - *charstring* - name of the LGen |
| // - weight - *float* - weight of the LGen |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_LGenWeightType { |
| charstring lgenName, |
| float weight |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenWeightTypeList |
| // |
| // Purpose: |
| // List of <EPTF_ExecCtrl_LGenWeightType>-s. |
| // |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_LGenWeightType EPTF_ExecCtrl_LGenWeightTypeList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroupDistributionType |
| // |
| // Purpose: |
| // Type to of an entity group distribution item. |
| // |
| // Elements: |
| // - eGrpName - *charstring* - name of the entity group |
| // - lgenWeights - <EPTF_ExecCtrl_LGenWeightTypeList> - weight of the LGens |
| // the entity group is distributed on |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_EntityGroupDistributionType { |
| charstring eGrpName, |
| EPTF_ExecCtrl_LGenWeightTypeList lgenWeights |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroupDistributionTypeList |
| // |
| // Purpose: |
| // List of <EPTF_ExecCtrl_EntityGroupDistributionType>-s. |
| // |
| // Detailed Comments: |
| // This is the type of the modulepar |
| // If this parameter is given for an entity group, |
| // the entity group will be distributed on the specified |
| // LGens (if possible) according to the weights given. |
| // (The weight factors will be normalized to 1.0) |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_EntityGroupDistributionType EPTF_ExecCtrl_EntityGroupDistributionTypeList; |
| |
| } // group EPTF_ExecCtrl_TypeDB |
| |
| /////////////////////////////////////////////////////////// |
| // Group: EPTF_ExecCtrl_InstanceDB |
| // |
| // Purpose: |
| // Contains items corresponding to the instance database of ExecCtrl |
| // |
| /////////////////////////////////////////////////////////// |
| group EPTF_ExecCtrl_InstanceDB { |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroupList |
| // |
| // Purpose: |
| // Defines the type of the entity group instance DB |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_EntityGroup> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_EntityGroup EPTF_ExecCtrl_EntityGroupList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCaseList |
| // |
| // Purpose: |
| // Defines the type of the traffic case instance DB |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_TrafficCase> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_TrafficCase EPTF_ExecCtrl_TrafficCaseList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioList |
| // |
| // Purpose: |
| // Defines the type of the scenario instance DB |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_Scenario> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_Scenario EPTF_ExecCtrl_ScenarioList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenList |
| // |
| // Purpose: |
| // Defines the type of the LGen instance DB |
| // |
| // Elements: |
| // List of <EPTF_ExecCtrl_LGenData> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_LGenData EPTF_ExecCtrl_LGenList; |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroup |
| // |
| // Purpose: |
| // Defines the type of one element of the EntityGroup instance DB |
| // |
| // Elements: |
| // - name - *charstring* - name of the group |
| // - eType - *charstring* - name of the entity type of the group members |
| // - eOffset - *integer* - entity index of first member of the group |
| // - eCount - *integer* - number of entities in group |
| // - lgenList - <EPTF_ExecCtrl_EntityGroupDistributionList> - list of LGens this group is distributed on |
| // - scenarios - <EPTF_IntegerList> - reference to scenario instances running on this group (index into EPTF_ExecCtrl_ScenarioList) |
| // - lgenPoolIdx - *integer* - reference to the LGenPool this entity group is assigned (-1: no LGenPool) |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_EntityGroup { |
| charstring name, //name of the group |
| charstring eType, //name of the entity type of the group members |
| integer eOffset, //entity index of first member of the group |
| integer eCount, //number of entities in group |
| EPTF_ExecCtrl_EntityGroupDistributionList lgenList, // list of LGens this group is distributed on |
| EPTF_IntegerList scenarios, // reference to scenario instances running on this group (index into EPTF_ExecCtrl_ScenarioList) |
| integer lgenPoolIdx // reference to the LGenPool this entity group is assigned (-1: no LGenPool) |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroupDistribution |
| // |
| // Purpose: |
| // Element of <EPTF_ExecCtrl_EntityGroupDistributionList> |
| // |
| // Elements: |
| // - lgenIdx - *integer* - the LGen this distribution corresponds (index into EPTF_ExecCtrl_LGenList) |
| // - eOffset - *integer* - index of the first entity on this LGen relative to the group offset |
| // - eCount - *integer* - number of entities on this LGen |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_EntityGroupDistribution { |
| integer lgenIdx, // the LGen this distribution corresponds (index into EPTF_ExecCtrl_LGenList) |
| integer eOffset, // index of the first entity on this LGen relative to the group offset |
| integer eCount, // number of entities on this LGen |
| integer eCountActive // number of active entities on this LGen |
| // integer grpIdxInLGen // the index of eGrp data in EPTF_ExecCtrl_LGenData[lgenIdx].eGroups |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_EntityGroupDistributionList |
| // |
| // Purpose: |
| // Defines the entity group distribution on LGens in an <EPTF_ExecCtrl_EntityGroup> |
| // |
| // Elements: |
| // list of <EPTF_ExecCtrl_EntityGroupDistribution> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_EntityGroupDistribution EPTF_ExecCtrl_EntityGroupDistributionList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT |
| // |
| // Purpose: |
| // Defines the function type of traffic case CPS changed callback |
| // |
| // Parameters: |
| // pl_cps - *in float* - the new CPS value |
| // pl_tcIdx - *in integer* - the traffic case instance idx |
| // |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type function EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT(in float pl_cps, in integer pl_tcIdx) runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT_List |
| // |
| // Purpose: |
| // Defines the CPS changed callback function list for a traffic case |
| // |
| // Elements: |
| // list of <EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT_List; |
| |
| // {Delta statistics}: |
| // |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptor |
| // |
| // Purpose: |
| // Defines the function type of traffic case CPS changed callback |
| // |
| // Elements: |
| // - statisticsId - *integer* - statistics Id |
| // - variableId - *integer* - varible id for delta statistics |
| // |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptor { |
| integer statisticsId, |
| integer variableId |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptorList |
| // |
| // Purpose: |
| // Defines Data descriptor list for delta statistics |
| // |
| // Elements: |
| // list of <EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptorList> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptor EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptorList; |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCase |
| // |
| // Purpose: |
| // Defines the traffic case instance type |
| // |
| // Elements: |
| // - name - *charstring* - name of the traffic case instance (by default auto generated to ScenarioInstanceName+"."+tcTypeName) |
| // - scenarioIdx - *integer* - index into EPTF_ExecCtrl_ScenarioList |
| // - tcOfScenarioIdx - *integer* - index into EPTF_ExecCtrl_ScenarioList[scenarioIdx].scData.tcList |
| // - groupFinishData - <EPTF_ExecCtrl_TrafficCase_GroupFinishData> - traffic case distribution data on the LGens this traffic case is distributed on |
| // - cpsChangedCallbackList - <EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT_List> - list of callback functions called when the target CPS changes |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_TrafficCase { |
| charstring name, // name of the traffic case instance (by default auto generated to ScenarioInstanceName+"."+tcTypeName) |
| integer scenarioIdx, // index into EPTF_ExecCtrl_ScenarioList |
| integer tcOfScenarioIdx, // index into EPTF_ExecCtrl_ScenarioList[scenarioIdx].scData.tcList |
| EPTF_ExecCtrl_TrafficCase_GroupFinishData groupFinishData, // group finish data for the lgens |
| // EPTF_ExecCtrl_TrafficCaseDistributionList lgenList // traffic case distribution data on the LGens this traffic case is distributed on |
| EPTF_ExecCtrl_TrafficCaseCPSChangedCallbackFn_FT_List cpsChangedCallbackList, // list of callback functions called when the target CPS changes, |
| EPTF_ExecCtrl_TrafficCaseDeltaStatDescriptorList deltaStatList // Testcase data descriptor for delta statistics |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TrafficCase_GroupFinishData |
| // |
| // Purpose: |
| // Defines auxiliary data to evaluate group finish conditions |
| // |
| // Elements: |
| // - onGroupFinishCounter - *integer* - counter for onGroupFinish (starts from 0. if reaches the number of lgens => the onGroupFinish condition is true) |
| // - onLaunchFinishCounter - *integer* - (starts from 0. if reaches the number of lgens => the onLaunchFinish condition is true) |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_TrafficCase_GroupFinishData { |
| EPTF_ExecCtrl_OnGroupFinishData onGroupFinish, // group finish data for onGroupFinish |
| integer onLaunchFinishCounter // group finish data for onLaunchFinish: (starts from 0. if reaches the number of lgens => the onLaunchFinish condition is true) |
| } |
| |
| // locally evaluted conditions : nofRangeLoop, execTime, entitiesFinished, custom, allDone (nofGrpLoop) |
| // globally evaluted conditions: nofExecStart, nofSuccess, nofFail, nofTimeout, nofError |
| // they all index into <EPTF_ExecCtrl_OnGroupFinishData>.groupFinished: |
| // unknown: |
| const integer c_EPTF_ExecCtrl_groupFinishConditionUnknown := -1; |
| // globally evaluated: |
| const integer c_EPTF_ExecCtrl_groupFinishNofExecStartIdx := 0; |
| const integer c_EPTF_ExecCtrl_groupFinishNofSuccessIdx := 1; |
| const integer c_EPTF_ExecCtrl_groupFinishNofFailIdx := 2; |
| const integer c_EPTF_ExecCtrl_groupFinishNofTimeoutIdx := 3; |
| const integer c_EPTF_ExecCtrl_groupFinishNofErrorIdx := 4; |
| // locally evaluated (cannot be used for indexing): |
| const integer c_EPTF_ExecCtrl_groupFinish_ExecTime := 5; |
| const integer c_EPTF_ExecCtrl_groupFinish_RangeLoops := 6; |
| const integer c_EPTF_ExecCtrl_groupFinish_EntitiesFinished := 7; |
| const integer c_EPTF_ExecCtrl_groupFinish_AvailableEntitiesFinished := 8; |
| const integer c_EPTF_ExecCtrl_groupFinish_Custom := 9; |
| type integer EPTF_ExecCtrl_GrpFinishConditionType ( |
| c_EPTF_ExecCtrl_groupFinishConditionUnknown, |
| c_EPTF_ExecCtrl_groupFinishNofExecStartIdx, |
| c_EPTF_ExecCtrl_groupFinishNofSuccessIdx, |
| c_EPTF_ExecCtrl_groupFinishNofFailIdx, |
| c_EPTF_ExecCtrl_groupFinishNofTimeoutIdx, |
| c_EPTF_ExecCtrl_groupFinishNofErrorIdx, |
| c_EPTF_ExecCtrl_groupFinish_ExecTime, |
| c_EPTF_ExecCtrl_groupFinish_RangeLoops, |
| c_EPTF_ExecCtrl_groupFinish_EntitiesFinished, |
| c_EPTF_ExecCtrl_groupFinish_AvailableEntitiesFinished, |
| c_EPTF_ExecCtrl_groupFinish_Custom |
| ); |
| |
| type record of EPTF_ExecCtrl_GrpFinishConditionType EPTF_ExecCtrl_GrpFinishConditionTypes; |
| |
| // full name of var on LGenBase is: |
| // var charstring vl_varNameBase := f_EPTF_LGenBaseStats_getNamePrefix(pl_eGrpName,pl_scName,pl_tc.name); |
| // vl_varNameBase&c_EPTF_ExecCtrl_nameOfVarsInLGen[i] |
| const EPTF_CharstringList c_EPTF_ExecCtrl_nameOfVarsInLGen := { |
| c_EPTF_LGenBaseStats_nameOfTcNrOfStarts,//"NofExecStart" |
| c_EPTF_LGenBaseStats_nameOfTcNrOfSuccesses,//"NofSuccess" |
| c_EPTF_LGenBaseStats_nameOfTcNrOfFails,//"NofFail" |
| c_EPTF_LGenBaseStats_nameOfTcNrOfTimeouts,//"NofTimeout" |
| c_EPTF_LGenBaseStats_nameOfTcNrOfErrors//"NofError" |
| } |
| // c_EPTF_ExecCtrl_nameOfVarsInLGen[c_EPTF_ExecCtrl_groupFinishNofExecStartIdx]: name of the EPTF_Var in LGenBase that is used to calculate the condition for NofExecStart |
| type record EPTF_ExecCtrl_OnGroupFinish_LGenStatus { |
| integer lgenIdx, // index of the LGen in v_ExecCtrl_lgens |
| integer currentCounter // value of the group finish counter on the LGen (when TC is paused) |
| } |
| type record of EPTF_ExecCtrl_OnGroupFinish_LGenStatus EPTF_ExecCtrl_OnGroupFinish_LGenStatusList; // indexed by the same LGen index that is used for the related entity groups v_EPTF_ExecCtrl_entityGroups[egrpIdx].lgenList |
| type record of EPTF_ExecCtrl_OnGroupFinish_LGenStatusList EPTF_ExecCtrl_OnGroupFinish_LGenStatusList_ConditionStatus; // indexed by the condition type <EPTF_ExecCtrl_GrpFinishConditionType> |
| type record of EPTF_IntegerList EPTF_IntegerListList;// indexed by [condition type][LGenIdx] (same as in conditionStatus) |
| type record of EPTF_LGenBase_ConditionTrue EPTF_LGenBase_ConditionTruePerLGen; // indexed by LGenIdx (index of v_EPTF_ExecCtrl_entityGroups[egrpIdx].lgenList) |
| type record EPTF_ExecCtrl_OnGroupFinishData { |
| float tcStartTime, // time when the traffic case was started |
| EPTF_BooleanList groupFinished, // true if groupFinishCondition has fired |
| EPTF_LGenBase_ConditionTruePerLGen groupFinishedPerLGen, // condition statuses on the LGens |
| integer execTimeStatId, // the id of the chrono statistics that measures the execTime of the traffic case |
| EPTF_IntegerList groupFinishedGuardTimerId, // event ID of the group finish guard timer |
| EPTF_ExecCtrl_OnGroupFinish_LGenStatusList_ConditionStatus conditionStatus, // indexed by condition type |
| EPTF_IntegerListList conditionStatusPrev // indexed by [condition type][LGenIdx] (same as in conditionStatus) |
| } |
| // List of calcFns for calculating global groupFinishCondition flag for locally evaluated group finish conditions |
| type record of EPTF_Var_fcb_CalcFn EPTF_ExecCtrl_groupFinishCalcFns; |
| |
| // type record EPTF_ExecCtrl_TrafficCaseDistribution { |
| // } |
| // |
| // type record of EPTF_ExecCtrl_TrafficCaseDistribution EPTF_ExecCtrl_TrafficCaseDistributionList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TcOfScenario |
| // |
| // Purpose: |
| // Alias to <EPTF_LGenBase_TcMgmt_TcOfScenario3> |
| // |
| // Elements: |
| // |
| // Detailed Comments: |
| // Type of scenario specific data of a traffic case instance |
| // Stores the traffic case data in the latest declarator format |
| /////////////////////////////////////////////////////////// |
| type EPTF_LGenBase_TcOfScenarioInternalDeclarator EPTF_ExecCtrl_TcOfScenario; |
| |
| // previous definition of EPTF_LGenBase_TcOfScenarioInternal: |
| // type record EPTF_ExecCtrl_TcOfScenario{ |
| // integer tcTypeIdx, |
| // float startDelay optional, //not needed for weighted |
| // EPTF_LGenBase_TcMgmt_TcProperty2Reach target, |
| // EPTF_LGenBase_burstFuncName scheduler optional, // this differs only from EPTF_LGenBase_TcOfScenarioInternal ! |
| // boolean enableEntities, |
| // boolean enable, |
| // EPTF_LGenBase_TcMgmt_ParamRangeDeclaratorList ranges optional, |
| // EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList params optional, |
| // //finishConditions |
| // EPTF_LGenBase_TcMgmt_GroupFinishConditions2 groupFinishConditions optional, |
| // EPTF_LGenBase_TcMgmt_EntityFinishConditions entityFinishConditions optional, |
| // //actionLists |
| // EPTF_LGenBase_TcMgmt_GroupActions2List tcFinishActions optional, |
| // EPTF_LGenBase_TcMgmt_EntityActionsList entityFinishActions optional, |
| // integer templateSetIdx // -1 if doesn't exist |
| // } |
| |
| type record of EPTF_ExecCtrl_TcOfScenario EPTF_ExecCtrl_TcOfScenarioList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_WeightedScData |
| // |
| // Purpose: |
| // Alias to <EPTF_LGenBase_WeightedScData> |
| // |
| // Elements: |
| // |
| // Detailed Comments: |
| // Type of weighted scenario instance specific data |
| /////////////////////////////////////////////////////////// |
| type EPTF_LGenBase_WeightedScData EPTF_ExecCtrl_WeightedScData; |
| |
| // type record EPTF_ExecCtrl_WeightedScData { |
| // float cpsToReach, |
| // boolean lockCPS, - not used |
| // boolean deterministicMix |
| // } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioType |
| // |
| // Purpose: |
| // Alias to <EPTF_LGenBase_TcMgmt_ScenarioDeclarator3> |
| // |
| // Elements: |
| // |
| // Detailed Comments: |
| // Type of scenario data in scenario instance <EPTF_ExecCtrl_Scenario> |
| // Stores the scenario data in the latest scenario declarator format |
| /////////////////////////////////////////////////////////// |
| type EPTF_LGenBase_ScenarioTypeInternalDeclarator EPTF_ExecCtrl_ScenarioType; // same as EPTF_LGenBase_TcMgmt_ScenarioDeclarator3 |
| // type record EPTF_ExecCtrl_ScenarioType { |
| // charstring name, |
| // boolean enabled, |
| // charstring phaseList optional, // name of the supported phase list |
| // EPTF_ExecCtrl_WeightedScData weightedScData optional, // omit -> normal scenario |
| // EPTF_ExecCtrl_TcOfScenarioList tcList, |
| // EPTF_LGenBase_TcMgmt_PhaseFinishConditionList phaseFinishConditions optional, |
| // EPTF_LGenBase_TcMgmt_PhaseActionList phaseActions optional |
| // } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT |
| // |
| // Purpose: |
| // Defines the function type of scenario CPS changed callback |
| // |
| // Parameters: |
| // pl_cps - *in float* - the new CPS value |
| // pl_scIdx - *in integer* - the scenario instance idx |
| // |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type function EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT(in float pl_cps, in integer pl_scIdx) runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT_List |
| // |
| // Purpose: |
| // Defines the CPS changed callback function list for a scenario |
| // |
| // Elements: |
| // list of <EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT_List; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_Scenario |
| // |
| // Purpose: |
| // Define the Scenario instance type |
| // |
| // Elements: |
| // - name - *charstring* - name of the scenario instance (by default auto generated to EGrpName+"."+ScenarioTypeName) |
| // - eGroupIdx - *integer* - index into EPTF_ExecCtrl_EntityGroupList |
| // - tcIdxList - <EPTF_IntegerList> - parallel database with scData.tcList, each element points into EPTF_ExecCtrl_TrafficCaseList |
| // - scData - <EPTF_ExecCtrl_ScenarioType> - the scenario instance data from the scenario type |
| // - scGrpIdx - *integer* - index into the scenarioGroup instance DB (v_ExecCtrl_ScenarioGroupInstanceDB.data) to the scenario group to which this scenario instance added |
| // - cpsChangedCallbackList - <EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT_List> - list of callback functions called when the target CPS changes |
| // |
| // Detailed Comments: |
| // Type of scenario instance |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_Scenario { |
| charstring name, // name of the scenario instance (by default auto generated to EGrpName+"."+ScenarioTypeName) |
| integer eGroupIdx, // index into EPTF_ExecCtrl_EntityGroupList |
| EPTF_IntegerList tcIdxList, // parallel database with scData.tcList, each element points into EPTF_ExecCtrl_TrafficCaseList |
| EPTF_ExecCtrl_ScenarioType scData, // the scenario instance data from the scenario type |
| integer scGrpIdx, // index into the scenarioGroup instance DB (v_ExecCtrl_ScenarioGroupInstanceDB.data) to the scenario group to which this scenario instance added |
| // TODO (e.g state) |
| EPTF_ExecCtrl_ScenarioCPSChangedCallbackFn_FT_List cpsChangedCallbackList // list of callback functions called when the target CPS changes |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenInEGroupRef |
| // |
| // Purpose: |
| // Define the type of a reference to the LGen specific data in an Entity Group |
| // |
| // Elements: |
| // - eGrpIdx - *integer* - index into EPTF_ExecCtrl_EntityGroupList |
| // - lgenIdxInEGrp - *integer* - index into EPTF_ExecCtrl_EntityGroupList[eGrpIdx].lgenList |
| // |
| // Detailed Comments: |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_LGenInEGroupRef { |
| integer eGrpIdx, // index into EPTF_ExecCtrl_EntityGroupList |
| integer lgenIdxInEGrp // index into EPTF_ExecCtrl_EntityGroupList[eGrpIdx].lgenList |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenInEGroupRefList |
| // |
| // Purpose: |
| // Define the list of LGen references in an Entity Group |
| // |
| // Elements: |
| // list of <EPTF_ExecCtrl_LGenInEGroupRef> |
| // |
| // Detailed Comments: |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_LGenInEGroupRef EPTF_ExecCtrl_LGenInEGroupRefList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenData |
| // |
| // Purpose: |
| // Define the type of LGen data in <EPTF_ExecCtrl_LGenList> |
| // |
| // Elements: |
| // - name - *charstring* - name of the LGen |
| // - lgenCompRef - *integer* - it is an EPTF_ExecCtrlClient_CT converted to integer by f_EPTF_Base_downcast |
| // - hostName - *charstring* - hostname where the LGen is running ("" if unknown) |
| // - resourceList - <EPTF_ExecCtrl_LGenResourceInfoList> - info about available/total entity numbers per eType on this LGen |
| // - eGroups - <EPTF_ExecCtrl_LGenInEGroupRefList> - list of Entity Groups this LGen supports (references to the LGenList in the EntityGroup) |
| // |
| // Detailed Comments: |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_LGenData { |
| charstring name, // name of the LGen |
| integer lgenCompRef, // it is an EPTF_ExecCtrlClient_CT converted to integer by f_EPTF_Base_downcast |
| charstring hostName, // hostname where the LGen is running ("" if unknown) |
| EPTF_ExecCtrl_LGenResourceInfoList resourceList, // info about available/total entity numbers per eType on this LGen |
| EPTF_ExecCtrl_LGenInEGroupRefList eGroups // list of Entity Groups this LGen supports (references to the LGenList in the EntityGroup) |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenResourceInfo |
| // |
| // Purpose: |
| // Type for storing an LGen resource entry. |
| // |
| // Elements: |
| // - eType - *charstring* - the name of the entity type |
| // - eAvail - *integer* - the currently available number of entities (-1 means infty) |
| // - eMaxCount - *integer* - the maximum amount of entities |
| // that can be created by the Application library (-1 means infty) |
| // The number of entities already allocated is approx: eMaxCount - eAvail |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ExecCtrl_LGenResourceInfo |
| { |
| charstring eType, // the name of the entity type |
| integer eAvail, // the currently available number of entities (-1 means infty) |
| integer eMaxCount// the maximum amount of entities |
| // that can be created by the Application library (-1 means infty) |
| // The number of entities already allocated is approx: eMaxCount - eAvail |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_LGenResourceInfoList |
| // |
| // Purpose: |
| // Type for storing list of references to LGen resource entries |
| // |
| // Elements: |
| // <EPTF_ExecCtrl_LGenResourceInfo> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_ExecCtrl_LGenResourceInfo EPTF_ExecCtrl_LGenResourceInfoList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ExecCtrl_TemplateLists |
| // |
| // Purpose: |
| // Type of the templateSet instance DB |
| // |
| // Elements: |
| // <EPTF_LGenBase_TemplateList> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TemplateList EPTF_ExecCtrl_TemplateLists; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_ExecCtrl_EntityGroup_initialValue |
| // |
| // Purpose: An initializer structure of <EPTF_ExecCtrl_EntityGroup> |
| /////////////////////////////////////////////////////////// |
| const EPTF_ExecCtrl_EntityGroup c_EPTF_ExecCtrl_EntityGroup_initialValue := { |
| name := "", |
| eType := "", |
| eOffset := 0, |
| eCount := 0, |
| lgenList := {}, |
| scenarios := {}, |
| lgenPoolIdx := -1 |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_ExecCtrl_TrafficCase_initialValue |
| // |
| // Purpose: An initializer structure of <EPTF_ExecCtrl_TrafficCase> |
| /////////////////////////////////////////////////////////// |
| const EPTF_ExecCtrl_TrafficCase c_EPTF_ExecCtrl_TrafficCase_initialValue := { |
| name := "", |
| scenarioIdx := -1, |
| tcOfScenarioIdx := -1, |
| groupFinishData := c_EPTF_ExecCtrl_TrafficCase_GroupFinishData_initialValue, |
| // lgenList := {} |
| cpsChangedCallbackList := {}, |
| deltaStatList := {} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_ExecCtrl_Scenario_initialValue |
| // |
| // Purpose: An initializer structure of <EPTF_ExecCtrl_Scenario> |
| /////////////////////////////////////////////////////////// |
| const EPTF_ExecCtrl_Scenario c_EPTF_ExecCtrl_Scenario_initialValue := { |
| name := "", |
| eGroupIdx := -1, |
| tcIdxList := {}, |
| scData := c_EPTF_LGenBase_emptyScenarioTypeInternalDeclarator, |
| scGrpIdx := -1, |
| cpsChangedCallbackList := {} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_ExecCtrl_TrafficCase_GroupFinishData_initialValue |
| // |
| // Purpose: An initializer structure of <EPTF_ExecCtrl_TrafficCase_GroupFinishData> |
| /////////////////////////////////////////////////////////// |
| const EPTF_ExecCtrl_TrafficCase_GroupFinishData c_EPTF_ExecCtrl_TrafficCase_GroupFinishData_initialValue := { |
| onGroupFinish := c_EPTF_ExecCtrl_OnGroupFinishData_initialValue, |
| onLaunchFinishCounter := 0 |
| } |
| |
| |
| const EPTF_ExecCtrl_OnGroupFinishData c_EPTF_ExecCtrl_OnGroupFinishData_initialValue := { |
| tcStartTime := 0.0, |
| groupFinished := {false,false,false,false,false,false,false,false,false,false}, |
| groupFinishedPerLGen := {}, |
| execTimeStatId := -1, |
| groupFinishedGuardTimerId := {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}, |
| conditionStatus := {{},{},{},{},{},{},{},{},{},{}}, |
| conditionStatusPrev := {{},{},{},{},{},{},{},{},{},{}} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_ExecCtrl_LGenData_initialValue |
| // |
| // Purpose: An initializer structure of <EPTF_ExecCtrl_LGenData> |
| /////////////////////////////////////////////////////////// |
| const EPTF_ExecCtrl_LGenData c_EPTF_ExecCtrl_LGenData_initialValue := { |
| name := "", |
| lgenCompRef := -1, |
| hostName:="", |
| resourceList := {}, |
| eGroups := {} |
| } |
| |
| } // group EPTF_ExecCtrl_InstanceDB |
| |
| } // module |
| |