OPC Historian .NET Server Toolkit Reference
UpdateInsertReplace Method (AppPlugin)

Professional Edition only.
This method inserts or replaces values and qualities in the history database for the specified timestamps for one or more items. If the item has a value at the specified timestamp, the new value and quality will replace the old one. If there is no value at that timestamp, the method will insert the new data. The method runs to completion before returning. This method is intended to unconditionally insert/replace values and qualities; e.g., correction of values for bad sensors. The serverHnd, timeStamps, dataValues and qualities are arrays of equal size. To set values and qualities for a number of different items at a single time, then ftTimeStamp array would have the same time for each item. To set a stream of values, timestamps and qualities for a single item, set the size of the item array to the number of values to be inserted/replaced and put the same ItemID in each element. S_OK as a errors return code for an individual value is allowed when the HDA server is unable to say whether there was already a value at that timestamp. If the HDA server can determine whether the new value replaces a value that was already there, it should use OPC_S_INSERTED or OPC_S_REPLACED to return that information.
Overload List
OverloadDescription
UpdateInsertReplace(Int32,Int32[],DateTime[],Object[],Int32[],Int32,Int32[])Professional Edition only.
This method inserts or replaces values and qualities in the history database for the specified timestamps for one or more items. If the item has a value at the specified timestamp, the new value and quality will replace the old one. If there is no value at that timestamp, the method will insert the new data. The method runs to completion before returning. This method is intended to unconditionally insert/replace values and qualities; e.g., correction of values for bad sensors. The serverHnd, timeStamps, dataValues and qualities are arrays of equal size. To set values and qualities for a number of different items at a single time, then ftTimeStamp array would have the same time for each item. To set a stream of values, timestamps and qualities for a single item, set the size of the item array to the number of values to be inserted/replaced and put the same ItemID in each element. S_OK as a errors return code for an individual value is allowed when the HDA server is unable to say whether there was already a value at that timestamp. If the HDA server can determine whether the new value replaces a value that was already there, it should use OPC_S_INSERTED or OPC_S_REPLACED to return that information.  
UpdateInsertReplace(Int32[],DateTime[],Object[],Int32[],Int32[])Professional Edition only.
This method inserts or replaces values and qualities in the history database for the specified timestamps for one or more items. If the item has a value at the specified timestamp, the new value and quality will replace the old one. If there is no value at that timestamp, the method will insert the new data. This method is intended to unconditionally insert/replace values and qualities; e.g., correction of values for bad sensors. The serverHnd, timeStamps, dataValues and qualities are arrays of equal size. To set values and qualities for a number of different items at a single time, then ftTimeStamp array would have the same time for each item. To set a stream of values, timestamps and qualities for a single item, set the size of the item array to the number of values to be inserted/replaced and put the same ItemID in each element. S_OK as a errors return code for an individual value is allowed when the HDA server is unable to say whether there was already a value at that timestamp. If the HDA server can determine whether the new value replaces a value that was already there, it should use OPC_S_INSERTED or OPC_S_REPLACED to return that information.  
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AppPlugin Class
AppPlugin Members

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback