You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2022/07/01 10:48:30 UTC

[plc4x] branch develop updated: chore(plc4go): Minor updates to the cbus protocol

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 145764e3d chore(plc4go): Minor updates to the cbus protocol
145764e3d is described below

commit 145764e3d7963ee9b3ddb209994b55e640119c17
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Fri Jul 1 12:48:20 2022 +0200

    chore(plc4go): Minor updates to the cbus protocol
---
 .../protocols/cbus/readwrite/model/CBusHeader.go   |  1 -
 .../readwrite/model/CBusPointToPointCommand.go     | 23 ----------------------
 2 files changed, 24 deletions(-)

diff --git a/plc4go/protocols/cbus/readwrite/model/CBusHeader.go b/plc4go/protocols/cbus/readwrite/model/CBusHeader.go
index c0ed9f05e..80b131597 100644
--- a/plc4go/protocols/cbus/readwrite/model/CBusHeader.go
+++ b/plc4go/protocols/cbus/readwrite/model/CBusHeader.go
@@ -175,7 +175,6 @@ func CBusHeaderParse(readBuffer utils.ReadBuffer) (CBusHeader, error) {
 	if closeErr := readBuffer.CloseContext("destinationAddressType"); closeErr != nil {
 		return nil, errors.Wrap(closeErr, "Error closing for destinationAddressType")
 	}
-	dpReservedManagement := _dpReservedManagement
 
 	if closeErr := readBuffer.CloseContext("CBusHeader"); closeErr != nil {
 		return nil, errors.Wrap(closeErr, "Error closing for CBusHeader")
diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go
index 78dd58dcc..196f85cf2 100644
--- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go
+++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go
@@ -31,7 +31,6 @@ import (
 
 // Constant values.
 const CBusPointToPointCommand_CR byte = 0xD
-const CBusPointToPointCommand_LF byte = 0xA
 
 // CBusPointToPointCommand is the corresponding interface of CBusPointToPointCommand
 type CBusPointToPointCommand interface {
@@ -146,10 +145,6 @@ func (m *_CBusPointToPointCommand) GetCr() byte {
 	return CBusPointToPointCommand_CR
 }
 
-func (m *_CBusPointToPointCommand) GetLf() byte {
-	return CBusPointToPointCommand_LF
-}
-
 ///////////////////////
 ///////////////////////
 ///////////////////////////////////////////////////////////
@@ -196,9 +191,6 @@ func (m *_CBusPointToPointCommand) GetParentLengthInBits() uint16 {
 	// Const Field (cr)
 	lengthInBits += 8
 
-	// Const Field (lf)
-	lengthInBits += 8
-
 	return lengthInBits
 }
 
@@ -327,15 +319,6 @@ func CBusPointToPointCommandParse(readBuffer utils.ReadBuffer, srchk bool) (CBus
 		return nil, errors.New("Expected constant value " + fmt.Sprintf("%d", CBusPointToPointCommand_CR) + " but got " + fmt.Sprintf("%d", cr))
 	}
 
-	// Const Field (lf)
-	lf, _lfErr := readBuffer.ReadByte("lf")
-	if _lfErr != nil {
-		return nil, errors.Wrap(_lfErr, "Error parsing 'lf' field")
-	}
-	if lf != CBusPointToPointCommand_LF {
-		return nil, errors.New("Expected constant value " + fmt.Sprintf("%d", CBusPointToPointCommand_LF) + " but got " + fmt.Sprintf("%d", lf))
-	}
-
 	if closeErr := readBuffer.CloseContext("CBusPointToPointCommand"); closeErr != nil {
 		return nil, errors.Wrap(closeErr, "Error closing for CBusPointToPointCommand")
 	}
@@ -414,12 +397,6 @@ func (pm *_CBusPointToPointCommand) SerializeParent(writeBuffer utils.WriteBuffe
 		return errors.Wrap(_crErr, "Error serializing 'cr' field")
 	}
 
-	// Const Field (lf)
-	_lfErr := writeBuffer.WriteByte("lf", 0xA)
-	if _lfErr != nil {
-		return errors.Wrap(_lfErr, "Error serializing 'lf' field")
-	}
-
 	if popErr := writeBuffer.PopContext("CBusPointToPointCommand"); popErr != nil {
 		return errors.Wrap(popErr, "Error popping for CBusPointToPointCommand")
 	}