Generic server callback method.
Write an item value into the cache.
Visual Basic (Usage) | ![]() |
---|---|
Dim AppItemHandle As Integer Dim newValue As Object Dim quality As Short Dim timestamp As Date Dim value As Integer value = GenericServer.SetItemValue(AppItemHandle, newValue, quality, timestamp) |
C# | |
---|---|
public static int SetItemValue( int AppItemHandle, object newValue, short quality, DateTime timestamp ) |
Parameters
- AppItemHandle
- Item handle as defined in the AddItem method call.
- newValue
- Object with new item value. The value must match the canonical data type of this item. The canonical date type is the type of the value in the cache and is defined in the AddItem method call.
null can be passed to change only the quality and timestamp. - quality
- New quality of the item value. This is a short value ( Int16) with a value of the OPCQuality enumerator.
- timestamp
- Timestamp of the new item value.
Return Value
Returns S_OK if the value was successfully written into the cache.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