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 enum's for opc ua driver in mspec #214

Merged
merged 3 commits into from
Dec 22, 2020
Merged

Conversation

hutcheb
Copy link
Contributor

@hutcheb hutcheb commented Dec 19, 2020

Fix for connection string optional fields tcp and params.

Fix for connection string optional fields tcp and params.
Copy link
Contributor

@ottobackwards ottobackwards left a comment

Choose a reason for hiding this comment

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

One question inline. Also, are there any tests for the address parsing?

@@ -68,12 +69,14 @@ public static OpcuaField of(String address) {
String identifier = matcher.group("identifier");

String identifierTypeString = matcher.group("identifierType");
OpcuaIdentifierType identifierType = OpcuaIdentifierType.fromString(identifierTypeString);
OpcuaIdentifierType identifierType = OpcuaIdentifierType.enumForValue(identifierTypeString);
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if it is an invalid value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A null pointer exception is eventually raised, might be worth adding a contains key to the enum template as it looks like it is a concern with all of the Field classes.

Add check for datatype enum values in OpcField.
Add tests for optional connection string parameters.
Add additional tests for datatypes in address string.
@hutcheb hutcheb merged commit ae0bfe3 into develop Dec 22, 2020
@hutcheb hutcheb deleted the enums_for_opcua_driver branch January 24, 2021 21:39
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.

None yet

2 participants