Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

OSIsoft.AF.Data Namespace

  • Last UpdatedNov 18, 2025
  • 6 minute read
OSIsoft.AF.Data Namespace
The OSIsoft.AF.Data namespace provides a set of classes for obtaining data from assets within an organization.

Classes

  ClassDescription
Public classCode example
AFAnnotation
The structured AFAnnotation object is used to read and create annotations associated with historical data events of an AFAttribute as well as to read and create annotations associated with asset based objects such as an AFEventFrame or AFElement.
Public classCode example
AFAnnotations
A list of structured AFAnnotation objects associated with an historical data event.
Public classCode example
AFCalculation
The static class AFCalculation provides mechanisms to evaluate expressions.
Public classCode example
AFData
The AFData object is associated with a single AFAttribute and is used to retrieve and set extended historical data. It is accessed through the Data property of an AFAttribute.
Public classCode example
AFDataCache
An AFDataCache manages a collection of AFAttributes via cache enabled AFData objects and will can automatically monitor for new data changes.
Public class
AFDataLossException
Represents a data loss incident in a datapipe.
Public classCode example
AFDataPipe
An AFDataPipe is a collection of AFAttribute objects that are signed up for data change events on the server.
Public class
AFDataPipeEvent
A data pipe event used to represent changes to the PIPoint and AFAttribute objects delivered by the PIDataPipe and AFDataPipe classes.
Public class
AFDataPipeEventWithChangeTime
A data pipe event used to represent changes to an AFAttribute object delivered by the PIDataPipe class, including the time at which the update occurred.
Public class
AFDataPipeRangeDeletedEvent
A data pipe event used to represent removal of a range of data.
Public class
AFDataPipeSignupEstablishedEvent
A data pipe event used to represent a previously suspended signup that has been established.
Public class
AFDataPipeSignupSuspendedException
Represents a signup that cannot be completed currently but could become active in the future.
Public class
AFDataPipeStatistics
Statistics for data pipe updates.
Public class
AFDataPipeUpdateToken
The AFDataPipeUpdateToken contains the AFAttributes that could be affected when loading the specified changes.
Public class
AFEventSource
The AFEventSource is a base class that can be used for data references which need to provide streaming events for an AFDataPipe.
Public classCode example
AFListData
The AFListData object is associated with a AFAttributeList and is used to retrieve and set extended historical data for multiple attributes. It is accessed through the Data property of an AFAttributeList.
Public class
AFTimeBasedEventSource
The AFTimeBasedEventSource is a base class that can be used for data references which do not natively support streaming events for an AFDataPipe but supports RecordedValues(AFTimeRange, AFBoundaryType, UOM, String, Boolean, Int32). AFTimeBasedEventSource periodically polls data from AFAttribute in the pipe and caches the result. When the GetUpdateEvents/GetObserverEvents of the pipe is called, AFTimeBasedEventSource extracts the events up to current time + EventHorizonOffset from its cache to be returned to the caller.

Interfaces

  InterfaceDescription
Public interface
IAFDataProvider
An interface for providing cache-enabled AFData instances that can be used to generate inputs for calculations.

Enumerations

  EnumerationDescription
Public enumeration
AFBoundaryType
Defines the behavior of data retrieval at the end points of a specified time range.
Public enumeration
AFBufferOption
Indicates buffering option in updating values, when supported by the Data Reference.
Public enumeration
AFCalculationBasis
Defines the possible calculation options when performing summary calculations over time-series data.
Public enumeration
AFDataCacheUpdateOption
Specifies how AFDataCache update the data in the cache for the AFAttribute items the AFDataCache manages.
Public enumeration
AFDataMethods
The AFDataMethods is an enumeration of the possible data methods which a data reference supports. It is returned by the AFAttribute.SupportedDataMethods and AFDataReference.SupportedDataMethods properties.
Public enumeration
AFDataPipeAction
Specifies how the data for the PIPoint or AFAttribute associated with an AFDataPipeEvent was changed.
Public enumeration
AFDataPipePreviousEventAction
Provides information about the previous data pipe events. Not every data source has information about previous data pipe events.
Public enumeration
AFDataPipeType
Specifies the type of data change events generated by the PIDataPipe class.
Public enumeration
AFDataPipeUpdateAction
Identifies the effect that updating items had on an AFDataPipe or AFDataCache signup.
Public enumeration
AFEventHorizonMode
EventHorizonMode specifies what events are returned by the datapipe at the GetUpdateEvent/GetObserverEvents calls based on the timestamp of the events.
Public enumeration
AFRetrievalMode
Defines the possible options for retrieving recorded values from an attribute.
Public enumeration
AFSampleType
Defines the evaluation of an expression over a time range.
Public enumeration
AFSummaryTypes
Flags to indicate which summary type calculation(s) should be performed.
Public enumeration
AFTimestampCalculation
Defines the timestamp returned for a value when a summary calculation is done.
Public enumeration
AFUpdateOption
Indicates how to treat duplicate values in the archive, when supported by the Data Reference.
TitleResults for “How to create a CRG?”Also Available in