2 Replies Latest reply on Nov 15, 2014 6:11 AM by ekuwana

    PIPoint.UpdateValues Collective/Buffering behaviour before AF SDK 2.6?


      From my understanding, version 2.6 of the AF SDK added an overload for the PIPoint.UpdateValues method, which allows the caller to specify an AFBufferOption. The default option being BufferIfPossible when the original UpdateValues method is called without specifying an AFBufferOption.


      However, what is the expected behaviour in earlier versions of the AF SDK when writing to a PI Collective using PIPoint.UpdateValues where you cannot specify the AFBufferOption?


      It seems the AF SDK reference I have installed only details the 2.6 version, even though I rolled back to the 2.5 version of the SDK.

        • Re: PIPoint.UpdateValues Collective/Buffering behaviour before AF SDK 2.6?

          I did some quick tests and as far as I can tell collective-wise, you must manually fan out to all collective members by explicitly connecting to each one of them if PICollective.AllowWriteValues is false, or using SwitchMember if otherwise.


          So for example, in an environment where the PI Server tuning parameter Replication_EnableSDKWriteValues is set to false, thus setting AllowWriteValues to false, I would need to do something like this?

          foreach (PICollectiveMember m in attr.PIPoint.Server.CollectiveMembers)
            attr.PIPoint.UpdateValue(value, AFUpdateOption.Insert);

           Whereas in AF SDK 2.6, this is no longer necessary (if going through pibufss)?

            • Re: PIPoint.UpdateValues Collective/Buffering behaviour before AF SDK 2.6?

              Hi Ashley,


              You're correct, in AF SDK 2.5, to manually fan to all collective members, you need to either explicitly connect to each member (member.Connect), or do SwitchMember. If Replication_EnableSDKWriteValues is set to false then you need to do the former, as correctly shown by your sample code.


              In AF SDK 2.6, there's another option to do manual fanning (member.ConnectDirect), but it's more preferable to utilize buffering (through PIBufSS). If buffering security between PIBufSS and PIServer is properly configured (refer to PI Buffering Manager) then by default (BufferIfPossible) all data writes will be buffered/fanned to the corresponding PIServer/Collectives.