More about Data Pipes

Version 1

    This is the most advanced topic offered in the Developing Applications with PI AF SDK Online Course.  As one would expect with advanced topics, exploring a few extra features is equally as advanced, if not more so.  The more adventurous learners are encouraged to issue a PI Square search to discover more on the various topics.  Given the advanced nature of the topic, the reading below is purely optional. 

     

    In the previous videos, you were introduced to the PIDataPipe for subscribing to data change events from PIPoint(s).  An AFAttribute has its own data pipe called the AFDataPipe.  One key difference is that in order to subscribe to data change events of an AFAttribute, the attribute's data reference must support the AFDataMethods.DataPipe enumeration with its SupportedDataMethodsproperty.

     

    In addition to an AFDataPipe, there is also an AFDataCache, which efficiently manages the collection of AFAttributes via cache-enabled AFData objects.

     

    You are encouraged to read LiveLibrary.osisoft.com and pay particular attention to any Remarks.

     

    The PIDataPipe example also used the GetUpdateEvents method, which returns a list.  If you have lots of signups and events, this list could potentially consume lots of memory.  A PIDataPipe and an AFDataPipe may also implement the GetObserverEvents method, which uses less memory but is more complex to code.

     

    Optional reading:


    PI AF SDK guidelines, pages 28-30

     

    What is the best way to collect data for 25k+ elements?  A very long but very interesting discussion of many advanced topics.

     

    PI AF SDK ... most efficient way to repeatedly access data on the same attributes

     

    PIDevClub Webinar Series - AF SDK AMA  See the section titled Consuming updates with the Data Pipe on slides 8-24.


    Reactive Extensions for AF SDK (Part 1): LINQ to AFDataPipe

     

    Please use the discussion forum to discuss or ask any questions about Data Pipes