the start time in UTC format
the end time in UTC format
in milliseconds
aggregateConfiguration contains additional parameters
The TreatUncertainAsBad Variable indicates how the Server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations. A value of True indicates the Server considers the severity equivalent to Bad, a value of False indicates the Server considers the severity equivalent to Good, unless the Aggregate definition says otherwise. The default value is True. Note that the value is still treated as Uncertain when the StatusCode for the result is calculated.
The PercentDataBad Variable indicates the minimum percentage of Bad data in a given interval required for the StatusCode for the given interval for processed data request to be set to Bad. (Uncertain is treated as defined above.) Refer to 5.4.3 for details on using this Variable when assigning StatusCodes. For details on which Aggregates use the PercentDataBad Variable, see the definition of each Aggregate. The default value is 100.
The PercentDataGood Variable indicates the minimum percentage of Good data in a given interval required for the StatusCode for the given interval for the processed data requests to be set to Good. Refer to 5.4.3 for details on using this Variable when assigning StatusCodes. For details on which Aggregates use the PercentDataGood Variable, see the definition of each Aggregate. The default value is 100.
The PercentDataGood and PercentDataBad shall follow the following relationship PercentDataGood ≥ (100 – PercentDataBad). If they are equal the result of the PercentDataGood calculation is used. If the values entered for PercentDataGood and PercentDataBad do not result in a valid calculation (e.g. Bad = 80; Good = 0) the result will have a StatusCode of Bad_AggregateInvalidInputs The StatusCode Bad_AggregateInvalidInputs will be returned if the value of PercentDataGood or PercentDataBad exceed 100.
The UseSlopedExtrapolation Variable indicates how the Server interpolates data when no boundary value exists (i.e. extrapolating into the future from the last known value). A value of False indicates that the Server will use a SteppedExtrapolation format, and hold the last known value constant. A value of True indicates the Server will project the value using UseSlopedExtrapolation mode. The default value is False. For SimpleBounds this value is ignored.
// es5
session.readAggregateValue(
{nodeId: "ns=5;s=Simulation Examples.Functions.Sine1" },
new Date("2015-06-10T09:00:00.000Z"),
new Date("2015-06-10T09:01:00.000Z"),
AggregateFunction.Average, 3600000, (err,dataValues) => {
});
// es6
const dataValues = await session.readAggregateValue(
{ nodeId: "ns=5;s=Simulation Examples.Functions.Sine1" },
new Date("2015-06-10T09:00:00.000Z"),
new Date("2015-06-10T09:01:00.000Z"),
AggregateFunction.Average, 3600000);
Optional
results: HistoryReadResult[]Optional
results: HistoryReadResult[]Optional
options: ExtraReadHistoryValueParametersOptional
result: HistoryReadResultOptional
result: HistoryReadResultOptional
options: ExtraReadHistoryValueParameters
the read value id