-
Notifications
You must be signed in to change notification settings - Fork 13
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
Better support for Enums #158
Comments
Generally, that sounds reasonable. What if the number is out of range?
Then for OPC UA disconnect/reconnect do what? Erase the strings on disconnect? Overwrite on reconnect? Both? Neither?
A single string record should show all enum strings? How?
Here that would work: show all strings in a single record. (Why would you do that? Well, why not.) |
the record should become INVALID.
No.
Yes.
No, it should show the current state. Now it shows the current state index number like "3". |
Ah. "...should show (and for output records accept) the enum string |
Exactly. Instead of converting the enum to a string showing the index number, it should show the state name. That would be much more useful. |
In case that an enum has less members/defintions when the PLC Erase all before overwriting - which is now a new writing. |
Yes, like that. |
Of course. Keeping old strings would not make sense. The whole set of strings belongs together and should be erased / replaced atomically upon (re-)connect. |
Progress report:
Someone wants to write tests? |
@karlvestin started working on adding tests for structured data, which would leave the enum tests and the UASDK variant for me? |
I was actually thinking of implementing the UASDK support myself. One more point do discuss: When converting OPC-UA Enums to/from numbers, should it use the index (as now) or rather the numerical enum value? I think the latter. |
By default: Enum value, clearly. |
Status update: UASDK Support works. CHAR arrays work (like long strings). |
Just for the record... Recent Tech-Talk shows the situation I think we need to avoid: a device constantly changing enum choices, based on its operational state. Obviously, that this is more an interface design question than a technical issue. |
That will only happen on (re-)connect (e.g. when the OPC-UA server is restarted). To be exact: during |
The text was updated successfully, but these errors were encountered: