6 Replies Latest reply on Dec 16, 2014 12:18 PM by rzandvliet

    Receiving archive data change events via AFDataPipe


      I want to receive archive data change events via the AFDataPipe. When I look at the AFSDK reference the AFDataPipeType Reference is applicable for PIDataPipe and AfDataPipe (see below). But when creating an instance of the AFDataPipe class, I'm not able to set the AFDataPipeType. Is this a mistake in the documentation or is AFDataPipe always sending Snapshots and Archive change events.


      Specifies the type of data change events generated by the PIDataPipe and AFDataPipe classes.

      Namespace: OSIsoft.AF.Data
      Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: (


      Member nameValueDescription
      Snapshot0The datapipe will generate snapshot or current value data change events.
      Archive1The datapipe will generate archive data change events.
      TimeSeries2The datapipe will generate change events for a PI time series



      The PIDataPipe and AFDataPipe classes use this enumeration to define the type of data change events that are generated.

      Version Information


      Supported in: 2.6, 2.5

        • Re: Receiving archive data change events via AFDataPipe
          Dan Fishman

          .  I know in the PIDataPipe class you specify the AFDataPipeType in the constructor.  I'm not seeing this for the AFDataPipe.


          My AFDataPipe I quickly pieced together is only picking up snapshot changes.  My thoughts are that the AFDataPipe is only for snapshot/current value data change events.  I'll see if I can get archive events through the pipe.



            • Re: Receiving archive data change events via AFDataPipe
              Rhys Kirk

              Probably because 'snapshot' and 'archive' are PI data archive concepts covered by the PIDataPipe and the AFDataPipe is reliant on the Attribute Data Reference's implementation of the Data Pipe. Perhaps as a developer we have to be specific when working with PI Points with archive data and use the PIDataPipe..?

              1 of 1 people found this helpful
              • Re: Receiving archive data change events via AFDataPipe

                Dan, Rhys and Roger,


                for now I conclude that this is a "documentation bug" in the AFSDK.chm helpfile. When we want to assign for updates on archive events we have to use the pi points together with PiDataPipe and maintain the reference between the pi point and af attribute by ourself.




                  • Re: Receiving archive data change events via AFDataPipe
                    Marcos Vainer Loeff

                    Hi Robert,


                    Yes, the documentation needs to be fixed. I will foward this issue to the developers. From my understanding, the idea of not using the  AFDataPipeType is due to the fact that AFDataPipes will monitor the snapshots and historical events automatically. Nevertheless, according to my quick tests, this will only occur on PI AF SDK 2.7. On PI AF SDK 2.6, it monitors only snapshot events. You can download the PI AF SDK 2.7 Beta and compare the results.


                    One last thing, I recommend you to use AFDataPipe instead of PIDataPipe. The development team is adding some cool features only on the AFDataPipe class so in order to avoid having to update your code in the future, just use AFDataPipe.



                    Hope it helps!

                    1 of 1 people found this helpful