Click or drag to resize
OSIsoft, LLC

AFCalculationBasis Enumeration

Defines the possible calculation options when performing summary calculations over time-series data.

Namespace:  OSIsoft.AF.Data
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version:
public enum AFCalculationBasis
  Member nameValueDescription
TimeWeighted0 Weight the values in the calculation by the time over which they apply. Interpolation is based on whether the attribute is stepped. Interpolated events are generated at the boundaries if necessary.

Evaluate values with equal weighting for each event. No interpolation is done except in the case of expression calculations evaluated by the PI Server. There must be at least one event within the time range to perform a successful calculation. Two events are required for standard deviation. In handling events at the boundary of the calculation, the AF SDK uses following rules:

1) use events at both boundaries when there is only one calculation interval;

2) include events at start time in multiple intervals and the intervals are in ascending time order;

3) include events at the end time in multiple intervals and the intervals are in descending time order.

TimeWeightedContinuous2 Apply weighting as in TimeWeighted, but do all interpolation between values as if they represent continuous data, (standard interpolation) regardless of whether the attribute is stepped.
TimeWeightedDiscrete3 Apply weighting as in TimeWeighted but interpolation between values is performed as if they represent discrete, unrelated values (stair step plot) regardless of the attribute is stepped.
EventWeightedExcludeMostRecentEvent4 The calculation behaves the same as EventWeighted, except in the handling of events at the boundary of summary intervals in a multiple intervals calculation. Use this option to prevent events at the intervals boundary from being double count at both intervals. With this option, events at the end time (most recent time) of an interval is not used in that interval.
EventWeightedExcludeEarliestEvent5 Similar to the option EventWeightedExcludeMostRecentEvent. Events at the start time(earliest time) of an interval is not used in that interval.
EventWeightedIncludeBothEnds6 Events at both ends of the interval boundaries are included in the event weighted calculation.

Note Notes to Callers
This method, property, or class is only available in the .NET 4 version of the SDK.

Version Information


Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5
See Also
Enabling Operational Intelligence