AFDataReferenceContext Enumeration
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
The AFDataReferenceContext is an enumeration of the possible contexts supported
for by data reference. It is returned by the
AFDataReference.SupportedContexts
property.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[FlagsAttribute] public enum AFDataReferenceContext
<FlagsAttribute> Public Enumeration AFDataReferenceContext Dim instance As AFDataReferenceContext
[FlagsAttribute] public enum class AFDataReferenceContext
[<FlagsAttribute>] type AFDataReferenceContext
Members
| Member name | Value | Description | |
|---|---|---|---|
| None | 0 | No data reference context is supported. Therefore, the current value is the only supported context. | |
| Time | 1 | Used with the timeContext parameter to specify that the reference supports accessing values with a Time context. This context does not apply to the GetValues method. | |
| TimeRange | 2 | Used with the timeContext parameter to specify that the reference supports accessing with a Time Range context. If an AFCase object is used for the timeContext, then the case's start and end time are used to specify a time range to the reference. This type of context is often used when computing summary values. This context does not apply to the SetValue or GetValues methods. | |
| Case | 4 | Used with the context parameter to specify that the reference supports accessing values with an AFCase context. However, if only the start time and end time properties are being used, time range context should be specified instead. | |
| Analysis | 8 | Used with the context parameter to specify that the reference supports accessing values with an AFAnalysis context. | |
| Model | 16 | Used with the context parameter to specify that the reference supports accessing values with an AFModel context. | |
| All | 65535 | The data reference supports all reference contexts. |
Remarks
Time and TimeRange are passed in the timeContext parameter of the GetValue, SetValue, and GetValues methods while Model, ModelAnalysis, and Case are passed in the context parameter of these same methods.
The AF SDK also supports accessing values over several cases by specifying a AFNamedCollectionList<AFCase> context for the context parameter of the GetValues method.