-
Notifications
You must be signed in to change notification settings - Fork 96
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
ModelCompiler invalid code for abstract datatypes #149
Comments
Can you provides a simple model that demonstrates the issue? |
In the original issue, in the IssueDemoServer.zip you find a simple model and server implementation demonstrating the issue. |
It is not clear what the issue is. Decoding/Encoding instances of the subtype works fine. |
To clarify:
while it should look like this (added abstract keyword):
So this (excerpt from EncodableFactory.cs#L447-455)
does not attempt to add abstract types to the encodable factory. |
Scenario:
Generating code from a NodeSet2.xml containing an abstract DataType and a non-abstract subtype of said abstract DataType.
In NodeSet2.xml the abstract DataType does not have any references to encoding nodes (Default Binary/XML).
In NodeSet2.xml the non-abstract DataType does have references to encoding nodes (Default Binary/XML).
Expected behavior:
Working Code ;)
Actual behavior:
The generated code for the abstract DataType looks like this:
This causes the a .NET server using the OPCFoundation Stack (version 1.4.372.107) to crash since no encoding id is defined for the OPC DataType in the C# class (thats neither an interface nor abstract).
Find the files and a server sample attached.
IssueDemoServer.zip
The text was updated successfully, but these errors were encountered: