This is an automated email from the ASF dual-hosted git repository.
sruehl 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 261bfe7e88 feat(bacnet): initial BDT and FDT support
261bfe7e88 is described below
commit 261bfe7e888ec228569c8446bbc2ee4998b4ca78
Author: Sebastian Rühl <[email protected]>
AuthorDate: Mon Apr 25 12:04:29 2022 +0200
feat(bacnet): initial BDT and FDT support
---
.../plc4go/bacnetip/readwrite/model/BVLC.go | 6 +--
.../model/BVLCDeleteForeignDeviceTableEntry.go | 46 +++++++++++++++++--
.../model/BVLCReadBroadcastDistributionTableAck.go | 51 ++++++++++++++++++++--
.../model/BVLCReadForeignDeviceTableAck.go | 51 ++++++++++++++++++++--
.../bacnetip/readwrite/model/BVLCSecureBVLL.go | 51 ++++++++++++++++++++--
.../resources/protocols/bacnetip/bacnetip.mspec | 18 +++++---
6 files changed, 200 insertions(+), 23 deletions(-)
diff --git a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLC.go
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLC.go
index 73fc6421b1..d3cddaeaa4 100644
--- a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLC.go
+++ b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLC.go
@@ -189,7 +189,7 @@ func BVLCParse(readBuffer utils.ReadBuffer) (*BVLC, error) {
case bvlcFunction == 0x02: // BVLCReadBroadcastDistributionTable
_child, typeSwitchError =
BVLCReadBroadcastDistributionTableParse(readBuffer)
case bvlcFunction == 0x03: // BVLCReadBroadcastDistributionTableAck
- _child, typeSwitchError =
BVLCReadBroadcastDistributionTableAckParse(readBuffer)
+ _child, typeSwitchError =
BVLCReadBroadcastDistributionTableAckParse(readBuffer, bvlcPayloadLength)
case bvlcFunction == 0x04: // BVLCForwardedNPDU
_child, typeSwitchError = BVLCForwardedNPDUParse(readBuffer,
bvlcPayloadLength)
case bvlcFunction == 0x05: // BVLCRegisterForeignDevice
@@ -197,7 +197,7 @@ func BVLCParse(readBuffer utils.ReadBuffer) (*BVLC, error) {
case bvlcFunction == 0x06: // BVLCReadForeignDeviceTable
_child, typeSwitchError =
BVLCReadForeignDeviceTableParse(readBuffer)
case bvlcFunction == 0x07: // BVLCReadForeignDeviceTableAck
- _child, typeSwitchError =
BVLCReadForeignDeviceTableAckParse(readBuffer)
+ _child, typeSwitchError =
BVLCReadForeignDeviceTableAckParse(readBuffer, bvlcPayloadLength)
case bvlcFunction == 0x08: // BVLCDeleteForeignDeviceTableEntry
_child, typeSwitchError =
BVLCDeleteForeignDeviceTableEntryParse(readBuffer)
case bvlcFunction == 0x09: // BVLCDistributeBroadcastToNetwork
@@ -207,7 +207,7 @@ func BVLCParse(readBuffer utils.ReadBuffer) (*BVLC, error) {
case bvlcFunction == 0x0B: // BVLCOriginalBroadcastNPDU
_child, typeSwitchError =
BVLCOriginalBroadcastNPDUParse(readBuffer, bvlcPayloadLength)
case bvlcFunction == 0x0C: // BVLCSecureBVLL
- _child, typeSwitchError = BVLCSecureBVLLParse(readBuffer)
+ _child, typeSwitchError = BVLCSecureBVLLParse(readBuffer,
bvlcPayloadLength)
default:
// TODO: return actual type
typeSwitchError = errors.New("Unmapped type")
diff --git
a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go
index 802613daec..b4c15e2074 100644
---
a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go
+++
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go
@@ -21,6 +21,7 @@ package model
import (
"github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "github.com/pkg/errors"
)
// Code generated by code-generation. DO NOT EDIT.
@@ -28,11 +29,14 @@ import (
// BVLCDeleteForeignDeviceTableEntry is the data-structure of this message
type BVLCDeleteForeignDeviceTableEntry struct {
*BVLC
+ FdtEntry []byte
}
// IBVLCDeleteForeignDeviceTableEntry is the corresponding interface of
BVLCDeleteForeignDeviceTableEntry
type IBVLCDeleteForeignDeviceTableEntry interface {
IBVLC
+ // GetFdtEntry returns FdtEntry (property field)
+ GetFdtEntry() []byte
// GetLengthInBytes returns the length in bytes
GetLengthInBytes() uint16
// GetLengthInBits returns the length in bits
@@ -61,10 +65,25 @@ func (m *BVLCDeleteForeignDeviceTableEntry) GetParent()
*BVLC {
return m.BVLC
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BVLCDeleteForeignDeviceTableEntry) GetFdtEntry() []byte {
+ return m.FdtEntry
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewBVLCDeleteForeignDeviceTableEntry factory function for
BVLCDeleteForeignDeviceTableEntry
-func NewBVLCDeleteForeignDeviceTableEntry() *BVLCDeleteForeignDeviceTableEntry
{
+func NewBVLCDeleteForeignDeviceTableEntry(fdtEntry []byte)
*BVLCDeleteForeignDeviceTableEntry {
_result := &BVLCDeleteForeignDeviceTableEntry{
- BVLC: NewBVLC(),
+ FdtEntry: fdtEntry,
+ BVLC: NewBVLC(),
}
_result.Child = _result
return _result
@@ -97,6 +116,11 @@ func (m *BVLCDeleteForeignDeviceTableEntry)
GetLengthInBits() uint16 {
func (m *BVLCDeleteForeignDeviceTableEntry)
GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Array field
+ if len(m.FdtEntry) > 0 {
+ lengthInBits += 8 * uint16(len(m.FdtEntry))
+ }
+
return lengthInBits
}
@@ -110,6 +134,12 @@ func BVLCDeleteForeignDeviceTableEntryParse(readBuffer
utils.ReadBuffer) (*BVLCD
}
currentPos := readBuffer.GetPos()
_ = currentPos
+ // Byte Array field (fdtEntry)
+ numberOfBytesfdtEntry := int(uint16(6))
+ fdtEntry, _readArrayErr := readBuffer.ReadByteArray("fdtEntry",
numberOfBytesfdtEntry)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing
'fdtEntry' field")
+ }
if closeErr :=
readBuffer.CloseContext("BVLCDeleteForeignDeviceTableEntry"); closeErr != nil {
return nil, closeErr
@@ -117,7 +147,8 @@ func BVLCDeleteForeignDeviceTableEntryParse(readBuffer
utils.ReadBuffer) (*BVLCD
// Create a partially initialized instance
_child := &BVLCDeleteForeignDeviceTableEntry{
- BVLC: &BVLC{},
+ FdtEntry: fdtEntry,
+ BVLC: &BVLC{},
}
_child.BVLC.Child = _child
return _child, nil
@@ -129,6 +160,15 @@ func (m *BVLCDeleteForeignDeviceTableEntry)
Serialize(writeBuffer utils.WriteBuf
return pushErr
}
+ // Array Field (fdtEntry)
+ if m.FdtEntry != nil {
+ // Byte Array field (fdtEntry)
+ _writeArrayErr :=
writeBuffer.WriteByteArray("fdtEntry", m.FdtEntry)
+ if _writeArrayErr != nil {
+ return errors.Wrap(_writeArrayErr, "Error
serializing 'fdtEntry' field")
+ }
+ }
+
if popErr :=
writeBuffer.PopContext("BVLCDeleteForeignDeviceTableEntry"); popErr != nil {
return popErr
}
diff --git
a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
index 5619022727..abc0aad10a 100644
---
a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
+++
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
@@ -21,6 +21,7 @@ package model
import (
"github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "github.com/pkg/errors"
)
// Code generated by code-generation. DO NOT EDIT.
@@ -28,11 +29,17 @@ import (
// BVLCReadBroadcastDistributionTableAck is the data-structure of this message
type BVLCReadBroadcastDistributionTableAck struct {
*BVLC
+ BdtEntries []byte
+
+ // Arguments.
+ BvlcPayloadLength uint16
}
// IBVLCReadBroadcastDistributionTableAck is the corresponding interface of
BVLCReadBroadcastDistributionTableAck
type IBVLCReadBroadcastDistributionTableAck interface {
IBVLC
+ // GetBdtEntries returns BdtEntries (property field)
+ GetBdtEntries() []byte
// GetLengthInBytes returns the length in bytes
GetLengthInBytes() uint16
// GetLengthInBits returns the length in bits
@@ -61,10 +68,25 @@ func (m *BVLCReadBroadcastDistributionTableAck) GetParent()
*BVLC {
return m.BVLC
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BVLCReadBroadcastDistributionTableAck) GetBdtEntries() []byte {
+ return m.BdtEntries
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewBVLCReadBroadcastDistributionTableAck factory function for
BVLCReadBroadcastDistributionTableAck
-func NewBVLCReadBroadcastDistributionTableAck()
*BVLCReadBroadcastDistributionTableAck {
+func NewBVLCReadBroadcastDistributionTableAck(bdtEntries []byte,
bvlcPayloadLength uint16) *BVLCReadBroadcastDistributionTableAck {
_result := &BVLCReadBroadcastDistributionTableAck{
- BVLC: NewBVLC(),
+ BdtEntries: bdtEntries,
+ BVLC: NewBVLC(),
}
_result.Child = _result
return _result
@@ -97,6 +119,11 @@ func (m *BVLCReadBroadcastDistributionTableAck)
GetLengthInBits() uint16 {
func (m *BVLCReadBroadcastDistributionTableAck)
GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Array field
+ if len(m.BdtEntries) > 0 {
+ lengthInBits += 8 * uint16(len(m.BdtEntries))
+ }
+
return lengthInBits
}
@@ -104,12 +131,18 @@ func (m *BVLCReadBroadcastDistributionTableAck)
GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BVLCReadBroadcastDistributionTableAckParse(readBuffer utils.ReadBuffer)
(*BVLCReadBroadcastDistributionTableAck, error) {
+func BVLCReadBroadcastDistributionTableAckParse(readBuffer utils.ReadBuffer,
bvlcPayloadLength uint16) (*BVLCReadBroadcastDistributionTableAck, error) {
if pullErr :=
readBuffer.PullContext("BVLCReadBroadcastDistributionTableAck"); pullErr != nil
{
return nil, pullErr
}
currentPos := readBuffer.GetPos()
_ = currentPos
+ // Byte Array field (bdtEntries)
+ numberOfBytesbdtEntries := int(bvlcPayloadLength)
+ bdtEntries, _readArrayErr := readBuffer.ReadByteArray("bdtEntries",
numberOfBytesbdtEntries)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing
'bdtEntries' field")
+ }
if closeErr :=
readBuffer.CloseContext("BVLCReadBroadcastDistributionTableAck"); closeErr !=
nil {
return nil, closeErr
@@ -117,7 +150,8 @@ func BVLCReadBroadcastDistributionTableAckParse(readBuffer
utils.ReadBuffer) (*B
// Create a partially initialized instance
_child := &BVLCReadBroadcastDistributionTableAck{
- BVLC: &BVLC{},
+ BdtEntries: bdtEntries,
+ BVLC: &BVLC{},
}
_child.BVLC.Child = _child
return _child, nil
@@ -129,6 +163,15 @@ func (m *BVLCReadBroadcastDistributionTableAck)
Serialize(writeBuffer utils.Writ
return pushErr
}
+ // Array Field (bdtEntries)
+ if m.BdtEntries != nil {
+ // Byte Array field (bdtEntries)
+ _writeArrayErr :=
writeBuffer.WriteByteArray("bdtEntries", m.BdtEntries)
+ if _writeArrayErr != nil {
+ return errors.Wrap(_writeArrayErr, "Error
serializing 'bdtEntries' field")
+ }
+ }
+
if popErr :=
writeBuffer.PopContext("BVLCReadBroadcastDistributionTableAck"); popErr != nil {
return popErr
}
diff --git
a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
index e65be1eeed..97229b5d9c 100644
---
a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
+++
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
@@ -21,6 +21,7 @@ package model
import (
"github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "github.com/pkg/errors"
)
// Code generated by code-generation. DO NOT EDIT.
@@ -28,11 +29,17 @@ import (
// BVLCReadForeignDeviceTableAck is the data-structure of this message
type BVLCReadForeignDeviceTableAck struct {
*BVLC
+ FdtEntries []byte
+
+ // Arguments.
+ BvlcPayloadLength uint16
}
// IBVLCReadForeignDeviceTableAck is the corresponding interface of
BVLCReadForeignDeviceTableAck
type IBVLCReadForeignDeviceTableAck interface {
IBVLC
+ // GetFdtEntries returns FdtEntries (property field)
+ GetFdtEntries() []byte
// GetLengthInBytes returns the length in bytes
GetLengthInBytes() uint16
// GetLengthInBits returns the length in bits
@@ -61,10 +68,25 @@ func (m *BVLCReadForeignDeviceTableAck) GetParent() *BVLC {
return m.BVLC
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BVLCReadForeignDeviceTableAck) GetFdtEntries() []byte {
+ return m.FdtEntries
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewBVLCReadForeignDeviceTableAck factory function for
BVLCReadForeignDeviceTableAck
-func NewBVLCReadForeignDeviceTableAck() *BVLCReadForeignDeviceTableAck {
+func NewBVLCReadForeignDeviceTableAck(fdtEntries []byte, bvlcPayloadLength
uint16) *BVLCReadForeignDeviceTableAck {
_result := &BVLCReadForeignDeviceTableAck{
- BVLC: NewBVLC(),
+ FdtEntries: fdtEntries,
+ BVLC: NewBVLC(),
}
_result.Child = _result
return _result
@@ -97,6 +119,11 @@ func (m *BVLCReadForeignDeviceTableAck) GetLengthInBits()
uint16 {
func (m *BVLCReadForeignDeviceTableAck) GetLengthInBitsConditional(lastItem
bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Array field
+ if len(m.FdtEntries) > 0 {
+ lengthInBits += 8 * uint16(len(m.FdtEntries))
+ }
+
return lengthInBits
}
@@ -104,12 +131,18 @@ func (m *BVLCReadForeignDeviceTableAck)
GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BVLCReadForeignDeviceTableAckParse(readBuffer utils.ReadBuffer)
(*BVLCReadForeignDeviceTableAck, error) {
+func BVLCReadForeignDeviceTableAckParse(readBuffer utils.ReadBuffer,
bvlcPayloadLength uint16) (*BVLCReadForeignDeviceTableAck, error) {
if pullErr := readBuffer.PullContext("BVLCReadForeignDeviceTableAck");
pullErr != nil {
return nil, pullErr
}
currentPos := readBuffer.GetPos()
_ = currentPos
+ // Byte Array field (fdtEntries)
+ numberOfBytesfdtEntries := int(bvlcPayloadLength)
+ fdtEntries, _readArrayErr := readBuffer.ReadByteArray("fdtEntries",
numberOfBytesfdtEntries)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing
'fdtEntries' field")
+ }
if closeErr :=
readBuffer.CloseContext("BVLCReadForeignDeviceTableAck"); closeErr != nil {
return nil, closeErr
@@ -117,7 +150,8 @@ func BVLCReadForeignDeviceTableAckParse(readBuffer
utils.ReadBuffer) (*BVLCReadF
// Create a partially initialized instance
_child := &BVLCReadForeignDeviceTableAck{
- BVLC: &BVLC{},
+ FdtEntries: fdtEntries,
+ BVLC: &BVLC{},
}
_child.BVLC.Child = _child
return _child, nil
@@ -129,6 +163,15 @@ func (m *BVLCReadForeignDeviceTableAck)
Serialize(writeBuffer utils.WriteBuffer)
return pushErr
}
+ // Array Field (fdtEntries)
+ if m.FdtEntries != nil {
+ // Byte Array field (fdtEntries)
+ _writeArrayErr :=
writeBuffer.WriteByteArray("fdtEntries", m.FdtEntries)
+ if _writeArrayErr != nil {
+ return errors.Wrap(_writeArrayErr, "Error
serializing 'fdtEntries' field")
+ }
+ }
+
if popErr :=
writeBuffer.PopContext("BVLCReadForeignDeviceTableAck"); popErr != nil {
return popErr
}
diff --git a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCSecureBVLL.go
b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCSecureBVLL.go
index 3102d0a7de..95e90432d4 100644
--- a/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCSecureBVLL.go
+++ b/plc4go/internal/plc4go/bacnetip/readwrite/model/BVLCSecureBVLL.go
@@ -21,6 +21,7 @@ package model
import (
"github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "github.com/pkg/errors"
)
// Code generated by code-generation. DO NOT EDIT.
@@ -28,11 +29,17 @@ import (
// BVLCSecureBVLL is the data-structure of this message
type BVLCSecureBVLL struct {
*BVLC
+ SecurityWrapper []byte
+
+ // Arguments.
+ BvlcPayloadLength uint16
}
// IBVLCSecureBVLL is the corresponding interface of BVLCSecureBVLL
type IBVLCSecureBVLL interface {
IBVLC
+ // GetSecurityWrapper returns SecurityWrapper (property field)
+ GetSecurityWrapper() []byte
// GetLengthInBytes returns the length in bytes
GetLengthInBytes() uint16
// GetLengthInBits returns the length in bits
@@ -61,10 +68,25 @@ func (m *BVLCSecureBVLL) GetParent() *BVLC {
return m.BVLC
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BVLCSecureBVLL) GetSecurityWrapper() []byte {
+ return m.SecurityWrapper
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewBVLCSecureBVLL factory function for BVLCSecureBVLL
-func NewBVLCSecureBVLL() *BVLCSecureBVLL {
+func NewBVLCSecureBVLL(securityWrapper []byte, bvlcPayloadLength uint16)
*BVLCSecureBVLL {
_result := &BVLCSecureBVLL{
- BVLC: NewBVLC(),
+ SecurityWrapper: securityWrapper,
+ BVLC: NewBVLC(),
}
_result.Child = _result
return _result
@@ -97,6 +119,11 @@ func (m *BVLCSecureBVLL) GetLengthInBits() uint16 {
func (m *BVLCSecureBVLL) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Array field
+ if len(m.SecurityWrapper) > 0 {
+ lengthInBits += 8 * uint16(len(m.SecurityWrapper))
+ }
+
return lengthInBits
}
@@ -104,12 +131,18 @@ func (m *BVLCSecureBVLL) GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BVLCSecureBVLLParse(readBuffer utils.ReadBuffer) (*BVLCSecureBVLL, error)
{
+func BVLCSecureBVLLParse(readBuffer utils.ReadBuffer, bvlcPayloadLength
uint16) (*BVLCSecureBVLL, error) {
if pullErr := readBuffer.PullContext("BVLCSecureBVLL"); pullErr != nil {
return nil, pullErr
}
currentPos := readBuffer.GetPos()
_ = currentPos
+ // Byte Array field (securityWrapper)
+ numberOfBytessecurityWrapper := int(bvlcPayloadLength)
+ securityWrapper, _readArrayErr :=
readBuffer.ReadByteArray("securityWrapper", numberOfBytessecurityWrapper)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing
'securityWrapper' field")
+ }
if closeErr := readBuffer.CloseContext("BVLCSecureBVLL"); closeErr !=
nil {
return nil, closeErr
@@ -117,7 +150,8 @@ func BVLCSecureBVLLParse(readBuffer utils.ReadBuffer)
(*BVLCSecureBVLL, error) {
// Create a partially initialized instance
_child := &BVLCSecureBVLL{
- BVLC: &BVLC{},
+ SecurityWrapper: securityWrapper,
+ BVLC: &BVLC{},
}
_child.BVLC.Child = _child
return _child, nil
@@ -129,6 +163,15 @@ func (m *BVLCSecureBVLL) Serialize(writeBuffer
utils.WriteBuffer) error {
return pushErr
}
+ // Array Field (securityWrapper)
+ if m.SecurityWrapper != nil {
+ // Byte Array field (securityWrapper)
+ _writeArrayErr :=
writeBuffer.WriteByteArray("securityWrapper", m.SecurityWrapper)
+ if _writeArrayErr != nil {
+ return errors.Wrap(_writeArrayErr, "Error
serializing 'securityWrapper' field")
+ }
+ }
+
if popErr := writeBuffer.PopContext("BVLCSecureBVLL"); popErr
!= nil {
return popErr
}
diff --git
a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index eefac12b1c..307fd3780c 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -34,11 +34,13 @@
]
['0x02' BVLCReadBroadcastDistributionTable
]
- ['0x03' BVLCReadBroadcastDistributionTableAck
+ ['0x03' BVLCReadBroadcastDistributionTableAck(uint 16
bvlcPayloadLength)
+ [array byte bdtEntries
+ length 'bvlcPayloadLength' ]
]
['0x04' BVLCForwardedNPDU(uint 16 bvlcPayloadLength)
- [array uint 8 ip count '4' ]
- [simple uint 16 port ]
+ [array uint 8 ip count '4' ]
+ [simple uint 16 port ]
[simple NPDU('bvlcPayloadLength - 6')
npdu ]
]
@@ -47,9 +49,13 @@
]
['0x06' BVLCReadForeignDeviceTable
]
- ['0x07' BVLCReadForeignDeviceTableAck
+ ['0x07' BVLCReadForeignDeviceTableAck(uint 16 bvlcPayloadLength)
+ [array byte fdtEntries
+ length 'bvlcPayloadLength' ]
]
['0x08' BVLCDeleteForeignDeviceTableEntry
+ [array byte fdtEntry
+ count '6']
]
['0x09' BVLCDistributeBroadcastToNetwork(uint 16 bvlcPayloadLength)
[simple NPDU('bvlcPayloadLength')
@@ -63,7 +69,9 @@
[simple NPDU('bvlcPayloadLength')
npdu ]
]
- ['0x0C' BVLCSecureBVLL
+ ['0x0C' BVLCSecureBVLL(uint 16 bvlcPayloadLength)
+ [array byte securityWrapper
+ length 'bvlcPayloadLength' ]
]
]
]