kandimallav

Enable PI SDK Buffering using C# with PIData.UpdateValue()

Discussion created by kandimallav on Feb 25, 2012
Latest reply on Feb 27, 2012 by kandimallav

Hi,

 

Anyone tried PI SDK Buffering programtically with PIData.UpdateValue. We can set this with PI SDK Utility manually with PI SDK 1.4. But want to try this with IPISDKOptions by setting Environment options for NOPISDKBUFFERING value.

 

I am stuck at below. Appreciate any help.

 
PISDK.PISDK _sdk = new PISDK.PISDK(); 
PIPoint _piPoint;
Server _collective=_sdk.Servers["MYCollective"];
IPICollective _ipcollective = (IPICollective) _collective;
IPISDKOptions _pisdkoptions = (IPISDKOptions)_sdk;

PISDKCommon.NamedValues _namedvals= _pisdkoptions.GetAvailableEnvironmentOptions();
object objvalue=0;
 if(_namedvals.Count != 0)
   {
       objvalue=1;
   }
MessageBox.Show(_namedvals.get_Item(ref objvalue).Name.ToString()); 

/// I am stuck at the above line. This gives me "NOPISDKBUFFERING" at position 1 as the name of setting but not sure how to set the values with SetEnvironmentOptions Method, by passing Named values collection.

//_pisdkoptions.SetEnvironmentOptions(_namedvals, true);   ///? :(

 

 

Regards,

 

Parthu

Outcomes