blob: 7268bbf0d6f7f1495ac8b946e9c74a6a4f6dde55 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2019 Ericsson Telecom AB //
// //
// All rights reserved. This program and the accompanying materials //
// are made available under the terms of the Eclipse Public License v2.0 //
// which accompanies this distribution, and is available at //
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
///////////////////////////////////////////////////////////////////////////////
module EPTF_StatMeasure_Test_Definitions {
import from EPTF_CLL_StatMeasure_Definitions all;
//import from EPTF_CLL_StatMeasure_Functions all;
import from EPTF_CLL_Variable_Definitions all;
//import from EPTF_CLL_Variable_Functions all;
//import from EPTF_CLL_Base_Functions all;
import from EPTF_CLL_Common_Definitions all; // EPTF_IntegerList
modulepar float tsp_eps:=0.2; //epsilon: limit of difference
// Stat measure test component
type component EPTF_StatMeasure_Test_CT extends EPTF_Var_CT, EPTF_StatMeasure_CT
{
var boolean v_EPTF_StatMeasure_Test_initialized := false;
timer t_wait := 0.5;
var integer v_intVarIdx;
var integer v_floatVarIdx;
var integer v_timerVarIdx;
var float v_customMulti := 5.0;
var float v_customResult := 0.0;
var boolean v_boolNW;
}
type record of EPTF_StatMeasure_statType EPTF_StatMeasure_Test_statTypeList;
const EPTF_StatMeasure_Test_statTypeList c_EPTF_StatMeasure_Test_statTypes := {
content, // content of the variable
delta, // newValue-oldValue
deltaSum,// newValue-initialValue
min,// minimal value ever
max,// maximal value ever
mean,// mean value
standardDev, // standard deviation and mean (if this is chosen, mean is also calculated)
EPS, // measures the number of events during a refresh period (events/sec), and the time of measurement. For variables the events are the refresh events
chrono, // measures the time of measurement in sec. For variables it measures the time between start and the last refresh event
density // measures the density f
}
// Expected result after statistics tests
template EPTF_StatMeasure_StatisticsList t_expectedResult := {
{
varIdx := 0,
createdVarIdx := -1,
statData := {
content := {
}
},
enabled := true,
reset := true
},
{
varIdx := 0,
createdVarIdx := 3,
statData := {
delta := {
prevContent := {
intVal := 10
},
statValue := {
intVal := 0
}
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 4,
statData := {
deltaSum := {
iniContent := {
intVal := 10
},
statValue := {
intVal := 0
}
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 5,
statData := {
min := {
statValue := {
intVal := 10
}
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 6,
statData := {
max := {
statValue := {
intVal := 10
}
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 7,
statData := {
mean := {
n := 2,
x := 10.000000,
delta := 0.000000,
statValue := 10.000000
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
mean := {
n := 2,
x := 10.000000,
delta := 0.000000,
statValue := 10.000000
}
},
enabled := false,
reset := false
},
{
varIdx := 0,
createdVarIdx := 8,
statData := {
standardDev := {
meanIdx := 6,
S := 0.000000,
statValue := 0.000000
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 9,
statData := {
EPS := {
n := 2,
statValue := 0.000000,
startTime := ?,
measurementLength := 0.000000
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 10,
statData := {
chrono := {
statValue := ?,
startTime := ?,
stopTime := ?
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 11,
statData := {
density := {
boundaries := {
0.000000,
1.000000,
2.000000,
3.000000,
4.000000,
5.000000,
6.000000,
7.000000,
8.000000,
9.000000,
10.000000
},
statValue := {
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
},
createdBoundaryVarIdx := -1
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
density := {
boundaries := {
0.000000,
2.000000,
4.000000,
6.000000,
8.000000,
10.000000
},
statValue := {
0,
0,
0,
0,
0,
0,
2
},
createdBoundaryVarIdx := -1
}
},
enabled := false,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
max := {
statValue := {
floatVal := 10.000000
}
}
},
enabled := false,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
percentileP := {
densityIdx := 11,
maxIdx := 12,
pos := ?,
curBIdx := 6,
lower := 0,
current := 2,
statValue := 10.000000,
valueP := 0.95000000,
createdValuePVarIdx := -1
}
},
enabled := false,
reset := false
},
{
varIdx := 0,
createdVarIdx := 12,
statData := {
percentile95 := {
percentilePIdx := 13
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
density := {
boundaries := {
},
statValue := {
2
},
createdBoundaryVarIdx := -1
}
},
enabled := false,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
max := {
statValue := {
floatVal := 10.000000
}
}
},
enabled := false,
reset := false
},
{
varIdx := 0,
createdVarIdx := 13,
statData := {
percentileP := {
densityIdx := 15,
maxIdx := 16,
pos := ?,
curBIdx := ?,
lower := 0,
current := ?,
statValue := 10.000000,
valueP := 0.5000000,
createdValuePVarIdx := -1
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 14,
statData := {
limits := {
referenceVarId := -1,
limits := {
},
defaultColor := led_black,
enableValueInLEDText := false,
statValue := {
color := led_black,
text := "" // 10.0 but text is disabled
}
}
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := -1,
statData := {
custom := {
statName := "custom_19",
newStatFn := null,
newStatFnArgList := {
},
addDataFn := null,
addDataFnArgList := {
},
getStatFn := null,
getStatFnArgList := {
},
stat2StrFn := null,
stat2StrFnArgList := {
},
createVarFromStatFn := null,
createVarFromStatFnArgList := {
},
resetStatFn := null,
resetStatFnArgList := {
},
enableStatFn := null,
enableStatFnArgList := {
},
disableStatFn := null,
disableStatFnArgList := {
}
}
},
enabled := true,
reset := true
},
/*
{
varIdx := 0,
createdVarIdx := 12,
statData := {
custom := ?
},
enabled := true,
reset := false
},
{
varIdx := 0,
createdVarIdx := 13,
statData := {
custom := ?
},
enabled := true,
reset := false
},
*/
{
varIdx := 1,
createdVarIdx := -1,
statData := {
content := {
}
},
enabled := true,
reset := true
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
delta := {
prevContent := {
floatVal := 5.000000
},
statValue := {
floatVal := 1.000000
}
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
deltaSum := {
iniContent := {
floatVal := 1.000000
},
statValue := {
floatVal := 4.000000
}
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
min := {
statValue := {
floatVal := 1.000000
}
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
max := {
statValue := {
floatVal := 5.000000
}
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
mean := {
n := 5,
x := 5.000000,
delta := 2.500000,
statValue := 3.000000
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
mean := {
n := 5,
x := 5.000000,
delta := 2.500000,
statValue := 3.000000
}
},
enabled := false,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
standardDev := {
meanIdx := 26,
S := 10.000000,
statValue := 2.000000
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
EPS := {
n := 5,
statValue := 0.000000,
startTime := ?,
measurementLength := 0.000000
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
chrono := {
statValue := ?,
startTime := ?,
stopTime := ?
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
density := {
boundaries := {
0.000000,
1.000000,
2.000000,
3.000000,
4.000000,
5.000000,
6.000000,
7.000000,
8.000000,
9.000000,
10.000000
},
statValue := {
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0
},
createdBoundaryVarIdx := -1
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
density := {
boundaries := {
0.000000,
2.000000,
4.000000,
6.000000,
8.000000,
10.000000
},
statValue := {
0,
1,
2,
2,
0,
0,
0
},
createdBoundaryVarIdx := -1
}
},
enabled := false,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
max := {
statValue := {
floatVal := 5.000000
}
}
},
enabled := false,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
percentileP := {
densityIdx := 31,
maxIdx := 32,
pos := ?, //2.850000,
curBIdx := 3,
lower := 3,
current := 2,
statValue := 6.000000,
valueP := 0.9500000,
createdValuePVarIdx := -1
}
},
enabled := false,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
percentile95 := {
percentilePIdx := 33
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
density := {
boundaries := {
},
statValue := {
5
},
createdBoundaryVarIdx := -1
}
},
enabled := false,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
max := {
statValue := {
floatVal := 5.000000
}
}
},
enabled := false,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
percentileP := {
densityIdx := 35,
maxIdx := 36,
pos := ?, //2.850000,
curBIdx := 0,
lower := 0,
current := 0,
statValue := 5.000000,
valueP := 0.5000000,
createdValuePVarIdx := -1
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
limits := {
referenceVarId := -1,
limits := {
},
defaultColor := led_black,
enableValueInLEDText := false,
statValue := {
color := led_black,
text := "" // 5.0 but text is disabled
}
}
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
custom := {
statName := "custom_39",
newStatFn := null,
newStatFnArgList := {
},
addDataFn := null,
addDataFnArgList := {
},
getStatFn := null,
getStatFnArgList := {
},
stat2StrFn := null,
stat2StrFnArgList := {
},
createVarFromStatFn := null,
createVarFromStatFnArgList := {
},
resetStatFn := null,
resetStatFnArgList := {
},
enableStatFn := null,
enableStatFnArgList := {
},
disableStatFn := null,
disableStatFnArgList := {
}
}
},
enabled := true,
reset := true
},
/*
{
varIdx := 1,
createdVarIdx := -1,
statData := {
custom := ?
},
enabled := true,
reset := false
},
{
varIdx := 1,
createdVarIdx := -1,
statData := {
custom := ?,
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
content := {
}
},
enabled := true,
reset := true
},
*/
{
varIdx := -1,
createdVarIdx := -1,
statData := {
delta := {
prevContent := {
intVal := 7
},
statValue := {
intVal := 1
}
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
deltaSum := {
iniContent := {
intVal := 1
},
statValue := {
intVal := 6
}
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
min := {
statValue := {
intVal := 1
}
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
max := {
statValue := {
intVal := 7
}
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
mean := {
n := 4,
x := 7.000000,
delta := 4.000000,
statValue := 4.000000
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
mean := {
n := 4,
x := 7.000000,
delta := 4.000000,
statValue := 4.000000
}
},
enabled := false,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
standardDev := {
meanIdx := 45,
S := 26.000000,
statValue := 6.500000
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
EPS := {
n := 4,
statValue := 2.000000,
startTime := ?,
measurementLength := 2.000000
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
chrono := {
statValue := ?,
startTime := ?,
stopTime := ?
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
density := {
boundaries := {
0.000000,
1.000000,
2.000000,
3.000000,
4.000000,
5.000000,
6.000000,
7.000000,
8.000000,
9.000000,
10.000000
},
statValue := {
0,
0,
1,
1,
0,
0,
0,
1,
1,
0,
0,
0
},
createdBoundaryVarIdx := -1
}
},
enabled := true,
reset := false
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
density := {
boundaries := { },
statValue := { 0 },
createdBoundaryVarIdx := -1
}
},
enabled := false,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
max := {
statValue := {
intVal := 0
}
}
},
enabled := false,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
percentileP := {
densityIdx := 50,
maxIdx := 51,
pos := ?,
curBIdx := 0,
lower := 0,
current := 0,
statValue := -1.000000,
valueP := 0.95000000,
createdValuePVarIdx := -1
}
},
enabled := false,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
percentile95 := {
percentilePIdx := 52
}
},
enabled := true,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
density := {
boundaries := { },
statValue := { 0 },
createdBoundaryVarIdx := -1
}
},
enabled := false,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
max := {
statValue := {
intVal := 0
}
}
},
enabled := false,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
percentileP := {
densityIdx := 54,
maxIdx := 55,
pos := ?,
curBIdx := 0,
lower := 0,
current := 0,
statValue := -1.000000,
valueP := 0.50000000,
createdValuePVarIdx := -1
}
},
enabled := true,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
limits := {
referenceVarId := -1,
limits := {
},
defaultColor := led_black,
enableValueInLEDText := false,
statValue := {
color := led_black,
text := ""
}
}
},
enabled := true,
reset := true
},
{
varIdx := -1,
createdVarIdx := -1,
statData := {
custom := {
statName := "custom_58",
newStatFn := null,
newStatFnArgList := {
},
addDataFn := null,
addDataFnArgList := {
},
getStatFn := null,
getStatFnArgList := {
},
stat2StrFn := null,
stat2StrFnArgList := {
},
createVarFromStatFn := null,
createVarFromStatFnArgList := {
},
resetStatFn := null,
resetStatFnArgList := {
},
enableStatFn := null,
enableStatFnArgList := {
},
disableStatFn := null,
disableStatFnArgList := {
}
}
},
enabled := true,
reset := true
}
};
}//module