UA_Connect is used to create an (optional secure) transport connection of an OPC UA session. UA_Connect is to be performed once for each connection. The UA_NamespaceGetIndexList is to be performed once for each namespace. The NodeHdl for a specific node is to be retrieved once. Read and write can be performed as frequent as necessary and permitted by the system. Once the communication is done, the node handle is not required anymore and shall be released via the use of UA_NodeReleaseHandleList for all relevant handles. The connection handle shall be released using UA_Disconnect.


Figure 2: Read/Write Sequence

A list is handled as an array of the related base type (e.g. UANodeID or UANodeAdditionalInfo). Additionally, there is a length specified which holds the number of elements in the array. Although several arrays can be connected to the function block (e.g. node handles and variables in case of UA_ReadList) there is only one length because all arrays have the same number of elements to be processed.

The UA_NodeGetHandleList will return an UANodeHdl array. This call will not verify that the given UANodeID is valid. It will just be checked if it is structurally right (e.g. it’s not one by UAIdentifierType mentioned values) – otherwise an error in the corresponding error element (NodeErrorIDs) will be returned. The output array of UA_NodeGetHandleList can be used unchanged for subsequent calls to function blocks UA_ReadList, UA_WriteList, but the control implementation shall check always the corresponding error element (NodeErrorIDs). In case of any general error no outputs shall be changed from the underlying implementation.