-
Notifications
You must be signed in to change notification settings - Fork 669
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
NOISSUE - Fix opc-ua message type handling #1071
Conversation
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
opcua/api/transport.go
Outdated
@@ -24,6 +24,9 @@ const ( | |||
|
|||
defOffset = 0 | |||
defLimit = 10 | |||
|
|||
defNamespace = "ns=0" | |||
defIdentifier = "i=84" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave a comment next to these magic numbers.
opcua/gopcua/browser.go
Outdated
@@ -14,7 +14,7 @@ import ( | |||
"github.com/mainflux/mainflux/opcua" | |||
) | |||
|
|||
const maxChildrens = 7 | |||
const maxChildrens = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - why 5, some comment please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really explain why 5 or 7... It's just to try to make this faster but it depends on the server...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant this be in env var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will remove this and change the architecture. No need for now
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1071 +/- ##
==========================================
- Coverage 78.27% 78.24% -0.04%
==========================================
Files 95 95
Lines 6648 6648
==========================================
- Hits 5204 5202 -2
- Misses 1134 1136 +2
Partials 310 310
Continue to review full report at Codecov.
|
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
opcua/gopcua/browser.go
Outdated
nodes = append(nodes, children...) | ||
} | ||
return nil | ||
bc, err := broseChildren(n, def.Path, level, id.HasComponent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
browse
opcua/gopcua/browser.go
Outdated
@@ -14,7 +14,7 @@ import ( | |||
"github.com/mainflux/mainflux/opcua" | |||
) | |||
|
|||
const maxChildrens = 7 | |||
const maxChildrens = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant this be in env var
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* NOISSUE - Fix opc-ua message type handling Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add comments Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix reviews Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Return error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale manuel.imperiale@gmail.com