Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data type libraries for companion specifications #169

Open
quinmars opened this issue Oct 3, 2020 · 2 comments
Open

Data type libraries for companion specifications #169

quinmars opened this issue Oct 3, 2020 · 2 comments

Comments

@quinmars
Copy link
Contributor

quinmars commented Oct 3, 2020

As already mention in another issue, I have written a generator that generates C# classes from Nodest2.xml files. And now I'm quite satisfied with its output. My first idea was to utilize the new roslyn feature called "source generator". That would have some benefits, because you can access the type structure of the target project, and for example inspect its dependency assemblies or not generating classes that are already written by hand. But it turns out that the "output" of such projects is intentionally not written to disk. That's why I decided to go the traditional way, that is a plain console application.

With this generator we could provide nuget packages for all companion specifications found at https://github.com/OPCFoundation/UA-Nodeset, i.e., having a opc-ua-nodesets or opc-ua-companions What do you think about that? If you like we can also transfer the generator to convertersystems.

P.S. While writing the generator I noticed some minor issues that could be improved by UaClient. I will open a new issues for them soon.

@awcullen
Copy link
Contributor

Your generator is well written, and outputs clear source code. It will be fantastic to have the many companion specs "pre-generated" as NuGet packages, ready to be included into a project. I will be happy to incorporate any changes that makes this easier.

Do you think I should merge the "TypeLibraryAttribute" and associated code that finds the attribute and registers the types with the encoder/decoder?

@quinmars
Copy link
Contributor Author

I'm glad to hear you like it.

Do you think I should merge the "TypeLibraryAttribute" and associated code that finds the attribute and registers the types with the encoder/decoder?

Yes, please. Although I do not need it for the code generation, I will use TypeLibrary attribute in code so that the user can easly use all exposed types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants