XDASrv Reference Manual
SetItemValue Method
See Also  Send Feedback
NSPlugin Namespace > GenericServer Class : SetItemValue Method




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.

Generic server callback method.

Write an item value into the cache.

Syntax

Visual Basic (Declaration) 
Public Shared Function SetItemValue( _
   ByVal AppItemHandle As Integer, _
   ByVal newValue As Object, _
   ByVal quality As Short, _
   ByVal timestamp As Date _
) As Integer
Visual Basic (Usage)Copy Code
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
)
Managed Extensions for C++ 
public: static int SetItemValue( 
   int AppItemHandle,
   Object* newValue,
   short quality,
   DateTime timestamp
) 
C++/CLI 
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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2002-2011 Advosol Inc. All Rights Reserved.