| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // 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_StatManager_Definitions |
| // |
| // Purpose: |
| // This module contains type definitions for TTCN-3 EPTF StatManager |
| // implementation. |
| // |
| // Module Parameters: |
| // tsp_EPTF_StatManager_... - *charstring* - details, default value: "..." |
| // |
| // Module depends on: |
| // <EPTF_CLL_DataSource_Definitions> |
| // <EPTF_CLL_StatMeasure_Definitions> |
| // <EPTF_CLL_Logging_Definitions> |
| // <EPTF_CLL_HashMap_Definitions> |
| // |
| // Current Owner: |
| // Balazs Lugossy (EBALLUG) |
| // |
| // Last Review Date: |
| // |
| // |
| // Detailed Comments: |
| // This module contains type definitions for TTCN-3 EPTF StatManager |
| // implementation. |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| module EPTF_CLL_StatManager_Definitions { |
| |
| import from EPTF_CLL_DataSource_Definitions all; |
| import from EPTF_CLL_StatMeasure_Definitions all; |
| import from EPTF_CLL_Logging_Definitions all; |
| import from EPTF_CLL_HashMap_Definitions all; |
| |
| |
| group ModulePars{ |
| modulepar charstring tsp_EPTF_StatManager_loggingComponentMask := "EPTF_StatManager"; |
| }//Modulepars |
| |
| group Types{ |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_StatManager_CT |
| // |
| // Purpose: |
| // |
| // |
| // Elements: |
| // |
| // Detailed Comments: |
| // |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type component EPTF_StatManager_CT |
| extends EPTF_StatMeasure_CT, EPTF_DataSourceClient_CT, EPTF_DataSource_CT, EPTF_Logging_CT, EPTF_HashMap_CT |
| { |
| private var boolean v_EPTF_StatManager_initialized := false; // init flag |
| // logging |
| private var integer v_StatManager_loggingMaskId := c_EPTF_Logging_invalidMaskId; |
| private var integer v_EPTF_StatManager_limitStatVarsHashMap := -1; |
| } |
| |
| type record EPTF_StatManager_GoSPar { |
| integer nofSuccVarId, |
| integer nofFailVarId, |
| integer nofTimeoutVarId, |
| integer nofErrorVarId |
| } |
| |
| }//Types |
| |
| group Constants{ |
| |
| const charstring c_StatManager_DataSource_sourceId := "StatManager"; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_StatManager_dataElement_Help |
| // |
| // Purpose: |
| // This data element returns the help information about |
| // all dataElements supported. |
| // ValueType: charstring |
| // |
| // Parameters: |
| // - <c_EPTF_DataSource_paramNameHelpFormat> - the format of the output |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_EPTF_StatManager_dataElement_help := c_EPTF_DataSource_dataElement_Help |
| |
| const EPTF_DataSource_Help_DataElement c_EPTF_StatManager_Help_dataElement_help := c_EPTF_DataSource_Help_dataElement_genericHelp; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_dataElementGoS |
| // |
| // Purpose: |
| // This dataElement creates/returns a limits statistics for a given source and reference variable. |
| // The type of the value of the data is: statusLEDType |
| // |
| // Parameters: |
| // c_StatManager_paramName_SuccessVarId - *integer* - Id of the variable containing the value of the Success counter |
| // c_StatManager_paramName_FailVarId - *integer* - Id of the variable containing the value of the Fail counter |
| // c_StatManager_paramName_TimeoutVarId - *integer* - Id of the variable containing the value of the Timeout counter |
| // c_StatManager_paramName_ErrorVarId - *integer* - Id of the variable containing the value of the Error counter |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_dataElementGoS := "GoS"; |
| |
| const EPTF_DataSource_Help_DataElement c_StatManager_Help_dataElementGoS := { |
| name := c_StatManager_dataElementGoS, |
| valueType := floatType, |
| description := "This dataElement creates/returns a GoS statistics for a given source variables.", |
| parameters := { |
| { |
| name := c_StatManager_paramName_SuccessVarId, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "the name of the EPTF Variable that contains the Success data for the GoS statistics (its value should be integer type)", |
| exampleValue := "varNameThatContainsIntValue" |
| },{ |
| name := c_StatManager_paramName_FailVarId, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "the name of the EPTF Variable that contains the Fail data for the GoS statistics (its value should be integer type)", |
| exampleValue := "varNameThatContainsIntValue" |
| },{ |
| name := c_StatManager_paramName_TimeoutVarId, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "the name of the EPTF Variable that contains the Timeout data for the GoS statistics (its value should be integer type)", |
| exampleValue := "varNameThatContainsIntValue" |
| },{ |
| name := c_StatManager_paramName_ErrorVarId, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "the name of the EPTF Variable that contains the Error data for the GoS statistics (its value should be integer type)", |
| exampleValue := "varNameThatContainsIntValue" |
| } |
| } |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_dataElementLEDlimit |
| // |
| // Purpose: |
| // This dataElement creates/returns a limits statistics for a given source and reference variable. |
| // The type of the value of the data is: statusLEDType |
| // |
| // Parameters: |
| // c_StatManager_paramName_blackLimit - *charstring* - limiting value when the LED colour becomes black |
| // c_StatManager_paramName_blueLimit - *charstring* - limiting value when the LED colour becomes blue |
| // c_StatManager_paramName_redkLimit - *charstring* - limiting value when the LED colour becomes red |
| // c_StatManager_paramName_yellowLimit - *charstring* - limiting value when the LED colour becomes yellow |
| // c_StatManager_paramName_greenLimit - *charstring* - limiting value when the LED colour becomes green |
| // c_StatManager_paramName_defaultColor - *charstring* - default color of the statusLED |
| // c_StatManager_paramName_enableValueInLEDText - *boolean* - enable value indication |
| // c_StatManager_paramName_VarId - *integer* - Id of the source variable |
| // c_StatManager_paramName_referenceVarId - *integer* - Id of the reference variable |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_dataElementLEDlimit := "LEDlimit"; |
| |
| const EPTF_DataSource_Help_DataElement c_StatManager_Help_dataElementLEDlimit := { |
| name := c_StatManager_dataElementLEDlimit, |
| valueType := statusLEDType, |
| description := "This dataElement creates/returns a limits statistics for a given source and reference variable.", |
| parameters := { |
| { |
| name := c_StatManager_paramName_blackLimit, |
| typeDescriptor := { |
| valueType := floatType |
| }, |
| description := "Limiting value above which the LED colour becomes black (optional)", |
| exampleValue := "10.0" |
| },{ |
| name := c_StatManager_paramName_blueLimit, |
| typeDescriptor := { |
| valueType := floatType |
| }, |
| description := "Limiting value above which the LED colour becomes blue (optional)", |
| exampleValue := "20.0" |
| },{ |
| name := c_StatManager_paramName_redLimit, |
| typeDescriptor := { |
| valueType := floatType |
| }, |
| description := "Limiting value above which the LED colour becomes red (optional)", |
| exampleValue := "30.0" |
| },{ |
| name := c_StatManager_paramName_yellowLimit, |
| typeDescriptor := { |
| valueType := floatType |
| }, |
| description := "Limiting value above which the LED colour becomes yellow (optional)", |
| exampleValue := "40.0" |
| },{ |
| name := c_StatManager_paramName_greenLimit, |
| typeDescriptor := { |
| valueType := floatType |
| }, |
| description := "Limiting value above which the LED colour becomes green (optional)", |
| exampleValue := "50.0" |
| },{ |
| name := c_StatManager_paramName_defaultColor, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "Specifies the default colour of the LED (colour below the lowest limit). Its value should be one of: \"blue\",\"black\",\"yellow\",\"green\" or \"red\". "& |
| "(optional, default: \"black\")", |
| exampleValue := "green" |
| },{ |
| name := c_StatManager_paramName_enableValueInLEDText, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "If set to \"yes\": enables value indication in the label of the statusLED. "& |
| "When enabled, the value of the data variable will appear in the LED text. Possible values: \"yes\", \"no\" (optional, default: \"no\")", |
| exampleValue := "yes" |
| },{ |
| name := c_StatManager_paramName_VarId, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "the name of the EPTF Variable that contains the source data for the limits statistics (its value should be float or integer type)", |
| exampleValue := "varNameThatContainsFloatOrIntValue" |
| },{ |
| name := c_StatManager_paramName_referenceVarId, |
| typeDescriptor := { |
| valueType := charstringType |
| }, |
| description := "The name of the reference variable (optional). "& |
| "If specified the limits are considered as relative difference in percentile from the value of the reference variable." |
| &" If not specified, the limits will be taken as absolute values. The reference variable should contain a float or integer type value.", |
| exampleValue := "referenceVarNameThatContainsFloatOrIntValue" |
| } |
| } |
| } |
| |
| /* /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_limitList |
| // |
| // Purpose: |
| // A list of the limits that specifies the color of a statusLED |
| // It has to be specified in the following form: |
| // "redLimit=25 yellowLimit=50 ... greenLimit=100" |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_limitList := "limitList"*/ |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_blackLimit |
| // |
| // Purpose: |
| // To specify the value range of the limit statistic for which the statusLED shall be black |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_blackLimit := "blackLimit" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_blueLimit |
| // |
| // Purpose: |
| // To specify the value range of the limit statistic for which the statusLED shall be blue |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_blueLimit := "blueLimit" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_redLimit |
| // |
| // Purpose: |
| // To specify the value range of the limit statistic for which the statusLED shall be red |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_redLimit := "redLimit" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_yellowLimit |
| // |
| // Purpose: |
| // To specify the value range of the limit statistic for which the statusLED shall be yellow |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_yellowLimit := "yellowLimit" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_greenLimit |
| // |
| // Purpose: |
| // To specify the value range of the limit statistic for which the statusLED shall be green |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_greenLimit := "greenLimit" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_defaultColor |
| // |
| // Purpose: |
| // Specifies the default color of the statusLED |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_defaultColor := "defaultColor" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_enableValueInLEDText |
| // |
| // Purpose: |
| // Enables value indication in the label of the statusLED |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_enableValueInLEDText := "enableValueInLEDText" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_varId |
| // |
| // Purpose: |
| // Variable for the limit stat |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_VarId := "VarId" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_referenceVarId |
| // |
| // Purpose: |
| // Reference variable for the limit stat |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_referenceVarId := "refVarId" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_varId |
| // |
| // Purpose: |
| // Value for the limit stat |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_value := "value" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_referenceVarId |
| // |
| // Purpose: |
| // Reference value for the limit stat |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_referenceValue := "refValue" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_SuccessVarId |
| // |
| // Purpose: |
| // Variable for the GoS stat that contains the number of Success counter |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_SuccessVarId := "SuccessVarName" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_FailVarId |
| // |
| // Purpose: |
| // Variable for the GoS stat that contains the number of Fail counter |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_FailVarId := "FailVarName" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_TimeoutVarId |
| // |
| // Purpose: |
| // Variable for the GoS stat that contains the number of Timeout counter |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_TimeoutVarId := "TimeoutVarName" |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_StatManager_paramName_ErrorVarId |
| // |
| // Purpose: |
| // Variable for the GoS stat that contains the number of Error counter |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_StatManager_paramName_ErrorVarId := "ErrorVarName" |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_StatManager_loggingEventClasses |
| // |
| // Purpose: |
| // list of logging event class names used on the StatManager |
| // |
| // Detailed Comments: |
| // <EPTF_Logging_EventClassPrefixList> { "Warning", "Debug" } |
| /////////////////////////////////////////////////////////// |
| const EPTF_Logging_EventClassPrefixList c_EPTF_StatManager_loggingEventClasses := { "Warning", "Debug" }; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_StatManager_loggingClassIdx_Warning |
| // |
| // Purpose: |
| // logging class index for Warning |
| // |
| // Detailed Comments: |
| // *0* |
| /////////////////////////////////////////////////////////// |
| const integer c_EPTF_StatManager_loggingClassIdx_Warning := 0; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_StatManager_loggingClassIdx_Debug |
| // |
| // Purpose: |
| // logging class index for Debug |
| // |
| // Detailed Comments: |
| // *1* |
| /////////////////////////////////////////////////////////// |
| const integer c_EPTF_StatManager_loggingClassIdx_Debug := 1; |
| |
| const charstring c_EPTF_StatManager_floatNumber := "[+-]#(0,1)[0-9]#(1,)[.]#(1,1)[0-9]#(1,)"; // float number: "12.354", "-1.23", "+1.254" |
| const charstring c_EPTF_StatManager_integerNumber := "[+-]#(0,1)[0-9]#(1,)"; |
| |
| // the datasource help database for StatManager |
| const EPTF_DataSource_Help_DataElementChildren c_EPTF_StatManager_help := { |
| { |
| dataElement := c_EPTF_StatManager_Help_dataElement_help |
| }, |
| { |
| dataElement := c_StatManager_Help_dataElementLEDlimit |
| }, |
| { |
| dataElement := c_StatManager_Help_dataElementGoS |
| } |
| } |
| |
| }//Constants |
| |
| } // module |