This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch feature/mspec-ng
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/mspec-ng by this push:
new 743a7b2 fix(plc4go/codgen): fix merge messup
743a7b2 is described below
commit 743a7b2952bbe68f556796d3e121dd766c25c698
Author: Sebastian Rühl <[email protected]>
AuthorDate: Mon Nov 1 13:26:47 2021 +0100
fix(plc4go/codgen): fix merge messup
---
.../language-go/src/main/resources/templates/go/model-template.go.ftlh | 1 +
.../model/DF1CommandResponseMessageProtectedTypedLogicalRead.go | 2 +-
plc4go/internal/plc4go/abeth/readwrite/model/DF1ResponseMessage.go | 2 +-
plc4go/internal/plc4go/s7/readwrite/model/COTPParameter.go | 2 +-
.../s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git
a/code-generation/language-go/src/main/resources/templates/go/model-template.go.ftlh
b/code-generation/language-go/src/main/resources/templates/go/model-template.go.ftlh
index 08bc7f4..c5187f1 100644
---
a/code-generation/language-go/src/main/resources/templates/go/model-template.go.ftlh
+++
b/code-generation/language-go/src/main/resources/templates/go/model-template.go.ftlh
@@ -902,6 +902,7 @@ func ${type.name}Parse(readBuffer utils.ReadBuffer<#if
hasParserArguments>, ${pa
<#assign typeDefinition=typeDefinition.parentType>
</#if>
<#assign
hasRefParams=complexTypeReference.params.isPresent() &&
typeDefinition.parserArguments.isPresent()>
+ <#assign refParams> <#if hasRefParams>, <#list
complexTypeReference.params.orElseThrow() as
typeParam>${helper.toTypedParseExpression(assertField, null, typeParam,
null)}<#sep>, </#sep></#list> </#if> </#assign>
</@compress>
_val, _err :=
${helper.getLanguageTypeNameForField(field)}Parse(readBuffer${refParams})
if _err != nil {
diff --git
a/plc4go/internal/plc4go/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go
b/plc4go/internal/plc4go/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go
index 626fd11..a56801a 100644
---
a/plc4go/internal/plc4go/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go
+++
b/plc4go/internal/plc4go/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go
@@ -104,7 +104,7 @@ func (m
*DF1CommandResponseMessageProtectedTypedLogicalRead) LengthInBytes() uin
return m.LengthInBits() / 8
}
-func DF1CommandResponseMessageProtectedTypedLogicalReadParse(readBuffer
utils.ReadBuffer, status uint8) (*DF1ResponseMessage, error) {
+func DF1CommandResponseMessageProtectedTypedLogicalReadParse(readBuffer
utils.ReadBuffer, payloadLength uint16, status uint8) (*DF1ResponseMessage,
error) {
if pullErr :=
readBuffer.PullContext("DF1CommandResponseMessageProtectedTypedLogicalRead");
pullErr != nil {
return nil, pullErr
}
diff --git a/plc4go/internal/plc4go/abeth/readwrite/model/DF1ResponseMessage.go
b/plc4go/internal/plc4go/abeth/readwrite/model/DF1ResponseMessage.go
index bc32664..2c4913a 100644
--- a/plc4go/internal/plc4go/abeth/readwrite/model/DF1ResponseMessage.go
+++ b/plc4go/internal/plc4go/abeth/readwrite/model/DF1ResponseMessage.go
@@ -183,7 +183,7 @@ func DF1ResponseMessageParse(readBuffer utils.ReadBuffer,
payloadLength uint16)
var typeSwitchError error
switch {
case commandCode == 0x4F: //
DF1CommandResponseMessageProtectedTypedLogicalRead
- _parent, typeSwitchError =
DF1CommandResponseMessageProtectedTypedLogicalReadParse(readBuffer, status)
+ _parent, typeSwitchError =
DF1CommandResponseMessageProtectedTypedLogicalReadParse(readBuffer,
payloadLength, status)
default:
// TODO: return actual type
typeSwitchError = errors.New("Unmapped type")
diff --git a/plc4go/internal/plc4go/s7/readwrite/model/COTPParameter.go
b/plc4go/internal/plc4go/s7/readwrite/model/COTPParameter.go
index 6c029c8..ed3be91 100644
--- a/plc4go/internal/plc4go/s7/readwrite/model/COTPParameter.go
+++ b/plc4go/internal/plc4go/s7/readwrite/model/COTPParameter.go
@@ -126,7 +126,7 @@ func COTPParameterParse(readBuffer utils.ReadBuffer, rest
uint8) (*COTPParameter
case parameterType == 0xC3: // COTPParameterChecksum
_parent, typeSwitchError =
COTPParameterChecksumParse(readBuffer, rest)
case parameterType == 0xE0: //
COTPParameterDisconnectAdditionalInformation
- _parent, typeSwitchError =
COTPParameterDisconnectAdditionalInformationParse(readBuffer)
+ _parent, typeSwitchError =
COTPParameterDisconnectAdditionalInformationParse(readBuffer, rest)
default:
// TODO: return actual type
typeSwitchError = errors.New("Unmapped type")
diff --git
a/plc4go/internal/plc4go/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go
b/plc4go/internal/plc4go/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go
index eb3249f..2fcbd99 100644
---
a/plc4go/internal/plc4go/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go
+++
b/plc4go/internal/plc4go/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go
@@ -100,7 +100,7 @@ func (m *COTPParameterDisconnectAdditionalInformation)
LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func COTPParameterDisconnectAdditionalInformationParse(readBuffer
utils.ReadBuffer) (*COTPParameter, error) {
+func COTPParameterDisconnectAdditionalInformationParse(readBuffer
utils.ReadBuffer, rest uint8) (*COTPParameter, error) {
if pullErr :=
readBuffer.PullContext("COTPParameterDisconnectAdditionalInformation"); pullErr
!= nil {
return nil, pullErr
}