pdcomm_opcua_server_set_value
Function
Writes the Value attribute of a variable as a local, authenticated user.
int32_t pdcomm_opcua_server_set_value(pdcomm_opcua_handle server, pdcomm_opcua_bytes node_id, pdcomm_opcua_bytes variant, uint32_t *out_status)The same rules as a client Write apply: the variable must be writable and the new Variant must have the same built-in type and array shape.
Parameters
| Name | Description |
|---|---|
server | Server handle. |
node_id | Encoded NodeId in namespace 2, at most 4096 bytes. |
variant | Encoded Variant, at most 4 MiB. |
out_status | Receives the OPC UA StatusCode of the write, for example Good, BadNodeIdUnknown, BadNotWritable or BadTypeMismatch. It is BadInternalError when the call itself fails. |
Returns
#PDCOMM_OPCUA_OK when the write ran (check out_status), #PDCOMM_OPCUA_INVALID_INPUT, #PDCOMM_OPCUA_CLOSED, #PDCOMM_OPCUA_BUSY, #PDCOMM_OPCUA_INVALID_HANDLE or #PDCOMM_OPCUA_POISONED.