3 Replies Latest reply on Aug 18, 2016 12:45 AM by jyi

    AFDataPipe and Compression


      I am using AFDataPipe to retrieve updates. Does AFDataPipe.GetObserverEvents retrieve events before or after compression ? Is there a way to control this so that we only obtain compressed values ?

        • Re: AFDataPipe and Compression

          Hi Arun,


          It will depend on how you create your AFDataPipe. In case of retrieving PI Point values, you can do so via PIDataPipe, which is a specialized type of AFDataPipe.

          Initializing the PIDataPipe, you can specify the pipe type as below.


          var piDataPipeArchive = new PIDataPipe(AFDataPipeType.Archive)
          var piDaaPipeSnapshot = new PIDataPipe(AFDataPipeType.Snapshot)
          var piDaaPipeTS = new PIDataPipe(AFDataPipeType.TimeSeries)


          Snapshot type will give you before compresssion, Archive type will give you compressed version.

          The GetObserverEvents will be applied in the same way however.

          You can look in this LiveLibrary documents for the detail description: AFDataPipeType Enumeration

          TimeSeries type is only supported if your PI Data Archive is 2015 or later (3.4.395+) and also used only via PI Connectors.

          1 of 1 people found this helpful
            • Re: AFDataPipe and Compression

              Thanks Jinmo.


              I would like more clarification on TimeSeries type.


              In this presentation, it says

              • TimeSeries (PI Server 2015 and later)
                • Initial events are consistent with updates
                • Includes snapshot and archive events in order


              But, both the sub bullets are not super clear to me. Also, if it includes both snapshot and archive events, how would I be able to identify which ones are archived events and which ones are time series events ?

                • Re: AFDataPipe and Compression

                  For timeseries type datapipe, Live library explains the best below. And I copy it here.

                  PIDataPipe Constructor



                  The TimeSeries pipe type is only supported by PI Data Archives at or later than 3.4.395. It is a new pipe that combines the features of snapshot and archive pipes. The event action will indicate the correctly whether the event is Added to the end of the series, Inserted in the middle of the series, Deleted from the Series or Updated(edit of existing event) in the series, unlike the snapshot pipe where all the events have action of Update. The timeseries pipe events also contain information about whether the event is archived (persisted), in the form of the PreviousEventAction property of the data pipe event. So application can signup for just one pipe instead of both snapshot and archive pipes to get full time series information of the points.

                  1 of 1 people found this helpful