AFEventSource Class
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
The AFEventSource is a base class that can be used for data references which
need to provide streaming events for an AFDataPipe.
Inheritance Hierarchy
SystemObject
OSIsoft.AF.DataAFEventSource
OSIsoft.AF.DataAFEventSource
Namespace: OSIsoft.AF.Data
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public abstract class AFEventSource : IDisposable
Public MustInherit Class AFEventSource Implements IDisposable Dim instance As AFEventSource
public ref class AFEventSource abstract : IDisposable
[<AbstractClassAttribute>] type AFEventSource = class interface IDisposable end
The AFEventSource type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| Dispose |
Cleans up resources
| |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
Remarks
Data Reference needs to provide a static method CreateDataPipe that returns an AFEventSource object.
The AFEventSource has the following abstract methods that the implementor has to provide:
AddSignup, RemoveSignup, GetEvents() and Dispose(bool).
AFEventSource base class has methods to publish data pipe events and report errors. The base class also maintains
a dictionary of the AFAttributes being monitored by the eventsource. The AddSignup and RemoveSignup are methods
that allow the implementor to handle adding and removing data streams for the pipe from the system of record.
The GetEvents method is to get data pipe events from the system of record.
The event source also supports an option to return current events for each AFAttribute as the first data pipe event.
The base class has implementation for handling the initialization option if the system of record does not have
native support for such option. The implementor can override the virtual method GenerateInitialEvents
if the system of record has native support to return current event as initial event.