AggregateSelection Property

General info

Label

Aggregate Selection

Description

The default aggregate to be used for the web displays.

Data type

UInt32

Default value

1 (syslib.model.codes.Aggregates.AGG_TYPE_INTERPOLATIVE)

Type

CodingGroup

Code

918

Symbolic name

MODEL_PROP_AGGREGATESELECTION

Lua access code

syslib.model.properties.AggregateSelection

Available since

1.8.1.1450

Parent classes

AdvancedTrendPen | GenKPI

Attributes

Name Tooltip
PROP_CONFIGURABLE
PROP_VISIBLE
PROP_HAS_DEFAULT

Codings

Coding group: Aggregates

Examples

Read from or write to the AggregateSelection property.

  • Lua

  • C#

-- Read from the AggregateSelection
syslib.getvalue("<OBJECT FULL PATH>.KPISliceSettings.AggregateSelection")

-- Write to the AggregateSelection
syslib.setvalue("<OBJECT FULL PATH>.KPISliceSettings.AggregateSelection",
    syslib.model.codes.Aggregates.AGG_TYPE_INVALID)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the AggregateSelection
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.KPISliceSettings.AggregateSelection"));
// Write to the AggregateSelection
Result result = sli.WriteValue(sc, new WriteItem(Aggregates.AGG_TYPE_INVALID, "<OBJECT FULL PATH>.KPISliceSettings.AggregateSelection"));

A switch-like function of the codings.

function get_coding_name(code)
    local _a = syslib.model.codes.Aggregates
    if _a.AGG_TYPE_INVALID==code then return 'AGG_TYPE_INVALID'
    elseif _a.AGG_TYPE_INTERPOLATIVE==code then return 'AGG_TYPE_INTERPOLATIVE'
    elseif _a.AGG_TYPE_AVERAGE==code then return 'AGG_TYPE_AVERAGE'
    elseif _a.AGG_TYPE_TIMEAVERAGE==code then return 'AGG_TYPE_TIMEAVERAGE'
    elseif _a.AGG_TYPE_TIMEAVERAGE2==code then return 'AGG_TYPE_TIMEAVERAGE2'
    elseif _a.AGG_TYPE_TOTAL==code then return 'AGG_TYPE_TOTAL'
    elseif _a.AGG_TYPE_TOTAL2==code then return 'AGG_TYPE_TOTAL2'
    elseif _a.AGG_TYPE_MINIMUM==code then return 'AGG_TYPE_MINIMUM'
    elseif _a.AGG_TYPE_MAXIMUM==code then return 'AGG_TYPE_MAXIMUM'
    elseif _a.AGG_TYPE_MINIMUMACTUALTIME==code then return 'AGG_TYPE_MINIMUMACTUALTIME'
    elseif _a.AGG_TYPE_MAXIMUMACTUALTIME==code then return 'AGG_TYPE_MAXIMUMACTUALTIME'
    elseif _a.AGG_TYPE_RANGE==code then return 'AGG_TYPE_RANGE'
    elseif _a.AGG_TYPE_MINIMUM2==code then return 'AGG_TYPE_MINIMUM2'
    elseif _a.AGG_TYPE_MAXIMUM2==code then return 'AGG_TYPE_MAXIMUM2'
    elseif _a.AGG_TYPE_MINIMUMACTUALTIME2==code then return 'AGG_TYPE_MINIMUMACTUALTIME2'
    elseif _a.AGG_TYPE_MAXIMUMACTUALTIME2==code then return 'AGG_TYPE_MAXIMUMACTUALTIME2'
    elseif _a.AGG_TYPE_RANGE2==code then return 'AGG_TYPE_RANGE2'
    elseif _a.AGG_TYPE_COUNT==code then return 'AGG_TYPE_COUNT'
    elseif _a.AGG_TYPE_DURATIONINSTATEZERO==code then return 'AGG_TYPE_DURATIONINSTATEZERO'
    elseif _a.AGG_TYPE_DURATIONINSTATENONZERO==code then return 'AGG_TYPE_DURATIONINSTATENONZERO'
    elseif _a.AGG_TYPE_NUMBEROFTRANSITIONS==code then return 'AGG_TYPE_NUMBEROFTRANSITIONS'
    elseif _a.AGG_TYPE_START==code then return 'AGG_TYPE_START'
    elseif _a.AGG_TYPE_END==code then return 'AGG_TYPE_END'
    elseif _a.AGG_TYPE_DELTA==code then return 'AGG_TYPE_DELTA'
    elseif _a.AGG_TYPE_STARTBOUND==code then return 'AGG_TYPE_STARTBOUND'
    elseif _a.AGG_TYPE_ENDBOUND==code then return 'AGG_TYPE_ENDBOUND'
    elseif _a.AGG_TYPE_DELTABOUNDS==code then return 'AGG_TYPE_DELTABOUNDS'
    elseif _a.AGG_TYPE_DURATIONGOOD==code then return 'AGG_TYPE_DURATIONGOOD'
    elseif _a.AGG_TYPE_DURATIONBAD==code then return 'AGG_TYPE_DURATIONBAD'
    elseif _a.AGG_TYPE_PERCENTGOOD==code then return 'AGG_TYPE_PERCENTGOOD'
    elseif _a.AGG_TYPE_PERCENTBAD==code then return 'AGG_TYPE_PERCENTBAD'
    elseif _a.AGG_TYPE_WORSTQUALITY==code then return 'AGG_TYPE_WORSTQUALITY'
    elseif _a.AGG_TYPE_WORSTQUALITY2==code then return 'AGG_TYPE_WORSTQUALITY2'
    elseif _a.AGG_TYPE_ANNOTATIONCOUNT==code then return 'AGG_TYPE_ANNOTATIONCOUNT'
    elseif _a.AGG_TYPE_STANDARDDEVIATIONSAMPLE==code then return 'AGG_TYPE_STANDARDDEVIATIONSAMPLE'
    elseif _a.AGG_TYPE_VARIANCESAMPLE==code then return 'AGG_TYPE_VARIANCESAMPLE'
    elseif _a.AGG_TYPE_STANDARDDEVIATIONPOPULATION==code then return 'AGG_TYPE_STANDARDDEVIATIONPOPULATION'
    elseif _a.AGG_TYPE_VARIANCEPOPULATION==code then return 'AGG_TYPE_VARIANCEPOPULATION'
    elseif _a.AGG_TYPE_INTERPOLATIVE_END==code then return 'AGG_TYPE_INTERPOLATIVE_END'
    elseif _a.AGG_TYPE_SAMPLE==code then return 'AGG_TYPE_SAMPLE'
    elseif _a.AGG_TYPE_BESTFIT==code then return 'AGG_TYPE_BESTFIT'
    elseif _a.AGG_TYPE_RAW==code then return 'AGG_TYPE_RAW'
    end
end
return get_coding_name(syslib.model.codes.Aggregates.AGG_TYPE_INVALID)