7.3 UA_NamespaceGetIndexList

FB-Name UA_NamespaceGetIndexList
This Function Block is used to get the namespace-indexes of numerous namespace-URIs
VAR_INPUT
BExecuteBOOLFB performs its task on rising edge on this input.
BConnectionHdlDWORDConnection handle.
BNamespaceUrisCountUINTNumber of NamespaceUris in Array of NamespaceUris.
BNamespaceUrisARRAY OF
Vendor specific
Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING. Array of Vendor specific with the NamespaceUris. See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)
BTimeoutTIMEMaximum time to response.
VAR_OUTPUT
BDoneBOOLFB has completed its task.
BBusyBOOLThe FB is not finished and new output values are to be expected.
BErrorBOOLSignals that an error has occurred within the FB.
EErrorIDDWORDError code.
BErrorIDsARRAY OF
DWORD

Error codes. Array shall be the same number of elements as NamespaceUrisCount.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

BNamespaceIndexesARRAY OF
UINT

Namespace Indexes. Array shall be the same number of elements as NamespaceUris.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

Notes: Reads the Server-Object NamespaceArray (NS:0; Id: 2255) and returns the indexes of the requested elements which can be used in subsequent calls where the Namespace-Array-Index is required - e.g., UA_NodeGetHandleList.

This is a convenient function block – could also be done with ReadList and the returned unknown array length of the NamespaceArray could be evaluated in the user program.

In case the requested NamespaceUri is not found the error PLCopenUA_Bad_NSNotFound will be returned in the corresponding ErrorIDs.

UA_NamespaceGetIndexList
BOOLExecuteDoneBOOL
DWORDConnectionHdlBusyBOOL
UINTNamespaceUrisCountErrorBOOL
ARRAY of Vendor specificNamespaceUrisErrorIDDWORD
TIMETimeoutErrorIDsARRAY of DWORD
NamespaceIndexesARRAY of UINT