WriteVQT sets the item value, quality and timestamp. This method is supported by oPD DA V3 servers only. The items are identified either by the fully qualified item ID or by the server handle that was returned in a previous AddItems call.
If an item is specified by the item id and it does not yet exist in the BGGroup internal list of added items then the item is added by executin AddItems.
The item values are written by executing an asynchronous WriteVQT call. The success of the WriteVQT call is reported for each item in argument of the completion handler. Error that happen in the WriteVQT request handlding are reported in the requestErrors array. For the items for which the server accepted the WriteVQT request the success of the actual WriteVQT is reported in the OPCWriteVQTResult argument.
Visual Basic (Declaration) | |
---|---|
Public Sub WriteVQT( _ ByVal values() As ItemValue, _ ByVal tag As Object, _ ByVal onCompleted As OnBGGrpWrite _ ) |
C# | |
---|---|
public void WriteVQT( ItemValue[] values, object tag, OnBGGrpWrite onCompleted ) |
Parameters
- values
- Array of objects with the item identifier and the value to be written. Each item may be identified by either:
- the server handle that was returnd in a previous AddItems call.
- the client handle that was specified as a unique value in a previous AddItems call.
- the fully qualified item id. The item is searched in the BGGroup internal list of added items. If the item has not yet been added then it is added by executing an AddItems call. - tag
- This object is passed to the competion handler and allows the user to pass any information that may be needed in the completion handler. Nothing (null) can be specified if the application does not require to pass any information.
- onCompleted
- Completion notification handler. void xxx( BGException ex, int[] requestErrors, OPCWriteResult[] rslt, object tag ){}