locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
476 stars 129 forks source link

generate types and enums from nodeset #218

Closed gstvg closed 1 year ago

gstvg commented 2 years ago

Uses the nodeset <Definition> to generate types and enums Also generates Unions, which have it's binary codec defined here: https://reference.opcfoundation.org/v104/Core/docs/Part6/5.2.8/

Probably the CLI args of types.js could be better. Would like to know how you think it should be done Add another arg for a nodeset file, rename the bsd arg, or create another .js file? Then i'll properly edit the README.md

Also, looks like you already thought about <Definition> here: https://github.com/locka99/opcua/blob/b7e7573a48771a55a79819c3e15e66267e8b7ab3/tools/schema/nodeset.js#L375 Would you like that the xml decoding code to be there?

Thanks!