From e611fd13d96cd281a4458f8f0d80c44eea0e320a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20R=C3=BChl?= Date: Tue, 7 Jun 2022 11:25:45 +0200 Subject: [PATCH] refactor(bacnet): rename BACnetConstructedDataSecurityPduTimeout to BACnetConstructedDataSecurityPDUTimeout --- .../readwrite/model/BACnetConstructedData.go | 4 +- ...ACnetConstructedDataSecurityPDUTimeout.go} | 60 +++++++++---------- .../protocols/bacnetip/bacnetip.mspec | 2 +- 3 files changed, 33 insertions(+), 33 deletions(-) rename plc4go/protocols/bacnetip/readwrite/model/{BACnetConstructedDataSecurityPduTimeout.go => BACnetConstructedDataSecurityPDUTimeout.go} (74%) diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go index b2c29a3a77a..7fe03cda59d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go @@ -580,8 +580,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob _child, typeSwitchError = BACnetConstructedDataScheduleDefaultParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument) case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURED_STATUS: // BACnetConstructedDataSecuredStatus _child, typeSwitchError = BACnetConstructedDataSecuredStatusParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument) - case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT: // BACnetConstructedDataSecurityPduTimeout - _child, typeSwitchError = BACnetConstructedDataSecurityPduTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument) + case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT: // BACnetConstructedDataSecurityPDUTimeout + _child, typeSwitchError = BACnetConstructedDataSecurityPDUTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument) case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_TIME_WINDOW: // BACnetConstructedDataSecurityTimeWindow _child, typeSwitchError = BACnetConstructedDataSecurityTimeWindowParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument) case true && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_CHANGE_VALUES: // BACnetConstructedDataStateChangeValues diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPduTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go similarity index 74% rename from plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPduTimeout.go rename to plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go index ac4bf87081e..5d2be660a29 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPduTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go @@ -26,8 +26,8 @@ import ( // Code generated by code-generation. DO NOT EDIT. -// BACnetConstructedDataSecurityPduTimeout is the data-structure of this message -type BACnetConstructedDataSecurityPduTimeout struct { +// BACnetConstructedDataSecurityPDUTimeout is the data-structure of this message +type BACnetConstructedDataSecurityPDUTimeout struct { *BACnetConstructedData SecurityPduTimeout *BACnetApplicationTagUnsignedInteger @@ -35,8 +35,8 @@ type BACnetConstructedDataSecurityPduTimeout struct { TagNumber uint8 } -// IBACnetConstructedDataSecurityPduTimeout is the corresponding interface of BACnetConstructedDataSecurityPduTimeout -type IBACnetConstructedDataSecurityPduTimeout interface { +// IBACnetConstructedDataSecurityPDUTimeout is the corresponding interface of BACnetConstructedDataSecurityPDUTimeout +type IBACnetConstructedDataSecurityPDUTimeout interface { IBACnetConstructedData // GetSecurityPduTimeout returns SecurityPduTimeout (property field) GetSecurityPduTimeout() *BACnetApplicationTagUnsignedInteger @@ -53,11 +53,11 @@ type IBACnetConstructedDataSecurityPduTimeout interface { /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *BACnetConstructedDataSecurityPduTimeout) GetObjectTypeArgument() BACnetObjectType { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetObjectTypeArgument() BACnetObjectType { return 0 } -func (m *BACnetConstructedDataSecurityPduTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { return BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT } @@ -66,12 +66,12 @@ func (m *BACnetConstructedDataSecurityPduTimeout) GetPropertyIdentifierArgument( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *BACnetConstructedDataSecurityPduTimeout) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) { +func (m *BACnetConstructedDataSecurityPDUTimeout) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) { m.BACnetConstructedData.OpeningTag = openingTag m.BACnetConstructedData.ClosingTag = closingTag } -func (m *BACnetConstructedDataSecurityPduTimeout) GetParent() *BACnetConstructedData { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetParent() *BACnetConstructedData { return m.BACnetConstructedData } @@ -80,7 +80,7 @@ func (m *BACnetConstructedDataSecurityPduTimeout) GetParent() *BACnetConstructed /////////////////////// Accessors for property fields. /////////////////////// -func (m *BACnetConstructedDataSecurityPduTimeout) GetSecurityPduTimeout() *BACnetApplicationTagUnsignedInteger { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetSecurityPduTimeout() *BACnetApplicationTagUnsignedInteger { return m.SecurityPduTimeout } @@ -89,9 +89,9 @@ func (m *BACnetConstructedDataSecurityPduTimeout) GetSecurityPduTimeout() *BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -// NewBACnetConstructedDataSecurityPduTimeout factory function for BACnetConstructedDataSecurityPduTimeout -func NewBACnetConstructedDataSecurityPduTimeout(securityPduTimeout *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSecurityPduTimeout { - _result := &BACnetConstructedDataSecurityPduTimeout{ +// NewBACnetConstructedDataSecurityPDUTimeout factory function for BACnetConstructedDataSecurityPDUTimeout +func NewBACnetConstructedDataSecurityPDUTimeout(securityPduTimeout *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSecurityPDUTimeout { + _result := &BACnetConstructedDataSecurityPDUTimeout{ SecurityPduTimeout: securityPduTimeout, BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber), } @@ -99,31 +99,31 @@ func NewBACnetConstructedDataSecurityPduTimeout(securityPduTimeout *BACnetApplic return _result } -func CastBACnetConstructedDataSecurityPduTimeout(structType interface{}) *BACnetConstructedDataSecurityPduTimeout { - if casted, ok := structType.(BACnetConstructedDataSecurityPduTimeout); ok { +func CastBACnetConstructedDataSecurityPDUTimeout(structType interface{}) *BACnetConstructedDataSecurityPDUTimeout { + if casted, ok := structType.(BACnetConstructedDataSecurityPDUTimeout); ok { return &casted } - if casted, ok := structType.(*BACnetConstructedDataSecurityPduTimeout); ok { + if casted, ok := structType.(*BACnetConstructedDataSecurityPDUTimeout); ok { return casted } if casted, ok := structType.(BACnetConstructedData); ok { - return CastBACnetConstructedDataSecurityPduTimeout(casted.Child) + return CastBACnetConstructedDataSecurityPDUTimeout(casted.Child) } if casted, ok := structType.(*BACnetConstructedData); ok { - return CastBACnetConstructedDataSecurityPduTimeout(casted.Child) + return CastBACnetConstructedDataSecurityPDUTimeout(casted.Child) } return nil } -func (m *BACnetConstructedDataSecurityPduTimeout) GetTypeName() string { - return "BACnetConstructedDataSecurityPduTimeout" +func (m *BACnetConstructedDataSecurityPDUTimeout) GetTypeName() string { + return "BACnetConstructedDataSecurityPDUTimeout" } -func (m *BACnetConstructedDataSecurityPduTimeout) GetLengthInBits() uint16 { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetLengthInBits() uint16 { return m.GetLengthInBitsConditional(false) } -func (m *BACnetConstructedDataSecurityPduTimeout) GetLengthInBitsConditional(lastItem bool) uint16 { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetLengthInBitsConditional(lastItem bool) uint16 { lengthInBits := uint16(m.GetParentLengthInBits()) // Simple field (securityPduTimeout) @@ -132,14 +132,14 @@ func (m *BACnetConstructedDataSecurityPduTimeout) GetLengthInBitsConditional(las return lengthInBits } -func (m *BACnetConstructedDataSecurityPduTimeout) GetLengthInBytes() uint16 { +func (m *BACnetConstructedDataSecurityPDUTimeout) GetLengthInBytes() uint16 { return m.GetLengthInBits() / 8 } -func BACnetConstructedDataSecurityPduTimeoutParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSecurityPduTimeout, error) { +func BACnetConstructedDataSecurityPDUTimeoutParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSecurityPDUTimeout, error) { positionAware := readBuffer _ = positionAware - if pullErr := readBuffer.PullContext("BACnetConstructedDataSecurityPduTimeout"); pullErr != nil { + if pullErr := readBuffer.PullContext("BACnetConstructedDataSecurityPDUTimeout"); pullErr != nil { return nil, pullErr } currentPos := positionAware.GetPos() @@ -158,12 +158,12 @@ func BACnetConstructedDataSecurityPduTimeoutParse(readBuffer utils.ReadBuffer, t return nil, closeErr } - if closeErr := readBuffer.CloseContext("BACnetConstructedDataSecurityPduTimeout"); closeErr != nil { + if closeErr := readBuffer.CloseContext("BACnetConstructedDataSecurityPDUTimeout"); closeErr != nil { return nil, closeErr } // Create a partially initialized instance - _child := &BACnetConstructedDataSecurityPduTimeout{ + _child := &BACnetConstructedDataSecurityPDUTimeout{ SecurityPduTimeout: CastBACnetApplicationTagUnsignedInteger(securityPduTimeout), BACnetConstructedData: &BACnetConstructedData{}, } @@ -171,11 +171,11 @@ func BACnetConstructedDataSecurityPduTimeoutParse(readBuffer utils.ReadBuffer, t return _child, nil } -func (m *BACnetConstructedDataSecurityPduTimeout) Serialize(writeBuffer utils.WriteBuffer) error { +func (m *BACnetConstructedDataSecurityPDUTimeout) Serialize(writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware ser := func() error { - if pushErr := writeBuffer.PushContext("BACnetConstructedDataSecurityPduTimeout"); pushErr != nil { + if pushErr := writeBuffer.PushContext("BACnetConstructedDataSecurityPDUTimeout"); pushErr != nil { return pushErr } @@ -191,7 +191,7 @@ func (m *BACnetConstructedDataSecurityPduTimeout) Serialize(writeBuffer utils.Wr return errors.Wrap(_securityPduTimeoutErr, "Error serializing 'securityPduTimeout' field") } - if popErr := writeBuffer.PopContext("BACnetConstructedDataSecurityPduTimeout"); popErr != nil { + if popErr := writeBuffer.PopContext("BACnetConstructedDataSecurityPDUTimeout"); popErr != nil { return popErr } return nil @@ -199,7 +199,7 @@ func (m *BACnetConstructedDataSecurityPduTimeout) Serialize(writeBuffer utils.Wr return m.SerializeParent(writeBuffer, m, ser) } -func (m *BACnetConstructedDataSecurityPduTimeout) String() string { +func (m *BACnetConstructedDataSecurityPDUTimeout) String() string { if m == nil { return "" } diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec index e5f9fb12ff8..787df7bd15b 100644 --- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec +++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec @@ -3257,7 +3257,7 @@ [*, 'SECURED_STATUS' BACnetConstructedDataSecuredStatus [simple BACnetDoorSecuredStatusTagged('0', 'TagClass.APPLICATION_TAGS') securedStatus ] ] - [*, 'SECURITY_PDU_TIMEOUT' BACnetConstructedDataSecurityPduTimeout + [*, 'SECURITY_PDU_TIMEOUT' BACnetConstructedDataSecurityPDUTimeout [simple BACnetApplicationTagUnsignedInteger securityPduTimeout ] ] [*, 'SECURITY_TIME_WINDOW' BACnetConstructedDataSecurityTimeWindow