Skip to content

Commit

Permalink
feat(opcua): add support for OpcuaMessageError
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Aug 3, 2023
1 parent 01ce5a8 commit b88d4eb
Show file tree
Hide file tree
Showing 4 changed files with 314 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plc4go/protocols/opcua/readwrite/model/MessagePDU.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

303 changes: 303 additions & 0 deletions plc4go/protocols/opcua/readwrite/model/OpcuaMessageError.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ public static MessagePDU staticParse(ReadBuffer readBuffer, Boolean response)
} else if (EvaluationHelper.equals(messageType, (String) "MSG")
&& EvaluationHelper.equals(response, (boolean) true)) {
builder = OpcuaMessageResponse.staticParseMessagePDUBuilder(readBuffer, response);
} else if (EvaluationHelper.equals(messageType, (String) "ERR")
&& EvaluationHelper.equals(response, (boolean) true)) {
builder = OpcuaMessageERR.staticParseMessagePDUBuilder(readBuffer, response);
}
if (builder == null) {
throw new ParseException(
Expand Down
6 changes: 6 additions & 0 deletions protocols/opcua/src/main/xslt/opc-manual.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@
[simple int 32 requestId]
[array byte message count 'messageSize - 24']
]
['"ERR"','true' OpcuaMessageError
[simple string 8 chunk ]
[implicit int 32 messageSize 'lengthInBytes']
[simple OpcuaStatusCode error ]
[simple PascalString reason]
]
]
]

Expand Down

0 comments on commit b88d4eb

Please sign in to comment.