Click or drag to resize
OSIsoft, LLC

PIPointList Class

The PIPointList object represents a list of PIPoint objects. The PIPoints can be on different PIServer. PIPointList supports duplicate PIPoint in the list.

Inheritance Hierarchy
SystemObject
  OSIsoft.AF.PIPIPointList

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.6.195
Syntax
public sealed class PIPointList : IList<PIPoint>, 
	ICollection<PIPoint>, IEnumerable<PIPoint>, IEnumerable, 
	IList, ICollection

The PIPointList type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCount
Gets the number of items actually contained in the collection.
Public propertyItem
Gets or Sets the PIPoint located at the passed in index.
Top
Methods
  NameDescription
Public methodAdd
This method adds the passed PIPoint to the list and returns the index where the point was added.
Public methodAddRange
This method adds a collection of PIPoint objects to the PIPointList
Public methodClear
Removes all of the PIPoint instances associated with this PIPointList
Public methodContains
This method determines whether the collection contains a specific item.
Public methodCopyTo
Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.
Public methodCurrentValue
Returns an AFListResultsTKey, TResult object containing a list of AFValue objects representing the current value for the PIPoint objects in the list. The order of the AFValue objects in the results list is the same order as the corresponding PIPoint in the PIPointList. Point level error and PIServer level errors can be accessed in the AFListResultsTKey, TResult error collections.
Public methodEndOfStream
Returns an AFListResultsTKey, TResult object containing a list of AFValue objects representing the end of stream value for the PIPoint objects in the list. The order of the AFValue objects in the results list is the same order as the corresponding PIPoint in the PIPointList. Point level error and PIServer level errors can be accessed in the AFListResultsTKey, TResult error collections.
Public methodEndOfStreamAsync
Returns an AFListResultsTKey, TResult containing a list of AFValue objects corresponding to the end of stream value for the PIPoint objects in the list. The order of the AFValue objects in the return list is the same order as the corresponding PIPoint in the PIPointList.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodCode exampleFilteredSummaries(IListAFTimeIntervalDefinition, Boolean, String, AFSummaryTypes, AFCalculationBasis, AFSampleType, AFTimeSpan, AFTimestampCalculation, PIPagingConfiguration)
This method, when supplied a filter expression that evaluates to true or false, evaluates it over the time range on the passed in intervalDefinitions. For the time ranges where the expression evaluates to true, the method calculates the requested summaries on the PI point.
Public methodCode exampleFilteredSummaries(AFTimeRange, AFTimeSpan, String, AFSummaryTypes, AFCalculationBasis, AFSampleType, AFTimeSpan, AFTimestampCalculation, PIPagingConfiguration)
This method, when supplied a filter expression that evaluates to true or false, evaluates it over the passed time range. For the time ranges where the expression evaluates to true, the method calculates the requested summaries on the source attribute.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetServers
Get a list of the PIServer objects associated with this PIPointList
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Searches for the specified object and returns the zero-based index of the first occurrence within the entire collection.
Public methodInsert
This method inserts the passed in PIPoint object into the PIPointList at the given zero-based index.
Public methodInterpolatedValue
Returns an AFListResultsTKey, TResult object containing list of AFValue objects representing the interpolated values for the PIPoint objects in the list for the requested time. The order of the AFValue objects in the results list is the same order as the corresponding PIPoint in the PIPointList. Point level error and PIServer level error can be accessed in the AFListResultsTKey, TResult
Public methodInterpolatedValueAsync
Returns an AFListResultsTKey, TResult containing a list of AFValue objects corresponding to the interpolated value for the PIPoint objects in the list for the requested time. The order of the AFValue objects in the return list is the same order as the corresponding PIPoint in the PIPointList.
Public methodCode exampleInterpolatedValues
Retrieves interpolated values over the specified time range at the specified sampling interval.
Public methodCode exampleInterpolatedValuesAtTimes
Retrieves interpolated values at the specified times.
Public methodCode exampleInterpolatedValuesByCount
This method returns the specified number of interpolated values evenly spaced throughout the specified timeRange.
Public methodLoadAttributes
Load PIPoint attributes into the cache for each PIPoint in the list.
Public methodLoadAttributesAsync
Load PIPoint attributes into the cache for each PIPoint in the list.
Public methodCode examplePlotValues
Retrieves values over the specified time range suitable for plotting over the number of intervals (typically represents pixels).
Public methodRecordedValue
Returns an AFListResultsTKey, TResult containing list of AFValue objects corresponding to the archive value for the PIPoint objects in the list for the requested time and AFRetrievalMode. The order of the AFValue objects in the return list is the same order as the corresponding PIPoint in the PIPointList. Point level error and PIServer level errors can be accessed in the AFListResultsTKey, TResult
Public methodRecordedValueAsync
Returns an AFListResultsTKey, TResult containing a list of AFValue objects corresponding to the archive value for the PIPoint objects in the list for the requested time and AFRetrievalMode. The order of the AFValue objects in the return list is the same order as the corresponding PIPoint in the PIPointList.
Public methodCode exampleRecordedValues
Returns a list of compressed values for the requested time range from PI.
Public methodRecordedValuesAtTimes
Retrieves recorded values at the specified times.
Public methodCode exampleRecordedValuesByCount
This method returns a specified number of compressed values beginning at the requested start time in the direction specified.
Public methodRemove
This method removes all occurrences of the passed PIPoint from the list. The method returns if the passed PIPoint is not found in the list.
Public methodRemoveAt
This routine removes the PIPoint at the passed index location. It returns true if the same PIPoint is still in the PIPointList at another location. The index is zero-based.
Public methodSaveAttributes
Set the PIPoint attribute values for each PIPoint in the list and save the attribute values to the server.
Public methodSnapshot Obsolete.
Returns an AFListResultsTKey, TResult object containing a list of AFValue objects representing the snapshot for the PIPoint objects in the list. The order of the AFValue objects in the results list is the same order as the corresponding PIPoint in the PIPointList. Point level error and PIServer level errors can be accessed in the AFListResultsTKey, TResult error collections.
Public methodCode exampleSummaries(IListAFTimeIntervalDefinition, Boolean, AFSummaryTypes, AFCalculationBasis, AFTimestampCalculation, PIPagingConfiguration)
Returns several summaries for each specified interval and range for each PIPoint in the list.
Public methodCode exampleSummaries(AFTimeRange, AFTimeSpan, AFSummaryTypes, AFCalculationBasis, AFTimestampCalculation, PIPagingConfiguration)
Returns several summaries over a time range for each interval within the range for each PIPoint in the list.
Public methodCode exampleSummary
Returns several summaries over a single time range for each PIPoint in the list.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnloadAllAttributes
Unload all PIPoint attributes from the cache except for the specified names for each PIPoint in the list.
Public methodUnloadAttributes
Unload PIPoint attributes from the cache for each PIPoint in the list.
Top
Extension Methods
Remarks
The PIPointList is the primary way to make bulk data access calls to the PIServer.

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

Examples
// Get the PIPoints from the PIServer on the local computer
PISystems myPISystems = new PISystems();
PISystem myPISystem = myPISystems.DefaultPISystem;
PIServer myPIServer = PIServer.FindPIServer(myPISystem, piServerName);
PIPointList myPIPointList = new PIPointList(PIPoint.FindPIPoints(myPIServer, "Sin*"));

// Display information about the PIPoints
foreach (PIPoint point in myPIPointList)
{
    Console.WriteLine("Name of the PIPoint = {0}", point.Name);
    Console.WriteLine("ID of the PIPoint = {0}", point.ID);
    Console.WriteLine("Type of the PIPoint = {0}", point.PointType);
    Console.WriteLine("PIPoint Current Value = '{0}'", point.CurrentValue());
    Console.WriteLine();
}

// Get and display current value for all PIPoints
AFListResults<PIPoint, AFValue> results = myPIPointList.CurrentValue();
IList<AFValue> values = results.Results;
foreach (AFValue value in values)
{
    Console.WriteLine("Current Value = '{0}'", value);
}
Version Information

AFSDK

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