You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/11/22 12:07:45 UTC
[plc4x] branch develop updated: fix(bacnet): fix network layer message related to routing
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 3311c89c84 fix(bacnet): fix network layer message related to routing
3311c89c84 is described below
commit 3311c89c84419925b2f531cee1923f0a46fc8d86
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Nov 22 13:07:26 2022 +0100
fix(bacnet): fix network layer message related to routing
---
.../bacnetip/readwrite/model/BACnetVendorId.go | 128 ++++++++++++++++++---
.../readwrite/model/NLMIAmRouterToNetwork.go | 58 +++++-----
.../readwrite/model/NLMRouterAvailableToNetwork.go | 58 +++++-----
.../readwrite/model/NLMRouterBusyToNetwork.go | 58 +++++-----
.../readwrite/model/NLMWhoIsRouterToNetwork.go | 55 ++++-----
.../resources/protocols/bacnetip/bacnetip.mspec | 8 +-
6 files changed, 223 insertions(+), 142 deletions(-)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go
index 4979535636..0885d304a2 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go
@@ -571,7 +571,7 @@ const (
BACnetVendorId_MSR_ELECTRONIC_GMBH BACnetVendorId = 532
BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC BACnetVendorId = 533
BACnetVendorId_EMT_CONTROLS BACnetVendorId = 534
- BACnetVendorId_DAINTREE_NETWORKS_INC BACnetVendorId = 535
+ BACnetVendorId_DAINTREE BACnetVendorId = 535
BACnetVendorId_EUROIC_CDOO BACnetVendorId = 536
BACnetVendorId_TE_CONNECTIVITY_ENERGY BACnetVendorId = 537
BACnetVendorId_GEZE_GMBH BACnetVendorId = 538
@@ -792,7 +792,7 @@ const (
BACnetVendorId_OPTERGY_PTY_LTD BACnetVendorId = 755
BACnetVendorId_LSI_VIRTICUS BACnetVendorId = 756
BACnetVendorId_KONZEPTPARK_GMBH BACnetVendorId = 757
- BACnetVendorId_HUBBELL_BUILDING_AUTOMATION_INC BACnetVendorId = 758
+ BACnetVendorId_NX_LIGHTING_CONTROLS BACnetVendorId = 758
BACnetVendorId_E_CURV_INC BACnetVendorId = 759
BACnetVendorId_AGNOSYS_GMBH BACnetVendorId = 760
BACnetVendorId_SHANGHAI_SUNFULL_AUTOMATION_COLTD BACnetVendorId = 761
@@ -1417,6 +1417,12 @@ const (
BACnetVendorId_BEVER_INNOVATIONS BACnetVendorId = 1385
BACnetVendorId_PELICAN_WIRELESS_SYSTEMS BACnetVendorId = 1386
BACnetVendorId_CONTROL_CONCEPTS_INC BACnetVendorId = 1387
+ BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1388
+ BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD BACnetVendorId = 1389
+ BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD BACnetVendorId = 1390
+ BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD BACnetVendorId = 1391
+ BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD BACnetVendorId = 1392
+ BACnetVendorId_EM_FIRST_CO_LTD BACnetVendorId = 1393
BACnetVendorId_UNKNOWN_VENDOR BACnetVendorId = 0xFFFF
)
@@ -1960,7 +1966,7 @@ func init() {
BACnetVendorId_MSR_ELECTRONIC_GMBH,
BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC,
BACnetVendorId_EMT_CONTROLS,
- BACnetVendorId_DAINTREE_NETWORKS_INC,
+ BACnetVendorId_DAINTREE,
BACnetVendorId_EUROIC_CDOO,
BACnetVendorId_TE_CONNECTIVITY_ENERGY,
BACnetVendorId_GEZE_GMBH,
@@ -2181,7 +2187,7 @@ func init() {
BACnetVendorId_OPTERGY_PTY_LTD,
BACnetVendorId_LSI_VIRTICUS,
BACnetVendorId_KONZEPTPARK_GMBH,
- BACnetVendorId_HUBBELL_BUILDING_AUTOMATION_INC,
+ BACnetVendorId_NX_LIGHTING_CONTROLS,
BACnetVendorId_E_CURV_INC,
BACnetVendorId_AGNOSYS_GMBH,
BACnetVendorId_SHANGHAI_SUNFULL_AUTOMATION_COLTD,
@@ -2806,6 +2812,12 @@ func init() {
BACnetVendorId_BEVER_INNOVATIONS,
BACnetVendorId_PELICAN_WIRELESS_SYSTEMS,
BACnetVendorId_CONTROL_CONCEPTS_INC,
+ BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD,
+ BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD,
+ BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD,
+ BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD,
+ BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD,
+ BACnetVendorId_EM_FIRST_CO_LTD,
BACnetVendorId_UNKNOWN_VENDOR,
}
}
@@ -4544,10 +4556,34 @@ func (e BACnetVendorId) VendorId() uint16 {
{ /* '1387' */
return 1387
}
+ case 1388:
+ { /* '1388' */
+ return 1388
+ }
+ case 1389:
+ { /* '1389' */
+ return 1389
+ }
case 139:
{ /* '139' */
return 139
}
+ case 1390:
+ { /* '1390' */
+ return 1390
+ }
+ case 1391:
+ { /* '1391' */
+ return 1391
+ }
+ case 1392:
+ { /* '1392' */
+ return 1392
+ }
+ case 1393:
+ { /* '1393' */
+ return 1393
+ }
case 14:
{ /* '14' */
return 14
@@ -10090,10 +10126,34 @@ func (e BACnetVendorId) VendorName() string {
{ /* '1387' */
return "Control Concepts Inc."
}
+ case 1388:
+ { /* '1388' */
+ return "Augmatic Technologies Pvt. Ltd."
+ }
+ case 1389:
+ { /* '1389' */
+ return "Xiamen Milesight loT Co., Ltd"
+ }
case 139:
{ /* '139' */
return "I Controls"
}
+ case 1390:
+ { /* '1390' */
+ return "Tianjin Anjie loT Schience and Technology Co., Ltd"
+ }
+ case 1391:
+ { /* '1391' */
+ return "Guangzhou S. Energy Electronics Technology Co. Ltd."
+ }
+ case 1392:
+ { /* '1392' */
+ return "AKVO Atmospheric Water Systems Pvt. Ltd."
+ }
+ case 1393:
+ { /* '1393' */
+ return "EmFirst Co. Ltd."
+ }
case 14:
{ /* '14' */
return "Cimetrics Technology"
@@ -11852,7 +11912,7 @@ func (e BACnetVendorId) VendorName() string {
}
case 535:
{ /* '535' */
- return "Daintree Networks Inc."
+ return "Daintree"
}
case 536:
{ /* '536' */
@@ -12832,7 +12892,7 @@ func (e BACnetVendorId) VendorName() string {
}
case 758:
{ /* '758' */
- return "Hubbell Building Automation, Inc."
+ return "NX Lighting Controls"
}
case 759:
{ /* '759' */
@@ -14769,8 +14829,20 @@ func BACnetVendorIdByValue(value uint16) (enum BACnetVendorId, ok bool) {
return BACnetVendorId_PELICAN_WIRELESS_SYSTEMS, true
case 1387:
return BACnetVendorId_CONTROL_CONCEPTS_INC, true
+ case 1388:
+ return BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD, true
+ case 1389:
+ return BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD, true
case 139:
return BACnetVendorId_I_CONTROLS, true
+ case 1390:
+ return BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD, true
+ case 1391:
+ return BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD, true
+ case 1392:
+ return BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD, true
+ case 1393:
+ return BACnetVendorId_EM_FIRST_CO_LTD, true
case 14:
return BACnetVendorId_CIMETRICS_TECHNOLOGY, true
case 140:
@@ -15650,7 +15722,7 @@ func BACnetVendorIdByValue(value uint16) (enum BACnetVendorId, ok bool) {
case 534:
return BACnetVendorId_EMT_CONTROLS, true
case 535:
- return BACnetVendorId_DAINTREE_NETWORKS_INC, true
+ return BACnetVendorId_DAINTREE, true
case 536:
return BACnetVendorId_EUROIC_CDOO, true
case 537:
@@ -16140,7 +16212,7 @@ func BACnetVendorIdByValue(value uint16) (enum BACnetVendorId, ok bool) {
case 757:
return BACnetVendorId_KONZEPTPARK_GMBH, true
case 758:
- return BACnetVendorId_HUBBELL_BUILDING_AUTOMATION_INC, true
+ return BACnetVendorId_NX_LIGHTING_CONTROLS, true
case 759:
return BACnetVendorId_E_CURV_INC, true
case 76:
@@ -17539,8 +17611,20 @@ func BACnetVendorIdByName(value string) (enum BACnetVendorId, ok bool) {
return BACnetVendorId_PELICAN_WIRELESS_SYSTEMS, true
case "CONTROL_CONCEPTS_INC":
return BACnetVendorId_CONTROL_CONCEPTS_INC, true
+ case "AUGMATIC_TECHNOLOGIES_PVT_LTD":
+ return BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD, true
+ case "XIAMEN_MILESIGHTLOT_CO_LTD":
+ return BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD, true
case "I_CONTROLS":
return BACnetVendorId_I_CONTROLS, true
+ case "TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD":
+ return BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD, true
+ case "GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD":
+ return BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD, true
+ case "AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD":
+ return BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD, true
+ case "EM_FIRST_CO_LTD":
+ return BACnetVendorId_EM_FIRST_CO_LTD, true
case "CIMETRICS_TECHNOLOGY":
return BACnetVendorId_CIMETRICS_TECHNOLOGY, true
case "VICONICS_ELECTRONICS_INC":
@@ -18419,8 +18503,8 @@ func BACnetVendorIdByName(value string) (enum BACnetVendorId, ok bool) {
return BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC, true
case "EMT_CONTROLS":
return BACnetVendorId_EMT_CONTROLS, true
- case "DAINTREE_NETWORKS_INC":
- return BACnetVendorId_DAINTREE_NETWORKS_INC, true
+ case "DAINTREE":
+ return BACnetVendorId_DAINTREE, true
case "EUROIC_CDOO":
return BACnetVendorId_EUROIC_CDOO, true
case "TE_CONNECTIVITY_ENERGY":
@@ -18909,8 +18993,8 @@ func BACnetVendorIdByName(value string) (enum BACnetVendorId, ok bool) {
return BACnetVendorId_LSI_VIRTICUS, true
case "KONZEPTPARK_GMBH":
return BACnetVendorId_KONZEPTPARK_GMBH, true
- case "HUBBELL_BUILDING_AUTOMATION_INC":
- return BACnetVendorId_HUBBELL_BUILDING_AUTOMATION_INC, true
+ case "NX_LIGHTING_CONTROLS":
+ return BACnetVendorId_NX_LIGHTING_CONTROLS, true
case "E_CURV_INC":
return BACnetVendorId_E_CURV_INC, true
case "NOHMI_BOSAI_LTD":
@@ -20366,8 +20450,20 @@ func (e BACnetVendorId) PLC4XEnumName() string {
return "PELICAN_WIRELESS_SYSTEMS"
case BACnetVendorId_CONTROL_CONCEPTS_INC:
return "CONTROL_CONCEPTS_INC"
+ case BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD:
+ return "AUGMATIC_TECHNOLOGIES_PVT_LTD"
+ case BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD:
+ return "XIAMEN_MILESIGHTLOT_CO_LTD"
case BACnetVendorId_I_CONTROLS:
return "I_CONTROLS"
+ case BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD:
+ return "TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD"
+ case BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD:
+ return "GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD"
+ case BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD:
+ return "AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD"
+ case BACnetVendorId_EM_FIRST_CO_LTD:
+ return "EM_FIRST_CO_LTD"
case BACnetVendorId_CIMETRICS_TECHNOLOGY:
return "CIMETRICS_TECHNOLOGY"
case BACnetVendorId_VICONICS_ELECTRONICS_INC:
@@ -21246,8 +21342,8 @@ func (e BACnetVendorId) PLC4XEnumName() string {
return "ENERGY_CONTROL_SYSTEMS_INC"
case BACnetVendorId_EMT_CONTROLS:
return "EMT_CONTROLS"
- case BACnetVendorId_DAINTREE_NETWORKS_INC:
- return "DAINTREE_NETWORKS_INC"
+ case BACnetVendorId_DAINTREE:
+ return "DAINTREE"
case BACnetVendorId_EUROIC_CDOO:
return "EUROIC_CDOO"
case BACnetVendorId_TE_CONNECTIVITY_ENERGY:
@@ -21736,8 +21832,8 @@ func (e BACnetVendorId) PLC4XEnumName() string {
return "LSI_VIRTICUS"
case BACnetVendorId_KONZEPTPARK_GMBH:
return "KONZEPTPARK_GMBH"
- case BACnetVendorId_HUBBELL_BUILDING_AUTOMATION_INC:
- return "HUBBELL_BUILDING_AUTOMATION_INC"
+ case BACnetVendorId_NX_LIGHTING_CONTROLS:
+ return "NX_LIGHTING_CONTROLS"
case BACnetVendorId_E_CURV_INC:
return "E_CURV_INC"
case BACnetVendorId_NOHMI_BOSAI_LTD:
diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go
index 14ad6378ad..5151cd9b24 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go
@@ -31,8 +31,8 @@ type NLMIAmRouterToNetwork interface {
utils.LengthAware
utils.Serializable
NLM
- // GetDestinationNetworkAddress returns DestinationNetworkAddress (property field)
- GetDestinationNetworkAddress() []uint16
+ // GetDestinationNetworkAddresses returns DestinationNetworkAddresses (property field)
+ GetDestinationNetworkAddresses() []uint16
}
// NLMIAmRouterToNetworkExactly can be used when we want exactly this type and not a type which fulfills NLMIAmRouterToNetwork.
@@ -45,7 +45,7 @@ type NLMIAmRouterToNetworkExactly interface {
// _NLMIAmRouterToNetwork is the data-structure of this message
type _NLMIAmRouterToNetwork struct {
*_NLM
- DestinationNetworkAddress []uint16
+ DestinationNetworkAddresses []uint16
}
///////////////////////////////////////////////////////////
@@ -73,8 +73,8 @@ func (m *_NLMIAmRouterToNetwork) GetParent() NLM {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_NLMIAmRouterToNetwork) GetDestinationNetworkAddress() []uint16 {
- return m.DestinationNetworkAddress
+func (m *_NLMIAmRouterToNetwork) GetDestinationNetworkAddresses() []uint16 {
+ return m.DestinationNetworkAddresses
}
///////////////////////
@@ -83,10 +83,10 @@ func (m *_NLMIAmRouterToNetwork) GetDestinationNetworkAddress() []uint16 {
///////////////////////////////////////////////////////////
// NewNLMIAmRouterToNetwork factory function for _NLMIAmRouterToNetwork
-func NewNLMIAmRouterToNetwork(destinationNetworkAddress []uint16, apduLength uint16) *_NLMIAmRouterToNetwork {
+func NewNLMIAmRouterToNetwork(destinationNetworkAddresses []uint16, apduLength uint16) *_NLMIAmRouterToNetwork {
_result := &_NLMIAmRouterToNetwork{
- DestinationNetworkAddress: destinationNetworkAddress,
- _NLM: NewNLM(apduLength),
+ DestinationNetworkAddresses: destinationNetworkAddresses,
+ _NLM: NewNLM(apduLength),
}
_result._NLM._NLMChildRequirements = _result
return _result
@@ -115,8 +115,8 @@ func (m *_NLMIAmRouterToNetwork) GetLengthInBitsConditional(lastItem bool) uint1
lengthInBits := uint16(m.GetParentLengthInBits())
// Array field
- if len(m.DestinationNetworkAddress) > 0 {
- lengthInBits += 16 * uint16(len(m.DestinationNetworkAddress))
+ if len(m.DestinationNetworkAddresses) > 0 {
+ lengthInBits += 16 * uint16(len(m.DestinationNetworkAddresses))
}
return lengthInBits
@@ -139,25 +139,25 @@ func NLMIAmRouterToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apduLengt
currentPos := positionAware.GetPos()
_ = currentPos
- // Array field (destinationNetworkAddress)
- if pullErr := readBuffer.PullContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pullErr != nil {
- return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddress")
+ // Array field (destinationNetworkAddresses)
+ if pullErr := readBuffer.PullContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddresses")
}
// Length array
- var destinationNetworkAddress []uint16
+ var destinationNetworkAddresses []uint16
{
- _destinationNetworkAddressLength := uint16(apduLength) - uint16(uint16(1))
- _destinationNetworkAddressEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressLength)
- for positionAware.GetPos() < _destinationNetworkAddressEndPos {
+ _destinationNetworkAddressesLength := uint16(apduLength) - uint16(uint16(1))
+ _destinationNetworkAddressesEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressesLength)
+ for positionAware.GetPos() < _destinationNetworkAddressesEndPos {
_item, _err := readBuffer.ReadUint16("", 16)
if _err != nil {
- return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddress' field of NLMIAmRouterToNetwork")
+ return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddresses' field of NLMIAmRouterToNetwork")
}
- destinationNetworkAddress = append(destinationNetworkAddress, _item)
+ destinationNetworkAddresses = append(destinationNetworkAddresses, _item)
}
}
- if closeErr := readBuffer.CloseContext("destinationNetworkAddress", utils.WithRenderAsList(true)); closeErr != nil {
- return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddress")
+ if closeErr := readBuffer.CloseContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddresses")
}
if closeErr := readBuffer.CloseContext("NLMIAmRouterToNetwork"); closeErr != nil {
@@ -169,7 +169,7 @@ func NLMIAmRouterToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apduLengt
_NLM: &_NLM{
ApduLength: apduLength,
},
- DestinationNetworkAddress: destinationNetworkAddress,
+ DestinationNetworkAddresses: destinationNetworkAddresses,
}
_child._NLM._NLMChildRequirements = _child
return _child, nil
@@ -191,18 +191,18 @@ func (m *_NLMIAmRouterToNetwork) SerializeWithWriteBuffer(writeBuffer utils.Writ
return errors.Wrap(pushErr, "Error pushing for NLMIAmRouterToNetwork")
}
- // Array Field (destinationNetworkAddress)
- if pushErr := writeBuffer.PushContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pushErr != nil {
- return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddress")
+ // Array Field (destinationNetworkAddresses)
+ if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses")
}
- for _, _element := range m.GetDestinationNetworkAddress() {
+ for _, _element := range m.GetDestinationNetworkAddresses() {
_elementErr := writeBuffer.WriteUint16("", 16, _element)
if _elementErr != nil {
- return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddress' field")
+ return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field")
}
}
- if popErr := writeBuffer.PopContext("destinationNetworkAddress", utils.WithRenderAsList(true)); popErr != nil {
- return errors.Wrap(popErr, "Error popping for destinationNetworkAddress")
+ if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses")
}
if popErr := writeBuffer.PopContext("NLMIAmRouterToNetwork"); popErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go
index d51f185314..fd603991c4 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go
@@ -31,8 +31,8 @@ type NLMRouterAvailableToNetwork interface {
utils.LengthAware
utils.Serializable
NLM
- // GetDestinationNetworkAddress returns DestinationNetworkAddress (property field)
- GetDestinationNetworkAddress() []uint16
+ // GetDestinationNetworkAddresses returns DestinationNetworkAddresses (property field)
+ GetDestinationNetworkAddresses() []uint16
}
// NLMRouterAvailableToNetworkExactly can be used when we want exactly this type and not a type which fulfills NLMRouterAvailableToNetwork.
@@ -45,7 +45,7 @@ type NLMRouterAvailableToNetworkExactly interface {
// _NLMRouterAvailableToNetwork is the data-structure of this message
type _NLMRouterAvailableToNetwork struct {
*_NLM
- DestinationNetworkAddress []uint16
+ DestinationNetworkAddresses []uint16
}
///////////////////////////////////////////////////////////
@@ -73,8 +73,8 @@ func (m *_NLMRouterAvailableToNetwork) GetParent() NLM {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_NLMRouterAvailableToNetwork) GetDestinationNetworkAddress() []uint16 {
- return m.DestinationNetworkAddress
+func (m *_NLMRouterAvailableToNetwork) GetDestinationNetworkAddresses() []uint16 {
+ return m.DestinationNetworkAddresses
}
///////////////////////
@@ -83,10 +83,10 @@ func (m *_NLMRouterAvailableToNetwork) GetDestinationNetworkAddress() []uint16 {
///////////////////////////////////////////////////////////
// NewNLMRouterAvailableToNetwork factory function for _NLMRouterAvailableToNetwork
-func NewNLMRouterAvailableToNetwork(destinationNetworkAddress []uint16, apduLength uint16) *_NLMRouterAvailableToNetwork {
+func NewNLMRouterAvailableToNetwork(destinationNetworkAddresses []uint16, apduLength uint16) *_NLMRouterAvailableToNetwork {
_result := &_NLMRouterAvailableToNetwork{
- DestinationNetworkAddress: destinationNetworkAddress,
- _NLM: NewNLM(apduLength),
+ DestinationNetworkAddresses: destinationNetworkAddresses,
+ _NLM: NewNLM(apduLength),
}
_result._NLM._NLMChildRequirements = _result
return _result
@@ -115,8 +115,8 @@ func (m *_NLMRouterAvailableToNetwork) GetLengthInBitsConditional(lastItem bool)
lengthInBits := uint16(m.GetParentLengthInBits())
// Array field
- if len(m.DestinationNetworkAddress) > 0 {
- lengthInBits += 16 * uint16(len(m.DestinationNetworkAddress))
+ if len(m.DestinationNetworkAddresses) > 0 {
+ lengthInBits += 16 * uint16(len(m.DestinationNetworkAddresses))
}
return lengthInBits
@@ -139,25 +139,25 @@ func NLMRouterAvailableToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apd
currentPos := positionAware.GetPos()
_ = currentPos
- // Array field (destinationNetworkAddress)
- if pullErr := readBuffer.PullContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pullErr != nil {
- return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddress")
+ // Array field (destinationNetworkAddresses)
+ if pullErr := readBuffer.PullContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddresses")
}
// Length array
- var destinationNetworkAddress []uint16
+ var destinationNetworkAddresses []uint16
{
- _destinationNetworkAddressLength := uint16(apduLength) - uint16(uint16(1))
- _destinationNetworkAddressEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressLength)
- for positionAware.GetPos() < _destinationNetworkAddressEndPos {
+ _destinationNetworkAddressesLength := uint16(apduLength) - uint16(uint16(1))
+ _destinationNetworkAddressesEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressesLength)
+ for positionAware.GetPos() < _destinationNetworkAddressesEndPos {
_item, _err := readBuffer.ReadUint16("", 16)
if _err != nil {
- return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddress' field of NLMRouterAvailableToNetwork")
+ return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddresses' field of NLMRouterAvailableToNetwork")
}
- destinationNetworkAddress = append(destinationNetworkAddress, _item)
+ destinationNetworkAddresses = append(destinationNetworkAddresses, _item)
}
}
- if closeErr := readBuffer.CloseContext("destinationNetworkAddress", utils.WithRenderAsList(true)); closeErr != nil {
- return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddress")
+ if closeErr := readBuffer.CloseContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddresses")
}
if closeErr := readBuffer.CloseContext("NLMRouterAvailableToNetwork"); closeErr != nil {
@@ -169,7 +169,7 @@ func NLMRouterAvailableToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apd
_NLM: &_NLM{
ApduLength: apduLength,
},
- DestinationNetworkAddress: destinationNetworkAddress,
+ DestinationNetworkAddresses: destinationNetworkAddresses,
}
_child._NLM._NLMChildRequirements = _child
return _child, nil
@@ -191,18 +191,18 @@ func (m *_NLMRouterAvailableToNetwork) SerializeWithWriteBuffer(writeBuffer util
return errors.Wrap(pushErr, "Error pushing for NLMRouterAvailableToNetwork")
}
- // Array Field (destinationNetworkAddress)
- if pushErr := writeBuffer.PushContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pushErr != nil {
- return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddress")
+ // Array Field (destinationNetworkAddresses)
+ if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses")
}
- for _, _element := range m.GetDestinationNetworkAddress() {
+ for _, _element := range m.GetDestinationNetworkAddresses() {
_elementErr := writeBuffer.WriteUint16("", 16, _element)
if _elementErr != nil {
- return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddress' field")
+ return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field")
}
}
- if popErr := writeBuffer.PopContext("destinationNetworkAddress", utils.WithRenderAsList(true)); popErr != nil {
- return errors.Wrap(popErr, "Error popping for destinationNetworkAddress")
+ if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses")
}
if popErr := writeBuffer.PopContext("NLMRouterAvailableToNetwork"); popErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go
index 230cb659e4..5c78bc5d2d 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go
@@ -31,8 +31,8 @@ type NLMRouterBusyToNetwork interface {
utils.LengthAware
utils.Serializable
NLM
- // GetDestinationNetworkAddress returns DestinationNetworkAddress (property field)
- GetDestinationNetworkAddress() []uint16
+ // GetDestinationNetworkAddresses returns DestinationNetworkAddresses (property field)
+ GetDestinationNetworkAddresses() []uint16
}
// NLMRouterBusyToNetworkExactly can be used when we want exactly this type and not a type which fulfills NLMRouterBusyToNetwork.
@@ -45,7 +45,7 @@ type NLMRouterBusyToNetworkExactly interface {
// _NLMRouterBusyToNetwork is the data-structure of this message
type _NLMRouterBusyToNetwork struct {
*_NLM
- DestinationNetworkAddress []uint16
+ DestinationNetworkAddresses []uint16
}
///////////////////////////////////////////////////////////
@@ -73,8 +73,8 @@ func (m *_NLMRouterBusyToNetwork) GetParent() NLM {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_NLMRouterBusyToNetwork) GetDestinationNetworkAddress() []uint16 {
- return m.DestinationNetworkAddress
+func (m *_NLMRouterBusyToNetwork) GetDestinationNetworkAddresses() []uint16 {
+ return m.DestinationNetworkAddresses
}
///////////////////////
@@ -83,10 +83,10 @@ func (m *_NLMRouterBusyToNetwork) GetDestinationNetworkAddress() []uint16 {
///////////////////////////////////////////////////////////
// NewNLMRouterBusyToNetwork factory function for _NLMRouterBusyToNetwork
-func NewNLMRouterBusyToNetwork(destinationNetworkAddress []uint16, apduLength uint16) *_NLMRouterBusyToNetwork {
+func NewNLMRouterBusyToNetwork(destinationNetworkAddresses []uint16, apduLength uint16) *_NLMRouterBusyToNetwork {
_result := &_NLMRouterBusyToNetwork{
- DestinationNetworkAddress: destinationNetworkAddress,
- _NLM: NewNLM(apduLength),
+ DestinationNetworkAddresses: destinationNetworkAddresses,
+ _NLM: NewNLM(apduLength),
}
_result._NLM._NLMChildRequirements = _result
return _result
@@ -115,8 +115,8 @@ func (m *_NLMRouterBusyToNetwork) GetLengthInBitsConditional(lastItem bool) uint
lengthInBits := uint16(m.GetParentLengthInBits())
// Array field
- if len(m.DestinationNetworkAddress) > 0 {
- lengthInBits += 16 * uint16(len(m.DestinationNetworkAddress))
+ if len(m.DestinationNetworkAddresses) > 0 {
+ lengthInBits += 16 * uint16(len(m.DestinationNetworkAddresses))
}
return lengthInBits
@@ -139,25 +139,25 @@ func NLMRouterBusyToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apduLeng
currentPos := positionAware.GetPos()
_ = currentPos
- // Array field (destinationNetworkAddress)
- if pullErr := readBuffer.PullContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pullErr != nil {
- return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddress")
+ // Array field (destinationNetworkAddresses)
+ if pullErr := readBuffer.PullContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddresses")
}
// Length array
- var destinationNetworkAddress []uint16
+ var destinationNetworkAddresses []uint16
{
- _destinationNetworkAddressLength := uint16(apduLength) - uint16(uint16(1))
- _destinationNetworkAddressEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressLength)
- for positionAware.GetPos() < _destinationNetworkAddressEndPos {
+ _destinationNetworkAddressesLength := uint16(apduLength) - uint16(uint16(1))
+ _destinationNetworkAddressesEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressesLength)
+ for positionAware.GetPos() < _destinationNetworkAddressesEndPos {
_item, _err := readBuffer.ReadUint16("", 16)
if _err != nil {
- return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddress' field of NLMRouterBusyToNetwork")
+ return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddresses' field of NLMRouterBusyToNetwork")
}
- destinationNetworkAddress = append(destinationNetworkAddress, _item)
+ destinationNetworkAddresses = append(destinationNetworkAddresses, _item)
}
}
- if closeErr := readBuffer.CloseContext("destinationNetworkAddress", utils.WithRenderAsList(true)); closeErr != nil {
- return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddress")
+ if closeErr := readBuffer.CloseContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddresses")
}
if closeErr := readBuffer.CloseContext("NLMRouterBusyToNetwork"); closeErr != nil {
@@ -169,7 +169,7 @@ func NLMRouterBusyToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apduLeng
_NLM: &_NLM{
ApduLength: apduLength,
},
- DestinationNetworkAddress: destinationNetworkAddress,
+ DestinationNetworkAddresses: destinationNetworkAddresses,
}
_child._NLM._NLMChildRequirements = _child
return _child, nil
@@ -191,18 +191,18 @@ func (m *_NLMRouterBusyToNetwork) SerializeWithWriteBuffer(writeBuffer utils.Wri
return errors.Wrap(pushErr, "Error pushing for NLMRouterBusyToNetwork")
}
- // Array Field (destinationNetworkAddress)
- if pushErr := writeBuffer.PushContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pushErr != nil {
- return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddress")
+ // Array Field (destinationNetworkAddresses)
+ if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses")
}
- for _, _element := range m.GetDestinationNetworkAddress() {
+ for _, _element := range m.GetDestinationNetworkAddresses() {
_elementErr := writeBuffer.WriteUint16("", 16, _element)
if _elementErr != nil {
- return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddress' field")
+ return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field")
}
}
- if popErr := writeBuffer.PopContext("destinationNetworkAddress", utils.WithRenderAsList(true)); popErr != nil {
- return errors.Wrap(popErr, "Error popping for destinationNetworkAddress")
+ if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses")
}
if popErr := writeBuffer.PopContext("NLMRouterBusyToNetwork"); popErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go
index 134eaa439e..1025c19617 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go
@@ -32,7 +32,7 @@ type NLMWhoIsRouterToNetwork interface {
utils.Serializable
NLM
// GetDestinationNetworkAddress returns DestinationNetworkAddress (property field)
- GetDestinationNetworkAddress() []uint16
+ GetDestinationNetworkAddress() *uint16
}
// NLMWhoIsRouterToNetworkExactly can be used when we want exactly this type and not a type which fulfills NLMWhoIsRouterToNetwork.
@@ -45,7 +45,7 @@ type NLMWhoIsRouterToNetworkExactly interface {
// _NLMWhoIsRouterToNetwork is the data-structure of this message
type _NLMWhoIsRouterToNetwork struct {
*_NLM
- DestinationNetworkAddress []uint16
+ DestinationNetworkAddress *uint16
}
///////////////////////////////////////////////////////////
@@ -73,7 +73,7 @@ func (m *_NLMWhoIsRouterToNetwork) GetParent() NLM {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *_NLMWhoIsRouterToNetwork) GetDestinationNetworkAddress() []uint16 {
+func (m *_NLMWhoIsRouterToNetwork) GetDestinationNetworkAddress() *uint16 {
return m.DestinationNetworkAddress
}
@@ -83,7 +83,7 @@ func (m *_NLMWhoIsRouterToNetwork) GetDestinationNetworkAddress() []uint16 {
///////////////////////////////////////////////////////////
// NewNLMWhoIsRouterToNetwork factory function for _NLMWhoIsRouterToNetwork
-func NewNLMWhoIsRouterToNetwork(destinationNetworkAddress []uint16, apduLength uint16) *_NLMWhoIsRouterToNetwork {
+func NewNLMWhoIsRouterToNetwork(destinationNetworkAddress *uint16, apduLength uint16) *_NLMWhoIsRouterToNetwork {
_result := &_NLMWhoIsRouterToNetwork{
DestinationNetworkAddress: destinationNetworkAddress,
_NLM: NewNLM(apduLength),
@@ -114,9 +114,9 @@ func (m *_NLMWhoIsRouterToNetwork) GetLengthInBits() uint16 {
func (m *_NLMWhoIsRouterToNetwork) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
- // Array field
- if len(m.DestinationNetworkAddress) > 0 {
- lengthInBits += 16 * uint16(len(m.DestinationNetworkAddress))
+ // Optional Field (destinationNetworkAddress)
+ if m.DestinationNetworkAddress != nil {
+ lengthInBits += 16
}
return lengthInBits
@@ -139,25 +139,14 @@ func NLMWhoIsRouterToNetworkParseWithBuffer(readBuffer utils.ReadBuffer, apduLen
currentPos := positionAware.GetPos()
_ = currentPos
- // Array field (destinationNetworkAddress)
- if pullErr := readBuffer.PullContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pullErr != nil {
- return nil, errors.Wrap(pullErr, "Error pulling for destinationNetworkAddress")
- }
- // Length array
- var destinationNetworkAddress []uint16
+ // Optional Field (destinationNetworkAddress) (Can be skipped, if a given expression evaluates to false)
+ var destinationNetworkAddress *uint16 = nil
{
- _destinationNetworkAddressLength := uint16(apduLength) - uint16(uint16(1))
- _destinationNetworkAddressEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressLength)
- for positionAware.GetPos() < _destinationNetworkAddressEndPos {
- _item, _err := readBuffer.ReadUint16("", 16)
- if _err != nil {
- return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddress' field of NLMWhoIsRouterToNetwork")
- }
- destinationNetworkAddress = append(destinationNetworkAddress, _item)
+ _val, _err := readBuffer.ReadUint16("destinationNetworkAddress", 16)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddress' field of NLMWhoIsRouterToNetwork")
}
- }
- if closeErr := readBuffer.CloseContext("destinationNetworkAddress", utils.WithRenderAsList(true)); closeErr != nil {
- return nil, errors.Wrap(closeErr, "Error closing for destinationNetworkAddress")
+ destinationNetworkAddress = &_val
}
if closeErr := readBuffer.CloseContext("NLMWhoIsRouterToNetwork"); closeErr != nil {
@@ -191,19 +180,15 @@ func (m *_NLMWhoIsRouterToNetwork) SerializeWithWriteBuffer(writeBuffer utils.Wr
return errors.Wrap(pushErr, "Error pushing for NLMWhoIsRouterToNetwork")
}
- // Array Field (destinationNetworkAddress)
- if pushErr := writeBuffer.PushContext("destinationNetworkAddress", utils.WithRenderAsList(true)); pushErr != nil {
- return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddress")
- }
- for _, _element := range m.GetDestinationNetworkAddress() {
- _elementErr := writeBuffer.WriteUint16("", 16, _element)
- if _elementErr != nil {
- return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddress' field")
+ // Optional Field (destinationNetworkAddress) (Can be skipped, if the value is null)
+ var destinationNetworkAddress *uint16 = nil
+ if m.GetDestinationNetworkAddress() != nil {
+ destinationNetworkAddress = m.GetDestinationNetworkAddress()
+ _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, *(destinationNetworkAddress))
+ if _destinationNetworkAddressErr != nil {
+ return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field")
}
}
- if popErr := writeBuffer.PopContext("destinationNetworkAddress", utils.WithRenderAsList(true)); popErr != nil {
- return errors.Wrap(popErr, "Error popping for destinationNetworkAddress")
- }
if popErr := writeBuffer.PopContext("NLMWhoIsRouterToNetwork"); popErr != nil {
return errors.Wrap(popErr, "Error popping for NLMWhoIsRouterToNetwork")
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index a603410412..e347f9ccaa 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -136,10 +136,10 @@
[virtual bit isVendorProprietaryMessage 'messageType >= 128']
[typeSwitch messageType, isVendorProprietaryMessage
['0x00' *WhoIsRouterToNetwork
- [array uint 16 destinationNetworkAddress length 'apduLength - 1']
+ [optional uint 16 destinationNetworkAddress]
]
['0x01' *IAmRouterToNetwork
- [array uint 16 destinationNetworkAddress length 'apduLength - 1']
+ [array uint 16 destinationNetworkAddresses length 'apduLength - 1']
]
['0x02' *ICouldBeRouterToNetwork
[simple uint 16 destinationNetworkAddress ]
@@ -151,10 +151,10 @@
[simple uint 16 destinationNetworkAddress ]
]
['0x04' *RouterBusyToNetwork
- [array uint 16 destinationNetworkAddress length 'apduLength - 1']
+ [array uint 16 destinationNetworkAddresses length 'apduLength - 1']
]
['0x05' *RouterAvailableToNetwork
- [array uint 16 destinationNetworkAddress length 'apduLength - 1']
+ [array uint 16 destinationNetworkAddresses length 'apduLength - 1']
]
['0x06' *InitalizeRoutingTable
[simple uint 8 numberOfPorts ]