| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // 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_LGenBase_Definitions |
| // |
| // Purpose: |
| // This module provides LGenBase-specific data types for TitanSim load generators |
| // |
| // Module Parameters: |
| // - |
| // |
| // Module depends on: |
| // <EPTF_CLL_Common_Definitions> |
| // <EPTF_CLL_Base_Definitions> |
| // <EPTF_CLL_RBTScheduler_Definitions> |
| // <EPTF_CLL_FBQ_Definitions> |
| // <EPTF_CLL_RNA_Definitions> |
| // <EPTF_CLL_LGenBaseTrafficMixer_Definitions> |
| // <EPTF_CLL_LGenBase_ConfigDefinitions> |
| // <EPTF_CLL_LGenBase_LoggingDefinitions> |
| // <EPTF_CLL_LGenBase_PhaseDefinitions> |
| // <EPTF_CLL_LGenBase_TemplateDefinitions> |
| // <TCCMaths_Functions> |
| // <EPTF_CLL_Variable_Definitions> |
| // <EPTF_CLL_StatHandlerClient_Definitions> |
| // <EPTF_CLL_StatHandler_Definitions> |
| // |
| // Current Owner: |
| // Janos Zoltan Svaner (ejnosvn) |
| // |
| // Last Review Date: |
| // 2008-02-26 |
| // |
| // Detailed Comments: |
| // |
| /////////////////////////////////////////////////////////// |
| |
| module EPTF_CLL_LGenBase_Definitions { |
| //========================================================================= |
| // Import Part |
| //========================================================================= |
| import from EPTF_CLL_Common_Definitions all; |
| //import from EPTF_CLL_Base_Definitions all; |
| import from EPTF_CLL_RBTScheduler_Definitions all; |
| import from EPTF_CLL_FBQ_Definitions all; |
| import from EPTF_CLL_RNA_Definitions all; |
| import from EPTF_CLL_LGenBaseTrafficMixer_Definitions all; |
| import from EPTF_CLL_LGenBase_ConfigDefinitions all; |
| import from EPTF_CLL_LGenBase_LoggingDefinitions all; |
| import from EPTF_CLL_LGenBase_PhaseDefinitions all; |
| import from EPTF_CLL_LGenBase_TemplateDefinitions all; |
| import from TCCMaths_Functions all; |
| import from EPTF_CLL_Variable_Definitions all; |
| import from EPTF_CLL_StatHandlerClient_Definitions all; |
| import from EPTF_CLL_StatHandler_Definitions all; |
| import from EPTF_CLL_StatMeasure_Definitions all; |
| import from EPTF_CLL_Logging_Definitions all; |
| import from EPTF_CLL_Common_IndexArrayDefinitions all |
| import from EPTF_CLL_DataSource_Definitions all; |
| import from EPTF_CLL_HashMap_Definitions all; |
| import from EPTF_CLL_ILog_Definitions all; |
| import from EPTF_CLL_LGenBase_ILog_Definitions all; |
| |
| friend module EPTF_CLL_LGenBase_EventHandlingFunctions; |
| friend module EPTF_CLL_LGenBase_LoggingFunctions; |
| friend module EPTF_CLL_LGenBase_PhaseConfigFunctions; |
| friend module EPTF_CLL_LGenBase_TrafficFunctions; |
| friend module EPTF_CLL_LGenBase_ConfigFunctions; |
| friend module EPTF_CLL_LGenBase_ExternalFunctions; |
| friend module EPTF_CLL_LGenBase_Functions; |
| friend module EPTF_CLL_LGenBase_PhaseFunctions; |
| friend module EPTF_CLL_LGenBase_StepFunctions; |
| friend module EPTF_CLL_LGenBase_TemplateFunctions; |
| friend module EPTF_CLL_LGenBaseStats_Definitions; |
| friend module EPTF_CLL_LGenBaseStats_Functions; |
| //friend module EPTF_CLL_LGenBaseStatsUI_Functions; |
| friend module EPTF_CLL_LGenBaseTrafficMixer_Functions; |
| friend module EPTF_CLL_LGenBase_DSFunctions; |
| friend module EPTF_CLL_LGenBase_ILog_Functions; |
| |
| modulepar EPTF_LGenBase_burstFunc tsp_LGenBase_BustCalcMethod := orig; |
| |
| modulepar boolean tsp_EPTF_LGenBaseDebug := false; |
| modulepar boolean tsp_EPTF_LGenBaseDebugTrafficMixer := false |
| modulepar boolean tsp_EPTF_LGenBaseDebugTraffic := false; |
| modulepar boolean tsp_EPTF_LGenBaseDebugTrafficVerbose := false; |
| modulepar boolean tsp_EPTF_LGenBaseDebugConfig := false; |
| modulepar integer tsp_EPTF_LGenBase_ourResolution := 100; |
| modulepar integer tsp_EPTF_LGenBase_ticsPerInterval := 1000; |
| modulepar float tsp_EPTF_LGenBase_abortStopProcess := 10.0; |
| modulepar charstring tsp_LGenBase_nameSeparator := "."; |
| modulepar float tsp_EPTF_LGenBase_CPS_minUpdateInterval := 0.05 |
| modulepar boolean tsp_EPTF_LGenBase_debugVars := false; |
| modulepar boolean tsp_EPTF_LGenBaseDebugFSMEventDispatch := false |
| modulepar charstring tsp_LGenBase_loggingComponentMask := "EPTF_LGenBase"; |
| modulepar EPTF_Var_SubscriptionMode tsp_EPTF_LGenBase_fSMStatsSubscribeMode := sampledAtSync; |
| modulepar float tsp_LGenBaseStats_CPSCalc := 1.0; |
| modulepar EPTF_CharstringList tsp_EPTF_LGenBaseDebugLightList := {}; |
| //========================================================================= |
| // Data Types |
| //========================================================================= |
| |
| /////////////////////////////////////////////////////////// |
| // Group: BehaviorType |
| // |
| // Purpose: |
| // Grouping data types for the BehaviorType metadatabase of |
| // <EPTF_LGenBase_CT> |
| // |
| /////////////////////////////////////////////////////////// |
| group BehaviorType { |
| |
| type EPTF_FreeBusyQueue EPTF_LGenBase_ListenerList; |
| const EPTF_LGenBase_ListenerList c_EPTF_LGenBase_emptyListenerList := c_EPTF_emptyFreeBusyQueue; |
| type record of EPTF_LGenBase_ListenerList EPTF_LGenBase_ListenerListArray; |
| type record of EPTF_LGenBase_ListenerListArray EPTF_LGenBase_GenericEventListenerDataBase; |
| |
| type record EPTF_LGenBase_EmptyFsmTableXRef{} |
| /*type union EPTF_LGenBase_FsmTableXRef{ |
| EPTF_IntegerList rowList, |
| EPTF_LGenBase_EmptyFsmTableXRef empty |
| }*/ |
| type record EPTF_LGenBase_FsmTableXRefItem { |
| integer rowIdx, |
| integer siblingRef // -1: any source fsm |
| } |
| const EPTF_LGenBase_FsmTableXRefItem c_EPTF_LGenBase_emptyFsmTableXRefItem := {-1, -1}; |
| type record of EPTF_LGenBase_FsmTableXRefItem EPTF_LGenBase_FsmTableXRef; // row |
| type record of EPTF_LGenBase_FsmTableXRef EPTF_LGenBase_FsmTableXRefListOfEvent; // tableIdx |
| type record of EPTF_LGenBase_FsmTableXRefListOfEvent EPTF_LGenBase_FsmTableXRefListOfEventOfTC; // tableIdx |
| |
| type record EPTF_LGenBase_FsmTableXRefListOfEventListItem { |
| EPTF_LGenBase_FsmTableXRefListOfEvent singleFsm,//tableIdx,row |
| EPTF_LGenBase_FsmTableXRefListOfEventOfTC fsmOfTc//tcIdx,siblingIdx,row |
| } |
| |
| type record of EPTF_LGenBase_FsmTableXRefListOfEventListItem EPTF_LGenBase_FsmTableXRefListOfEventList; // iIdx |
| type record of EPTF_LGenBase_FsmTableXRefListOfEventList EPTF_LGenBase_FsmTableXRefListOfEventListOfSpBehaviors |
| |
| type EPTF_Common_IndexArray EPTF_LGenBase_ArrayListenerList |
| const EPTF_LGenBase_ArrayListenerList c_EPTF_LGenBase_emptyArrayListenerList := c_EPTF_emptyCommon_IndexArray |
| type record of EPTF_LGenBase_ArrayListenerList EPTF_LGenBase_ArrayListenerListArray |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorDeclaration |
| // |
| // Purpose: |
| // Type for storing Behavior Type declarations. |
| // |
| // Elements: |
| // - name - *charstring* - the name of the behavior type |
| // - bMaxCount - *integer* - the amount of behavior contexts that can be bound to entity contexts, |
| // that is, how many simulated entity can be handled simultaneously |
| // - bCurrCount - *integer* - currently allocated numebr of behavior contexts |
| // - contextBindFn - <EPTF_LGenBase_BehaviorContextBinder_FT> - function to bind a behavior context |
| // - contextResetFn - <EPTF_LGenBase_BehaviorContextHandler_FT> - the |
| // reset function of the behavior type |
| // - contextUnbindFn - <EPTF_LGenBase_BehaviorContextHandler_FT> - function to unbind a behavior context |
| // - listeners - <EPTF_LGenBase_ListenerList> - entity event listeners in the behavior context |
| // - entityListenerHashmapRefs - <EPTF_IntegerList> - hashmap reference to the entity listeners |
| // - generalSourceListenerHashmapRefs - <EPTF_IntegerList> - hashmap reference to the entity source listeners |
| // - behaviorOfEntityHashMap - *integer* - index of the hashmap where behavior related entity to entity listener assignment occurs |
| // - behaviorOfSourceHashMap - *integer* - index of the hashmap where behavior related entity to entity source listener assignment occurs |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_BehaviorDeclaration { |
| charstring name, //name of the behavior type |
| integer bMaxCount, //maximum possible number of allocatable behavior contexts |
| integer bCurrCount,//currently allocated numebr of behavior contexts |
| EPTF_LGenBase_BehaviorContextBinder_FT contextBindFn, //function to bind a b.context |
| EPTF_LGenBase_BehaviorContextHandler_FT contextResetFn, //function to reset a b.context |
| EPTF_LGenBase_BehaviorContextHandler_FT contextUnbindFn, //function to unbind a b.context |
| EPTF_LGenBase_BehaviorContextBinder_FT contextBindWithAbsIdxFn, //function to bind a b.context |
| EPTF_LGenBase_ListenerList listeners, |
| EPTF_IntegerList entityListenerHashmapRefs, |
| EPTF_IntegerList generalSourceListenerHashmapRefs, |
| integer behaviorOfEntityHashMap, |
| integer behaviorOfSourceHashMap, |
| EPTF_LGenBase_FsmTableXRefListOfEventList fsmTableXRefDB, |
| EPTF_LGenBase_FsmTableXRefListOfEventList genTableXRefDB, |
| EPTF_LGenBase_FsmTableXRefListOfEventList entTableXRefDB |
| } |
| |
| ////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyBehaviorDeclaration |
| // |
| // Purpose: |
| // To init an empty <EPTF_LGenBase_BehaviorDeclaration> value. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_BehaviorDeclaration c_EPTF_LGenBase_emptyBehaviorDeclaration := { |
| "", -1, 0, null, null, null, null, c_EPTF_LGenBase_emptyListenerList, {}, {}, -1, -1, |
| {}, {}, {} |
| } |
| |
| ///////////////////////////////////////// |
| // Template: t_LGenBase_BehaviorDeclaration |
| // |
| // Purpose: Template to make it easy to fill the new <EPTF_LGenBase_BehaviorDeclaration> in |
| // <f_EPTF_LGenBase_declareBehaviorType> |
| ///////////////////////////////////////// |
| template EPTF_LGenBase_BehaviorDeclaration t_LGenBase_BehaviorDeclaration( |
| charstring pl_name, |
| integer pl_bMaxCount, //maximum possible number of allocatable behavior contexts |
| EPTF_LGenBase_BehaviorContextBinder_FT pl_contextBindFn, //function to bind a b.context |
| EPTF_LGenBase_BehaviorContextHandler_FT pl_contextResetFn, //function to reset a b.context |
| EPTF_LGenBase_BehaviorContextHandler_FT pl_contextUnbindFn, //function to unbind a b.context |
| EPTF_LGenBase_BehaviorContextBinder_FT pl_bindWithAbsIdxFn := null |
| ) := { |
| name := pl_name, |
| bMaxCount := pl_bMaxCount, |
| bCurrCount := c_EPTF_LGenBase_emptyBehaviorDeclaration.bCurrCount, |
| contextBindFn := pl_contextBindFn, //function to bind a b.context |
| contextResetFn := pl_contextResetFn, //function to reset a b.context |
| contextUnbindFn := pl_contextUnbindFn, //function to unbind a b.context |
| contextBindWithAbsIdxFn := pl_bindWithAbsIdxFn, |
| listeners := c_EPTF_LGenBase_emptyBehaviorDeclaration.listeners, |
| entityListenerHashmapRefs := c_EPTF_LGenBase_emptyBehaviorDeclaration.entityListenerHashmapRefs, |
| generalSourceListenerHashmapRefs := c_EPTF_LGenBase_emptyBehaviorDeclaration.generalSourceListenerHashmapRefs, |
| behaviorOfEntityHashMap := c_EPTF_LGenBase_emptyBehaviorDeclaration.behaviorOfEntityHashMap, |
| behaviorOfSourceHashMap := c_EPTF_LGenBase_emptyBehaviorDeclaration.behaviorOfSourceHashMap, |
| fsmTableXRefDB := {}, |
| genTableXRefDB := {}, |
| entTableXRefDB := {} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorContextHandler_FT |
| // |
| // Purpose: |
| // Runs-on-self function signature for a set behavior context |
| // manipulation functions |
| // |
| // Elements: |
| // - pl_eIdx - *in integer* - the entity whose behavior context |
| // must be manipulated. The nature of manipulation and the behavior |
| // type index must be known by the function implicitly |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_BehaviorContextHandler_FT (integer pl_eIdx) |
| runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorContextBinder_FT |
| // |
| // Purpose: |
| // Runs-on-self function signature for a behavior context |
| // binder functions |
| // |
| // Elements: |
| // - pl_eIdx - *in integer* - the entity whose behavior context |
| // must be manipulated. The nature of manipulation and the behavior |
| // type index must be known by the function implicitly |
| // |
| // Returns: |
| // The returned integer list contains the list of the indexes |
| // of the binded behavior contexts |
| // |
| // Detailed Comments: |
| // During the initialization the applib must initialize |
| // the behavior contexts and provide their indexes. The |
| // LGenBase stores these indexes in the entity contexts. |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_BehaviorContextBinder_FT ( |
| in integer pl_eIdx) |
| runs on self |
| return EPTF_IntegerList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorDeclarationList |
| // |
| // Purpose: |
| // Record of <EPTF_LGenBase_BehaviorDeclaration> to provide a container for |
| // arbitrary number of <EPTF_LGenBase_BehaviorDeclaration> values |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_BehaviorDeclaration> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_BehaviorDeclaration EPTF_LGenBase_BehaviorDeclarationList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorContextRefList |
| // |
| // Purpose: |
| // Type for storing list of references to behavior contexts |
| // |
| // Elements: |
| // <EPTF_IntegerList> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_IntegerList EPTF_LGenBase_BehaviorContextRefList |
| }//group behaviorType |
| |
| /////////////////////////////////////////////////////////// |
| // Group: Entities |
| // |
| // Purpose: |
| // Grouping data types for the Entities metadatabase of |
| // <EPTF_LGenBase_CT> |
| // |
| /////////////////////////////////////////////////////////// |
| group Entities { |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityCtx |
| // |
| // Purpose: |
| // Record type for storing context of a simulated entity . |
| // |
| // Elements: |
| // - bCtxList - <EPTF_LGenBase_BehaviorContextRefList> - index list |
| // referencing to behavior contexts associated with the simulated entity |
| // - fsmCtxList - <EPTF_LGenBase_EntityFsmCtxList> - index list |
| // referencing to activated state machines associated with the simulated |
| // entity |
| // - entityListenerLists - <EPTF_LGenBase_ListenerListArray> - for storing indexes |
| // of the entity event listeners. The listener lists are referred in the behavior contexts' |
| // - entityListenerListsQueue - <EPTF_FreeBusyQueue> - A queue for storing |
| // free or busy entity event listeners |
| // - entityIdxListenerList <EPTF_FreeBusyQueue> - indexes to the listeners in the |
| // listener lists |
| // - sourceEntityListenerList <EPTF_FreeBusyQueue> - list of source entities |
| // - appData - <EPTF_IntegerArray2D> - storage place for FSM-context related |
| // application specific data |
| // - eGrpBackIdx - *integer* - backward index to the entity group |
| // - fsmCtxQueue - <EPTF_FreeBusyQueue> - storage place for FSM-context indices |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityCtx { |
| EPTF_LGenBase_BehaviorContextRefList bCtxList, |
| EPTF_LGenBase_EntityFsmCtxList fsmCtxList, |
| EPTF_LGenBase_ArrayListenerListArray entityListenerLists, |
| EPTF_LGenBase_ArrayListenerList entityListenerListsQueue, |
| EPTF_LGenBase_ArrayListenerList fsmEntityListeners, |
| EPTF_LGenBase_ArrayListenerList entityIdxListenerList, |
| EPTF_LGenBase_ArrayListenerList sourceEntityListenerList, |
| EPTF_IntegerArray2D appData, //application specific data |
| integer eGrpBackIdx, |
| EPTF_FreeBusyQueue fsmCtxQueue |
| } |
| |
| ////////////////////////////////////////////////////////// |
| // Constant: c_empty_LGen_EntityCtx |
| // |
| // Purpose: |
| // To init an empty <EPTF_LGenBase_EntityCtx> value. |
| // |
| // Elements: |
| // name := "", |
| // bCtxList := {}, |
| // fsmCtxList := {} |
| // entityListenerList := {} |
| // appData := {} |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_EntityCtx c_empty_LGenBase_EntityCtx := {{},{},{}, |
| c_EPTF_LGenBase_emptyArrayListenerList, |
| c_EPTF_LGenBase_emptyArrayListenerList, |
| c_EPTF_LGenBase_emptyArrayListenerList, |
| c_EPTF_LGenBase_emptyArrayListenerList, |
| {},-1, |
| c_EPTF_emptyFreeBusyQueue} |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityCtxList |
| // |
| // Purpose: |
| // Record of <EPTF_LGenBase_EntityCtx> to provide a container for |
| // arbitrary number of <EPTF_LGenBase_EntityCtx> values |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EntityCtx EPTF_LGenBase_EntityCtxList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityType |
| // |
| // Purpose: An internal storage of traffic case descriptors/contexts |
| // |
| // Elements: |
| // - name - *charstring* - name of the entity type |
| // - behaviorTypeIdxList - <EPTF_IntegerList> - /references to the behavior types it exhibits |
| // - currCount - *integer* - the number of currently created entities of this type |
| // |
| // Detailed Comments: Internally describes an entity type with its name, behavior and |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityType { |
| charstring name, |
| EPTF_IntegerList behaviorTypeIdxList, |
| integer currCount |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityTypeList |
| // |
| // Purpose: List of entity types |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EntityType EPTF_LGenBase_EntityTypeList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityGroup |
| // |
| // Purpose: Internal descriptor |
| // |
| // Elements: |
| // - name - *charstring* - name of the group |
| // - eTypeIdx - *integer* - index to the entity type of the group members |
| // - eOffset - *integer* - entity index of first member |
| // - eCount - *integer* - number of entities in group |
| // - scenarios - <EPTF_LGenBase_ScenarioListOfGrp> - list of scenarios of an entity group |
| // - isLimited - *boolean* - Is the Execution limited by user? |
| // - origECount - *integer* - original number of entities in group before limit is applied |
| // - trafficCorrigation - *float* - this is the corrigation factor for traffic start and initial burst error (0.0<=, <1.0) |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityGroup { |
| charstring name, |
| integer eTypeIdx, |
| integer eOffset, |
| integer eCount, |
| EPTF_LGenBase_ScenarioListOfGrp scenarios, |
| EPTF_IntegerArray2D appData, //application specific data |
| boolean isLimited, |
| integer origECount, |
| float trafficCorrigation |
| } |
| |
| const EPTF_LGenBase_EntityGroup cEPTF_LGenBase_emptyEntityGroup := { |
| "", -1, 0, 0, {}, {}, false, 0, 0.0 |
| } |
| const EPTF_LGenBase_EntityGroup c_EPTF_LGenBase_emptyEntityGroup := cEPTF_LGenBase_emptyEntityGroup |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityGroupList |
| // Purpose: List of <EPTF_LGenBase_EntityGroup> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EntityGroup EPTF_LGenBase_EntityGroupList |
| } //group entities |
| |
| /////////////////////////////////////////////////////////// |
| // Group: TcMgmt_Declarators |
| // |
| // Purpose: |
| // Grouping data types for declaring: |
| // - behaviors, |
| // - entity types, |
| // - entity groups, |
| // - scenarios |
| // - entity group - scenario associacions |
| // - traffic case types |
| // in TITAN config file |
| // |
| /////////////////////////////////////////////////////////// |
| group TcMgmt_Declarators { |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorDeclarator |
| // |
| // Purpose: |
| // Type for storing Behavior Type declarations in module parameters. |
| // |
| // Elements: |
| // - name - *charstring* - the name of the behavior type |
| // - bMaxCount - *integer* - the amount of behavior contexts |
| // that can be bound to entity contexts, that is, how many |
| // simulated entity can be handled simultaneously |
| // - contextBindFn - <EPTF_LGenBase_BehaviorContextBinder_FT> - function to bind a behavior context |
| // - contextResetFn - <EPTF_LGenBase_BehaviorContextHandler_FT> - the |
| // reset function of the behavior type |
| // - contextUnbindFn - <EPTF_LGenBase_BehaviorContextHandler_FT> - function to unbind a behavior context |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_BehaviorDeclarator { |
| charstring name, //name of the behavior type |
| integer bMaxCount, //maximum possible number of allocatable behavior contexts |
| charstring contextBindFn, //function to bind a b.context |
| charstring contextResetFn, //function to reset a b.context |
| charstring contextUnbindFn //function to unbind a b.context |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_BehaviorDeclaratorList |
| // |
| // Purpose: List of <EPTF_LGenBase_BehaviorDeclarator> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_BehaviorDeclarator EPTF_LGenBase_BehaviorDeclaratorList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityTypeDeclarator |
| // |
| // Purpose: An internal storage of traffic case descriptors/contexts |
| // |
| // Elements: |
| // - name - *charstring* - name of the entity type |
| // - behaviorTypeIdxList - <EPTF_CharstringList> - references to the behavior types it exhibits |
| // |
| // Detailed Comments: Internally describes an entity type with its name, behavior and |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityTypeDeclarator { |
| charstring name, |
| EPTF_CharstringList behaviorTypeIdxList |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityTypeDeclaratorList |
| // |
| // Purpose: List of <EPTF_LGenBase_EntityTypeDeclarator> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EntityTypeDeclarator EPTF_LGenBase_TcMgmt_EntityTypeDeclaratorList; |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_AbsIdx |
| // |
| // Purpose: a union for storing weighted scenario index or normal traffic case index |
| // |
| // Elements: |
| // - tcIdx - *integer* - traffic case absolut index |
| // - scIdx - *integer* - weighted scenario absolut index |
| /////////////////////////////////////////////////////////// |
| type union EPTF_LGenBase_TcMgmt_AbsIdx { |
| integer tcIdx, |
| integer scIdx |
| } |
| |
| } // group TcMgmt_Declarators |
| |
| /////////////////////////////////////////////////////////// |
| // Group: InternalDeclarators |
| // |
| // Purpose: The internal storage of declarations to store the |
| // latest version of data type declarations. The declarator functions |
| // convert the declarators to these types first |
| group InternalDeclarators{ |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TrafficCaseTypeInternalDeclarator |
| // |
| // Purpose: |
| // Used as the common description of the traffic case types. |
| // All versions of the traffic case type declarator are converted to this declarator type. |
| // See also <f_EPTF_LGenBase_declareTrafficCaseType> function. |
| // |
| // 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. |
| // - customEntitySuccPrev - *charstring* - the registered name of a user-defined function |
| // to evaluate the state of the source entity at the end of a traffic. |
| // - entityFinishConditions - <EPTF_LGenBase_EntityFinishConditionsInternalDeclarator> - entity finish conditions |
| // - trafficFinishedActions - <EPTF_LGenBase_TcMgmt_GroupActionsList> - actions to do when a traffic finished |
| // - entityFinishActions - <EPTF_LGenBase_TcMgmt_EntityActionsList> - actions to do when an entity finished |
| // - params - <EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList> - other custom parameters |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TrafficCaseTypeInternalDeclarator { |
| charstring name, |
| charstring fsmName, |
| charstring entityType, |
| charstring customEntitySucc, //if EMPTY then default |
| charstring customEntitySuccPrev, //if EMPTY then default |
| EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator trafficStartFinishConditionsAndFunctions, |
| EPTF_LGenBase_EntityFinishConditionsInternalDeclarator entityFinishConditions, |
| //actionLists |
| EPTF_LGenBase_TcMgmt_GroupActionsList trafficFinishedActions optional, |
| EPTF_LGenBase_TcMgmt_EntityActionsList entityFinishActions optional, |
| // custom tc params |
| EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList params//, |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyTrafficCaseTypeInternalDeclarator |
| // |
| // Purpose: An empty initializer structure of <EPTF_LGenBase_TrafficCaseTypeInternalDeclarator> |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_TrafficCaseTypeInternalDeclarator c_EPTF_LGenBase_emptyTrafficCaseTypeInternalDeclarator :={ |
| "", "", "", "", "", |
| c_EPTF_LGenBase_emptyTrafficStartFinishConditionsInternalDeclarator, |
| c_EPTF_LGenBase_emptyEntityFinishConditionsInternalDeclarator, |
| omit,omit,{}//, |
| //c_EPTF_LGenBase_TcMgmt_emptyGroupFinishConditions2, |
| //{} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_EntityFinishConditionsInternalDeclarator |
| // |
| // Purpose: Internal declarator for entity finish conditions |
| // |
| // Elements: |
| // - nrOfExecStart - *integer* - Number of executed starts |
| // - nrOfSuccesses - *integer* - Number of successes |
| // - nrOfFails - *integer* - Number of fails |
| // - customFinishCondition - *charstring* - custom finish condition can be specified here |
| // |
| // Detailed Comments: |
| // When one of these conditions becomes true, the launch of the traffic on the specified entity |
| // of the specified traffic case will stop, and the actions will be fired. |
| ////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityFinishConditionsInternalDeclarator { |
| integer nrOfExecStart optional, |
| integer nrOfSuccesses optional, |
| integer nrOfFails optional, |
| integer nrOfErrors optional, |
| integer nrOfTimeouts optional, |
| charstring customFinishCondition optional |
| } |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyEntityFinishConditionsInternalDeclarator |
| // |
| // Purpose: An empty initializer structure of <EPTF_LGenBase_EntityFinishConditionsInternalDeclarator> |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_EntityFinishConditionsInternalDeclarator c_EPTF_LGenBase_emptyEntityFinishConditionsInternalDeclarator := {omit, omit, omit, omit, omit, omit}; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator |
| // |
| // Purpose: Internal declarator for traffic finish conditions |
| // |
| // Elements: |
| // - nrOfExecStart - <EPTF_LGenBase_NrOfExecStart> - Number of executed starts should occur |
| // - nrOfSuccesses - <EPTF_LGenBase_NrOfSuccesses> - Number of successes should occur |
| // - nrOfFails - <EPTF_LGenBase_NrOfFails> - Number of fails should occur |
| // - nrOfErrors - <EPTF_LGenBase_NrOfErrors> |
| // - nrOfTimeouts - <EPTF_LGenBase_NrOfTimeouts> |
| // - nrOfRangeLoop - <EPTF_LGenBase_NrOfRangeLoop> - The required amount of loop of range parameters in a traffic case |
| // - execTime - <EPTF_LGenBase_ExecTime> - The required time of execution of a traffic case and the actions to be executed |
| // - entitiesFinished - <EPTF_LGenBase_EntitiesFinished> - Number of entities should be finished |
| // - availableEntitiesFinished - <EPTF_LGenBase_AvailableEntitiesFinished> |
| // - customFinish - <EPTF_LGenBase_CustomFinish> - Custom finish conditions can be specified here |
| // - anythingFinished - <EPTF_LGenBase_AnythingFinished> - The actions to be executed when any of the conditions becomes true |
| // |
| // Detailed Comments: |
| // When one of these conditions becomes true, the launch of the traffic on the specified entity |
| // of the specified traffic case will stop, and the actions will be fired. |
| ////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator{ |
| EPTF_LGenBase_NrOfExecStart nrOfExecStart optional, |
| EPTF_LGenBase_NrOfSuccesses nrOfSuccesses optional, |
| EPTF_LGenBase_NrOfFails nrOfFails optional, |
| EPTF_LGenBase_NrOfErrors nrOfErrors optional, |
| EPTF_LGenBase_NrOfTimeouts nrOfTimeouts optional, |
| EPTF_LGenBase_NrOfRangeLoop nrOfRangeLoop optional, |
| EPTF_LGenBase_ExecTime execTime optional, |
| EPTF_LGenBase_EntitiesFinished entitiesFinished optional, |
| EPTF_LGenBase_AvailableEntitiesFinished availableEntitiesFinished optional, |
| EPTF_LGenBase_CustomFinish customFinish optional, |
| EPTF_LGenBase_AnythingFinished anythingFinished optional |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyTrafficStartFinishConditionsInternalDeclarator |
| // |
| // Purpose: An empty initializer structure of <EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator> |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator c_EPTF_LGenBase_emptyTrafficStartFinishConditionsInternalDeclarator := { |
| omit,omit,omit,omit,omit,omit,omit,omit,omit,omit,omit |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioTypeInternalDeclarator |
| // |
| // Purpose: Declares a list of traffic cases as a scenario for TitanSimR3. The scenario can be normal or weighted. |
| // |
| // Elements: |
| // - name - *charstring* - name of the scenario |
| // - enabled - *boolean* - enabled |
| // - conditionsFromTC - *boolean* - traffic case conditions are met |
| // - phaseListName - *charstring* - name of the supported phase list |
| // - weightedScData - <EPTF_LGenBase_WeightedScData> - additional data for weighted scenarios, omit -> normal scenario |
| // - tcList - <EPTF_LGenBase_TcMgmt_TcOfScenario3List> - list of traffic cases assigned to the scenario |
| // - phaseFinishConditions - <EPTF_LGenBase_TcMgmt_PhaseFinishConditionList> - a list of scenario phase finish conditions |
| // - phaseStateChangeActions - <EPTF_LGenBase_TcMgmt_PhaseActionList> - a list of scenario phase actions |
| // |
| // Detailed Comments: |
| // A weighted scenario can be started, if "weightedScData" is set. If "weightedScData" is omitted a normal scenario will be started. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ScenarioTypeInternalDeclarator{ |
| charstring name, |
| boolean enabled, |
| boolean conditionsFromTC, |
| EPTF_LGenBase_TrafficType trafficType, |
| charstring phaseListName optional, |
| EPTF_LGenBase_WeightedScData weightedScData optional, // omit -> normal scenario |
| EPTF_LGenBase_TcOfScenarioInternalDeclaratorList tcList, |
| EPTF_LGenBase_TcMgmt_PhaseFinishConditionList phaseFinishConditions optional, |
| EPTF_LGenBase_TcMgmt_PhaseActionList phaseStateChangeActions optional |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyScenarioTypeInternalDeclarator |
| // |
| // Purpose: An empty initializer structure of <EPTF_LGenBase_ScenarioTypeInternalDeclarator> |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_ScenarioTypeInternalDeclarator c_EPTF_LGenBase_emptyScenarioTypeInternalDeclarator := { |
| "", true, false, originating, omit, omit, {}, omit, omit |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioTypeInternalDeclaratorList |
| // |
| // Purpose: List of <EPTF_LGenBase_ScenarioTypeInternalDeclarator> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_ScenarioTypeInternalDeclarator EPTF_LGenBase_ScenarioTypeInternalDeclaratorList; |
| } |
| |
| ///////////////////////////////////////// |
| // Group: TcMgmt_Internal_Descriptors |
| // |
| // Purpose: Internally used structures |
| ///////////////////////////////////////// |
| group TcMgmt_Internal_Descriptors { |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eAbsIdxOffset |
| // |
| // Purpose: Index of the absolute index of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eAbsIdxOffset := 0; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eFSMCtxIdxOffset |
| // |
| // Purpose: Index of the FSM context index of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eFSMCtxIdxOffset := 1; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eNOStartsOffset |
| // |
| // Purpose: Index of the count of the starts of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eNOStartsOffset := 2; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eNOSuccOffset |
| // |
| // Purpose: Index of the count of the successful runs of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eNOSuccOffset := 3; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eNOFailOffset |
| // |
| // Purpose: Index of the count of the failed runs of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eNOFailOffset := 4; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eStateOffset |
| // |
| // Purpose: Index of the count of the current state of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| // See customEntitySucc of <EPTF_LGenBase_TcMgmt_tcTypeDeclarator2>. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eStateOffset := 5; |
| |
| ///////////////////////////////////////// |
| // Template: t_EPTF_LGenBase_initialDataIdx |
| // |
| // Purpose: Template to fill the initial dataidx of the entity |
| // in the dataidx record of the entityInfo of the |
| // <EPTF_LGenBase_TcDescriptor> record. |
| ///////////////////////////////////////// |
| template EPTF_IndexList t_EPTF_LGenBase_initialDataIdx(integer pl_eAbsIdx, integer pl_fsmCtxIdx) := {pl_eAbsIdx,pl_fsmCtxIdx,0,0,0,0}; |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eStateNone |
| // |
| // Purpose: Constant to translate <EPTF_LGenBase_EntityState> to integer. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eStateNone := 0; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eStatePass |
| // |
| // Purpose: Constant to translate <EPTF_LGenBase_EntityState> to integer. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eStatePass := 1; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_eStateFail |
| // |
| // Purpose: Constant to translate <EPTF_LGenBase_EntityState> to integer. |
| ///////////////////////////////////////// |
| const integer c_EPTF_LGenBase_eStateFail := 2; |
| |
| ///////////////////////////////////////// |
| // Type: EPTF_LGenBase_State |
| // |
| // Purpose: States of a traffic case |
| ///////////////////////////////////////// |
| |
| const integer c_EPTF_LGenBase_tcStateIdle := 0; |
| const integer c_EPTF_LGenBase_tcStateRunning := 1; |
| const integer c_EPTF_LGenBase_tcStateStopping := 2; |
| const integer c_EPTF_LGenBase_tcStateStopped := 3; |
| const integer c_EPTF_LGenBase_tcStateAborting := 4; |
| const integer c_EPTF_LGenBase_tcStateAborted := 5; |
| const integer c_EPTF_LGenBase_tcStateFinished := 6; |
| const integer c_EPTF_LGenBase_tcStatePaused := 7; |
| const integer c_EPTF_LGenBase_tcStateTerminated := 8; |
| const integer c_EPTF_LGenBase_tcStateCount := 9; |
| |
| const integer c_EPTF_LGenBase_firstTcState := c_EPTF_LGenBase_tcStateIdle; |
| //const integer c_EPTF_LGenBase_tcStateLaunchFinished := ; |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_stateNames |
| // |
| // Purpose: Literal representation of the traffic case states |
| ///////////////////////////////////////// |
| const EPTF_CharstringList c_EPTF_LGenBase_stateNames := { |
| "Idle", |
| "Running", |
| "Stopping", |
| "Stopped", |
| "Aborting", |
| "Aborted", |
| "Finished", |
| "Paused", |
| "Terminated" |
| } |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_stateNames |
| // |
| // Purpose: Literal representation of the traffic types of the traffic case |
| ///////////////////////////////////////// |
| const EPTF_CharstringList c_EPTF_LGenBase_trafficTypeNames := {"originating", "terminating"} |
| |
| ///////////////////////////////////////// |
| // Type: EPTF_LGenBase_tcState |
| // |
| // Purpose: Literal representation of the traffic case states |
| ///////////////////////////////////////// |
| type integer EPTF_LGenBase_tcState ( |
| c_EPTF_LGenBase_tcStateIdle, |
| c_EPTF_LGenBase_tcStateRunning, |
| c_EPTF_LGenBase_tcStatePaused, |
| c_EPTF_LGenBase_tcStateStopping, |
| c_EPTF_LGenBase_tcStateStopped, |
| c_EPTF_LGenBase_tcStateAborting, |
| c_EPTF_LGenBase_tcStateAborted, |
| c_EPTF_LGenBase_tcStateFinished, |
| c_EPTF_LGenBase_tcStateTerminated |
| ); |
| |
| const charstring c_EPTF_LGenBase_tcStateNameIdle := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateIdle] |
| const charstring c_EPTF_LGenBase_tcStateNameRunning := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateRunning] |
| const charstring c_EPTF_LGenBase_tcStateNamePaused := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStatePaused] |
| const charstring c_EPTF_LGenBase_tcStateNameStopping := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateStopping] |
| const charstring c_EPTF_LGenBase_tcStateNameStopped := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateStopped] |
| const charstring c_EPTF_LGenBase_tcStateNameAborting := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateAborting] |
| const charstring c_EPTF_LGenBase_tcStateNameAborted := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateAborted] |
| const charstring c_EPTF_LGenBase_tcStateNameFinished := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateFinished] |
| const charstring c_EPTF_LGenBase_tcStateNameTerminated := c_EPTF_LGenBase_stateNames[c_EPTF_LGenBase_tcStateTerminated] |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_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_LGenBase_TrafficCaseCPSChangedCallbackFn_FT(in float pl_cps, in integer pl_tcIdx) runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TrafficCaseCPSChangedCallbackFn_FT_List |
| // |
| // Purpose: |
| // Defines the CPS changed callback function list for a traffic case |
| // |
| // Elements: |
| // list of <EPTF_LGenBase_TrafficCaseCPSChangedCallbackFn_FT> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TrafficCaseCPSChangedCallbackFn_FT EPTF_LGenBase_TrafficCaseCPSChangedCallbackFn_FT_List; |
| |
| type record EPTF_LGenBase_TcVarDescriptor { |
| integer varId, |
| integer siblingFsmIdx, |
| integer idxInFsm |
| } |
| const EPTF_LGenBase_TcVarDescriptor c_EPTF_LGenBase_emptyTcVarDescriptor := { |
| -1, -1, -1 |
| } |
| type record of EPTF_LGenBase_TcVarDescriptor EPTF_LGenBase_TcVarDescriptorList |
| |
| type record EPTF_LGenBase_TcSiblingVarDescriptor { |
| integer siblingFsmIdx, |
| integer idxInFsm |
| } |
| const EPTF_LGenBase_TcSiblingVarDescriptor c_EPTF_LGenBase_emptyTcSiblingVarDescriptor := { |
| -1, -1 |
| } |
| type record of EPTF_LGenBase_TcSiblingVarDescriptor EPTF_LGenBase_TcSiblingVarDescriptorList |
| |
| type record EPTF_LGenBase_TcStatMeasDescriptor { |
| integer statId, |
| integer siblingFsmIdx, //The FSM where it has been declared first |
| integer idxInFsm //The position in FSM where it has been declared first |
| } |
| const EPTF_LGenBase_TcStatMeasDescriptor c_EPTF_LGenBase_emptyTcStatMeasDescriptor := { |
| -1, -1, -1 |
| } |
| type record of EPTF_LGenBase_TcStatMeasDescriptor EPTF_LGenBase_TcStatMeasDescriptorList |
| |
| type record EPTF_LGenBase_TcStatHandlerDescriptor { |
| charstring statName, |
| integer siblingFsmIdx, |
| integer idxInFsm |
| } |
| const EPTF_LGenBase_TcStatHandlerDescriptor c_EPTF_LGenBase_emptyTcStatHandlerDescriptor := { |
| "", -1, -1 |
| } |
| type record of EPTF_LGenBase_TcStatHandlerDescriptor EPTF_LGenBase_TcStatHandlerDescriptorList |
| |
| type record EPTF_LGenBase_TcSiblingFSM{ |
| charstring siblingName, |
| integer fsmTypeIdx |
| } |
| type record of EPTF_LGenBase_TcSiblingFSM EPTF_LGenBase_TcSiblingFsmList |
| |
| |
| type EPTF_IntegerArray2D EPTF_LGenBase_ListenerSiblingIdxListInTables; |
| |
| ///////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcDescriptor |
| // |
| // Purpose: Traffic case internal descriptor |
| // of a traffic-case instance of an entity group |
| // |
| ///////////////////////////////////////// |
| type record EPTF_LGenBase_TcDescriptor { |
| charstring privateName, //name of the TC |
| integer tcTypeIdx, |
| integer fsmIdx, //FSM table index of the TC |
| integer eGroupBackref, //back-reference to the entity group that owns this descriptor |
| integer eScenarioBackRef, //The index of the scenario of the tc in the entity group |
| integer eTcRelIdx, //The relative index of the traffic case in its scenario |
| //float cpsToReach, |
| //EPTF_LGenBase_TcMgmt_TcProperty2Reach target,//union of cpsToReach and trafficWeight |
| EPTF_LGenBase_EntityInfo entityInfo, // if entity is free then ready for TC start |
| EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT customEntitySuccPrev, //if null then default |
| EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup2_FT customEntitySucc2, //if null then default |
| float startDelay, |
| float startTime, |
| integer nrOfStarts, //cumulative stat for all entities of the entity group |
| integer nrOfSuccesses, //cumulative stat for all entities of the entity group |
| integer nrOfFails, //cumulative stat for all entities of the entity group |
| integer nrOfErrors, //cumulative stat for all entities of the entity group |
| integer nrOfTimeouts, //cumulative stat for all entities of the entity group |
| integer nrOfAllEntities, |
| integer nrOfAvailableEntities, |
| integer nrOfNotFinishedEntities, |
| integer nrOfRunningEntities, |
| integer schedulingTimer, //event queue Idx of the traffic-start peridodic event |
| integer execTimeTimer, //event queue Idx of the execution time expired event |
| integer grpLoop, |
| integer currentSent, //counts the size of the current burst |
| integer lastSent, //counts the size of the last burst |
| boolean hasSent, //EGBOZIE: for weighted traffic, shows if TC has participated in the burst |
| float lastCPS, |
| float lastCallTime, |
| EPTF_LGenBase_SchedulerData schedulerData, //burst calc functions, lastBurstSize, burstSizeCumulativeError |
| EPTF_LGenBase_TrafficType trafficType, |
| //if invalid(<0) then the TC NOT running for the group |
| boolean enabled, |
| boolean enableEntitiesAtStartup, |
| boolean enabledAtStartup, |
| EPTF_LGenBase_ConditionTrue groupFinishConditionDetected, |
| EPTF_LGenBase_ConditionTrue groupFinishConditionProcessed, |
| //finishConditions |
| EPTF_LGenBase_TrafficStartFinishConditionsAndActionsDesc trafficStartFinishConditionsAndActions, |
| EPTF_LGenBase_EntityFinishConditionsDesc entityFinishConditions, |
| //actionLists |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList trafficFinishedActions, |
| EPTF_LGenBase_TcMgmt_EntityActionsDescList entityFinishActions, |
| |
| EPTF_LGenBase_TcMgmt_ParamRangeDeclaratorList paramRanges, |
| EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList customParams, // points to application paramDB |
| integer sentMsgs, |
| integer receivedAnswers, |
| integer rangeIndex, |
| EPTF_IntegerList rangePosInRange, |
| integer rangeLoops, |
| integer v_sizeofRanges, |
| EPTF_LGenBase_tcState state, |
| charstring userData, |
| integer stopTimeoutTimer, |
| EPTF_FreeBusyQueue stoppingEntityInfo, |
| charstring uniqueName, |
| integer minAvailable, |
| integer maxRunning, |
| integer maxBusy, |
| EPTF_IntegerList referredTrafficCases, |
| integer paramHashMap, |
| integer templateSetIdx, // -1 if doesn't exist |
| EPTF_LGenBase_TcVarDescriptorList varList, |
| EPTF_LGenBase_TcSiblingVarDescriptorList siblingVarList, |
| EPTF_LGenBase_TcStatHandlerDescriptorList statHandlerStatList, |
| EPTF_LGenBase_TcStatHandlerDescriptorList siblingStatHandlerStatList, |
| //EPTF_BooleanList statisticProvidersRegistered, |
| EPTF_LGenBase_TcStatMeasDescriptorList statMeasStatList, |
| EPTF_LGenBase_TcSiblingVarDescriptorList siblingStatMeasStatList, |
| boolean stopped, |
| integer cpsOverrunCounter, |
| integer entityUnderrunCounter, |
| // list of callback functions called when the target CPS changes |
| EPTF_LGenBase_TrafficCaseCPSChangedCallbackFn_FT_List cpsChangedCallbackList, |
| EPTF_LGenBase_TcSiblingFsmList fsmList, |
| //TODO check it and varList |
| integer siblingVarCount, |
| integer siblingStatMeasCount, |
| integer siblingStatHandlerCount, |
| EPTF_IntegerArray2D varIdxInFsm, |
| EPTF_IntegerArray2D siblingFsmVarIdxInFsm, |
| EPTF_IntegerArray2D statMeasIdxInFsm, |
| EPTF_IntegerArray2D siblingFsmStatMeasIdxInFsm, |
| EPTF_IntegerArray2D statHandlerIdxInFsm, |
| EPTF_IntegerArray2D siblingFsmStatHandlerIdxInFsm, |
| integer TCVarNamesHash, |
| integer SiblingFSMVarNamesHash, |
| integer FSMVarNamesHash, |
| integer TCStatMeasNamesHash, |
| integer SiblingFSMStatMeasNamesHash, |
| integer FSMStatMeasNamesHash, |
| integer TCStatHandlerNamesHash, |
| integer SiblingFSMStatHandlerNamesHash, |
| integer FSMStatHandlerNamesHash, |
| EPTF_IntegerArray2D referredFsmIdxsInSiblings, |
| EPTF_IntegerArray2D referredTCIdxsInSiblings,/*, |
| EPTF_LGenBase_ListenerSiblingIdxListInTables siblingIdxListInTables*/ |
| boolean restoreTCAtStartTC |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_TcMgmt_emptytcDescriptor |
| // |
| // Purpose: An empty <EPTF_LGenBase_TcDescriptor> to initialize a new variable. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_TcDescriptor c_EPTF_LGenBase_TcMgmt_emptytcDescriptor := { |
| "", -1, -1, -1, -1, -1, c_EPTF_LGenBase_emptyEntityInfo, null, null, |
| 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0,0,0,-1,-1, 0, 0, 0,false,0.0, 0.0, c_EPTF_LGenBase_emptySchedulerData4Dummy, |
| c_EPTF_LGenBase_emptyScenarioTypeInternalDeclarator.trafficType, |
| false, false, false, |
| c_EPTF_LGenBase_emptyConditionTrue, |
| c_EPTF_LGenBase_emptyConditionTrue, |
| c_EPTF_LGenBase_emptyTrafficStartFinishConditionsAndActionsDesc, |
| c_EPTF_LGenBase_emptyEntityFinishConditionsDesc, {}, {}, {}, {}, |
| 0,0,0,{},0,0, |
| c_EPTF_LGenBase_tcStateIdle, |
| "", -1, c_EPTF_emptyFreeBusyQueue, "", |
| 0,0,0, {}, -1, -1, {}, {}, {}, {}, {},{}, |
| false, |
| 0,0, |
| {}, |
| {{"", -1}}, |
| 0, 0, 0, {},{},{},{},{},{}, |
| -1,-1,-1,-1,-1,-1,-1,-1,-1, |
| {}, |
| {}, |
| //{} |
| true |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_ParamRangeDescriptor |
| // |
| // Purpose: Internal storage of the actual values of a range parameter. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TcMgmt_ParamRangeDescriptor{ |
| charstring name, |
| integer baseOffset, |
| integer count, |
| integer iterator |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_ParamRangeDescriptorList |
| // |
| // Purpose: List of <EPTF_LGenBase_TcMgmt_ParamRangeDescriptor> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TcMgmt_ParamRangeDescriptor EPTF_LGenBase_TcMgmt_ParamRangeDescriptorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcTypeDescriptor |
| // |
| // Purpose: Used for temporary data transformation during traffic case type declaration. |
| // See <f_EPTF_LGenBase_declareTcType>, <f_EPTF_LGenBase_declareTcType2>, <f_EPTF_LGenBase_fillTcTypeDescriptor> functions and |
| // <v_LGenBase_trafficCaseTypes>. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TcTypeDescriptor { |
| charstring name, //name of the TC |
| integer fsmIdx, //FSM table name of the TC |
| integer entityTypeIdx, |
| EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT customEntitySuccPrev, //if EMPTY then default |
| EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup2_FT customEntitySucc2, //if EMPTY then default |
| //finishConditions |
| EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator trafficStartFinishConditions, |
| EPTF_LGenBase_EntityFinishConditionsInternalDeclarator entityFinishConditions, |
| //actionLists |
| EPTF_LGenBase_TcMgmt_GroupActionsList trafficFinishedActions, |
| EPTF_LGenBase_TcMgmt_EntityActionsList entityFinishActions, |
| EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList params |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcTypeDescriptorList |
| // |
| // Purpose: List of <EPTF_LGenBase_TcTypeDescriptor> records. |
| // See <v_LGenBase_trafficCaseTypes>. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TcTypeDescriptor EPTF_LGenBase_TcTypeDescriptorList; |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyTcTypeDescriptor |
| // |
| // Purpose: An empty <EPTF_LGenBase_TcTypeDescriptor> to initialize a new variable. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_TcTypeDescriptor c_EPTF_LGenBase_emptyTcTypeDescriptor := { |
| name := "", |
| fsmIdx := -1, |
| entityTypeIdx := -1, |
| customEntitySuccPrev := null, |
| customEntitySucc2 := null, |
| trafficStartFinishConditions := c_EPTF_LGenBase_emptyTrafficStartFinishConditionsInternalDeclarator, |
| entityFinishConditions := c_EPTF_LGenBase_emptyEntityFinishConditionsInternalDeclarator, |
| trafficFinishedActions := {}, //former onLaunchFinish |
| entityFinishActions := {}, |
| params := {} |
| }; |
| |
| type record EPTF_LGenBase_TcTypeFSM{ |
| charstring siblingName, |
| charstring fsmName, |
| integer fsmTypeIndex |
| } |
| |
| const EPTF_LGenBase_TcTypeFSM c_EPTF_LGenBase_emptyTcTypeFSM := { |
| "", |
| "", |
| -1 |
| } |
| type record of EPTF_LGenBase_TcTypeFSM EPTF_LGenBase_TcTypeFsmList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcOfScenarioInternalDescriptor |
| // |
| // Purpose: An internal descriptor of a traffic case type of a scenario. |
| // See <EPTF_LGenBase_ScenarioType>, <f_EPTF_LGenBase_createTc2EntityGroup>. |
| // |
| // Elements: |
| // - tcTypeIdx - *integer* - index of the traffic case type |
| // - startDelay - *float* - traffic case should start only after the specified amount of time (given in seconds) |
| // - target - <EPTF_LGenBase_TcMgmt_TcProperty2Reach> - target "cps" or "traffic weight" to reach |
| // - scheduler - <charstring> - the chosen scheduling strategy (burst calculation method) |
| // - entitySelection - <EPTF_LGenBase_EntitySelectionType> - the method of selecting a new entity |
| // - enableEntities - *boolean* - the entities have to be in enabled or disabled state after creating the traffic case |
| // - enable - *boolean* - the traffic case will be enabled or disabled after creation |
| // - ranges - <EPTF_LGenBase_TcMgmt_ParamRangeDeclaratorList> - Range descriptors for the traffic case. |
| // The dispatched <c_EPTF_LGenBase_inputIdx_testMgmt_startTC> events of <c_EPTF_LGenBase_bIdx> |
| // behavior get their traffic parameter from this range. See also: <t_startTcOfFsm>, <f_EPTF_LGenBase_doTrafficCaseTimerAction>. |
| // - params - <EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList> - Retrievable charstring parameters. See <f_EPTF_LGenBase_getCharstringParamValue> |
| // - groupFinishConditions - <EPTF_LGenBase_TcMgmt_GroupFinishConditions2> - When one of these conditions becomes true, the launch of the |
| // traffic of the specified traffic case will stop, and the |
| // actions described in the groupFinishActions will be fired. |
| // - entityFinishConditions - <EPTF_LGenBase_TcMgmt_EntityFinishConditions> - When one of these conditions becomes true, the launch of the |
| // traffic on the specified entity of the specified traffic case will stop, and the |
| // actions described in the entityFinishActions will be fired. |
| // - tcFinishActions - <EPTF_LGenBase_TcMgmt_GroupActions2List> - List of actions that will be executed when a |
| // group finish condition becomes true or the last traffic of the traffic case returns the acknowledgement. |
| // - entityFinishActions - <EPTF_LGenBase_TcMgmt_EntityActionsList> - List of actions that will be executed when an |
| // entity finish condition becomes true. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TcOfScenarioInternalDeclarator{ |
| charstring tcPrivateName, |
| charstring tcTypeName, |
| float startDelay, //not needed for weighted |
| EPTF_LGenBase_TcMgmt_TcProperty2Reach target, |
| charstring scheduler optional, |
| EPTF_LGenBase_EntitySelectionType entitySelection optional, |
| boolean enableEntities, |
| boolean enable, |
| EPTF_LGenBase_TcMgmt_ParamRangeDeclaratorList ranges, |
| EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList params, |
| EPTF_LGenBase_TrafficStartFinishConditionsInternalDeclarator trafficStartFinishConditionsAndActions, |
| EPTF_LGenBase_EntityFinishConditionsInternalDeclarator entityFinishConditions, |
| EPTF_LGenBase_TcMgmt_EntityActionsList entityFinishActions, |
| EPTF_LGenBase_TcMgmt_GroupActionsList trafficFinishedActions, |
| EPTF_LGenBase_TemplateList templateSet, |
| EPTF_LGenBase_TcTypeFsmList fsmList, |
| charstring customEntitySucc, |
| boolean restoreTCAtStartTC |
| } |
| //charstring scheduler optional, |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcOfScenarioInternalDeclaratorList |
| // |
| // Purpose: List of <EPTF_LGenBase_TcOfScenarioInternalDeclarator> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TcOfScenarioInternalDeclarator EPTF_LGenBase_TcOfScenarioInternalDeclaratorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyTcOfScenarioInternalDeclarator |
| // |
| // Purpose: An empty <EPTF_LGenBase_TcOfScenarioInternalDeclarator> to initialize a new variable. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_TcOfScenarioInternalDeclarator c_EPTF_LGenBase_emptyTcOfScenarioInternalDeclarator := { |
| "", "", 0.0, {dummy := 0.0}, |
| omit,omit, false, false, {}, {}, |
| c_EPTF_LGenBase_emptyTrafficStartFinishConditionsInternalDeclarator, |
| //c_EPTF_LGenBase_TcMgmt_emptyGroupFinishConditions2, |
| c_EPTF_LGenBase_emptyEntityFinishConditionsInternalDeclarator, |
| //omit, |
| {}, |
| //c_EPTF_LGenBase_TcMgmt_emptyGroupFinishConditions2, |
| //{}, |
| {}, |
| {}, |
| {}, |
| "", |
| true |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioTypeInternalDeclarator |
| // |
| // Purpose: |
| // Internal descriptor for collecting traffic cases in an entity group in a specimen of scenario |
| // |
| // Elements: |
| // - name - *charstring* - name of the scenario |
| // - enabled - *boolean* - enabled |
| // - phaseData - <EPTF_LGenBase_PhaseData> - additional data for all scenario related phase information |
| // - weightedScData - <EPTF_LGenBase_WeightedScData> - additional data for weighted scenarios, omit -> normal scenario |
| // - tcList - <EPTF_LGenBase_TcOfScenarioInternalList> - list of traffic cases assigned to the scenario |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ScenarioType{ |
| charstring name, |
| boolean enabled, |
| boolean conditionsFromTc, |
| EPTF_LGenBase_PhaseData phaseData optional, // omit -> no phase data |
| EPTF_LGenBase_WeightedScData weightedScData optional, // omit -> normal scenario |
| EPTF_LGenBase_TrafficType trafficType, |
| EPTF_LGenBase_TcOfScenarioInternalDeclaratorList tcList |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyScenarioType |
| // |
| // Purpose: An empty <EPTF_LGenBase_ScenarioType> to initialize a new variable. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_ScenarioType c_EPTF_LGenBase_emptyScenarioType := { |
| name := "", |
| enabled := true, |
| conditionsFromTc := false, |
| phaseData := omit, |
| weightedScData := omit, |
| trafficType := c_EPTF_LGenBase_emptyScenarioTypeInternalDeclarator.trafficType, |
| tcList := {} |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioTypeList |
| // |
| // Purpose: List of scenario specimens in an entity group |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_ScenarioType EPTF_LGenBase_ScenarioTypeList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_SchedulerData |
| // |
| // Purpose: |
| // Stores the data for handling scenarios with cpsToReach |
| // |
| // Elements: |
| // - burstFuncRef - <EPTF_LGenBase_burstFuncRef> - stores the reference to the burst pre- and post-calculation function |
| // - burstCalcNeeded - *boolean* - if burst recalculation is needed in the pre- and post-calculation functions |
| // - target - <EPTF_LGenBase_TcMgmt_TcProperty2Reach> - target cps or weight to reach with scheduler |
| // - lastBurstSize - *integer* - the last burst actually sent |
| // - targetBurstSize - *integer* - burst size to send |
| // - idealBurstSize - *float* - ideal burst size to send (maybe fractional) |
| // - roundedCpsUpdateInterval - *float* - rounded value of Cps update interval |
| // - burstSizeCumulativeError - *float* - culative error af burst size |
| // - schedulingTimer - *integer* - scheduling timer |
| // - moduloOperand - *integer* - modulo operand for IMST type scheduler |
| // - poissonTable - *t_Poisson_Table* - generated poisson table for poisson scheduler |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_SchedulerData { |
| EPTF_LGenBase_burstFuncRef burstFuncRef, |
| boolean burstCalcNeeded, |
| EPTF_LGenBase_TcMgmt_TcProperty2Reach target, //cps or weight target |
| integer lastBurstSize, |
| integer currentBurstSize, |
| float idealBurstSize , |
| float roundedCpsUpdateInterval, |
| float burstSizeCumulativeError, |
| integer schedulingTimer, |
| integer moduloOperand, |
| t_Poisson_Table poissonTable |
| } |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptySchedulerData4Cps |
| // c_EPTF_LGenBase_emptySchedulerData4TcWeight |
| // c_EPTF_LGenBase_emptySchedulerData4Dummy |
| // |
| // Purpose: Empty <EPTF_LGenBase_SchedulerData> to initialize a new variable. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_SchedulerData c_EPTF_LGenBase_emptySchedulerData4Cps := { |
| {c_EPTF_LGenBase_BurstCalc_cs, null, null}, false, {cpsToReach := 0.0}, 0, 0, 0.0, 0.0, 0.0, -1 , 0, {false,0.0,{}} }; |
| const EPTF_LGenBase_SchedulerData c_EPTF_LGenBase_emptySchedulerData4TcWeight := { |
| {c_EPTF_LGenBase_BurstCalc_cs, null, null}, false, {trafficWeight := 0.0}, 0, 0, 0.0, 0.0, 0.0, -1 , 0, {false,0.0,{}} }; |
| const EPTF_LGenBase_SchedulerData c_EPTF_LGenBase_emptySchedulerData4Dummy := { |
| {c_EPTF_LGenBase_BurstCalc_cs, null, null}, false, {dummy := 0.0}, 0, 0, 0.0, 0.0, 0.0, -1 , 0, {false,0.0,{}} }; |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT |
| // |
| // Purpose: |
| // Defines the function type of scenario CPS changed callback |
| // |
| // Parameters: |
| // pl_cps - *in float* - the new CPS value |
| // pl_eGrpIdx - *in integer* - the entity group instance idx |
| // pl_scIdx - *in integer* - the scenario instance idx in entity group |
| // |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT(in float pl_cps, in integer pl_eGrpIdx, in integer pl_scIdx) runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT_List |
| // |
| // Purpose: |
| // Defines the CPS changed callback function list for a scenario |
| // |
| // Elements: |
| // list of <EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT> |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT_List; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioOfGrp |
| // |
| // Purpose: |
| // Stores the indexes of the traffice cases of a scenario |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ScenarioOfGrp{ |
| charstring name, |
| EPTF_LGenBase_PhaseData phaseData optional, // omit -> no phase data |
| EPTF_LGenBase_WeightedScData weightedScData optional, //EGBOZIE: for weighted Scenarios |
| EPTF_LGenBase_SchedulerData schedulerData optional,//EGBOZIE: for weighted Scenarios |
| EPTF_TrafficMixer_scenarioTraffixMixData trafficMixData optional, //EGBOZIE: for weighted Scenarios |
| boolean enabled, |
| integer startedTcs, |
| EPTF_IntegerList tcIdxList, |
| EPTF_LGenBase_tcState state, |
| boolean lockCPS, |
| charstring uniqueName, |
| EPTF_LGenBase_TrafficType trafficType, |
| integer absIdx, |
| EPTF_LGenBase_ScenarioCPSChangedCallbackFn_FT_List cpsChangedCallbackList // list of callback functions called when the target CPS changes |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyScenarioOfGrp |
| // |
| // Purpose: An empty <EPTF_LGenBase_ScenarioOfGrp> to initialize a new variable. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_ScenarioOfGrp c_EPTF_LGenBase_emptyScenarioOfGrp := { |
| name := "", |
| phaseData := omit, |
| weightedScData := omit,//EGBOZIE: new, is omit for weighted scenario |
| schedulerData := omit,//EGBOZIE: new, is omit for weighted scenario |
| trafficMixData := omit,//EGBOZIE: new, is omit for weighted scenario, |
| enabled := true, //implicit true, since EPTF_LGenBase_Scenario2Grp does not know this |
| startedTcs := 0, |
| tcIdxList := {}, |
| state := c_EPTF_LGenBase_tcStateIdle, |
| lockCPS := false, |
| uniqueName := "", |
| trafficType := c_EPTF_LGenBase_emptyScenarioTypeInternalDeclarator.trafficType, |
| absIdx := -1, |
| cpsChangedCallbackList := {} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ScenarioListOfGrp |
| // |
| // Purpose: Stores the list if scenarios of an entity group |
| // |
| // Detailed Comments: For internal use |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_ScenarioOfGrp EPTF_LGenBase_ScenarioListOfGrp; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityInfo |
| // |
| // Purpose: Databases for storing entity information |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityInfo{ |
| EPTF_FreeBusyQueue fbq, |
| EPTF_RNA_RandomNArray rna, |
| EPTF_LGenBase_EntitySelectionType entitySelection, |
| EPTF_LGenBase_EntityItemList itemList |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Const: c_EPTF_LGenBase_emptyEntityInfo |
| // |
| // Purpose: An empty <EPTF_LGenBase_EntityInfo> to initialize a new variable. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_EntityInfo c_EPTF_LGenBase_emptyEntityInfo := {c_EPTF_emptyFreeBusyQueue, c_EPTF_RNA_emptyRandomNArray, round_robin, {}}; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityItem |
| // |
| // Purpose: Stores various entity information |
| // |
| // Elements: |
| // - entityIdx - *integer* - entity index |
| // - fsmCtxIdx - *integer* - FSM ctx reference |
| // - nrOfStarts - *integer* - nr. of starts |
| // - nrOfSuccesses - *integer* - nr. of successes (entity is successful <=> nr.of.successes>=1) |
| // - nrOfFails - *integer* - nr. of fails |
| // - nrOfErrors - *integer* |
| // - nrOfTimeouts - *integer* |
| // - entityState - *integer* - state of the entity |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityItem{ |
| integer entityIdx, |
| //integer fsmCtxIdx, |
| integer nrOfStarts, |
| integer nrOfSuccesses, |
| integer nrOfFails, |
| integer nrOfErrors, |
| integer nrOfTimeouts, |
| integer entityState, |
| boolean isRunning, |
| boolean finished, |
| boolean disabled, |
| float startTime, |
| EPTF_IntegerList siblingFsmCtxList, |
| EPTF_IntegerList siblingFsmVarList, |
| EPTF_IntegerList siblingFsmStatMeasList, |
| EPTF_IntegerList siblingFsmStatHandlerList |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Const: c_EPTF_LGenBase_emptyEntityItem |
| // |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_EntityItem c_EPTF_LGenBase_emptyEntityItem := {-1, /*-1, */0, 0, 0, 0, 0, 0, false, false, false, 0.0,{}, {}, {}, {} }; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityItemList |
| // |
| // Purpose: A list of entity information |
| // |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EntityItem EPTF_LGenBase_EntityItemList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityState |
| // |
| // Purpose: A subset of *verdicttype* to describe the state of an entity. |
| // See: <EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT>. |
| /////////////////////////////////////////////////////////// |
| type verdicttype EPTF_LGenBase_EntityState(none, pass, fail); |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT |
| // Purpose: Obsolete |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT( |
| in integer eGroupIdx, |
| in integer eIdxInGroup |
| ) |
| runs on self return boolean |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT |
| // |
| // Purpose: Function prototype. The customEntitySucc member of the |
| // <EPTF_LGenBase_TcTypeDescriptor> is called |
| // to evaluate the state of the entity at the end of a traffic of an entity. |
| // See <EPTF_LGenBase_TcMgmt_tcTypeDeclarator2>, <f_EPTF_LGenBase_finishedTcListener>. |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup2_FT( |
| in integer pl_tcIdx, |
| in integer pl_eIdxInTc, |
| in boolean pl_lastSuccess |
| ) |
| runs on self return EPTF_LGenBase_EntityState |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_tcDescriptorList |
| // |
| // Purpose: An internal storage of traffic case descriptors/contexts |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TcDescriptor EPTF_LGenBase_tcDescriptorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_customFinishCondition_FT |
| // |
| // Purpose: Function prototype to calculate whether an entity |
| // or an entity group must be finished. |
| // See <EPTF_LGenBase_TcMgmt_GroupFinishConditions>, <f_EPTF_LGenBase_finishedTcListener>. |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_customFinishCondition_FT( |
| in integer pl_tcIdx, |
| in integer pl_eIdx |
| ) |
| runs on self |
| return boolean; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_customFinishFunction_FT |
| // |
| // Purpose: Function prototype to execute when a finish condition of an entity |
| // or an entity group became true. |
| // See <EPTF_LGenBase_TcMgmt_GroupFinishConditions>, <EPTF_LGenBase_TcMgmt_EntityFinishConditions>, <f_EPTF_LGenBase_finishedTcListener>. |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_customFinishFunction_FT(in integer pl_idx) runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NrOfExecStartDescriptor |
| // |
| // Purpose: Descriptor for storing actions if number of executed starts becomes true |
| // |
| // Elements: |
| // count - *integer* - number of executed starts should occur |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_NrOfExecStartDescriptor{ |
| integer count, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NrOfSuccessesDescriptor |
| // |
| // Purpose: Descriptor for storing actions if number of successes becomes true |
| // |
| // Elements: |
| // count - *integer* - number of successes should occur |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_NrOfSuccessesDescriptor{ |
| integer count, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NrOfFailsDescriptor |
| // |
| // Purpose: Descriptor for storing actions if number of fails becomes true |
| // |
| // Elements: |
| // count - *integer* - number of fails should occur |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_NrOfFailsDescriptor{ |
| integer count, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NrOfErrorsDescriptor |
| // |
| // Purpose: Descriptor for storing actions if number of errors becomes true |
| // |
| // Elements: |
| // count - *integer* - number of errors should occur |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_NrOfErrorsDescriptor{ |
| integer count, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NrOfTimeoutsDescriptor |
| // |
| // Purpose: Descriptor for storing actions if number of timeouts becomes true |
| // |
| // Elements: |
| // count - *integer* - number of timeouts should occur |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_NrOfTimeoutsDescriptor{ |
| integer count, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NrOfRangeLoopDescriptor |
| // |
| // Purpose: Descriptor for storing actions if required amount of range parameters loops becomes true |
| // |
| // Elements: |
| // count - *integer* - The required amount of loop of range parameters should occur |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_NrOfRangeLoopDescriptor{ |
| integer count, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ExecTimeDescriptor |
| // |
| // Purpose: Descriptor for storing actions if required execution time passed |
| // |
| // Elements: |
| // time - *float* - required execution time |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ExecTimeDescriptor{ |
| float time, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntitiesFinishedDescriptor |
| // |
| // Purpose: Descriptor for storing actions if entities finished |
| // |
| // Elements: |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntitiesFinishedDescriptor{ |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_AvailableEntitiesFinishedDescriptor |
| // |
| // Purpose: Descriptor for storing actions if all available entities finished |
| // |
| // Elements: |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_AvailableEntitiesFinishedDescriptor{ |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_AnythingFinishedDescriptor |
| // |
| // Purpose: Descriptor for storing actions to do if any of the conditions becomes true |
| // |
| // Elements: |
| // actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if conditions met |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_AnythingFinishedDescriptor{ |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_CustomFinishDescriptor |
| // |
| // Purpose: Descriptor for storing actions if custom finish condition becomes true |
| // |
| // Elements: |
| // - functionRef - <EPTF_LGenBase_customFinishCondition_FT> - custom finish function reference |
| // - actions - <EPTF_LGenBase_TcMgmt_GroupActionsDescList> - group actions to be done if custom finish condition true |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_CustomFinishDescriptor{ |
| EPTF_LGenBase_customFinishCondition_FT functionRef, |
| EPTF_LGenBase_TcMgmt_GroupActionsDescList actions |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TrafficStartFinishConditionsAndActionsDesc |
| // |
| // Purpose: Internal storage type of the <EPTF_LGenBase_TcMgmt_GroupFinishConditions> record. |
| // |
| // Detailed Comments: It contains the index of the registered customFinishCondition function. |
| // See <f_EPTF_LGenBase_convertGroupFinishConditions2Desc>, <f_EPTF_LGenBase_declareFunction>. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TrafficStartFinishConditionsAndActionsDesc { |
| EPTF_LGenBase_NrOfExecStartDescriptor nrOfExecStart optional, |
| EPTF_LGenBase_NrOfSuccessesDescriptor nrOfSuccesses optional, |
| EPTF_LGenBase_NrOfFailsDescriptor nrOfFails optional, |
| EPTF_LGenBase_NrOfErrorsDescriptor nrOfErrors optional, |
| EPTF_LGenBase_NrOfTimeoutsDescriptor nrOfTimeouts optional, |
| EPTF_LGenBase_NrOfRangeLoopDescriptor nrOfRangeLoop optional, |
| EPTF_LGenBase_ExecTimeDescriptor execTime optional, |
| EPTF_LGenBase_EntitiesFinishedDescriptor entitiesFinished optional, |
| EPTF_LGenBase_AvailableEntitiesFinishedDescriptor availableEntitiesFinished optional, |
| EPTF_LGenBase_CustomFinishDescriptor customFinishConditionFuncRef optional, |
| EPTF_LGenBase_AnythingFinishedDescriptor anythingFinished optional |
| } |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyGroupFinishConditionsDesc |
| // |
| // Purpose: An empty <EPTF_LGenBase_TrafficStartFinishConditionsAndActionsDesc> to initialize a new variable. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_TrafficStartFinishConditionsAndActionsDesc c_EPTF_LGenBase_emptyTrafficStartFinishConditionsAndActionsDesc := { |
| omit, omit, omit, omit, omit, omit, omit, omit, omit, omit, omit |
| }; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ConditionTrue |
| // |
| // Purpose: This type is used to store which condition of |
| // <EPTF_LGenBase_TcFinishConditionList> became true |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ConditionTrue{ |
| boolean nrOfExecStart, |
| boolean nrOfSuccesses, |
| boolean nrOfFails, |
| boolean nrOfErrors, |
| boolean nrOfTimeouts, |
| boolean nrOfRangeLoop, |
| boolean execTime, |
| boolean entitiesFinished, |
| boolean availableEntitiesFinished, |
| boolean customFinishCondition, |
| boolean anythingFinished |
| } |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyConditionTrue |
| // |
| // Purpose: Empty <EPTF_LGenBase_ConditionTrue> initializer. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_ConditionTrue c_EPTF_LGenBase_emptyConditionTrue := { |
| false, false, false, false, false, false, false, false, false, false, false |
| } |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_allConditionTrue |
| // |
| // Purpose: Empty <EPTF_LGenBase_ConditionTrue> initializer. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_ConditionTrue c_EPTF_LGenBase_allConditionTrue := { |
| true, true, true, true, true, true, true, true, true, true, true |
| } |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_anythingConditionTrue |
| // |
| // Purpose: A <EPTF_LGenBase_ConditionTrue> record where all the conditions are false except the "anythingFinished" |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_ConditionTrue c_EPTF_LGenBase_anythingConditionTrue := { |
| false, false, false, false, false, false, false, false, false, false, true |
| } |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_customConditionTrue |
| // |
| // Purpose: A <EPTF_LGenBase_ConditionTrue> record where all the conditions of custom finished are true |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_ConditionTrue c_EPTF_LGenBase_customConditionTrue := { |
| false, false, false, false, false, false, false, false, false, true, true |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityFinishConditionsDesc |
| // |
| // Purpose: Internal storage type of the <EPTF_LGenBase_TcMgmt_EntityFinishConditions> record. |
| // |
| // Detailed Comments: It contains the index of the registered customFinishCondition functions. |
| // See <f_EPTF_LGenBase_convertGroupFinishConditions2Desc>, <f_EPTF_LGenBase_declareFunction>. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityFinishConditionsDesc{ |
| integer nrOfExecStart optional, |
| integer nrOfSuccesses optional, |
| integer nrOfFails optional, |
| integer nrOfErrors optional, |
| integer nrOfTimeouts optional, |
| EPTF_LGenBase_customFinishCondition_FT customFinishCondition optional |
| } |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyEntityFinishConditionsDesc |
| // |
| // Purpose: An empty <EPTF_LGenBase_EntityFinishConditionsDesc> to initialize a new variable. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_EntityFinishConditionsDesc c_EPTF_LGenBase_emptyEntityFinishConditionsDesc := {omit, omit, omit, omit, omit, omit}; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_GroupActionsDesc |
| // |
| // Purpose: Internal storage type of the <EPTF_LGenBase_TcMgmt_GroupActions> record. |
| // |
| // Detailed Comments: It contains the index of the registered customFinishAction functions. |
| // See <f_EPTF_LGenBase_declareFunction>. |
| /////////////////////////////////////////////////////////// |
| type union EPTF_LGenBase_TcMgmt_GroupActionsDesc { |
| EPTF_LGenBase_TcMgmt_Action_EnableTc4GroupDesc enableTc, |
| EPTF_LGenBase_TcMgmt_Action_DisableTcDesc disableTc, |
| EPTF_LGenBase_TcMgmt_Action_EnableAllTc enableAllTc, |
| EPTF_LGenBase_TcMgmt_Action_DisableAllTc disableAllTc, |
| EPTF_LGenBase_TcMgmt_Action_GenerateGenericEvent generateGenericEvent, |
| EPTF_LGenBase_customFinishFunction_FT customFinishFunction, |
| EPTF_LGenBase_TcMgmt_Action_TestFinished testFinished |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_GroupActionsDescList |
| // |
| // Purpose: List of <EPTF_LGenBase_TcMgmt_GroupActionsDesc> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TcMgmt_GroupActionsDesc EPTF_LGenBase_TcMgmt_GroupActionsDescList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_Action_EnableTc4GroupDesc |
| // |
| // Purpose: Descriptor of enabling traffic case group finish action |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TcMgmt_Action_EnableTc4GroupDesc { |
| integer tcIdx, //action operate on this TC |
| EPTF_LGenBase_TcMgmt_EntityAvailabilityGroupTransferMode aMode //availibility transfer mode |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_Action_EnableTc4EntityDesc |
| // |
| // Purpose: Descriptor of enabling entity in traffic case entity finish action |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TcMgmt_Action_EnableTc4EntityDesc { |
| integer tcIdx, //action operate on this TC |
| EPTF_LGenBase_TcMgmt_EntityAvailabilityEntityTransferMode aMode //availibility transfer mode |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_Action_DisableTcDesc |
| // |
| // Purpose: Descriptor of enabling traffic case in entity and |
| // group finish actions |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TcMgmt_Action_DisableTcDesc { |
| integer tcIdx //action operate on this TC |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_EntityActionsDesc |
| // |
| // Purpose: Internal storage type of the <EPTF_LGenBase_TcMgmt_EntityActions> record. |
| /////////////////////////////////////////////////////////// |
| type union EPTF_LGenBase_TcMgmt_EntityActionsDesc { |
| EPTF_LGenBase_TcMgmt_Action_EnableTc4EntityDesc enableEntity4Tc, |
| EPTF_LGenBase_TcMgmt_Action_DisableTcDesc disableEntity4Tc, |
| EPTF_LGenBase_TcMgmt_Action_GenerateFsmEvent generateFsmEvent, |
| EPTF_LGenBase_customFinishFunction_FT customFinishFunction |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TcMgmt_EntityActionsDescList |
| // |
| // Purpose: List of <EPTF_LGenBase_TcMgmt_EntityActionsDesc> records. |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TcMgmt_EntityActionsDesc EPTF_LGenBase_TcMgmt_EntityActionsDescList |
| |
| }//group TcMgmt |
| |
| /////////////////////////////////////////////////////////// |
| // Group: Events |
| // |
| // Purpose: |
| // Grouping data types for the events/inputs metadatabase of |
| // <EPTF_LGenBase_CT> |
| // |
| /////////////////////////////////////////////////////////// |
| group Events { |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmEvent |
| // |
| // Purpose: Type for storing event declarations of a behavior, i.e., possible |
| // "inputs" of FSM tables. |
| // |
| // Elements: |
| // *charstring* |
| /////////////////////////////////////////////////////////// |
| type charstring EPTF_LGenBase_FsmEvent |
| |
| type record EPTF_LGenBase_FsmEventRec{ |
| EPTF_LGenBase_FsmEvent name, |
| EPTF_LGenBase_LogEvent_FT logFn |
| } |
| template EPTF_LGenBase_FsmEventRec t_EPTF_LGenBase_FsmEventInit( |
| charstring pl_name, |
| EPTF_LGenBase_LogEvent_FT pl_logFn) := { |
| name := pl_name, |
| logFn := pl_logFn |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmEventList |
| // |
| // Purpose: Record of <EPTF_LGenBase_FsmEvent> to provide an indexable container |
| // for an arbitrary number of <EPTF_LGenBase_FsmEvent> values |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_FsmEventRec> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_FsmEventRec EPTF_LGenBase_FsmEventList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmEventDataBase |
| // |
| // Purpose: |
| // Record of <EPTF_LGenBase_FsmEventList> to provide a container for |
| // arbitrary number of <EPTF_LGenBase_FsmEventList> values |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_FsmEventList> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_FsmEventList EPTF_LGenBase_FsmEventDataBase; |
| |
| }//group events |
| |
| /////////////////////////////////////////////////////////// |
| // Group: FsmTables |
| // |
| // Purpose: |
| // Grouping data types for the FSM of <EPTF_LGenBase_CT> |
| // |
| // |
| // Detailed Comments: |
| // It contains "non-indexed" cells, that is, cells that stores direct |
| // fn. references instead of test-step-references. Hence, it is *not* suitable |
| // of declaring FSM-s in cfg. files, but it is probably more intuitive for |
| // declaring FSM-s from TTCN-3 source. It is "the" internal representation of |
| // FSMs in <EPTF_LGenBasE_CT>. If a table is declared using these datatypes |
| // via <f_EPTF_LGenBase_declareCompactFsmTable> then the argument is stored in the |
| // database as-is. For .cfg file usage the data types of an other group, |
| // called <IndexedFsmTables> are suitable. During the declaration of an |
| // "indexed" FSM with <f_EPTF_LGenBase_declareIndexedCompactFsmTable> the table |
| // will be transformed on-the fly and stored as a "normal" table with direct |
| // fn. pointers. |
| /////////////////////////////////////////////////////////// |
| group FsmTables { |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmTableCell |
| // |
| // Purpose: |
| // Record type for describe an FSM table cell with direct fn. pointers |
| // |
| // Elements: |
| // - actionList - <EPTF_LGenBase_FsmActionList> - *optional* - a list |
| // of function references to test steps, i.e., to functions |
| // with a signature according to |
| // <EPTF_LGenBase_TestStepFunction_FT>. All of these actions |
| // will be invoked when the input belonging to the row of the |
| // cell is reported by <f_EPTF_LGenBase_reportEvent> and the |
| // relevant entity is in the local state belonging to the |
| // column of this cell |
| // - nextStateCalculation - <EPTF_LGenBase_FsmNextStateCalcDescriptor> - |
| // *optional* -calculation method of the next local state within |
| // the same table! The entity will be assumed to proceed to this state |
| // if the input belonging to the row of the cell is reported by |
| // <f_EPTF_LGenBase_dispatchEvent> and the relevant entity is in the |
| // local state belonging to the column of this cell. If present, |
| // then the nextState field is ignored! |
| // - nextState - <EPTF_LGenBase_FsmStateReference> - *optional* - |
| // reference to the next local state within |
| // the same table! The entity will be assumed to proceed to this state |
| // if the input belonging to the row of the cell is reported by |
| // <f_EPTF_LGenBase_dispatchEvent> and the relevant entity is in the |
| // local state belonging to the column of this cell. |
| // |
| // Detailed Comments: |
| // - *Note*: the next state reference is valid only w.r.t. the given FSM |
| // table in question! |
| // - If the actionList is *omit*, then it means that there are no actions |
| // to be performed in the given state for the given input. |
| // - If the nextstate is *omit*, then it means there will be no |
| // state-transition assumed for the entity in the given state for the |
| // given input. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmTableCell { |
| EPTF_LGenBase_FsmActionList actionList optional, |
| EPTF_LGenBase_FsmNextStateCalcDescriptor nextStateCalculation optional, //calc method for the next state |
| EPTF_LGenBase_FsmStateReference nextState optional //pointer to the next state |
| } |
| |
| ///////////////////////////////////////// |
| // Constant: c_EPTF_LGenBase_emptyFsmTableCell |
| // |
| // Purpose: An empty <EPTF_LGenBase_FsmTableCell> to initialize a new variable. |
| ///////////////////////////////////////// |
| const EPTF_LGenBase_FsmTableCell c_EPTF_LGenBase_emptyFsmTableCell := { omit, omit, omit } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmNextStateCalcDescriptor |
| // |
| // Purpose: |
| // Data type for storing the descriptor for next state calculation |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmNextStateCalcDescriptor{ |
| EPTF_LGenBase_NextStateCalc_FT fn, |
| EPTF_IntegerList contextArgs |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_NextStateCalc_FT |
| // |
| // Purpose: |
| // Callback function for calculating next state in the FSM table |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_NextStateCalc_FT( |
| in integer eIdx, |
| in integer fIdx, |
| in EPTF_IntegerList contextArgs, |
| in EPTF_LGenBase_FsmTableCellReference pl_cell, |
| in EPTF_IntegerList pl_stepArgs //supply args to actions |
| ) runs on self return integer; |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmAction |
| // |
| // Purpose: |
| // Data type to provide description about an action in an FSM cell |
| // |
| // Elements: |
| // - step - <EPTF_LGenBase_TestStepFunction_FT> - the function reference to |
| // the test step |
| // - stepContextArgs - <EPTF_IntegerList> - input arguments of the test step |
| // related to the referencing context, such as an FSM table cell |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmAction { |
| EPTF_LGenBase_TestStepFunction_FT step, |
| EPTF_IntegerList stepContextArgs |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmActionList |
| // |
| // Purpose: |
| // Data type to provide a list of actions for an FSM cell |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_FsmAction> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_FsmAction EPTF_LGenBase_FsmActionList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmTableCellList |
| // |
| // Purpose: |
| // Data type to provide a building block for the datatype |
| // <EPTF_LGenBase_FsmTableRow> realizing the rows of FSM table |
| // <EPTF_LGenBase_CompactFsmTable>. |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_FsmTableCell> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_FsmTableCell EPTF_LGenBase_FsmTableCellList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmTableRow |
| // |
| // Purpose: |
| // Data type to realize the rows of an FSM table. |
| // |
| // Elements: |
| // - eventToListen - <EPTF_LGenBase_EventDescriptor> reference to the event that |
| // is used as input for the row of the FSM table |
| // - cellRow - <EPTF_LGenBase_FsmTableCellList> cells of the row of the FSM table |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmTableRow { |
| EPTF_LGenBase_EventDescriptor eventToListen, |
| EPTF_LGenBase_FsmTableCellList cellRow |
| } |
| |
| type record EPTF_LGenBase_InternalFSMEvent2RowXref{ |
| EPTF_LGenBase_EventDescriptor event2Listen, |
| integer rowIdx, |
| integer siblingRef |
| } |
| const EPTF_LGenBase_InternalFSMEvent2RowXref c_EPTF_LGenBase_emptyInternalFSMEvent2RowXref := { |
| {-1,-1,general}, |
| -1, |
| -1 |
| } |
| |
| type record of EPTF_LGenBase_InternalFSMEvent2RowXref EPTF_LGenBase_InternalFSMEvent2RowXrefList |
| |
| type record EPTF_LGenBase_InternalFSMRowDescriptor{ |
| EPTF_IntegerList colIdxListByStates, |
| EPTF_LGenBase_FsmTableCellList cellList |
| } |
| type record of EPTF_LGenBase_InternalFSMRowDescriptor EPTF_LGenBase_InternalFSMRowDescriptorList |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmTableRowList |
| // |
| // Purpose: |
| // Data type containing the cell-rows the data type <EPTF_LGenBase_CompactFsmTable> |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_FsmTableRow> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_FsmTableRow EPTF_LGenBase_FsmTableRowList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmStateReference |
| // |
| // Purpose: |
| // Data type for referencin an FSM state |
| // |
| // Elements: |
| // Type alias for *integer* |
| /////////////////////////////////////////////////////////// |
| type integer EPTF_LGenBase_FsmStateReference; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_CompactFsmTable |
| // |
| // Purpose: |
| // The top level data type for FSM representation in <EPTF_LGenBase_CT> |
| // |
| // Elements: |
| // - name - *charstring* - a name for the table. Used for only |
| // debugging/logging/displaying |
| // - stateList - <EPTF_LGenBase_FsmLocalStateList> - declaration of states of the |
| // FSM. Each state is represented as a charstring label whose position |
| // within <EPTF_LGenBase_FsmLocalStateList> defines the column index for the |
| // state within the same <EPTF_LGenBase_CompactFsmTable>.table |
| // - timerList - <EPTF_LGenBase_FsmLocalTimerList> - declaration of timers of the |
| // FSM. Each timer is represented as a two-tuple: a charstring label and a |
| // float timeout value. Timers are referenced locally via their index |
| // within this list |
| // - table - <EPTF_LGenBase_FsmTableRowList> - 2D table of cells of the FSM |
| // |
| // Detailed Comments: |
| // - Allows mixing of inputs/events/actions from any declared BehaviorType |
| // without requiring to use sparse table-representations, hence the name |
| // "CompactFSM" |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_CompactFsmTable { |
| charstring name, |
| EPTF_LGenBase_FsmLocalStateList stateList, |
| EPTF_LGenBase_FsmLocalTimerList timerList, |
| EPTF_LGenBase_FsmTableRowList table |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_CompactFsmTableList |
| // |
| // Purpose: |
| // Data type for FSM table database |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_CompactFsmTable> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_CompactFsmTable EPTF_LGenBase_CompactFsmTableList; |
| |
| type enumerated EPTF_LGenBase_FSMTimerType |
| { |
| static(0), |
| random, |
| randomGauss |
| }; |
| |
| //TODO New random timer datatype |
| /* type record EPTF_LGenBase_FSMTimerInternal{ |
| charstring name, |
| // float timeoutMin, |
| // float timeoutMax, |
| // EPTF_LGenBase_FSMTimerType timerType, |
| EPTF_LGenBase_FSMTimerParameters timerParams //optional |
| } |
| |
| const EPTF_LGenBase_FSMTimerInternal c_EPTF_LGenBase_emptyFSMTimerInternal := { |
| "", 0.0, 0.0, static, omit |
| }*/ |
| |
| type EPTF_LGenBase_FsmTimer EPTF_LGenBase_FSMTimerInternal; |
| |
| const EPTF_LGenBase_FSMTimerInternal c_EPTF_LGenBase_emptyFSMTimerInternal := { |
| name :="", |
| timerParams := { static := { startValue := 0.0}} |
| } |
| |
| type record of EPTF_LGenBase_FSMTimerInternal EPTF_LGenBase_FsmTimerInternalList |
| |
| type record EPTF_LGenBase_FSMParamsInternalDeclarator{ |
| EPTF_LGenBase_FsmLocalStateList stateList, |
| EPTF_LGenBase_FsmTimerInternalList timerList, |
| EPTF_LGenBase_FsmVarDeclaratorList varList, |
| EPTF_LGenBase_FsmStatMeasWithParamsDeclaratorList statMeasWithParamsList, |
| EPTF_LGenBase_FsmStatHandlerDeclaratorList statHandlerStatList |
| } |
| const EPTF_LGenBase_FSMParamsInternalDeclarator c_EPTF_LGenBase_emptyFSMParamsInternalDeclarator := |
| { |
| {},{},{},{},{} |
| } |
| |
| type EPTF_LGenBase_Events2ListenDeclarator EPTF_LGenBase_Events2ListenInternalDeclarator |
| |
| type record EPTF_LGenBase_FsmNextStateCalcInternal{ |
| charstring fnName, //EPTF_LGenBase_NextStateCalc_FT fn, |
| EPTF_LGenBase_FsmActionArgsDeclarator args |
| } |
| |
| type record EPTF_LGenBase_FsmTableCellInternal{ |
| EPTF_LGenBase_FsmActionDeclaratorList actionList optional, |
| EPTF_LGenBase_FsmNextStateCalcInternal nextStateCalculation optional, //calc method for the next state |
| charstring nextState optional //pointer to the next state |
| } |
| const EPTF_LGenBase_FsmTableCellInternal c_EPTF_LGenBase_emptyFsmTableCellInternal := {omit, omit, omit} |
| |
| type record EPTF_LGenBase_ActionsInState{ |
| EPTF_LGenBase_FsmTableCellStateDeclarator inState, |
| EPTF_LGenBase_FsmTableCellInternal cell |
| } |
| |
| type record of EPTF_LGenBase_ActionsInState EPTF_LGenBase_ActionsInStateList |
| |
| //TODO To check the type of the events it should be a record |
| type record EPTF_LGenBase_FSMTableRowInternalDeclarator{ |
| EPTF_LGenBase_EventType eventType, |
| EPTF_LGenBase_Events2ListenInternalDeclarator events2Listen, |
| EPTF_LGenBase_ActionsInStateList actionList |
| } |
| |
| const EPTF_LGenBase_FSMTableRowInternalDeclarator c_EPTF_LGenBase_emptyFSMTableRowInternalDeclarator := { |
| c_EPTF_LGenBase_eventTypeFSM, |
| {unhandled := {}}, |
| {} |
| } |
| |
| type record of EPTF_LGenBase_FSMTableRowInternalDeclarator EPTF_LGenBase_FSMTableRowInternalDeclaratorList |
| |
| type record EPTF_LGenBase_FSMInternalDeclarator{ |
| charstring name, |
| EPTF_LGenBase_FSMParamsInternalDeclarator fsmParams, |
| EPTF_LGenBase_FSMTableRowInternalDeclaratorList table |
| } |
| const EPTF_LGenBase_FSMInternalDeclarator c_EPTF_LGenBase_emptyFSMInternalDeclarator := { |
| "", c_EPTF_LGenBase_emptyFSMParamsInternalDeclarator, {} |
| } |
| }//group fsmTables |
| |
| /////////////////////////////////////////////////////////// |
| // Group: privateFSMTable |
| // |
| // Purpose: |
| // Grouping data types for private FSM table declarators of |
| // <EPTF_LGenBase_CT> |
| // |
| /////////////////////////////////////////////////////////// |
| group privateFSMTable{ |
| type record EPTF_LGenBase_FsmVarDescriptor{ |
| charstring name, |
| EPTF_Var_DirectContent initValue |
| } |
| type record of EPTF_LGenBase_FsmVarDescriptor EPTF_LGenBase_FsmVarDescriptorList; |
| type record of EPTF_LGenBase_FsmVarDescriptorList EPTF_LGenBase_FsmVarDescriptorListArray; |
| const EPTF_LGenBase_FsmVarDescriptor c_EPTF_LGenBase_emptyFsmVarDescriptor := { |
| "",{intVal := 0} |
| } |
| //Xref list of providers |
| type union EPTF_LGenBase_FsmStatProviderDescriptor{ |
| EPTF_IntegerList varXrefList, |
| integer statMeasXref, |
| integer statHandlerXref |
| } |
| type record of EPTF_LGenBase_FsmStatProviderDescriptor EPTF_LGenBase_FsmStatProviderDescriptorList |
| |
| type set of EPTF_LGenBase_FsmStatHandlerProvider EPTF_LGenBase_FsmStatHandlerProviderSet; |
| type record EPTF_LGenBase_FsmStatDescriptor{ |
| charstring name, |
| EPTF_LGenBase_FsmStatProviderDescriptorList providers, |
| EPTF_LGenBase_FsmStatHandlerProviderSet providerDeclarators, |
| charstring statMethod, |
| EPTF_Var_DirectContent statResetValue//, |
| //EPTF_LGenBase_FsmObjectScope scope, |
| //integer refId, |
| //integer refCount |
| } |
| type record of EPTF_LGenBase_FsmStatDescriptor EPTF_LGenBase_FsmStatDescriptorList; |
| type record of EPTF_LGenBase_FsmStatDescriptorList EPTF_LGenBase_FsmStatDescriptorListArray; |
| const EPTF_LGenBase_FsmStatDescriptor c_EPTF_LGenBase_emptyFsmStatDescriptor := { |
| "",{},{},"",{intVal := 0}//,-1, 0 |
| } |
| |
| type record EPTF_LGenBase_FsmStatMeasDescriptor{ |
| charstring name, |
| integer varXRef, |
| charstring targetVarName, |
| EPTF_LGenBase_FSMStatMeasParams params |
| } |
| const EPTF_LGenBase_FsmStatMeasDescriptor c_EPTF_LGenBase_emptyFsmStatMeasDescriptor := { |
| "",-1,"",{statType := content} |
| } |
| type record of EPTF_LGenBase_FsmStatMeasDescriptor EPTF_LGenBase_FsmStatMeasDescriptorList |
| type record of EPTF_LGenBase_FsmStatMeasDescriptorList EPTF_LGenBase_FsmStatMeasDescriptorListArray |
| |
| type EPTF_IntegerList EPTF_LGenBase_FsmObjCounterList; |
| const EPTF_LGenBase_FsmObjCounterList c_EPTF_LGenBase_initialFsmObjCounterList := {0,0,0} |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmObjectScope |
| // |
| // Purpose: |
| // Declares the scope of the FSM variables and statistics. |
| /////////////////////////////////////////////////////////// |
| const integer c_EPTF_LGenBase_fsmObjectScopeInvalid := -1; |
| const integer c_EPTF_LGenBase_fsmObjectScopeFSM := 0; |
| const integer c_EPTF_LGenBase_fsmObjectScopeTC := 1; |
| const integer c_EPTF_LGenBase_fsmObjectScopeSiblingFSM := 2; |
| const integer c_EPTF_LGenBase_fsmObjectScopeFirst := c_EPTF_LGenBase_fsmObjectScopeFSM |
| const integer c_EPTF_LGenBase_fsmObjectScopeLast := c_EPTF_LGenBase_fsmObjectScopeSiblingFSM |
| const integer c_EPTF_LGenBase_fsmObjectScopeMax := c_EPTF_LGenBase_fsmObjectScopeLast+1 |
| type integer EPTF_LGenBase_FsmObjectScope (c_EPTF_LGenBase_fsmObjectScopeFirst..c_EPTF_LGenBase_fsmObjectScopeLast); |
| //Note: The c_EPTF_LGenBase_initialFsmObjCounterList must be changed whenever new scope types are created |
| |
| type record EPTF_LGenBase_fsmVarXRef{ |
| EPTF_LGenBase_FsmObjectScope scope, |
| integer idxInScope |
| } |
| type record of EPTF_LGenBase_fsmVarXRef EPTF_LGenBase_fsmVarXRefList; |
| |
| type EPTF_LGenBase_fsmVarXRef EPTF_LGenBase_fsmStatisticXRef; |
| type EPTF_LGenBase_fsmVarXRefList EPTF_LGenBase_fsmStatisticXRefList; |
| |
| type EPTF_LGenBase_fsmVarXRef EPTF_LGenBase_fsmStatMeasXRef; |
| type EPTF_LGenBase_fsmVarXRefList EPTF_LGenBase_fsmStatMeasXRefList; |
| |
| const EPTF_LGenBase_fsmVarXRef c_EPTF_LGenBase_emptyFsmVarXRef :={ |
| c_EPTF_LGenBase_fsmObjectScopeFSM, |
| -1 |
| } |
| |
| type record of EPTF_Var_DirectContent EPTF_LGenBase_ParamValueList; |
| |
| type EPTF_CharstringList EPTF_LGenBase_ReferredFsmList; |
| type EPTF_CharstringList EPTF_LGenBase_ReferredTCList; |
| |
| type record EPTF_LGenBase_SiblingEventDescriptor{ |
| charstring siblingName, |
| charstring iName, |
| EPTF_LGenBase_ReportableEventType eventType |
| } |
| |
| type record EPTF_LGenBase_SiblingListenerRow { |
| integer row, |
| EPTF_LGenBase_EventsFromSibling eventsFromSibling |
| } |
| |
| type record of EPTF_LGenBase_SiblingListenerRow EPTF_LGenBase_SiblingListenerRowList; |
| type record of verdicttype EPTF_LGenBase_VerdictArray; |
| type record EPTF_LGenBase_InternalFsmTable { |
| charstring name, |
| EPTF_LGenBase_FsmLocalStateList stateList, |
| EPTF_LGenBase_FsmTimerInternalList timerList, |
| EPTF_LGenBase_FsmVarDescriptorListArray varListArray, |
| EPTF_LGenBase_FsmStatDescriptorListArray statisticListArray, |
| EPTF_LGenBase_FsmStatMeasDescriptorListArray statMeasStatListArray, |
| //EPTF_LGenBase_InternalFsmTableRowList rowList, |
| EPTF_LGenBase_InternalFSMEvent2RowXrefList eventXref, |
| EPTF_LGenBase_InternalFSMRowDescriptorList rows, |
| //Counters |
| EPTF_LGenBase_FsmObjCounterList varCounts, |
| EPTF_LGenBase_FsmObjCounterList statisticCounts, |
| EPTF_LGenBase_FsmObjCounterList statMeasCounts, |
| //HashMaps |
| integer varNamesHash, |
| integer stateNamesHash, |
| integer statisticNamesHash, |
| integer statMeasNamesHash, |
| integer timerNamesHash, |
| |
| EPTF_LGenBase_fsmVarXRefList varXRefs, |
| EPTF_LGenBase_fsmStatisticXRefList statisticXRefs, |
| EPTF_LGenBase_fsmStatMeasXRefList statMeasXRefs, |
| EPTF_LGenBase_ParamValueList paramValues, |
| |
| EPTF_IntegerList catchAllRowIdxList, |
| EPTF_IntegerList unhandledEventRowIdxList, |
| |
| boolean debugLight, |
| EPTF_LGenBase_ReferredFsmList referredFsmList, |
| EPTF_LGenBase_SiblingListenerRowList siblingListenerRowList, |
| EPTF_LGenBase_ReferredTCList referredTCList, |
| EPTF_LGenBase_VerdictArray verdictList |
| } |
| type record of EPTF_LGenBase_InternalFsmTable EPTF_LGenBase_InternalFsmTableList; |
| const EPTF_LGenBase_InternalFsmTable c_EPTF_LGenBase_emptyInternalFsmTable := { |
| /*name :=*/ "", |
| /*stateList :=*/ {}, |
| /*timerList :=*/ {}, |
| /*varListArray :=*/ {{},{},{}}, |
| /*statisticListArray :=*/ {{},{},{}}, |
| /*statMeasStatListArray :=*/ {{},{},{}}, |
| /*eventXref :=*/ {}, |
| /*rows :=*/ {}, |
| /*varCounts :=*/ c_EPTF_LGenBase_initialFsmObjCounterList, |
| /*statisticCounts :=*/ c_EPTF_LGenBase_initialFsmObjCounterList, |
| /*statMeasCounts :=*/ c_EPTF_LGenBase_initialFsmObjCounterList, |
| /*varNamesHash :=*/ -1, |
| /*stateNamesHash :=*/ -1, |
| /*statisticNamesHash :=*/ -1, |
| /*statMeasNamesHash :=*/ -1, |
| /*timerNamesHash :=*/ -1, |
| /*varXRefs :=*/ {}, |
| /*statisticXRefs :=*/ {}, |
| /*statMeasXRefs :=*/ {}, |
| /*paramValues :=*/ {}, |
| /*catchAllRowIdxList :=*/ {}, |
| /*unhandledEventRowIdxList :=*/ {}, |
| /*debugLight :=*/ false, |
| /*referredFsmList :=*/ {}, |
| /*siblingListenerRowList := -*/ {}, |
| /*referredTCList :=*/ {}, |
| /*verdictList := */ {} |
| }; |
| }//privateFSMTable |
| |
| /////////////////////////////////////////////////////////// |
| // Group: IndexedFsmTables |
| // |
| // Purpose: |
| // Grouping data types for the "Indexed" FSM of <EPTF_LGenBase_CT> |
| // |
| // Detailed Comments: |
| // It contains "indexed" cells, that is, cells that stores test |
| // step-references instead of direct fn. references. Hence, it is suitable of |
| // declaring FSM-s in cfg. files. For declaring FSM-s from TTCN-3 source, |
| // usage of the data types of the group <FsmTables> could be more |
| // intuitive. During the declaration of an "idexed" FSM with |
| // <f_EPTF_LGenBase_declareIndexedCompactFsmTable> the table will be transformed |
| // on-the fly to the "non-indexed" representation and will be stored as a |
| // "normal" table with direct fn. pointers. |
| /////////////////////////////////////////////////////////// |
| group IndexedFsmTable { |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmAction |
| // |
| // Purpose: |
| // Data type to provide description about an action in an indexed FSM cell |
| // |
| // Elements: |
| // - step - <EPTF_LGenBase_StepReference> - the indexed function reference to |
| // the test step |
| // - stepContextArgs - <EPTF_IntegerList> - input arguments of the test step |
| // related to the referencing context, such as an FSM table cell |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_IndexedFsmAction { |
| EPTF_LGenBase_StepReference step, |
| EPTF_IntegerList stepContextArgs |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_IndexedFsmActionList |
| // |
| // Purpose: |
| // Data type to provide a list of actions for an indexed FSM cell |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_IndexedFsmAction> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_IndexedFsmAction EPTF_LGenBase_IndexedFsmActionList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_IndexedFsmTableCell |
| // |
| // Purpose: |
| // Record type for describe an FSM table cell with direct fn. pointers |
| // |
| // Elements: |
| // - actionList - <EPTF_LGenBase_StepReferenceList> - *optional* - a list |
| // of test steps references, i.e., two-tuples of integers: a |
| // BehaviorType index and a local event/input index w.r.t. the |
| // declared events/inputs of the given BehaviorType. All of |
| // these actions will be invoked when the input belonging to |
| // the row of the cell is reported by <f_EPTF_LGenBase_reportEvent> |
| // and the relevant entity is in the local state belonging to |
| // the column of this cell |
| // - nextStateCalculation - <EPTF_LGenBase_FsmNextStateCalcDescriptor> - |
| // *optional* -calculation method of the next local state within |
| // the same table! The entity will be assumed to proceed to this state |
| // if the input belonging to the row of the cell is reported by |
| // <f_EPTF_LGenBase_dispatchEvent> and the relevant entity is in the |
| // local state belonging to the column of this cell. If present, |
| // then the nextState field is ignored! |
| // - nextState - <EPTF_LGenBase_FsmStateReference> - *optional* - reference |
| // to the next local state within the /same table/! The entity |
| // will be assumed to proceed to this state if the input |
| // belonging to the row of the cell is reported by |
| // <f_EPTF_LGenBase_reportEvent> and the relevant entity is in the |
| // local state belonging to the column of this cell |
| // |
| // Detailed Comments: |
| // - *Note*: the next state reference is valid only w.r.t. the given FSM |
| // table in question! |
| // - If the actionList is *omit*, then it means that there are no actions |
| // to be performed in the given state for the given input. |
| // - If the nextstate is *omit*, then it means there will be no |
| // state-transition assumed for the entity in the given state for the |
| // given input. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_IndexedFsmTableCell { |
| EPTF_LGenBase_IndexedFsmActionList actionList optional, |
| EPTF_LGenBase_FsmNextStateCalcDescriptor nextStateCalculation optional, //calc method for the next state |
| EPTF_LGenBase_FsmStateReference nextState optional //pointer to the next state |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_IndexedFsmTableCellList |
| // |
| // Purpose: |
| // Data type to provide a building block for the datatype |
| // <EPTF_LGenBase_IndexedFsmTableRow> realizing the rows of FSM table |
| // <EPTF_LGenBase_IndexedCompactFsmTable>. |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_IndexedFsmTableCell> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_IndexedFsmTableCell EPTF_LGenBase_IndexedFsmTableCellList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_IndexedFsmTableRow |
| // |
| // Purpose: |
| // Data type to realize the rows of an indexed FSM table. |
| // |
| // Elements: |
| // - eventToListen - <EPTF_LGenBase_EventReference> reference to the event that |
| // is used as input for the row of the FSM table |
| // - cellRow - <EPTF_LGenBase_FsmTableCellList> cells of the row of the FSM table |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_IndexedFsmTableRow { |
| //EPTF_LGenBase_EventReference eventToListen, |
| EPTF_LGenBase_EventDescriptor eventToListen, |
| EPTF_LGenBase_IndexedFsmTableCellList cellRow |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_IndexedFsmTableRowList |
| // |
| // Purpose: |
| // Data type containing the cell-rows the data type <EPTF_LGenBase_CompactFsmTable> |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_IndexedFsmTableRow> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_IndexedFsmTableRow EPTF_LGenBase_IndexedFsmTableRowList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_IndexedCompactFsmTable |
| // |
| // Purpose: The top level data type for the indexed FSM representation in |
| // <EPTF_LGenBase_CT> |
| // |
| // Elements: |
| // - name - *charstring* - a name for the table. Used for only |
| // debugging/logging/displaying |
| // - stateList - <EPTF_LGenBase_FsmLocalStateList> - declaration of states of the |
| // FSM. Each state is represented as a charstring label whose position |
| // within <EPTF_LGenBase_FsmLocalStateList> defines the column index for the |
| // state within the same <EPTF_LGenBase_CompactFsmTable.table> |
| // - table - <EPTF_LGenBase_IndexedFsmTableRowList> - 2D table of cells of the |
| // "indexed" FSM |
| // |
| // Detailed Comments: |
| // - Allows mixing of inputs/events/actions from any declared BehaviorType |
| // without requiring to use sparse table-representations, hence the name |
| // "CompactFSM" |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_IndexedCompactFsmTable { |
| charstring name, |
| EPTF_LGenBase_FsmLocalStateList stateList, |
| EPTF_LGenBase_FsmLocalTimerList timerList, |
| EPTF_LGenBase_IndexedFsmTableRowList table |
| } |
| |
| }//group IndexedFsmTable |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Group: TestSteps |
| // |
| // Purpose: |
| // Grouping data types for test steps (actions) |
| // |
| /////////////////////////////////////////////////////////// |
| group TestSteps{ |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmTableCellReference |
| // |
| // Purpose: |
| // Record type to point to a specific tablecell in the database |
| // |
| // Elements: |
| // - tableIdx - *integer* - specific table within the behaviorType, 1st |
| // dimension in the FSMTableDataBase |
| // - tableRowIdx - *integer* - brow index within the table, 2nd dimension |
| // in the FSMTableDataBase |
| // - tableColIdx - *integer* - state index within the table, 3rd |
| // dimension in the FSMTableDataBase |
| // |
| // Detailed Comments: |
| // - |
| ////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmTableCellReference { |
| integer tableIdx, //specific table within the behaviorType, 2nd dimension in the FSMTableDataBase |
| integer tableRowIdx, //row index within the table, 3rd dimension in the FSMTableDataBase |
| integer tableColIdx //state index within the table, 3rd dimension in the FSMTableDataBase |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmTableReference |
| // |
| // Purpose: |
| // Record type to point to a specific table in the database |
| // |
| // Elements: |
| // - tableIdx - *integer* - index of the table |
| // |
| // Detailed Comments: |
| // - |
| ////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmTableReference { |
| integer tableIdx} |
| |
| /*type record EPTF_LGenBase_setNextState { |
| integer nextState optional |
| } |
| type record of EPTF_LGenBase_setNextState EPTF_LGenBase_setNextStateList*/ |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityFsmCtx |
| // |
| // Purpose: |
| // Record type for entity FSM context |
| // |
| // Elements: |
| // - tableIdx - *integer* - reference to the active table |
| // - stateIdx - *integer* - reference to a local state of the table in which |
| // the entity is supposed to be at |
| // - timerData - EPTF_IntegerList - The list of timer identifiers of the FSM |
| // - timerStartValues - EPTF_FloatList - |
| // - appData - <EPTF_IntegerArray2D> - application specific data |
| // - rowListeners - <EPTF_LGenBase_FsmRowListenerDescriptorList> - the active listeners of the table, one listener per row |
| // - fsmOfTargetEntityListeners - <EPTF_LGenBase_ListenerList> - List of target entity listeners |
| // - fsmOfSourceEntityListeners - <EPTF_LGenBase_ListenerList> - List of source entity listeners |
| // - fsmOfSourceFsmListeners - <EPTF_LGenBase_ListenerList> - List of source FSM listeners |
| // - tcIdx - *integer* - Traffic case absolute index |
| // - varList - <EPTF_IntegerList> - variable list associated to the FSM context |
| ////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EntityFsmCtx { |
| integer tableIdx, |
| integer stateIdx, |
| //EPTF_LGenBase_setNextStateList nextStateStack, |
| //integer nextStateStackDepth, |
| EPTF_IntegerList timerData, |
| EPTF_LGenBase_FSMTimerParametersList timerParams, |
| EPTF_IntegerArray2D appData, //application specific data |
| EPTF_LGenBase_FsmRowListenerDescriptorList rowListeners, //one listener per row |
| EPTF_LGenBase_ListenerList fsmOfTargetEntityListeners optional, |
| EPTF_LGenBase_ListenerList fsmOfSourceEntityListeners optional, |
| EPTF_LGenBase_ListenerList fsmOfSourceFsmListeners optional, |
| integer tcIdx, |
| EPTF_IntegerList varList, |
| EPTF_IntegerList statMeasStatList, |
| //EPTF_IntegerList siblingVarIdxInEntityInfo, |
| boolean debugLog, |
| boolean singleShotDebugLog, |
| integer logBufferVariable, |
| integer singleShotLogBufferVariable, |
| integer siblingIdx, |
| EPTF_LGenBase_ReportedEventDescriptorList eventStack, |
| integer numOfEventsInStack, |
| charstring dte_str // the content of the DTE catched, empty if no error |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Const: c_EPTF_LGenBase_emptyEntityFsmCtx |
| // |
| // Purpose: An empty <EPTF_LGenBase_EntityFsmCtx> to initialize a new variable. |
| /////////////////////////////////////////////////////////// |
| const EPTF_LGenBase_EntityFsmCtx c_EPTF_LGenBase_emptyEntityFsmCtx := { |
| -1, 0, |
| //{}, -1, |
| {}, {},{},{}, |
| omit,//c_EPTF_LGenBase_emptyListenerList, |
| omit,//c_EPTF_LGenBase_emptyListenerList, |
| omit,//c_EPTF_LGenBase_emptyListenerList, |
| -1, {}, {},//{}, |
| false, false, -1, -1, -1, |
| {}, -1, |
| "" |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmRowListenerDescriptor |
| // |
| // Purpose: |
| // Record type for describe the context of the event listener function of a |
| // row of an FSM table, i.e., a "row listener" |
| ////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_FsmRowListenerDescriptor { |
| integer lIdx optional |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_FsmRowListenerDescriptorList |
| // |
| // Purpose: |
| // The datatpye to store the contexts of all activated row-listeners of an |
| // FSM context |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_FsmRowListenerDescriptor> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_FsmRowListenerDescriptor EPTF_LGenBase_FsmRowListenerDescriptorList |
| |
| /* type record EPTF_LGenBase_FsmEventType2RowIdx { |
| integer general, |
| integer entity, |
| integer fsm |
| } |
| |
| type record of EPTF_LGenBase_FsmEventType2RowIdx EPTF_LGenBase_FsmEventType2RowIdxList; |
| */ |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EntityFsmCtxList |
| // |
| // Purpose: |
| // The datatpye to store the contexts of all actiavted FSM-s of each entity |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_EntityFsmCtx> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EntityFsmCtx EPTF_LGenBase_EntityFsmCtxList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TestStepArgs |
| // |
| // Purpose: |
| // Record type for test step arguments |
| // |
| // Elements: |
| // eIdx - *integer* - entity that operates on |
| // TODO describe elements |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TestStepArgs { |
| integer eIdx, //entity that operates on |
| EPTF_LGenBase_StepContext refContext, //FSM cell & context if invoked from FSM |
| EPTF_IntegerList stepArgs, //args |
| EPTF_LGenBase_ReportedEventDescriptor reportedEvent |
| } |
| |
| const EPTF_LGenBase_TestStepArgs c_EPTF_LGenBase_emptyTestStepArgs := { |
| eIdx := -1, |
| refContext := c_EPTF_LGenBase_emptyStepContext, |
| stepArgs := {}, |
| reportedEvent := c_EPTF_LGenBase_emptyReportedEventDescriptor |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_StepContext |
| // |
| // Purpose: |
| // Record type for describing calling context for the called test step |
| // |
| // Elements: |
| // - fCtxIdx - *integer optional* - the FSM context, if any, from which |
| // the step has been invoked |
| // - fRefArgs - <EPTF_IntegerList> - "Referring" arguments pre-stored in |
| // the FSM table cell of the. |
| // |
| // Detailed Comments: |
| // The fRefArgs are predetermined at the time of declaring the FSM table, |
| // that is, it is independent of the actual invocation |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_StepContext { |
| integer fCtxIdx, //related FSM context of the entity, if invoked via FSM |
| EPTF_IntegerList fRefArgs //args supplied in the context from which the step is referenced |
| } |
| const EPTF_LGenBase_StepContext c_EPTF_LGenBase_emptyStepContext :={ |
| fCtxIdx := -1, |
| fRefArgs := {} |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TestStepFunction_FT |
| // |
| // Purpose: |
| // Function prototype of a generic LGen test step |
| // |
| // Elements: |
| // - pl_ptr - *inout* <EPTF_LGenBase_TestStepArgs> - arguments for the test step |
| // |
| // Returns: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_TestStepFunction_FT( |
| in EPTF_LGenBase_TestStepArgs pl_ptr |
| ) runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TestStepFunctionList |
| // |
| // Purpose: |
| // Record of <EPTF_LGenBase_TestStepFunction_FT> to provide a container for |
| // arbitrary number of <EPTF_LGenBase_TestStepFunction_FT> values |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_TestStepFunction_FT> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TestStepFunction_FT EPTF_LGenBase_TestStepFunctionList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TestStepDescriptor |
| // |
| // Purpose: |
| // Record type for describe a declared test step |
| // |
| // Elements: |
| // - name - *charstring* - the name of the test step, used for logging/debugging purposes |
| // - fn - <EPTF_LGenBase_TestStepFunction_FT> - the function reference to the step |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TestStepDescriptor { |
| charstring name, |
| EPTF_LGenBase_TestStepFunction_FT step |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_TestStepDescriptorList |
| // |
| // Purpose: |
| // Type for storing all test steps of a give nbehavior type |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_TestStepDescriptor> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_TestStepDescriptor EPTF_LGenBase_TestStepDescriptorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_StepReference |
| // |
| // Purpose: |
| // Record type for test step references |
| // |
| // Elements: |
| // - bIdx - *integer* - behavior index |
| // - sIdx - *integer* - step index |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_StepReference { |
| integer bIdx, |
| integer sIdx |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_StepReferenceList |
| // |
| // Purpose: |
| // Data type for storing a list of test steps references |
| // |
| // Elements: |
| // record of <EPTF_LGenBase_StepReference> |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_StepReference EPTF_LGenBase_StepReferenceList |
| |
| group stepArgsConsts{ |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToSiblingRefFSM := 0 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToSiblingBehavior := 1 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToSiblingInput := 2 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToSiblingVarId0 := 3 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToSiblingVarId1 := 4 |
| |
| const integer c_EPTF_LGenBase_stepArgsIdxReplyEventBehavior := 0 |
| const integer c_EPTF_LGenBase_stepArgsIdxReplyEventInput := 1 |
| const integer c_EPTF_LGenBase_stepArgsIdxReplyEventVarId0 := 2 |
| const integer c_EPTF_LGenBase_stepArgsIdxReplyEventVarId1 := 3 |
| |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToTCRefFSM := 0 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToTCBehavior := 1 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToTCInput := 2 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToTCVarId0 := 3 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventToTCVarId1 := 4 |
| |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmToSiblingRefFSM := 0 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmToSiblingInput := 1 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmToSiblingVarId0 := 2 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmToSiblingVarId1 := 3 |
| |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmInput := 0 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmVarId0 := 1 |
| const integer c_EPTF_LGenBase_stepArgsIdxEventOfFsmVarId1 := 2 |
| |
| } |
| |
| }//group test steps |
| |
| /////////////////////////////////////////////////////////// |
| // Group: EventListeners |
| // |
| // Purpose: |
| // Grouping data types for event listeenrs |
| // |
| // Elements: |
| /////////////////////////////////////////////////////////// |
| group EventListeners { |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventTarget |
| // |
| // Purpose: |
| // Data type for describing "addressee entity" of an event. |
| // |
| // Elements: |
| // - eIdx - *integer* - entity index |
| // - fsmCtxIdx - *integer* - FSM context index |
| // |
| // Detailed comments: |
| // If fsmCtxIDx is /not/ there, then all active FSM-s of that entity listening |
| // to the particular event will be notified. If fsmCtxIDx is /there/, then |
| // only that active FSM-s of that entity listening |
| // to the particular event will be notified that are listed here |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventTarget { |
| integer eIdx, |
| integer fsmCtxIdx optional |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventSource |
| // |
| // Purpose: |
| // Data type for describing "source entity" of an event. |
| // |
| // Elements: |
| // - eIdx - *integer* - entity index |
| // - fsmCtxIdx - *integer* - FSM context index |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventSource { |
| integer eIdx, |
| integer fsmCtxIdx optional |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ReportableEventDescriptor |
| // |
| // Purpose: |
| // Record type for descripting reportable events. |
| // |
| // Elements: |
| // - bIdx - *integer* - behavior index (behavior type) |
| // - iIdx - *integer* - input idx (event ID) w.r.t. behavior type |
| // - target - <EPTF_LGenBase_EventTarget> *optional* - the entity and the |
| // FSM context index of that entity, if known, w.r.t. whom the event has |
| // occured |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ReportableEventDescriptor { |
| integer bIdx, |
| integer iIdx, |
| EPTF_LGenBase_EventTarget target optional, |
| EPTF_LGenBase_EventSource source optional |
| } |
| const EPTF_LGenBase_ReportableEventDescriptor c_EPTF_LGenBase_emptyReportableEventDescriptor := { |
| -1,-1,omit,omit |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ListenableEventDescriptor |
| // |
| // Purpose: |
| // Record type for descripting reportable events. |
| // |
| // Elements: |
| // - bIdx - *integer* - behavior index (behavior type) |
| // - iIdx - *integer* - input idx (event ID) w.r.t. behavior type |
| // - target - <EPTF_LGenBase_EventTarget> *optional* - the entity and the |
| // FSM context index of that entity, if known, w.r.t. whom the event has |
| // occured |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ListenableEventDescriptor { |
| integer bIdx optional, //Optional to be possible to use in describing listened events |
| integer iIdx optional, //Optional to be possible to use in describing listened events |
| EPTF_LGenBase_EventTarget target optional, |
| EPTF_LGenBase_EventSource source optional |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ReportedEventDescriptor |
| // |
| // Purpose: |
| // Record type for descripting reported events. |
| // |
| // Elements: |
| // - event - <EPTF_LGenBase_ReportableEventDescriptor> - the event occured |
| // - reportedArgs - <EPTF_IntegerList> - the actual reported arguments of |
| // the event determined by the reporter |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_ReportedEventDescriptor { |
| EPTF_LGenBase_ReportableEventDescriptor event, |
| EPTF_IntegerList reportedArgs |
| } |
| const EPTF_LGenBase_ReportedEventDescriptor c_EPTF_LGenBase_emptyReportedEventDescriptor := { |
| c_EPTF_LGenBase_emptyReportableEventDescriptor, {} |
| } |
| type record of EPTF_LGenBase_ReportedEventDescriptor EPTF_LGenBase_ReportedEventDescriptorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventDescriptor |
| // |
| // Purpose: |
| // Record type for describing events that can be listened to by event listeners |
| // |
| // Elements: |
| // - bIdx - *integer* - the behaviorType index of the reportable event |
| // - iIdx - *integer* - the index of the reportable event w.r.t. to bIdx |
| // - eventType - <EPTF_LGenBase_ReportableEventType> - the event-level |
| // class of the reportable event. |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventDescriptor { |
| integer bIdx, |
| integer iIdx, |
| EPTF_LGenBase_ReportableEventType eventType |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventDescriptorList |
| // |
| // Purpose: |
| // Type for describing a list of event descriptors |
| ///////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EventDescriptor EPTF_LGenBase_EventDescriptorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_InternalEventDescriptor |
| // |
| // Purpose: |
| // Data type to declare an event |
| // |
| // Elements: |
| // - eventList - <EPTF_LGenBase_EventDescriptor> defines a specific event |
| // - catchAll - <EPTF_LGenBase_EventCatchAll> special event type: 'any' event |
| // - unhandled - <EPTF_LGenBase_EventCatchAll> special event type: unhandled events |
| /////////////////////////////////////////////////////////// |
| type union EPTF_LGenBase_InternalEventDescriptor{ |
| EPTF_LGenBase_EventDescriptor event, |
| EPTF_LGenBase_EventCatchAll catchAll, |
| EPTF_LGenBase_EventUnhandled unhandled |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventListener_FT |
| // |
| // Purpose: |
| // Function prototype of event listeners |
| // |
| // Elements: |
| // - pl_event - *in* <EPTF_LGenBase_EventDescriptor> - the event reported to |
| // <f_EPTF_LGenBase_dispatchInput> |
| // - pl_args - *in* <EPTF_IntegerList> - arguments for the event |
| // handler. Its semantic is event handler specific. |
| // |
| // Runs on: *self* |
| // |
| // Returns: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_EventListener_FT( |
| EPTF_LGenBase_ReportedEventDescriptor pl_event, |
| EPTF_IntegerList pl_listenerArgs |
| ) runs on self |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventListenerDescriptor |
| // |
| // Purpose: |
| // Record type for listener descriptor |
| // |
| // Elements: |
| // - name - *charstring* - the name of the descriptor, earlier used for logging/debugging purposes, |
| // but it was removed because of decreasing the memory usage |
| // - fn - <EPTF_LGenBase_EventListener_FT> - function reference to the listener |
| // function that will be invoked upon the occurence of the event |
| // - args - <EPTF_IntegerList> - arguments to the listner, their semantics are |
| // opaque to the event dispatcher code and relevant ony for the event handler |
| // |
| // Detailed Comments: |
| // - args will be supplied as specified at the time of adding the listener |
| // to the event dispatch database |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventListenerDescriptor { |
| charstring name,//for backward compatibility only |
| EPTF_LGenBase_EventListener_FT fn, |
| EPTF_IntegerList args |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventListenerDescriptorList |
| // |
| // Purpose: |
| // Container for a list of listener descriptors |
| // |
| // Elements: |
| // - *record of* <EPTF_LGenBase_EventListenerDescriptor> |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EventListenerDescriptor EPTF_LGenBase_EventListenerDescriptorList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventListener |
| // |
| // Purpose: |
| // Record type for identify a listener |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventListener{ |
| EPTF_LGenBase_EventListener_FT fn, |
| EPTF_IntegerList args |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventListenerStorage |
| // |
| // Purpose: |
| // Record type for store listener descriptor |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventListenerStorage{ |
| EPTF_LGenBase_EventListener listener/*, |
| integer refCount*/ |
| } |
| type record of EPTF_LGenBase_EventListenerStorage EPTF_LGenBase_EventListenerStorageList |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_Event2Listener |
| // |
| // Purpose: |
| // Record type for assign a listener to an event |
| // |
| // Detailed Comments: |
| // Optimized for use to store listener assignments in str2int hashmap |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_Event2Listener{ |
| charstring eventDescriptor, |
| integer listenerIdx |
| } |
| |
| const integer c_EPTF_LGenBase_eventTypeBehavior := 0; |
| const integer c_EPTF_LGenBase_eventTypeGeneral := 1; |
| const integer c_EPTF_LGenBase_eventTypeEntity := 2; |
| const integer c_EPTF_LGenBase_eventTypeFSM := 3; |
| const integer c_EPTF_LGenBase_eventTypeEntityIndex := 4; |
| const integer c_EPTF_LGenBase_eventTypeFSMOfEntity := 5; |
| const integer c_EPTF_LGenBase_eventTypeBehaviorOfEntity := 6; |
| const integer c_EPTF_LGenBase_eventTypeSourceEntity := 7; |
| const integer c_EPTF_LGenBase_eventTypeSourceFsm := 8; |
| const integer c_EPTF_LGenBase_eventTypeSourceEntityIndex:= 9; |
| const integer c_EPTF_LGenBase_eventTypeFsmOfSourceEntity:= 10; |
| const integer c_EPTF_LGenBase_eventTypeBehaviorOfSourceEntity := 11; |
| const integer c_EPTF_LGenBase_eventTypeMax := 12; //Use in for cycles |
| |
| type integer EPTF_LGenBase_EventType (c_EPTF_LGenBase_eventTypeBehavior..c_EPTF_LGenBase_eventTypeBehaviorOfSourceEntity); |
| |
| const integer c_EPTF_LGenBase_eventFlagBehavior := 1; |
| const integer c_EPTF_LGenBase_eventFlagInput := 2; |
| const integer c_EPTF_LGenBase_eventFlagEntity := 4; |
| const integer c_EPTF_LGenBase_eventFlagFSM := 8; |
| const integer c_EPTF_LGenBase_eventFlagSourceEntity := 16; |
| const integer c_EPTF_LGenBase_eventFlagSourceFSM := 32; |
| |
| const integer c_EPTF_LGenBase_eventOffsetBehavior := 0; |
| const integer c_EPTF_LGenBase_eventOffsetInput := 1; |
| const integer c_EPTF_LGenBase_eventOffsetEntity := 2; |
| const integer c_EPTF_LGenBase_eventOffsetFSM := 3; |
| const integer c_EPTF_LGenBase_eventOffsetSourceEntity := 4; |
| const integer c_EPTF_LGenBase_eventOffsetSourceFSM := 5; |
| const integer c_EPTF_LGenBase_eventOffsetMax := 5; |
| |
| const EPTF_IntegerList c_EPTF_LGenBase_eventTypeMasks := { |
| c_EPTF_LGenBase_eventFlagBehavior, // Behavior |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagInput, //General |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagInput+c_EPTF_LGenBase_eventFlagEntity, //Entity |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagInput+c_EPTF_LGenBase_eventFlagEntity+c_EPTF_LGenBase_eventFlagFSM, //FSM |
| c_EPTF_LGenBase_eventFlagEntity, //EntityIndex |
| c_EPTF_LGenBase_eventFlagEntity+c_EPTF_LGenBase_eventFlagFSM, //FSMOfEntity |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagEntity, //behaviorOfEntity |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagInput+c_EPTF_LGenBase_eventFlagSourceEntity, //SourceEntity |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagInput+c_EPTF_LGenBase_eventFlagSourceEntity+c_EPTF_LGenBase_eventFlagSourceFSM, //SourceFsm |
| c_EPTF_LGenBase_eventFlagSourceEntity, //SourceEntityIndex |
| c_EPTF_LGenBase_eventFlagSourceEntity+c_EPTF_LGenBase_eventFlagSourceFSM, //FsmOfSourceEntity |
| c_EPTF_LGenBase_eventFlagBehavior+c_EPTF_LGenBase_eventFlagSourceEntity //BehaviorOfSourceEntity |
| } |
| |
| /* |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventInfo |
| // |
| // Purpose: |
| // Container for storing data about listeners within the entries of |
| // <v_LgenBase_fsmEvents>, that is, for each declared events |
| // |
| // Elements: |
| // - entityListenerHashMapRef - *integer* - reference to the |
| // init2intHasMap used as a database of entity listeners listening to |
| // the particular event |
| // - listeners4generic - <EPTF_LGenBase_EventListenerDescriptorList> |
| // event listener database of generic event listeners listening to a |
| // particular event |
| // |
| // Detailed Comments: |
| // The int2intHashMap referred by entityListenerHashMapRef is used for |
| // storing eIdx->lIdx(eIdx) mapping. That is, if a key (eIdx) is |
| // present in the HashMap then its value is an index pointing into the |
| // entity listeners database stored /inside/ the entity context of that |
| // entity referenced by the key eIdx |
| ///////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_EventInfo { |
| integer entityListenerHashMapRef, // (eIdx)->lIdx(eIdx) |
| EPTF_LGenBase_EventListenerDescriptorList listeners4generic |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_EventInfoList |
| // |
| // Purpose: |
| // Datatype for storing <EPTF_LGenBase_EventInfo> for each declared events |
| // of a behavior type |
| // |
| // Elements: |
| // - *record of* <EPTF_LGenBase_EventInfo> |
| // |
| // Detailed Comments: |
| // - |
| ///////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EventInfo EPTF_LGenBase_EventInfoList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_ListenerDataBase |
| // |
| // Purpose: |
| // The type for the EventListeners metadata-base, that is, an |
| // <EPTF_LGenBase_EventInfoList> for each declared behavior type |
| // |
| // Elements: |
| // - *record of* <EPTF_LGenBase_EventInfoList> |
| // |
| ///////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_EventInfoList EPTF_LGenBase_GenericEventListenerDataBase; |
| */ |
| } //group event Listeners |
| |
| group LGenBaseEvents{ |
| template EPTF_LGenBase_ReportedEventDescriptor t_startTcOfFsm( |
| integer pl_entityIdx, |
| integer pl_tcFsmIdx, |
| EPTF_IntegerList pl_args) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_startTC, |
| target := { |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcFsmIdx |
| }, |
| source := omit |
| }, |
| reportedArgs := pl_args |
| } |
| template EPTF_LGenBase_ReportedEventDescriptor t_stopTcOfFsm( |
| integer pl_entityIdx, |
| integer pl_tcFsmIdx, |
| integer pl_tcIdx) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_stopTC, |
| target := { |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcFsmIdx |
| }, |
| source := omit |
| }, |
| reportedArgs := {pl_tcIdx} |
| } |
| template EPTF_LGenBase_ReportedEventDescriptor t_abortTcOfFsm( |
| integer pl_entityIdx, |
| integer pl_tcFsmIdx, |
| integer pl_tcIdx) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_abortTC, |
| target := { |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcFsmIdx |
| }, |
| source := omit |
| }, |
| reportedArgs := {pl_tcIdx} |
| } |
| |
| template EPTF_LGenBase_ReportedEventDescriptor t_LGenBaseStartNextTc( |
| integer pl_tcIdx) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_startTC, |
| target := omit, |
| source := omit |
| }, |
| reportedArgs := {pl_tcIdx} |
| } |
| |
| template EPTF_LGenBase_ReportedEventDescriptor t_LGenBase_finishedTcSuccess( |
| integer pl_entityIdx, |
| integer pl_tcIdx, |
| template EPTF_LGenBase_EventSource pl_source := omit |
| ) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_finishedTcSuccess, |
| target := omit/*{ |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcIdx |
| }*/, |
| source := pl_source |
| }, |
| reportedArgs := {pl_tcIdx,pl_entityIdx} |
| } |
| template EPTF_LGenBase_ReportedEventDescriptor t_LGenBase_finishedTcFailed( |
| integer pl_entityIdx, |
| integer pl_tcIdx, |
| template EPTF_LGenBase_EventSource pl_source := omit |
| ) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_finishedTcFail, |
| target := omit/*{ |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcIdx |
| }*/, |
| source := pl_source |
| }, |
| reportedArgs := {pl_tcIdx,pl_entityIdx} |
| } |
| |
| template EPTF_LGenBase_ReportedEventDescriptor t_LGenBase_entityStopped( |
| integer pl_entityIdx, |
| integer pl_tcIdx, |
| template EPTF_LGenBase_EventSource pl_source := omit |
| ) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_entityStopped, |
| target := omit/*{ |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcIdx |
| }*/, |
| source := pl_source |
| }, |
| reportedArgs := {pl_tcIdx,pl_entityIdx} |
| } |
| |
| template EPTF_LGenBase_ReportedEventDescriptor t_LGenBase_entityAborted( |
| integer pl_entityIdx, |
| integer pl_tcIdx, |
| template EPTF_LGenBase_EventSource pl_source := omit |
| ) := |
| { |
| event := { |
| bIdx := c_EPTF_LGenBase_bIdx, |
| iIdx := c_EPTF_LGenBase_inputIdx_testMgmt_entityAborted, |
| target := omit/*{ |
| eIdx := pl_entityIdx, |
| fsmCtxIdx := pl_tcIdx |
| }*/, |
| source := pl_source |
| }, |
| reportedArgs := {pl_tcIdx,pl_entityIdx} |
| } |
| } |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_RegisteredFunctions |
| // |
| // Purpose: |
| // Union to store functions with different type in the same list |
| /////////////////////////////////////////////////////////// |
| type union EPTF_LGenBase_RegisteredFunctions{ |
| EPTF_LGenBase_customFinishCondition_FT customFinishCondition, |
| EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup_FT evaluateSuccess4EntityAtEntityGroup, |
| EPTF_LGenBase_evaluateSuccess4EntityAtEntityGroup2_FT evaluateSuccess4EntityAtEntityGroup2, |
| EPTF_LGenBase_customFinishFunction_FT customFinishFunction, |
| EPTF_LGenBase_TestStepFunction_FT testStepFunction, |
| EPTF_LGenBase_NextStateCalc_FT nextStateCalcFunction, |
| EPTF_LGenBase_BehaviorContextHandler_FT behaviorContextResetFn, |
| EPTF_LGenBase_BehaviorContextBinder_FT behaviorContextBindFn, |
| EPTF_LGenBase_BehaviorContextHandler_FT behaviorContextUnbindFn, |
| EPTF_LGenBase_customPhaseAction_FT customPhaseAction |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_RegisteredFunctionList |
| // |
| // Purpose: |
| // Register of functions that can be referred via their names |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_RegisteredFunctions EPTF_LGenBase_RegisteredFunctionList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_burstFuncRefList |
| // |
| // Purpose: |
| // List of <EPTF_LGenBase_burstFuncRef> record |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_burstFuncRef EPTF_LGenBase_burstFuncRefList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_burstFuncRef |
| // |
| // Purpose: |
| // Record for storing the burst precalculation and postcalculation function references |
| // |
| // Elements: |
| // - burstCalcMode - *charstring* - The name of burst calculation function |
| // - burstPreCalc - <EPTF_LGenBase_burstPreCalc_FT> - The burst precalculation function reference |
| // - burstPostCalc - <EPTF_LGenBase_burstPostCalc_FT> - The burst postcalculation function reference |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_burstFuncRef { |
| charstring burstCalcMode, |
| EPTF_LGenBase_burstPreCalc_FT burstPreCalc, |
| EPTF_LGenBase_burstPostCalc_FT burstPostCalc |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_burstPreCalc_FT |
| // |
| // Purpose: |
| // Burst precalculation function type |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_burstPreCalc_FT( |
| inout EPTF_LGenBase_SchedulerData pl_schData, |
| in float pl_when, |
| out integer pl_maxSend, |
| out float pl_nextCallTime |
| ) |
| runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_burstPostCalc_FT |
| // |
| // Purpose: |
| // Burst postcalculation function type |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_burstPostCalc_FT( |
| inout EPTF_LGenBase_SchedulerData pl_schData, |
| in integer pl_maxSend, |
| in integer pl_sent |
| ) |
| runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_burstPostCalc_FTList |
| // |
| // Purpose: |
| // List of burst postcalculation function type |
| /////////////////////////////////////////////////////////// |
| type record of EPTF_LGenBase_burstPostCalc_FT EPTF_LGenBase_burstPostCalc_FTList; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_groupFinished_FT |
| // |
| // Purpose: |
| // Function type for functions called when a group finish condition fired. |
| // |
| // Detailed comments: |
| // Obsolete callback. Use <EPTF_LGenBase_groupFinishedPerCondition_FT> instead. |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_groupFinished_FT( |
| in integer pl_tcIdx, |
| in EPTF_LGenBase_TcMgmt_GroupFinishActionListType pl_finishType |
| ) |
| runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_groupFinishedPerCondition_FT |
| // |
| // Purpose: |
| // Function type for functions called when a group finish condition fired. |
| /////////////////////////////////////////////////////////// |
| type record EPTF_LGenBase_TrafficFinised{} |
| type union EPTF_LGenBase_finishCallbackCause { |
| EPTF_LGenBase_ConditionTrue conditions, |
| EPTF_LGenBase_TrafficFinised trafficFinished |
| } |
| type function EPTF_LGenBase_groupFinishedPerCondition_FT( |
| in integer pl_tcIdx, |
| in EPTF_LGenBase_finishCallbackCause cause |
| ) |
| runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_GroupFinishedDetected_FT |
| // |
| // Purpose: |
| // Function type for functions called when a group finish condition fired. |
| /////////////////////////////////////////////////////////// |
| type function EPTF_LGenBase_GroupFinishedDetected_FT( |
| in integer pl_tcIdx, |
| in EPTF_LGenBase_ConditionTrue pl_condition, |
| out boolean pl_abortGroupFinished |
| ) |
| runs on self; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_LGenBase_scenarioCreated_FT |
| |