What's New in PI AF 2016
- Last UpdatedSep 18, 2024
- PI System
- AF SDK 2024
- Developer
The PI AF 2016 (2.8.0.7444, 2.8.1.7549, 2.8.2.7626) release is a major release that implements a preview of a new, more scalable notification infrastructure. This also expands the functionality of event frames to include annotations, acknowledgments and severity. Annotations are provided for elements, transfers and cases as well.
The ability to define attributes with specific characteristics and behaviors, such as limits and predictions, and associate those with other attributes has been added.
New data access calls are available, including async versions of most data calls. New methods of RecordedValuesAtTimes and ReplaceValues allow more efficient data access with the PI Data Archive 2016.
This release also delivers improved scalability and performance overall, with major improvements focused on event frame searching. The AF SDK provides a new, simpler, text-based query mechanisms for finding Elements and Event Frames.
This topic contains the following sections:
OSIsoft.AF Namespace
The AFSecurityRights.Annotate security permission was added to control the ability to annotate an AFBaseElement and acknowledge an AFEventFrame. The AFObject.GenerateUniqueName(String, IAFList) helper method was added to allow the generation of unique names based upon the items in the supplied list. The following new properties return the configured restrictions for an AFFile which are set using the AFDiag utility: PISystem.FileAllowedExtensions and PISystem.FileMaxLength.
To support exporting in different time formats when exporting in CSV format, the PIExportMode.UseServerTimeZone and PIExportMode.UseUtcTime properties have been added. To support searching for an attribute by trait, the new path filter AFPathFilterType.Trait has been added.
To support a new, more scalable notification infrastructure, the following collections have been added in preview for this release:
OSIsoft.AF.Analysis Namespace
The AFAnalysisTemplate.CreateEnabled was added to control the initial status of auto-generated analyses.
OSIsoft.AF.Asset Namespace
An attribute can be designated for manual data entry with the new AFAttributeTemplate.IsManualDataEntry and AFAttribute.IsManualDataEntry properties. Client applications can utilize this flag to determine whether to provide users with data entry. The new method AFAttribute.IsSupportedDataMethod(AFDataMethods) was added to test if an attribute supports a data method.
The new class AFAttributeTrait has been added to allow attributes with well-known behaviors and relationships to be defined. The trait can be used when referencing or finding the attribute instead of needing to know the actual name of the attribute. The following properties and methods have been added to be used with attribute traits:
- AFAttributeTemplate.Trait Property
- AFAttributeTemplate.GetAttributeTemplateByTrait Method
- AFAttributeTemplate.GetAttributeTemplatesByTrait Method
- AFAttribute.Trait Property
- AFAttribute.GetAttributeByTrait Method
- AFAttribute.GetAttributesByTrait Method
- AFElementTemplate.GetAttributeTemplateByTrait Method
- AFElementTemplate.GetAttributeTemplatesByTrait Method
- AFBaseElement.GetAttributeByTrait Method
- AFBaseElement.GetAttributesByTrait Method
To support annotations on an AFBaseElement, the AFBaseElement.IsAnnotated property and AFBaseElement.GetAnnotations method have been added. A new copy constructor AFFile.AFFile(AFFile) was added to make it easier to copy file values. To support acknowledging an event frame, the AFElementTemplate.CanBeAcknowledged property was added. The AFElementTemplate.Severity property was added to set the default severity for a new event frame.
The AFValue.Create methods have been added to allow the creation of an AFValue without the overhead of boxing/unboxing.
To support new methods in AFData class, the following new methods have been added to a data reference:
- AFDataReference.ReplaceValues
- AFDataReference.RecordedValuesAtTimes
- AFDataReference.FilteredSummariesAsync
- AFDataReference.InterpolatedValueAsync
- AFDataReference.InterpolatedValuesAtTimesAsync
- AFDataReference.InterpolatedValuesByCountAsync
- AFDataReference.PlotValuesAsync
- AFDataReference.RecordedValueAsync
- AFDataReference.RecordedValuesAsync
- AFDataReference.RecordedValuesByCountAsync
- AFDataReference.ReplaceValuesAsync
- AFDataReference.UpdateValuesAsync
- AFDataReference.SummaryAsync
- AFDataReference.SummariesAsync
The following new properties and methods have been added in preparation for new, more scalable notification infrastructure. Even though these objects are exposed in the SDK, they are still under development and subject to change.
OSIsoft.AF.Data Namespace
The new method AFData.ReplaceValues has been added to replace values within a time range. PI Data Archive 2016 or later is required. To get values as specific times, the AFData.RecordedValuesAtTimes and AFListData.RecordedValuesAtTimes methods have been added. These methods require the PI Data Archive 2016 or later to take full advantage of the performance gains.
Support for asynchronous method calls has been added with the addition of the following methods (corresponding methods were also added to the AFDataReference class):
- AFData.EndOfStreamAsync Method
- AFData.FilteredSummariesAsync Method
- AFData.InterpolatedValueAsync Method
- AFData.InterpolatedValuesAsync Method
- AFData.InterpolatedValuesAtTimesAsync Method
- AFData.PlotValuesAsync Method
- AFData.RecordedValueAsync Method
- AFData.RecordedValuesAsync Method
- AFData.RecordedValuesByCountAsync Method
- AFData.ReplaceValuesAsync Method
- AFData.UpdateValuesAsync Method
- AFData.SummaryAsync Method
- AFData.SummariesAsync Method
- AFListData.EndOfStreamAsync Method
- AFListData.InterpolatedValueAsync Method
- AFListData.RecordedValueAsync Method
To support annotations on an AFBaseElement, the following properties and methods have been added to the AFAnnotation class:
- AFAnnotation.IsDeleted Property
- AFAnnotation.Owner Property
- AFAnnotation.Attachment Property
- AFAnnotation.Save Method
- AFAnnotation.Delete Method
OSIsoft.AF.EventFrame Namespace
The OSIsoft.AF.EventFrame.AFSeverity class and the AFEventFrame.Severity property were added to set the severity level for an event frame. The following methods and properties were added to support acknowledging an event frame:
- AFEventFrame.CanBeAcknowledged Property
- AFEventFrame.IsAcknowledged Property
- AFEventFrame.AcknowledgedBy Property
- AFEventFrame.Acknowledge Method
OSIsoft.AF.Notification Namespace
The following new objects and properties have been added in preparation for new, more scalable notification infrastructure. Even though these objects are exposed in the SDK, they are still under development and subject to change.
- AFDeliveryFormat Class
- AFDefaultDeliveryFormats Class
- AFDeliveryFormats Class
- AFNotificationRule Class
- AFNotificationRules Class
- AFNotificationRuleSubscriber Class
- AFNotificationRuleSubscribers Class
- AFNotificationRuleTemplate Class
- AFNotificationRuleTemplates Class
- AFNotifyOption Enumeration
- AFMultiTriggerEventOption Enumeration
- AFDeliveryChannel.NotificationRule Property
- AFDeliveryChannel.NotificationRuleTemplate Property
- AFDeliveryChannel.NotificationRuleSubscriber Property
OSIsoft.AF.PI Namespace
The new method PIServer.Supports and new enumeration PIServerFeature have been added to allow checking if a feature is supported on the PI Data Archive. The PIPointQuery.ParseQuery method has been added to parse queries into tokens for searching.
The new method PIPoint.ReplaceValues has been added to replace values within a time range. PI Data Archive 2016 or later is required. To get values as specific times, the PIPoint.RecordedValuesAtTimes and PIPointList.RecordedValuesAtTimes methods have been added. These methods require the PI Data Archive 2016 or later to take full advantage of the performance gains.
Support for asynchronous method calls has been added with the addition of the following methods:
- PIPoint.EndOfStreamAsync Method
- PIPoint.FilteredSummariesAsync Method
- PIPoint.InterpolatedValueAsync Method
- PIPoint.InterpolatedValuesAsync Method
- PIPoint.InterpolatedValuesAtTimesAsync Method
- PIPoint.InterpolatedValuesByCountAsync Method
- PIPoint.PlotValuesAsync Method
- PIPoint.RecordedValueAsync Method
- PIPoint.ReplaceValuesAsync Method
- PIPoint.RecordedValuesAsync Method
- PIPoint.RecordedValuesByCountAsync Method
- PIPoint.UpdateValuesAsync Method
- PIPoint.SummaryAsync Method
- PIPoint.SummariesAsync Method
- PIPointList.EndOfStreamAsync Method
- PIPointList.InterpolatedValueAsync Method
- PIPointList.RecordedValueAsync Method
OSIsoft.AF.Search Namespace
Support for query based searches has been added with the addition of the new search classes AFElementSearch, AFEventFrameSearch, AFNotificationRuleTemplateSearch, and AFNotificationRuleSearch. The following new classes are used by these new search classes: AFSearchFilter, and AFSearchToken. The following properties and methods have been added to the base AFSearch class:
- AFSearch.ThrowOnError Property
- AFSearch.Identity Property
- AFSearch.PISystem Property
- AFSearch.CacheInterval Property
- AFSearch.CacheTimeout Property
- AFSearch.GetTotalCount Method
- AFSearch.Refresh Method