Back to Aurora Vision Library Lite website

You are here: Start » System » OPC UA » OPCUAClient_WriteDoubleValue

OPCUAClient_WriteDoubleValue


Header: STD.h
Namespace: avl

Writes a Double value to a variable node in a OPC UA server.

Syntax

void avl::OPCUAClient_WriteDoubleValue
(
	int inConnectionId,
	const avl::OpcUaNodeId& inNodeId,
	const atl::Conditional<double>& inValue,
	int inStatus = 0
)

Parameters

Name Type Range Default Description
Input value inConnectionId int 0 - 99 0 Slot id of the open connection to the server
Input value inNodeId const OpcUaNodeId& Id of the variable node to write the value to
Input value inValue const Conditional<double>& The value to write to the variable node
Input value inStatus int 0 OPC UA status code for the variable value

Description

This filter is used to write (send) a value into the "Value" property of a Variable Class node on a OPC UA server.

The inConnectionId input specifies the server connection slot id and must correspond to the value specified in the OPCUAClient_Connect filter.

The inNodeId input specifies the Node Id of the server node to write the value to (see OpcUaNodeId for details). The node pointed to by this id must be of Variable class and with a compatible value data type (see below), otherwise the filter will throw an IOError exception.

The inValue input specifies the value to be written. This input has a conditional type. Setting the value to Nil will result in writing Null to the node's value variant.

The inStatus input specifies the value's usability Status Code to be assigned to the value in the server. In most cases, when writing a valid non-Null value, this input will be left on the default status of 0 (StatusCodeGood). Writing a Null value usually requires to specify a status code in the "Bad" severity range.

This filter can write a scalar value to variables with OPC UA basic types of Float and Double (or derived from those), by converting the inValue input value of type Double.

This filter can also write to variable nodes of the Number abstract data type, by storing the value under the Double concrete data type.

Errors

This filter will throw an IOError exception on network connection errors, server service call errors and write operation or data conversion errors.

See Also