XDASrv Reference Manual
WriteItems(DeviceItemValue[],Int32[]) Method
See Also  Send Feedback
NSPlugin Namespace > GenericServer Class > WriteItems Method : WriteItems(DeviceItemValue[],Int32[]) Method




values
object with handle, value, quality, timestamp
errors
array with HRESULT success/error codes on return.
Standard Edition Write handler. In the Professional Edition this overload is is only called if the method with the client handle argument is not defined. This method is called when a client executes a 'write' server call. The items specified in the appHandles array need to be written to the device.
The cache update handling depends on the configuration parameter writeCacheUpdateMode For 0 (Generic): The cache is updated in the generic server after returning from the customization WiteItems method. Items with write error are not updated in the cache.
For 1 (Custom): The customization module needs to update the cache by executing the SetItemValue callback method for each written item. The generic server does not update the cache.

Syntax

Visual Basic (Declaration) 
Public Overloads Function WriteItems( _
   ByVal values() As DeviceItemValue, _
   ByRef errors As Integer() _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As GenericServer
Dim values() As DeviceItemValue
Dim errors As Integer()
Dim value As Integer
 
value = instance.WriteItems(values, errors)
C# 
public int WriteItems( 
   DeviceItemValue[] values,
   out int[] errors
)
Managed Extensions for C++ 
public: int WriteItems( 
   DeviceItemValue*[]* values,
   [PARAMFLAG::Out] int[] errors
) 
C++/CLI 
public:
int WriteItems( 
   array<DeviceItemValue^>^ values,
   [Out] array<int> errors
) 

Parameters

values
object with handle, value, quality, timestamp
errors
array with HRESULT success/error codes on return.

Return Value

HRESULT success/error code

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.