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

add Integer and UInteger types #1009

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

schroeder-
Copy link
Contributor

For completness, these datatypes are abstract! If they are used in structs, abstract types are either Variant or ExtensionObjects.
If they only contain basic types (int16, float, double..) they are Variants.
FreeOpcUa/opcua-client-gui#87

For completness, these datatypes are abstract! If they are used in structs, abstract types are either Variant or ExtensionObjects.
If they only contain basic types (int16, float, double..) they are Variants.
# If they are used in structs, abstract types are either Variant or ExtensionObjects.
# If they only contain basic types (int16, float, double..) they are Variants
UInteger = Variant
Integer = Variant
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that correct? All data types are defined as

Class UInt32(int):
    pass
but Integer should be a Variant type? Looks strnage but there are so many strange things in ua....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sry I forget about it. After digging I am not sure if Variant is correct or ExtensionObject. I only found mention that abstract classes should be ExtensionObjects.
But to your point a abstract class can have an unknown content, that is why either Variant or a ExtenstionObject must be used. Otherwise the decoder can't know how long the data is.
I will look in the specs to find the correct handling.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I see, then we should also add Number, Float, etc,... if it is allowed to use them in structs

Copy link
Contributor Author

@schroeder- schroeder- Sep 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it is allowed, but there are servers in the wild that use them.
Will add them if I know which type they should be. I only know of structs that are subtypes and they are ExtensionObjects.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find anything about using these insie a struct but maybe you have better sources...

@oroulet oroulet merged commit 47b229c into FreeOpcUa:master Sep 26, 2022
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

Successfully merging this pull request may close these issues.

2 participants