HMIProject / open62541

11 stars 6 forks source link

Add namespace utility functions #143

Closed LeanderGlanda closed 3 months ago

LeanderGlanda commented 3 months ago

This adds utility functions from here: https://www.open62541.org/doc/master/server.html#utility-functions

This does not add UA_Server_findDataType(), as it is not marked as UA_THREADSAFE and the returned UA_DataType struct seems complicated to handle, as it is a C generic type or something like that.

LeanderGlanda commented 3 months ago

Thanks. I also changed add_namespace() to not panic but to return an error if the string contains NUL bytes.

It's probably better to error than to panic. Panic eliminates the possibility to handle the error.

LeanderGlanda commented 3 months ago

This should be ready for review again.