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/07/18 13:01:09 UTC
[plc4x] 02/02: feat(cbus): implemented security application
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
commit c18171e203e651198b072b58602aba9a7b35f47f
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Jul 18 15:00:58 2022 +0200
feat(cbus): implemented security application
---
plc4go/protocols/cbus/readwrite/ParserHelper.go | 128 +-
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 142 +-
.../cbus/readwrite/model/LightingDataLabel.go | 2 +-
.../protocols/cbus/readwrite/model/PanicStatus.go | 217 ++
.../cbus/readwrite/model/SALDataSecurity.go | 54 +-
.../cbus/readwrite/model/SecurityArmCode.go | 251 +++
.../cbus/readwrite/model/SecurityCommandType.go | 137 ++
.../model/SecurityCommandTypeContainer.go | 2070 ++++++++++++++++++++
.../protocols/cbus/readwrite/model/SecurityData.go | 363 ++++
.../cbus/readwrite/model/SecurityDataAlarmOff.go | 155 ++
.../cbus/readwrite/model/SecurityDataAlarmOn.go | 155 ++
.../model/SecurityDataArmFailedCleared.go | 155 ++
.../readwrite/model/SecurityDataArmFailedRaised.go | 155 ++
.../model/SecurityDataArmReadyNotReady.go | 191 ++
.../cbus/readwrite/model/SecurityDataArmSystem.go | 302 +++
.../model/SecurityDataCurrentAlarmType.go | 155 ++
.../readwrite/model/SecurityDataDisplayMessage.go | 191 ++
.../cbus/readwrite/model/SecurityDataDropTamper.go | 155 ++
.../readwrite/model/SecurityDataEmulatedKeypad.go | 387 ++++
.../model/SecurityDataEntryDelayStarted.go | 155 ++
.../cbus/readwrite/model/SecurityDataEvent.go | 191 ++
.../model/SecurityDataExitDelayStarted.go | 155 ++
.../model/SecurityDataFireAlarmCleared.go | 155 ++
.../readwrite/model/SecurityDataFireAlarmRaised.go | 155 ++
.../readwrite/model/SecurityDataGasAlarmCleared.go | 155 ++
.../readwrite/model/SecurityDataGasAlarmRaised.go | 155 ++
.../model/SecurityDataLineCutAlarmCleared.go | 155 ++
.../model/SecurityDataLineCutAlarmRaised.go | 155 ++
.../model/SecurityDataLowBatteryCharging.go | 234 +++
.../model/SecurityDataLowBatteryCorrected.go | 155 ++
.../model/SecurityDataLowBatteryDetected.go | 155 ++
.../readwrite/model/SecurityDataMainsFailure.go | 155 ++
.../model/SecurityDataMainsRestoredOrApplied.go | 155 ++
.../cbus/readwrite/model/SecurityDataOff.go | 191 ++
.../cbus/readwrite/model/SecurityDataOn.go | 191 ++
.../model/SecurityDataOtherAlarmCleared.go | 155 ++
.../model/SecurityDataOtherAlarmRaised.go | 155 ++
.../readwrite/model/SecurityDataPanicActivated.go | 155 ++
.../readwrite/model/SecurityDataPanicCleared.go | 155 ++
.../model/SecurityDataPasswordEntryStatus.go | 285 +++
.../cbus/readwrite/model/SecurityDataRaiseAlarm.go | 155 ++
.../readwrite/model/SecurityDataRaiseTamper.go | 155 ++
.../readwrite/model/SecurityDataRequestZoneName.go | 191 ++
.../readwrite/model/SecurityDataStatus1Request.go | 155 ++
.../readwrite/model/SecurityDataStatus2Request.go | 155 ++
.../readwrite/model/SecurityDataStatusReport1.go | 330 ++++
.../readwrite/model/SecurityDataStatusReport2.go | 219 +++
.../model/SecurityDataSystemArmedDisarmed.go | 202 ++
.../readwrite/model/SecurityDataSystemDisarmed.go | 155 ++
.../cbus/readwrite/model/SecurityDataTamperOff.go | 155 ++
.../cbus/readwrite/model/SecurityDataTamperOn.go | 155 ++
.../readwrite/model/SecurityDataZoneIsolated.go | 191 ++
.../cbus/readwrite/model/SecurityDataZoneName.go | 217 ++
.../cbus/readwrite/model/SecurityDataZoneOpen.go | 191 ++
.../cbus/readwrite/model/SecurityDataZoneSealed.go | 191 ++
.../cbus/readwrite/model/SecurityDataZoneShort.go | 191 ++
.../readwrite/model/SecurityDataZoneUnsealed.go | 191 ++
.../protocols/cbus/readwrite/model/StaticHelper.go | 10 +
.../protocols/cbus/readwrite/model/TamperStatus.go | 217 ++
.../model/{CommandHeader.go => ZoneStatus.go} | 91 +-
.../cbus/readwrite/model/ZoneStatusTemp.go | 145 ++
.../java/cbus/readwrite/utils/StaticHelper.java | 11 +
.../org/apache/plc4x/java/cbus/ReferenceTest.java | 1 -
.../src/main/resources/protocols/cbus/c-bus.mspec | 321 ++-
64 files changed, 12753 insertions(+), 179 deletions(-)
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index 0f26aec42..74857ed4c 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -32,27 +32,12 @@ type CbusParserHelper struct {
func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.ReadBuffer) (interface{}, error) {
switch typeName {
- case "CALData":
- var requestContext model.RequestContext
- return model.CALDataParse(io, requestContext)
case "ApplicationAddress2":
return model.ApplicationAddress2Parse(io)
case "ApplicationAddress1":
return model.ApplicationAddress1Parse(io)
- case "Checksum":
- return model.ChecksumParse(io)
case "RequestContext":
return model.RequestContextParse(io)
- case "CALReply":
- var cBusOptions model.CBusOptions
- var requestContext model.RequestContext
- return model.CALReplyParse(io, cBusOptions, requestContext)
- case "CustomManufacturer":
- return model.CustomManufacturerParse(io)
- case "LightingData":
- return model.LightingDataParse(io)
- case "NetworkRoute":
- return model.NetworkRouteParse(io)
case "NetworkNumber":
return model.NetworkNumberParse(io)
case "RequestTermination":
@@ -65,8 +50,6 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
}
var requestContext model.RequestContext
return model.ReplyOrConfirmationParse(io, cBusOptions, messageLength, requestContext)
- case "StandardFormatStatusReply":
- return model.StandardFormatStatusReplyParse(io)
case "CBusMessage":
isResponse, err := utils.StrToBool(arguments[0])
if err != nil {
@@ -79,29 +62,14 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return nil, errors.Wrap(err, "Error parsing")
}
return model.CBusMessageParse(io, isResponse, requestContext, cBusOptions, messageLength)
- case "ResponseTermination":
- return model.ResponseTerminationParse(io)
case "CBusOptions":
return model.CBusOptionsParse(io)
- case "SALData":
- applicationId, _ := model.ApplicationIdByName(arguments[0])
- return model.SALDataParse(io, applicationId)
- case "CBusCommand":
- var cBusOptions model.CBusOptions
- return model.CBusCommandParse(io, cBusOptions)
- case "IdentifyReplyCommand":
- attribute, _ := model.AttributeByName(arguments[0])
- numBytes, err := utils.StrToUint8(arguments[1])
- if err != nil {
- return nil, errors.Wrap(err, "Error parsing")
- }
- return model.IdentifyReplyCommandParse(io, attribute, numBytes)
case "CALDataOrSetParameter":
return model.CALDataOrSetParameterParse(io)
+ case "PanicStatus":
+ return model.PanicStatusParse(io)
case "IdentifyReplyCommandUnitSummary":
return model.IdentifyReplyCommandUnitSummaryParse(io)
- case "CBusConstants":
- return model.CBusConstantsParse(io)
case "BridgeCount":
return model.BridgeCountParse(io)
case "PowerUp":
@@ -114,56 +82,34 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
}
var requestContext model.RequestContext
return model.ReplyParse(io, cBusOptions, replyLength, requestContext)
- case "SerialInterfaceAddress":
- return model.SerialInterfaceAddressParse(io)
case "InterfaceOptions1PowerUpSettings":
return model.InterfaceOptions1PowerUpSettingsParse(io)
- case "BridgeAddress":
- return model.BridgeAddressParse(io)
case "MonitoredSAL":
var cBusOptions model.CBusOptions
return model.MonitoredSALParse(io, cBusOptions)
case "ParameterChange":
return model.ParameterChangeParse(io)
- case "StatusByte":
- return model.StatusByteParse(io)
- case "LightingLabelOptions":
- return model.LightingLabelOptionsParse(io)
case "ReplyNetwork":
return model.ReplyNetworkParse(io)
case "SerialNumber":
return model.SerialNumberParse(io)
- case "ExtendedStatusHeader":
- return model.ExtendedStatusHeaderParse(io)
- case "CustomTypes":
- return model.CustomTypesParse(io)
- case "CommandHeader":
- return model.CommandHeaderParse(io)
case "Confirmation":
return model.ConfirmationParse(io)
case "CBusPointToMultiPointCommand":
var cBusOptions model.CBusOptions
return model.CBusPointToMultiPointCommandParse(io, cBusOptions)
- case "StatusHeader":
- return model.StatusHeaderParse(io)
case "StatusRequest":
return model.StatusRequestParse(io)
- case "EncodedReply":
- var cBusOptions model.CBusOptions
- var requestContext model.RequestContext
- return model.EncodedReplyParse(io, cBusOptions, requestContext)
case "InterfaceOptions3":
return model.InterfaceOptions3Parse(io)
case "InterfaceOptions1":
return model.InterfaceOptions1Parse(io)
case "InterfaceOptions2":
return model.InterfaceOptions2Parse(io)
- case "UnitAddress":
- return model.UnitAddressParse(io)
+ case "SecurityData":
+ return model.SecurityDataParse(io)
case "NetworkProtocolControlInformation":
return model.NetworkProtocolControlInformationParse(io)
- case "ExtendedFormatStatusReply":
- return model.ExtendedFormatStatusReplyParse(io)
case "CBusHeader":
return model.CBusHeaderParse(io)
case "Request":
@@ -173,11 +119,73 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return nil, errors.Wrap(err, "Error parsing")
}
return model.RequestParse(io, cBusOptions, messageLength)
+ case "Alpha":
+ return model.AlphaParse(io)
+ case "CALData":
+ var requestContext model.RequestContext
+ return model.CALDataParse(io, requestContext)
+ case "Checksum":
+ return model.ChecksumParse(io)
+ case "CALReply":
+ var cBusOptions model.CBusOptions
+ var requestContext model.RequestContext
+ return model.CALReplyParse(io, cBusOptions, requestContext)
+ case "CustomManufacturer":
+ return model.CustomManufacturerParse(io)
+ case "LightingData":
+ return model.LightingDataParse(io)
+ case "NetworkRoute":
+ return model.NetworkRouteParse(io)
+ case "StandardFormatStatusReply":
+ return model.StandardFormatStatusReplyParse(io)
+ case "ResponseTermination":
+ return model.ResponseTerminationParse(io)
+ case "SALData":
+ applicationId, _ := model.ApplicationIdByName(arguments[0])
+ return model.SALDataParse(io, applicationId)
+ case "CBusCommand":
+ var cBusOptions model.CBusOptions
+ return model.CBusCommandParse(io, cBusOptions)
+ case "TamperStatus":
+ return model.TamperStatusParse(io)
+ case "IdentifyReplyCommand":
+ attribute, _ := model.AttributeByName(arguments[0])
+ numBytes, err := utils.StrToUint8(arguments[1])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ return model.IdentifyReplyCommandParse(io, attribute, numBytes)
+ case "CBusConstants":
+ return model.CBusConstantsParse(io)
+ case "SerialInterfaceAddress":
+ return model.SerialInterfaceAddressParse(io)
+ case "ZoneStatus":
+ return model.ZoneStatusParse(io)
+ case "BridgeAddress":
+ return model.BridgeAddressParse(io)
+ case "StatusByte":
+ return model.StatusByteParse(io)
+ case "LightingLabelOptions":
+ return model.LightingLabelOptionsParse(io)
+ case "ExtendedStatusHeader":
+ return model.ExtendedStatusHeaderParse(io)
+ case "CustomTypes":
+ return model.CustomTypesParse(io)
+ case "StatusHeader":
+ return model.StatusHeaderParse(io)
+ case "EncodedReply":
+ var cBusOptions model.CBusOptions
+ var requestContext model.RequestContext
+ return model.EncodedReplyParse(io, cBusOptions, requestContext)
+ case "UnitAddress":
+ return model.UnitAddressParse(io)
+ case "ExtendedFormatStatusReply":
+ return model.ExtendedFormatStatusReplyParse(io)
+ case "SecurityArmCode":
+ return model.SecurityArmCodeParse(io)
case "CBusPointToPointCommand":
var cBusOptions model.CBusOptions
return model.CBusPointToPointCommandParse(io, cBusOptions)
- case "Alpha":
- return model.AlphaParse(io)
case "CBusPointToPointToMultipointCommand":
var cBusOptions model.CBusOptions
return model.CBusPointToPointToMultipointCommandParse(io, cBusOptions)
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index 9f13b6c63..52eda8cc5 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -42,30 +42,12 @@ func init() {
func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) {
switch typeName {
- case "CALData":
- // TODO: find a way to parse the sub types
- var requestContext model.RequestContext
- return model.CALDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), requestContext)
case "ApplicationAddress2":
return model.ApplicationAddress2Parse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "ApplicationAddress1":
return model.ApplicationAddress1Parse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "Checksum":
- return model.ChecksumParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "RequestContext":
return model.RequestContextParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "CALReply":
- // TODO: find a way to parse the sub types
- var cBusOptions model.CBusOptions
- // TODO: find a way to parse the sub types
- var requestContext model.RequestContext
- return model.CALReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext)
- case "CustomManufacturer":
- return model.CustomManufacturerParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "LightingData":
- return model.LightingDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "NetworkRoute":
- return model.NetworkRouteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "NetworkNumber":
return model.NetworkNumberParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "RequestTermination":
@@ -81,8 +63,6 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
// TODO: find a way to parse the sub types
var requestContext model.RequestContext
return model.ReplyOrConfirmationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, messageLength, requestContext)
- case "StandardFormatStatusReply":
- return model.StandardFormatStatusReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusMessage":
isResponse := parserArguments[0] == "true"
// TODO: find a way to parse the sub types
@@ -95,31 +75,14 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
}
messageLength := uint16(parsedUint3)
return model.CBusMessageParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), isResponse, requestContext, cBusOptions, messageLength)
- case "ResponseTermination":
- return model.ResponseTerminationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusOptions":
return model.CBusOptionsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "SALData":
- applicationId, _ := model.ApplicationIdByName(parserArguments[0])
- return model.SALDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), applicationId)
- case "CBusCommand":
- // TODO: find a way to parse the sub types
- var cBusOptions model.CBusOptions
- return model.CBusCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
- case "IdentifyReplyCommand":
- attribute, _ := model.AttributeByName(parserArguments[0])
- parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 5)
- if err != nil {
- return nil, err
- }
- numBytes := uint8(parsedUint1)
- return model.IdentifyReplyCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), attribute, numBytes)
case "CALDataOrSetParameter":
return model.CALDataOrSetParameterParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "PanicStatus":
+ return model.PanicStatusParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "IdentifyReplyCommandUnitSummary":
return model.IdentifyReplyCommandUnitSummaryParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "CBusConstants":
- return model.CBusConstantsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BridgeCount":
return model.BridgeCountParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "PowerUp":
@@ -135,60 +98,36 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
// TODO: find a way to parse the sub types
var requestContext model.RequestContext
return model.ReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, replyLength, requestContext)
- case "SerialInterfaceAddress":
- return model.SerialInterfaceAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "InterfaceOptions1PowerUpSettings":
return model.InterfaceOptions1PowerUpSettingsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "BridgeAddress":
- return model.BridgeAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "MonitoredSAL":
// TODO: find a way to parse the sub types
var cBusOptions model.CBusOptions
return model.MonitoredSALParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
case "ParameterChange":
return model.ParameterChangeParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "StatusByte":
- return model.StatusByteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "LightingLabelOptions":
- return model.LightingLabelOptionsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "ReplyNetwork":
return model.ReplyNetworkParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "SerialNumber":
return model.SerialNumberParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "ExtendedStatusHeader":
- return model.ExtendedStatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "CustomTypes":
- return model.CustomTypesParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "CommandHeader":
- return model.CommandHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "Confirmation":
return model.ConfirmationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusPointToMultiPointCommand":
// TODO: find a way to parse the sub types
var cBusOptions model.CBusOptions
return model.CBusPointToMultiPointCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
- case "StatusHeader":
- return model.StatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "StatusRequest":
return model.StatusRequestParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "EncodedReply":
- // TODO: find a way to parse the sub types
- var cBusOptions model.CBusOptions
- // TODO: find a way to parse the sub types
- var requestContext model.RequestContext
- return model.EncodedReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext)
case "InterfaceOptions3":
return model.InterfaceOptions3Parse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "InterfaceOptions1":
return model.InterfaceOptions1Parse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "InterfaceOptions2":
return model.InterfaceOptions2Parse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "UnitAddress":
- return model.UnitAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "SecurityData":
+ return model.SecurityDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "NetworkProtocolControlInformation":
return model.NetworkProtocolControlInformationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
- case "ExtendedFormatStatusReply":
- return model.ExtendedFormatStatusReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusHeader":
return model.CBusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "Request":
@@ -200,12 +139,81 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
}
messageLength := uint16(parsedUint1)
return model.RequestParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, messageLength)
+ case "Alpha":
+ return model.AlphaParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "CALData":
+ // TODO: find a way to parse the sub types
+ var requestContext model.RequestContext
+ return model.CALDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), requestContext)
+ case "Checksum":
+ return model.ChecksumParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "CALReply":
+ // TODO: find a way to parse the sub types
+ var cBusOptions model.CBusOptions
+ // TODO: find a way to parse the sub types
+ var requestContext model.RequestContext
+ return model.CALReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext)
+ case "CustomManufacturer":
+ return model.CustomManufacturerParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "LightingData":
+ return model.LightingDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "NetworkRoute":
+ return model.NetworkRouteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "StandardFormatStatusReply":
+ return model.StandardFormatStatusReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "ResponseTermination":
+ return model.ResponseTerminationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "SALData":
+ applicationId, _ := model.ApplicationIdByName(parserArguments[0])
+ return model.SALDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), applicationId)
+ case "CBusCommand":
+ // TODO: find a way to parse the sub types
+ var cBusOptions model.CBusOptions
+ return model.CBusCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
+ case "TamperStatus":
+ return model.TamperStatusParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "IdentifyReplyCommand":
+ attribute, _ := model.AttributeByName(parserArguments[0])
+ parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 5)
+ if err != nil {
+ return nil, err
+ }
+ numBytes := uint8(parsedUint1)
+ return model.IdentifyReplyCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), attribute, numBytes)
+ case "CBusConstants":
+ return model.CBusConstantsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "SerialInterfaceAddress":
+ return model.SerialInterfaceAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "ZoneStatus":
+ return model.ZoneStatusParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "BridgeAddress":
+ return model.BridgeAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "StatusByte":
+ return model.StatusByteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "LightingLabelOptions":
+ return model.LightingLabelOptionsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "ExtendedStatusHeader":
+ return model.ExtendedStatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "CustomTypes":
+ return model.CustomTypesParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "StatusHeader":
+ return model.StatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "EncodedReply":
+ // TODO: find a way to parse the sub types
+ var cBusOptions model.CBusOptions
+ // TODO: find a way to parse the sub types
+ var requestContext model.RequestContext
+ return model.EncodedReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext)
+ case "UnitAddress":
+ return model.UnitAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "ExtendedFormatStatusReply":
+ return model.ExtendedFormatStatusReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "SecurityArmCode":
+ return model.SecurityArmCodeParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusPointToPointCommand":
// TODO: find a way to parse the sub types
var cBusOptions model.CBusOptions
return model.CBusPointToPointCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
- case "Alpha":
- return model.AlphaParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusPointToPointToMultipointCommand":
// TODO: find a way to parse the sub types
var cBusOptions model.CBusOptions
diff --git a/plc4go/protocols/cbus/readwrite/model/LightingDataLabel.go b/plc4go/protocols/cbus/readwrite/model/LightingDataLabel.go
index 708bcd200..ddd6e5463 100644
--- a/plc4go/protocols/cbus/readwrite/model/LightingDataLabel.go
+++ b/plc4go/protocols/cbus/readwrite/model/LightingDataLabel.go
@@ -204,7 +204,7 @@ func LightingDataLabelParse(readBuffer utils.ReadBuffer, commandTypeContainer Li
}
}
// Byte Array field (data)
- numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(utils.InlineIf(bool(bool((labelOptions.GetLabelType()) != (LightingLabelType_LOAD_DYNAMIC_ICON))), func() interface{} { return uint16(uint16(3)) }, func() interface{} { return uint16(uint16(2)) }).(uint16))))
+ numberOfBytesdata := int(uint16(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(utils.InlineIf(bool(bool((labelOptions.GetLabelType()) != (LightingLabelType_LOAD_DYNAMIC_ICON))), func() interface{} { return uint16(uint16(uint16(3))) }, func() interface{} { return uint16(uint16(uint16(2))) }).(uint16)))))
data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
if _readArrayErr != nil {
return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of LightingDataLabel")
diff --git a/plc4go/protocols/cbus/readwrite/model/PanicStatus.go b/plc4go/protocols/cbus/readwrite/model/PanicStatus.go
new file mode 100644
index 000000000..7769c1c1a
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/PanicStatus.go
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// PanicStatus is the corresponding interface of PanicStatus
+type PanicStatus interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetStatus returns Status (property field)
+ GetStatus() uint8
+ // GetIsNoPanic returns IsNoPanic (virtual field)
+ GetIsNoPanic() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+ // GetIsPanicCurrentlyActive returns IsPanicCurrentlyActive (virtual field)
+ GetIsPanicCurrentlyActive() bool
+}
+
+// PanicStatusExactly can be used when we want exactly this type and not a type which fulfills PanicStatus.
+// This is useful for switch cases.
+type PanicStatusExactly interface {
+ PanicStatus
+ isPanicStatus() bool
+}
+
+// _PanicStatus is the data-structure of this message
+type _PanicStatus struct {
+ Status uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_PanicStatus) GetStatus() uint8 {
+ return m.Status
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_PanicStatus) GetIsNoPanic() bool {
+ return bool(bool((m.GetStatus()) == (0x00)))
+}
+
+func (m *_PanicStatus) GetIsReserved() bool {
+ return bool(bool(bool((m.GetStatus()) >= (0x01))) && bool(bool((m.GetStatus()) <= (0xFE))))
+}
+
+func (m *_PanicStatus) GetIsPanicCurrentlyActive() bool {
+ return bool(bool((m.GetStatus()) > (0xFE)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewPanicStatus factory function for _PanicStatus
+func NewPanicStatus(status uint8) *_PanicStatus {
+ return &_PanicStatus{Status: status}
+}
+
+// Deprecated: use the interface for direct cast
+func CastPanicStatus(structType interface{}) PanicStatus {
+ if casted, ok := structType.(PanicStatus); ok {
+ return casted
+ }
+ if casted, ok := structType.(*PanicStatus); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_PanicStatus) GetTypeName() string {
+ return "PanicStatus"
+}
+
+func (m *_PanicStatus) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_PanicStatus) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (status)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_PanicStatus) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func PanicStatusParse(readBuffer utils.ReadBuffer) (PanicStatus, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("PanicStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for PanicStatus")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (status)
+ _status, _statusErr := readBuffer.ReadUint8("status", 8)
+ if _statusErr != nil {
+ return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of PanicStatus")
+ }
+ status := _status
+
+ // Virtual field
+ _isNoPanic := bool((status) == (0x00))
+ isNoPanic := bool(_isNoPanic)
+ _ = isNoPanic
+
+ // Virtual field
+ _isReserved := bool(bool((status) >= (0x01))) && bool(bool((status) <= (0xFE)))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ // Virtual field
+ _isPanicCurrentlyActive := bool((status) > (0xFE))
+ isPanicCurrentlyActive := bool(_isPanicCurrentlyActive)
+ _ = isPanicCurrentlyActive
+
+ if closeErr := readBuffer.CloseContext("PanicStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for PanicStatus")
+ }
+
+ // Create the instance
+ return NewPanicStatus(status), nil
+}
+
+func (m *_PanicStatus) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("PanicStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for PanicStatus")
+ }
+
+ // Simple Field (status)
+ status := uint8(m.GetStatus())
+ _statusErr := writeBuffer.WriteUint8("status", 8, (status))
+ if _statusErr != nil {
+ return errors.Wrap(_statusErr, "Error serializing 'status' field")
+ }
+ // Virtual field
+ if _isNoPanicErr := writeBuffer.WriteVirtual("isNoPanic", m.GetIsNoPanic()); _isNoPanicErr != nil {
+ return errors.Wrap(_isNoPanicErr, "Error serializing 'isNoPanic' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+ // Virtual field
+ if _isPanicCurrentlyActiveErr := writeBuffer.WriteVirtual("isPanicCurrentlyActive", m.GetIsPanicCurrentlyActive()); _isPanicCurrentlyActiveErr != nil {
+ return errors.Wrap(_isPanicCurrentlyActiveErr, "Error serializing 'isPanicCurrentlyActive' field")
+ }
+
+ if popErr := writeBuffer.PopContext("PanicStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for PanicStatus")
+ }
+ return nil
+}
+
+func (m *_PanicStatus) isPanicStatus() bool {
+ return true
+}
+
+func (m *_PanicStatus) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go b/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go
index 77098a0c2..10c5a3ac6 100644
--- a/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go
+++ b/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go
@@ -31,6 +31,8 @@ type SALDataSecurity interface {
utils.LengthAware
utils.Serializable
SALData
+ // GetSecurityData returns SecurityData (property field)
+ GetSecurityData() SecurityData
}
// SALDataSecurityExactly can be used when we want exactly this type and not a type which fulfills SALDataSecurity.
@@ -43,6 +45,7 @@ type SALDataSecurityExactly interface {
// _SALDataSecurity is the data-structure of this message
type _SALDataSecurity struct {
*_SALData
+ SecurityData SecurityData
}
///////////////////////////////////////////////////////////
@@ -67,10 +70,25 @@ func (m *_SALDataSecurity) GetParent() SALData {
return m._SALData
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SALDataSecurity) GetSecurityData() SecurityData {
+ return m.SecurityData
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewSALDataSecurity factory function for _SALDataSecurity
-func NewSALDataSecurity(salData SALData) *_SALDataSecurity {
+func NewSALDataSecurity(securityData SecurityData, salData SALData) *_SALDataSecurity {
_result := &_SALDataSecurity{
- _SALData: NewSALData(salData),
+ SecurityData: securityData,
+ _SALData: NewSALData(salData),
}
_result._SALData._SALDataChildRequirements = _result
return _result
@@ -98,6 +116,9 @@ func (m *_SALDataSecurity) GetLengthInBits() uint16 {
func (m *_SALDataSecurity) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Simple field (securityData)
+ lengthInBits += m.SecurityData.GetLengthInBits()
+
return lengthInBits
}
@@ -114,9 +135,17 @@ func SALDataSecurityParse(readBuffer utils.ReadBuffer, applicationId Application
currentPos := positionAware.GetPos()
_ = currentPos
- // Validation
- if !(bool((1) == (2))) {
- return nil, errors.WithStack(utils.ParseValidationError{"Not yet implemented"})
+ // Simple Field (securityData)
+ if pullErr := readBuffer.PullContext("securityData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for securityData")
+ }
+ _securityData, _securityDataErr := SecurityDataParse(readBuffer)
+ if _securityDataErr != nil {
+ return nil, errors.Wrap(_securityDataErr, "Error parsing 'securityData' field of SALDataSecurity")
+ }
+ securityData := _securityData.(SecurityData)
+ if closeErr := readBuffer.CloseContext("securityData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for securityData")
}
if closeErr := readBuffer.CloseContext("SALDataSecurity"); closeErr != nil {
@@ -125,7 +154,8 @@ func SALDataSecurityParse(readBuffer utils.ReadBuffer, applicationId Application
// Create a partially initialized instance
_child := &_SALDataSecurity{
- _SALData: &_SALData{},
+ SecurityData: securityData,
+ _SALData: &_SALData{},
}
_child._SALData._SALDataChildRequirements = _child
return _child, nil
@@ -139,6 +169,18 @@ func (m *_SALDataSecurity) Serialize(writeBuffer utils.WriteBuffer) error {
return errors.Wrap(pushErr, "Error pushing for SALDataSecurity")
}
+ // Simple Field (securityData)
+ if pushErr := writeBuffer.PushContext("securityData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for securityData")
+ }
+ _securityDataErr := writeBuffer.WriteSerializable(m.GetSecurityData())
+ if popErr := writeBuffer.PopContext("securityData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for securityData")
+ }
+ if _securityDataErr != nil {
+ return errors.Wrap(_securityDataErr, "Error serializing 'securityData' field")
+ }
+
if popErr := writeBuffer.PopContext("SALDataSecurity"); popErr != nil {
return errors.Wrap(popErr, "Error popping for SALDataSecurity")
}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go b/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go
new file mode 100644
index 000000000..26b75aad5
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityArmCode is the corresponding interface of SecurityArmCode
+type SecurityArmCode interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCode returns Code (property field)
+ GetCode() uint8
+ // GetIsDisarmed returns IsDisarmed (virtual field)
+ GetIsDisarmed() bool
+ // GetIsFullyArmed returns IsFullyArmed (virtual field)
+ GetIsFullyArmed() bool
+ // GetIsPartiallyArmed returns IsPartiallyArmed (virtual field)
+ GetIsPartiallyArmed() bool
+ // GetIsArmSubtype returns IsArmSubtype (virtual field)
+ GetIsArmSubtype() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+}
+
+// SecurityArmCodeExactly can be used when we want exactly this type and not a type which fulfills SecurityArmCode.
+// This is useful for switch cases.
+type SecurityArmCodeExactly interface {
+ SecurityArmCode
+ isSecurityArmCode() bool
+}
+
+// _SecurityArmCode is the data-structure of this message
+type _SecurityArmCode struct {
+ Code uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityArmCode) GetCode() uint8 {
+ return m.Code
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_SecurityArmCode) GetIsDisarmed() bool {
+ return bool(bool((m.GetCode()) == (0x00)))
+}
+
+func (m *_SecurityArmCode) GetIsFullyArmed() bool {
+ return bool(bool((m.GetCode()) == (0x01)))
+}
+
+func (m *_SecurityArmCode) GetIsPartiallyArmed() bool {
+ return bool(bool((m.GetCode()) == (0x02)))
+}
+
+func (m *_SecurityArmCode) GetIsArmSubtype() bool {
+ return bool(bool(bool((m.GetCode()) >= (0x03))) && bool(bool((m.GetCode()) <= (0x7F))))
+}
+
+func (m *_SecurityArmCode) GetIsReserved() bool {
+ return bool(bool((m.GetCode()) > (0x7F)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityArmCode factory function for _SecurityArmCode
+func NewSecurityArmCode(code uint8) *_SecurityArmCode {
+ return &_SecurityArmCode{Code: code}
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityArmCode(structType interface{}) SecurityArmCode {
+ if casted, ok := structType.(SecurityArmCode); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityArmCode); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityArmCode) GetTypeName() string {
+ return "SecurityArmCode"
+}
+
+func (m *_SecurityArmCode) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityArmCode) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (code)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_SecurityArmCode) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityArmCodeParse(readBuffer utils.ReadBuffer) (SecurityArmCode, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityArmCode"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityArmCode")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (code)
+ _code, _codeErr := readBuffer.ReadUint8("code", 8)
+ if _codeErr != nil {
+ return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of SecurityArmCode")
+ }
+ code := _code
+
+ // Virtual field
+ _isDisarmed := bool((code) == (0x00))
+ isDisarmed := bool(_isDisarmed)
+ _ = isDisarmed
+
+ // Virtual field
+ _isFullyArmed := bool((code) == (0x01))
+ isFullyArmed := bool(_isFullyArmed)
+ _ = isFullyArmed
+
+ // Virtual field
+ _isPartiallyArmed := bool((code) == (0x02))
+ isPartiallyArmed := bool(_isPartiallyArmed)
+ _ = isPartiallyArmed
+
+ // Virtual field
+ _isArmSubtype := bool(bool((code) >= (0x03))) && bool(bool((code) <= (0x7F)))
+ isArmSubtype := bool(_isArmSubtype)
+ _ = isArmSubtype
+
+ // Virtual field
+ _isReserved := bool((code) > (0x7F))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ if closeErr := readBuffer.CloseContext("SecurityArmCode"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityArmCode")
+ }
+
+ // Create the instance
+ return NewSecurityArmCode(code), nil
+}
+
+func (m *_SecurityArmCode) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("SecurityArmCode"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityArmCode")
+ }
+
+ // Simple Field (code)
+ code := uint8(m.GetCode())
+ _codeErr := writeBuffer.WriteUint8("code", 8, (code))
+ if _codeErr != nil {
+ return errors.Wrap(_codeErr, "Error serializing 'code' field")
+ }
+ // Virtual field
+ if _isDisarmedErr := writeBuffer.WriteVirtual("isDisarmed", m.GetIsDisarmed()); _isDisarmedErr != nil {
+ return errors.Wrap(_isDisarmedErr, "Error serializing 'isDisarmed' field")
+ }
+ // Virtual field
+ if _isFullyArmedErr := writeBuffer.WriteVirtual("isFullyArmed", m.GetIsFullyArmed()); _isFullyArmedErr != nil {
+ return errors.Wrap(_isFullyArmedErr, "Error serializing 'isFullyArmed' field")
+ }
+ // Virtual field
+ if _isPartiallyArmedErr := writeBuffer.WriteVirtual("isPartiallyArmed", m.GetIsPartiallyArmed()); _isPartiallyArmedErr != nil {
+ return errors.Wrap(_isPartiallyArmedErr, "Error serializing 'isPartiallyArmed' field")
+ }
+ // Virtual field
+ if _isArmSubtypeErr := writeBuffer.WriteVirtual("isArmSubtype", m.GetIsArmSubtype()); _isArmSubtypeErr != nil {
+ return errors.Wrap(_isArmSubtypeErr, "Error serializing 'isArmSubtype' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityArmCode"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityArmCode")
+ }
+ return nil
+}
+
+func (m *_SecurityArmCode) isSecurityArmCode() bool {
+ return true
+}
+
+func (m *_SecurityArmCode) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go b/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go
new file mode 100644
index 000000000..d35619620
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityCommandType is an enum
+type SecurityCommandType uint8
+
+type ISecurityCommandType interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ SecurityCommandType_OFF SecurityCommandType = 0x00
+ SecurityCommandType_ON SecurityCommandType = 0x01
+ SecurityCommandType_EVENT SecurityCommandType = 0x02
+)
+
+var SecurityCommandTypeValues []SecurityCommandType
+
+func init() {
+ _ = errors.New
+ SecurityCommandTypeValues = []SecurityCommandType{
+ SecurityCommandType_OFF,
+ SecurityCommandType_ON,
+ SecurityCommandType_EVENT,
+ }
+}
+
+func SecurityCommandTypeByValue(value uint8) (enum SecurityCommandType, ok bool) {
+ switch value {
+ case 0x00:
+ return SecurityCommandType_OFF, true
+ case 0x01:
+ return SecurityCommandType_ON, true
+ case 0x02:
+ return SecurityCommandType_EVENT, true
+ }
+ return 0, false
+}
+
+func SecurityCommandTypeByName(value string) (enum SecurityCommandType, ok bool) {
+ switch value {
+ case "OFF":
+ return SecurityCommandType_OFF, true
+ case "ON":
+ return SecurityCommandType_ON, true
+ case "EVENT":
+ return SecurityCommandType_EVENT, true
+ }
+ return 0, false
+}
+
+func SecurityCommandTypeKnows(value uint8) bool {
+ for _, typeValue := range SecurityCommandTypeValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastSecurityCommandType(structType interface{}) SecurityCommandType {
+ castFunc := func(typ interface{}) SecurityCommandType {
+ if sSecurityCommandType, ok := typ.(SecurityCommandType); ok {
+ return sSecurityCommandType
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m SecurityCommandType) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m SecurityCommandType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityCommandTypeParse(readBuffer utils.ReadBuffer) (SecurityCommandType, error) {
+ val, err := readBuffer.ReadUint8("SecurityCommandType", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading SecurityCommandType")
+ }
+ if enum, ok := SecurityCommandTypeByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return SecurityCommandType(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e SecurityCommandType) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("SecurityCommandType", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e SecurityCommandType) PLC4XEnumName() string {
+ switch e {
+ case SecurityCommandType_OFF:
+ return "OFF"
+ case SecurityCommandType_ON:
+ return "ON"
+ case SecurityCommandType_EVENT:
+ return "EVENT"
+ }
+ return ""
+}
+
+func (e SecurityCommandType) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go
new file mode 100644
index 000000000..642d1f3da
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go
@@ -0,0 +1,2070 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityCommandTypeContainer is an enum
+type SecurityCommandTypeContainer uint8
+
+type ISecurityCommandTypeContainer interface {
+ NumBytes() uint8
+ CommandType() SecurityCommandType
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ SecurityCommandTypeContainer_SecurityCommandOff_0Bytes SecurityCommandTypeContainer = 0x00
+ SecurityCommandTypeContainer_SecurityCommandOff_1Bytes SecurityCommandTypeContainer = 0x01
+ SecurityCommandTypeContainer_SecurityCommandOff_2Bytes SecurityCommandTypeContainer = 0x02
+ SecurityCommandTypeContainer_SecurityCommandOff_3Bytes SecurityCommandTypeContainer = 0x03
+ SecurityCommandTypeContainer_SecurityCommandOff_4Bytes SecurityCommandTypeContainer = 0x04
+ SecurityCommandTypeContainer_SecurityCommandOff_5Bytes SecurityCommandTypeContainer = 0x05
+ SecurityCommandTypeContainer_SecurityCommandOff_6Bytes SecurityCommandTypeContainer = 0x06
+ SecurityCommandTypeContainer_SecurityCommandOff_7Bytes SecurityCommandTypeContainer = 0x07
+ SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes SecurityCommandTypeContainer = 0x08
+ SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes SecurityCommandTypeContainer = 0x09
+ SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes SecurityCommandTypeContainer = 0x0A
+ SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes SecurityCommandTypeContainer = 0x0B
+ SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes SecurityCommandTypeContainer = 0x0C
+ SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes SecurityCommandTypeContainer = 0x0D
+ SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes SecurityCommandTypeContainer = 0x0E
+ SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes SecurityCommandTypeContainer = 0x0F
+ SecurityCommandTypeContainer_SecurityCommandOn_0Bytes SecurityCommandTypeContainer = 0x78
+ SecurityCommandTypeContainer_SecurityCommandOn_1Bytes SecurityCommandTypeContainer = 0x79
+ SecurityCommandTypeContainer_SecurityCommandOn_2Bytes SecurityCommandTypeContainer = 0x7A
+ SecurityCommandTypeContainer_SecurityCommandOn_3Bytes SecurityCommandTypeContainer = 0x7B
+ SecurityCommandTypeContainer_SecurityCommandOn_4Bytes SecurityCommandTypeContainer = 0x7C
+ SecurityCommandTypeContainer_SecurityCommandOn_5Bytes SecurityCommandTypeContainer = 0x7D
+ SecurityCommandTypeContainer_SecurityCommandOn_6Bytes SecurityCommandTypeContainer = 0x7E
+ SecurityCommandTypeContainer_SecurityCommandOn_7Bytes SecurityCommandTypeContainer = 0x7F
+ SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes SecurityCommandTypeContainer = 0x80
+ SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes SecurityCommandTypeContainer = 0x81
+ SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes SecurityCommandTypeContainer = 0x82
+ SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes SecurityCommandTypeContainer = 0x83
+ SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes SecurityCommandTypeContainer = 0x84
+ SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes SecurityCommandTypeContainer = 0x85
+ SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes SecurityCommandTypeContainer = 0x86
+ SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes SecurityCommandTypeContainer = 0x87
+ SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes SecurityCommandTypeContainer = 0x88
+ SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes SecurityCommandTypeContainer = 0x89
+ SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes SecurityCommandTypeContainer = 0x8A
+ SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes SecurityCommandTypeContainer = 0x8B
+ SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes SecurityCommandTypeContainer = 0x8C
+ SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes SecurityCommandTypeContainer = 0x8D
+ SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes SecurityCommandTypeContainer = 0x8E
+ SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes SecurityCommandTypeContainer = 0x8F
+ SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes SecurityCommandTypeContainer = 0x90
+ SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes SecurityCommandTypeContainer = 0x91
+ SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes SecurityCommandTypeContainer = 0x92
+ SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes SecurityCommandTypeContainer = 0x93
+ SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes SecurityCommandTypeContainer = 0x94
+ SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes SecurityCommandTypeContainer = 0x95
+ SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes SecurityCommandTypeContainer = 0x96
+ SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes SecurityCommandTypeContainer = 0x97
+ SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes SecurityCommandTypeContainer = 0x98
+ SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes SecurityCommandTypeContainer = 0x99
+ SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes SecurityCommandTypeContainer = 0x9A
+ SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes SecurityCommandTypeContainer = 0x9B
+ SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes SecurityCommandTypeContainer = 0x9C
+ SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes SecurityCommandTypeContainer = 0x9D
+ SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes SecurityCommandTypeContainer = 0x9E
+ SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes SecurityCommandTypeContainer = 0x9F
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes SecurityCommandTypeContainer = 0xA0
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes SecurityCommandTypeContainer = 0xA1
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes SecurityCommandTypeContainer = 0xA2
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes SecurityCommandTypeContainer = 0xA3
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes SecurityCommandTypeContainer = 0xA4
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes SecurityCommandTypeContainer = 0xA5
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes SecurityCommandTypeContainer = 0xA6
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes SecurityCommandTypeContainer = 0xA7
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes SecurityCommandTypeContainer = 0xA8
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes SecurityCommandTypeContainer = 0xA9
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes SecurityCommandTypeContainer = 0xAA
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes SecurityCommandTypeContainer = 0xAB
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes SecurityCommandTypeContainer = 0xAC
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes SecurityCommandTypeContainer = 0xAD
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes SecurityCommandTypeContainer = 0xAE
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes SecurityCommandTypeContainer = 0xAF
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes SecurityCommandTypeContainer = 0xB0
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes SecurityCommandTypeContainer = 0xB1
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes SecurityCommandTypeContainer = 0xB2
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes SecurityCommandTypeContainer = 0xB3
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes SecurityCommandTypeContainer = 0xB4
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes SecurityCommandTypeContainer = 0xB5
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes SecurityCommandTypeContainer = 0xB6
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes SecurityCommandTypeContainer = 0xB7
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes SecurityCommandTypeContainer = 0xB8
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes SecurityCommandTypeContainer = 0xB9
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes SecurityCommandTypeContainer = 0xBA
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes SecurityCommandTypeContainer = 0xBB
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes SecurityCommandTypeContainer = 0xBC
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes SecurityCommandTypeContainer = 0xBD
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes SecurityCommandTypeContainer = 0xBE
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes SecurityCommandTypeContainer = 0xBF
+ SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes SecurityCommandTypeContainer = 0xE0
+ SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes SecurityCommandTypeContainer = 0xE1
+ SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes SecurityCommandTypeContainer = 0xE2
+ SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes SecurityCommandTypeContainer = 0xE3
+ SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes SecurityCommandTypeContainer = 0xE4
+ SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes SecurityCommandTypeContainer = 0xE5
+ SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes SecurityCommandTypeContainer = 0xE6
+ SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes SecurityCommandTypeContainer = 0xE7
+ SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes SecurityCommandTypeContainer = 0xE8
+ SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes SecurityCommandTypeContainer = 0xE9
+ SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes SecurityCommandTypeContainer = 0xEA
+ SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes SecurityCommandTypeContainer = 0xEB
+ SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes SecurityCommandTypeContainer = 0xEC
+ SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes SecurityCommandTypeContainer = 0xED
+ SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes SecurityCommandTypeContainer = 0xEE
+ SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes SecurityCommandTypeContainer = 0xEF
+ SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes SecurityCommandTypeContainer = 0xF0
+ SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes SecurityCommandTypeContainer = 0xF1
+ SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes SecurityCommandTypeContainer = 0xF2
+ SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes SecurityCommandTypeContainer = 0xF3
+ SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes SecurityCommandTypeContainer = 0xF4
+ SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes SecurityCommandTypeContainer = 0xF5
+ SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes SecurityCommandTypeContainer = 0xF6
+ SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes SecurityCommandTypeContainer = 0xF7
+ SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes SecurityCommandTypeContainer = 0xF8
+ SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes SecurityCommandTypeContainer = 0xF9
+ SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes SecurityCommandTypeContainer = 0xFA
+ SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes SecurityCommandTypeContainer = 0xFB
+ SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes SecurityCommandTypeContainer = 0xFC
+ SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes SecurityCommandTypeContainer = 0xFD
+ SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes SecurityCommandTypeContainer = 0xFE
+ SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes SecurityCommandTypeContainer = 0xFF
+)
+
+var SecurityCommandTypeContainerValues []SecurityCommandTypeContainer
+
+func init() {
+ _ = errors.New
+ SecurityCommandTypeContainerValues = []SecurityCommandTypeContainer{
+ SecurityCommandTypeContainer_SecurityCommandOff_0Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_1Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_2Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_3Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_4Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_5Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_6Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOff_7Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes,
+ SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_0Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_1Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_2Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_3Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_4Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_5Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_6Bytes,
+ SecurityCommandTypeContainer_SecurityCommandOn_7Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes,
+ SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes,
+ }
+}
+
+func (e SecurityCommandTypeContainer) NumBytes() uint8 {
+ switch e {
+ case 0x00:
+ { /* '0x00' */
+ return 0
+ }
+ case 0x01:
+ { /* '0x01' */
+ return 1
+ }
+ case 0x02:
+ { /* '0x02' */
+ return 2
+ }
+ case 0x03:
+ { /* '0x03' */
+ return 3
+ }
+ case 0x04:
+ { /* '0x04' */
+ return 4
+ }
+ case 0x05:
+ { /* '0x05' */
+ return 5
+ }
+ case 0x06:
+ { /* '0x06' */
+ return 6
+ }
+ case 0x07:
+ { /* '0x07' */
+ return 7
+ }
+ case 0x08:
+ { /* '0x08' */
+ return 0
+ }
+ case 0x09:
+ { /* '0x09' */
+ return 1
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return 2
+ }
+ case 0x0B:
+ { /* '0x0B' */
+ return 3
+ }
+ case 0x0C:
+ { /* '0x0C' */
+ return 4
+ }
+ case 0x0D:
+ { /* '0x0D' */
+ return 5
+ }
+ case 0x0E:
+ { /* '0x0E' */
+ return 6
+ }
+ case 0x0F:
+ { /* '0x0F' */
+ return 7
+ }
+ case 0x78:
+ { /* '0x78' */
+ return 0
+ }
+ case 0x79:
+ { /* '0x79' */
+ return 1
+ }
+ case 0x7A:
+ { /* '0x7A' */
+ return 2
+ }
+ case 0x7B:
+ { /* '0x7B' */
+ return 3
+ }
+ case 0x7C:
+ { /* '0x7C' */
+ return 4
+ }
+ case 0x7D:
+ { /* '0x7D' */
+ return 5
+ }
+ case 0x7E:
+ { /* '0x7E' */
+ return 6
+ }
+ case 0x7F:
+ { /* '0x7F' */
+ return 7
+ }
+ case 0x80:
+ { /* '0x80' */
+ return 8
+ }
+ case 0x81:
+ { /* '0x81' */
+ return 1
+ }
+ case 0x82:
+ { /* '0x82' */
+ return 2
+ }
+ case 0x83:
+ { /* '0x83' */
+ return 3
+ }
+ case 0x84:
+ { /* '0x84' */
+ return 4
+ }
+ case 0x85:
+ { /* '0x85' */
+ return 5
+ }
+ case 0x86:
+ { /* '0x86' */
+ return 6
+ }
+ case 0x87:
+ { /* '0x87' */
+ return 7
+ }
+ case 0x88:
+ { /* '0x88' */
+ return 8
+ }
+ case 0x89:
+ { /* '0x89' */
+ return 9
+ }
+ case 0x8A:
+ { /* '0x8A' */
+ return 10
+ }
+ case 0x8B:
+ { /* '0x8B' */
+ return 11
+ }
+ case 0x8C:
+ { /* '0x8C' */
+ return 12
+ }
+ case 0x8D:
+ { /* '0x8D' */
+ return 13
+ }
+ case 0x8E:
+ { /* '0x8E' */
+ return 14
+ }
+ case 0x8F:
+ { /* '0x8F' */
+ return 15
+ }
+ case 0x90:
+ { /* '0x90' */
+ return 16
+ }
+ case 0x91:
+ { /* '0x91' */
+ return 17
+ }
+ case 0x92:
+ { /* '0x92' */
+ return 18
+ }
+ case 0x93:
+ { /* '0x93' */
+ return 19
+ }
+ case 0x94:
+ { /* '0x94' */
+ return 20
+ }
+ case 0x95:
+ { /* '0x95' */
+ return 21
+ }
+ case 0x96:
+ { /* '0x96' */
+ return 22
+ }
+ case 0x97:
+ { /* '0x97' */
+ return 23
+ }
+ case 0x98:
+ { /* '0x98' */
+ return 24
+ }
+ case 0x99:
+ { /* '0x99' */
+ return 25
+ }
+ case 0x9A:
+ { /* '0x9A' */
+ return 26
+ }
+ case 0x9B:
+ { /* '0x9B' */
+ return 27
+ }
+ case 0x9C:
+ { /* '0x9C' */
+ return 28
+ }
+ case 0x9D:
+ { /* '0x9D' */
+ return 29
+ }
+ case 0x9E:
+ { /* '0x9E' */
+ return 30
+ }
+ case 0x9F:
+ { /* '0x9F' */
+ return 31
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return 0
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return 1
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return 2
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return 3
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return 4
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return 5
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return 6
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return 7
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return 8
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return 9
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return 10
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return 11
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return 12
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return 13
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return 14
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return 15
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return 16
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return 17
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return 18
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return 19
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return 20
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return 21
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return 22
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return 23
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return 24
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return 25
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return 26
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return 27
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return 28
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return 29
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return 30
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return 31
+ }
+ case 0xE0:
+ { /* '0xE0' */
+ return 0
+ }
+ case 0xE1:
+ { /* '0xE1' */
+ return 1
+ }
+ case 0xE2:
+ { /* '0xE2' */
+ return 2
+ }
+ case 0xE3:
+ { /* '0xE3' */
+ return 3
+ }
+ case 0xE4:
+ { /* '0xE4' */
+ return 4
+ }
+ case 0xE5:
+ { /* '0xE5' */
+ return 5
+ }
+ case 0xE6:
+ { /* '0xE6' */
+ return 6
+ }
+ case 0xE7:
+ { /* '0xE7' */
+ return 7
+ }
+ case 0xE8:
+ { /* '0xE8' */
+ return 8
+ }
+ case 0xE9:
+ { /* '0xE9' */
+ return 9
+ }
+ case 0xEA:
+ { /* '0xEA' */
+ return 10
+ }
+ case 0xEB:
+ { /* '0xEB' */
+ return 11
+ }
+ case 0xEC:
+ { /* '0xEC' */
+ return 12
+ }
+ case 0xED:
+ { /* '0xED' */
+ return 13
+ }
+ case 0xEE:
+ { /* '0xEE' */
+ return 14
+ }
+ case 0xEF:
+ { /* '0xEF' */
+ return 15
+ }
+ case 0xF0:
+ { /* '0xF0' */
+ return 16
+ }
+ case 0xF1:
+ { /* '0xF1' */
+ return 17
+ }
+ case 0xF2:
+ { /* '0xF2' */
+ return 18
+ }
+ case 0xF3:
+ { /* '0xF3' */
+ return 19
+ }
+ case 0xF4:
+ { /* '0xF4' */
+ return 20
+ }
+ case 0xF5:
+ { /* '0xF5' */
+ return 21
+ }
+ case 0xF6:
+ { /* '0xF6' */
+ return 22
+ }
+ case 0xF7:
+ { /* '0xF7' */
+ return 23
+ }
+ case 0xF8:
+ { /* '0xF8' */
+ return 24
+ }
+ case 0xF9:
+ { /* '0xF9' */
+ return 25
+ }
+ case 0xFA:
+ { /* '0xFA' */
+ return 26
+ }
+ case 0xFB:
+ { /* '0xFB' */
+ return 27
+ }
+ case 0xFC:
+ { /* '0xFC' */
+ return 28
+ }
+ case 0xFD:
+ { /* '0xFD' */
+ return 29
+ }
+ case 0xFE:
+ { /* '0xFE' */
+ return 30
+ }
+ case 0xFF:
+ { /* '0xFF' */
+ return 31
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func SecurityCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (SecurityCommandTypeContainer, error) {
+ for _, sizeValue := range SecurityCommandTypeContainerValues {
+ if sizeValue.NumBytes() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing NumBytes not found", value)
+}
+
+func (e SecurityCommandTypeContainer) CommandType() SecurityCommandType {
+ switch e {
+ case 0x00:
+ { /* '0x00' */
+ return SecurityCommandType_OFF
+ }
+ case 0x01:
+ { /* '0x01' */
+ return SecurityCommandType_OFF
+ }
+ case 0x02:
+ { /* '0x02' */
+ return SecurityCommandType_OFF
+ }
+ case 0x03:
+ { /* '0x03' */
+ return SecurityCommandType_OFF
+ }
+ case 0x04:
+ { /* '0x04' */
+ return SecurityCommandType_OFF
+ }
+ case 0x05:
+ { /* '0x05' */
+ return SecurityCommandType_OFF
+ }
+ case 0x06:
+ { /* '0x06' */
+ return SecurityCommandType_OFF
+ }
+ case 0x07:
+ { /* '0x07' */
+ return SecurityCommandType_OFF
+ }
+ case 0x08:
+ { /* '0x08' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x09:
+ { /* '0x09' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x0B:
+ { /* '0x0B' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x0C:
+ { /* '0x0C' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x0D:
+ { /* '0x0D' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x0E:
+ { /* '0x0E' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x0F:
+ { /* '0x0F' */
+ return SecurityCommandType_EVENT
+ }
+ case 0x78:
+ { /* '0x78' */
+ return SecurityCommandType_ON
+ }
+ case 0x79:
+ { /* '0x79' */
+ return SecurityCommandType_ON
+ }
+ case 0x7A:
+ { /* '0x7A' */
+ return SecurityCommandType_ON
+ }
+ case 0x7B:
+ { /* '0x7B' */
+ return SecurityCommandType_ON
+ }
+ case 0x7C:
+ { /* '0x7C' */
+ return SecurityCommandType_ON
+ }
+ case 0x7D:
+ { /* '0x7D' */
+ return SecurityCommandType_ON
+ }
+ case 0x7E:
+ { /* '0x7E' */
+ return SecurityCommandType_ON
+ }
+ case 0x7F:
+ { /* '0x7F' */
+ return SecurityCommandType_ON
+ }
+ case 0x80:
+ { /* '0x80' */
+ return SecurityCommandType_OFF
+ }
+ case 0x81:
+ { /* '0x81' */
+ return SecurityCommandType_OFF
+ }
+ case 0x82:
+ { /* '0x82' */
+ return SecurityCommandType_OFF
+ }
+ case 0x83:
+ { /* '0x83' */
+ return SecurityCommandType_OFF
+ }
+ case 0x84:
+ { /* '0x84' */
+ return SecurityCommandType_OFF
+ }
+ case 0x85:
+ { /* '0x85' */
+ return SecurityCommandType_OFF
+ }
+ case 0x86:
+ { /* '0x86' */
+ return SecurityCommandType_OFF
+ }
+ case 0x87:
+ { /* '0x87' */
+ return SecurityCommandType_OFF
+ }
+ case 0x88:
+ { /* '0x88' */
+ return SecurityCommandType_OFF
+ }
+ case 0x89:
+ { /* '0x89' */
+ return SecurityCommandType_OFF
+ }
+ case 0x8A:
+ { /* '0x8A' */
+ return SecurityCommandType_OFF
+ }
+ case 0x8B:
+ { /* '0x8B' */
+ return SecurityCommandType_OFF
+ }
+ case 0x8C:
+ { /* '0x8C' */
+ return SecurityCommandType_OFF
+ }
+ case 0x8D:
+ { /* '0x8D' */
+ return SecurityCommandType_OFF
+ }
+ case 0x8E:
+ { /* '0x8E' */
+ return SecurityCommandType_OFF
+ }
+ case 0x8F:
+ { /* '0x8F' */
+ return SecurityCommandType_OFF
+ }
+ case 0x90:
+ { /* '0x90' */
+ return SecurityCommandType_OFF
+ }
+ case 0x91:
+ { /* '0x91' */
+ return SecurityCommandType_OFF
+ }
+ case 0x92:
+ { /* '0x92' */
+ return SecurityCommandType_OFF
+ }
+ case 0x93:
+ { /* '0x93' */
+ return SecurityCommandType_OFF
+ }
+ case 0x94:
+ { /* '0x94' */
+ return SecurityCommandType_OFF
+ }
+ case 0x95:
+ { /* '0x95' */
+ return SecurityCommandType_OFF
+ }
+ case 0x96:
+ { /* '0x96' */
+ return SecurityCommandType_OFF
+ }
+ case 0x97:
+ { /* '0x97' */
+ return SecurityCommandType_OFF
+ }
+ case 0x98:
+ { /* '0x98' */
+ return SecurityCommandType_OFF
+ }
+ case 0x99:
+ { /* '0x99' */
+ return SecurityCommandType_OFF
+ }
+ case 0x9A:
+ { /* '0x9A' */
+ return SecurityCommandType_OFF
+ }
+ case 0x9B:
+ { /* '0x9B' */
+ return SecurityCommandType_OFF
+ }
+ case 0x9C:
+ { /* '0x9C' */
+ return SecurityCommandType_OFF
+ }
+ case 0x9D:
+ { /* '0x9D' */
+ return SecurityCommandType_OFF
+ }
+ case 0x9E:
+ { /* '0x9E' */
+ return SecurityCommandType_OFF
+ }
+ case 0x9F:
+ { /* '0x9F' */
+ return SecurityCommandType_OFF
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return SecurityCommandType_EVENT
+ }
+ case 0xE0:
+ { /* '0xE0' */
+ return SecurityCommandType_ON
+ }
+ case 0xE1:
+ { /* '0xE1' */
+ return SecurityCommandType_ON
+ }
+ case 0xE2:
+ { /* '0xE2' */
+ return SecurityCommandType_ON
+ }
+ case 0xE3:
+ { /* '0xE3' */
+ return SecurityCommandType_ON
+ }
+ case 0xE4:
+ { /* '0xE4' */
+ return SecurityCommandType_ON
+ }
+ case 0xE5:
+ { /* '0xE5' */
+ return SecurityCommandType_ON
+ }
+ case 0xE6:
+ { /* '0xE6' */
+ return SecurityCommandType_ON
+ }
+ case 0xE7:
+ { /* '0xE7' */
+ return SecurityCommandType_ON
+ }
+ case 0xE8:
+ { /* '0xE8' */
+ return SecurityCommandType_ON
+ }
+ case 0xE9:
+ { /* '0xE9' */
+ return SecurityCommandType_ON
+ }
+ case 0xEA:
+ { /* '0xEA' */
+ return SecurityCommandType_ON
+ }
+ case 0xEB:
+ { /* '0xEB' */
+ return SecurityCommandType_ON
+ }
+ case 0xEC:
+ { /* '0xEC' */
+ return SecurityCommandType_ON
+ }
+ case 0xED:
+ { /* '0xED' */
+ return SecurityCommandType_ON
+ }
+ case 0xEE:
+ { /* '0xEE' */
+ return SecurityCommandType_ON
+ }
+ case 0xEF:
+ { /* '0xEF' */
+ return SecurityCommandType_ON
+ }
+ case 0xF0:
+ { /* '0xF0' */
+ return SecurityCommandType_ON
+ }
+ case 0xF1:
+ { /* '0xF1' */
+ return SecurityCommandType_ON
+ }
+ case 0xF2:
+ { /* '0xF2' */
+ return SecurityCommandType_ON
+ }
+ case 0xF3:
+ { /* '0xF3' */
+ return SecurityCommandType_ON
+ }
+ case 0xF4:
+ { /* '0xF4' */
+ return SecurityCommandType_ON
+ }
+ case 0xF5:
+ { /* '0xF5' */
+ return SecurityCommandType_ON
+ }
+ case 0xF6:
+ { /* '0xF6' */
+ return SecurityCommandType_ON
+ }
+ case 0xF7:
+ { /* '0xF7' */
+ return SecurityCommandType_ON
+ }
+ case 0xF8:
+ { /* '0xF8' */
+ return SecurityCommandType_ON
+ }
+ case 0xF9:
+ { /* '0xF9' */
+ return SecurityCommandType_ON
+ }
+ case 0xFA:
+ { /* '0xFA' */
+ return SecurityCommandType_ON
+ }
+ case 0xFB:
+ { /* '0xFB' */
+ return SecurityCommandType_ON
+ }
+ case 0xFC:
+ { /* '0xFC' */
+ return SecurityCommandType_ON
+ }
+ case 0xFD:
+ { /* '0xFD' */
+ return SecurityCommandType_ON
+ }
+ case 0xFE:
+ { /* '0xFE' */
+ return SecurityCommandType_ON
+ }
+ case 0xFF:
+ { /* '0xFF' */
+ return SecurityCommandType_ON
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func SecurityCommandTypeContainerFirstEnumForFieldCommandType(value SecurityCommandType) (SecurityCommandTypeContainer, error) {
+ for _, sizeValue := range SecurityCommandTypeContainerValues {
+ if sizeValue.CommandType() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing CommandType not found", value)
+}
+func SecurityCommandTypeContainerByValue(value uint8) (enum SecurityCommandTypeContainer, ok bool) {
+ switch value {
+ case 0x00:
+ return SecurityCommandTypeContainer_SecurityCommandOff_0Bytes, true
+ case 0x01:
+ return SecurityCommandTypeContainer_SecurityCommandOff_1Bytes, true
+ case 0x02:
+ return SecurityCommandTypeContainer_SecurityCommandOff_2Bytes, true
+ case 0x03:
+ return SecurityCommandTypeContainer_SecurityCommandOff_3Bytes, true
+ case 0x04:
+ return SecurityCommandTypeContainer_SecurityCommandOff_4Bytes, true
+ case 0x05:
+ return SecurityCommandTypeContainer_SecurityCommandOff_5Bytes, true
+ case 0x06:
+ return SecurityCommandTypeContainer_SecurityCommandOff_6Bytes, true
+ case 0x07:
+ return SecurityCommandTypeContainer_SecurityCommandOff_7Bytes, true
+ case 0x08:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes, true
+ case 0x09:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes, true
+ case 0x0A:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes, true
+ case 0x0B:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes, true
+ case 0x0C:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes, true
+ case 0x0D:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes, true
+ case 0x0E:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes, true
+ case 0x0F:
+ return SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes, true
+ case 0x78:
+ return SecurityCommandTypeContainer_SecurityCommandOn_0Bytes, true
+ case 0x79:
+ return SecurityCommandTypeContainer_SecurityCommandOn_1Bytes, true
+ case 0x7A:
+ return SecurityCommandTypeContainer_SecurityCommandOn_2Bytes, true
+ case 0x7B:
+ return SecurityCommandTypeContainer_SecurityCommandOn_3Bytes, true
+ case 0x7C:
+ return SecurityCommandTypeContainer_SecurityCommandOn_4Bytes, true
+ case 0x7D:
+ return SecurityCommandTypeContainer_SecurityCommandOn_5Bytes, true
+ case 0x7E:
+ return SecurityCommandTypeContainer_SecurityCommandOn_6Bytes, true
+ case 0x7F:
+ return SecurityCommandTypeContainer_SecurityCommandOn_7Bytes, true
+ case 0x80:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes, true
+ case 0x81:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes, true
+ case 0x82:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes, true
+ case 0x83:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes, true
+ case 0x84:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes, true
+ case 0x85:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes, true
+ case 0x86:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes, true
+ case 0x87:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes, true
+ case 0x88:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes, true
+ case 0x89:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes, true
+ case 0x8A:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes, true
+ case 0x8B:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes, true
+ case 0x8C:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes, true
+ case 0x8D:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes, true
+ case 0x8E:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes, true
+ case 0x8F:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes, true
+ case 0x90:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes, true
+ case 0x91:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes, true
+ case 0x92:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes, true
+ case 0x93:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes, true
+ case 0x94:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes, true
+ case 0x95:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes, true
+ case 0x96:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes, true
+ case 0x97:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes, true
+ case 0x98:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes, true
+ case 0x99:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes, true
+ case 0x9A:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes, true
+ case 0x9B:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes, true
+ case 0x9C:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes, true
+ case 0x9D:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes, true
+ case 0x9E:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes, true
+ case 0x9F:
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes, true
+ case 0xA0:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes, true
+ case 0xA1:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes, true
+ case 0xA2:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes, true
+ case 0xA3:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes, true
+ case 0xA4:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes, true
+ case 0xA5:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes, true
+ case 0xA6:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes, true
+ case 0xA7:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes, true
+ case 0xA8:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes, true
+ case 0xA9:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes, true
+ case 0xAA:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes, true
+ case 0xAB:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes, true
+ case 0xAC:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes, true
+ case 0xAD:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes, true
+ case 0xAE:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes, true
+ case 0xAF:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes, true
+ case 0xB0:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes, true
+ case 0xB1:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes, true
+ case 0xB2:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes, true
+ case 0xB3:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes, true
+ case 0xB4:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes, true
+ case 0xB5:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes, true
+ case 0xB6:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes, true
+ case 0xB7:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes, true
+ case 0xB8:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes, true
+ case 0xB9:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes, true
+ case 0xBA:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes, true
+ case 0xBB:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes, true
+ case 0xBC:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes, true
+ case 0xBD:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes, true
+ case 0xBE:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes, true
+ case 0xBF:
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes, true
+ case 0xE0:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes, true
+ case 0xE1:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes, true
+ case 0xE2:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes, true
+ case 0xE3:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes, true
+ case 0xE4:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes, true
+ case 0xE5:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes, true
+ case 0xE6:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes, true
+ case 0xE7:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes, true
+ case 0xE8:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes, true
+ case 0xE9:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes, true
+ case 0xEA:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes, true
+ case 0xEB:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes, true
+ case 0xEC:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes, true
+ case 0xED:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes, true
+ case 0xEE:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes, true
+ case 0xEF:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes, true
+ case 0xF0:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes, true
+ case 0xF1:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes, true
+ case 0xF2:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes, true
+ case 0xF3:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes, true
+ case 0xF4:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes, true
+ case 0xF5:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes, true
+ case 0xF6:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes, true
+ case 0xF7:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes, true
+ case 0xF8:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes, true
+ case 0xF9:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes, true
+ case 0xFA:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes, true
+ case 0xFB:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes, true
+ case 0xFC:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes, true
+ case 0xFD:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes, true
+ case 0xFE:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes, true
+ case 0xFF:
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes, true
+ }
+ return 0, false
+}
+
+func SecurityCommandTypeContainerByName(value string) (enum SecurityCommandTypeContainer, ok bool) {
+ switch value {
+ case "SecurityCommandOff_0Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_0Bytes, true
+ case "SecurityCommandOff_1Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_1Bytes, true
+ case "SecurityCommandOff_2Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_2Bytes, true
+ case "SecurityCommandOff_3Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_3Bytes, true
+ case "SecurityCommandOff_4Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_4Bytes, true
+ case "SecurityCommandOff_5Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_5Bytes, true
+ case "SecurityCommandOff_6Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_6Bytes, true
+ case "SecurityCommandOff_7Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOff_7Bytes, true
+ case "SecurityCommandEvent_0Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes, true
+ case "SecurityCommandEvent_1Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes, true
+ case "SecurityCommandEvent_2Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes, true
+ case "SecurityCommandEvent_3Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes, true
+ case "SecurityCommandEvent_4Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes, true
+ case "SecurityCommandEvent_5Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes, true
+ case "SecurityCommandEvent_6Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes, true
+ case "SecurityCommandEvent_7Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes, true
+ case "SecurityCommandOn_0Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_0Bytes, true
+ case "SecurityCommandOn_1Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_1Bytes, true
+ case "SecurityCommandOn_2Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_2Bytes, true
+ case "SecurityCommandOn_3Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_3Bytes, true
+ case "SecurityCommandOn_4Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_4Bytes, true
+ case "SecurityCommandOn_5Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_5Bytes, true
+ case "SecurityCommandOn_6Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_6Bytes, true
+ case "SecurityCommandOn_7Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandOn_7Bytes, true
+ case "SecurityCommandLongOff_0Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes, true
+ case "SecurityCommandLongOff_1Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes, true
+ case "SecurityCommandLongOff_2Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes, true
+ case "SecurityCommandLongOff_3Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes, true
+ case "SecurityCommandLongOff_4Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes, true
+ case "SecurityCommandLongOff_5Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes, true
+ case "SecurityCommandLongOff_6Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes, true
+ case "SecurityCommandLongOff_7Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes, true
+ case "SecurityCommandLongOff_8Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes, true
+ case "SecurityCommandLongOff_9Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes, true
+ case "SecurityCommandLongOff_10Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes, true
+ case "SecurityCommandLongOff_11Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes, true
+ case "SecurityCommandLongOff_12Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes, true
+ case "SecurityCommandLongOff_13Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes, true
+ case "SecurityCommandLongOff_14Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes, true
+ case "SecurityCommandLongOff_15Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes, true
+ case "SecurityCommandLongOff_16Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes, true
+ case "SecurityCommandLongOff_17Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes, true
+ case "SecurityCommandLongOff_18Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes, true
+ case "SecurityCommandLongOff_19Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes, true
+ case "SecurityCommandLongOff_20Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes, true
+ case "SecurityCommandLongOff_21Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes, true
+ case "SecurityCommandLongOff_22Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes, true
+ case "SecurityCommandLongOff_23Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes, true
+ case "SecurityCommandLongOff_24Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes, true
+ case "SecurityCommandLongOff_25Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes, true
+ case "SecurityCommandLongOff_26Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes, true
+ case "SecurityCommandLongOff_27Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes, true
+ case "SecurityCommandLongOff_28Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes, true
+ case "SecurityCommandLongOff_29Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes, true
+ case "SecurityCommandLongOff_30Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes, true
+ case "SecurityCommandLongOff_31Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes, true
+ case "SecurityCommandLongEvent_0Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes, true
+ case "SecurityCommandLongEvent_1Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes, true
+ case "SecurityCommandLongEvent_2Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes, true
+ case "SecurityCommandLongEvent_3Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes, true
+ case "SecurityCommandLongEvent_4Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes, true
+ case "SecurityCommandLongEvent_5Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes, true
+ case "SecurityCommandLongEvent_6Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes, true
+ case "SecurityCommandLongEvent_7Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes, true
+ case "SecurityCommandLongEvent_8Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes, true
+ case "SecurityCommandLongEvent_9Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes, true
+ case "SecurityCommandLongEvent_10Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes, true
+ case "SecurityCommandLongEvent_11Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes, true
+ case "SecurityCommandLongEvent_12Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes, true
+ case "SecurityCommandLongEvent_13Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes, true
+ case "SecurityCommandLongEvent_14Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes, true
+ case "SecurityCommandLongEvent_15Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes, true
+ case "SecurityCommandLongEvent_16Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes, true
+ case "SecurityCommandLongEvent_17Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes, true
+ case "SecurityCommandLongEvent_18Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes, true
+ case "SecurityCommandLongEvent_19Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes, true
+ case "SecurityCommandLongEvent_20Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes, true
+ case "SecurityCommandLongEvent_21Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes, true
+ case "SecurityCommandLongEvent_22Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes, true
+ case "SecurityCommandLongEvent_23Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes, true
+ case "SecurityCommandLongEvent_24Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes, true
+ case "SecurityCommandLongEvent_25Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes, true
+ case "SecurityCommandLongEvent_26Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes, true
+ case "SecurityCommandLongEvent_27Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes, true
+ case "SecurityCommandLongEvent_28Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes, true
+ case "SecurityCommandLongEvent_29Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes, true
+ case "SecurityCommandLongEvent_30Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes, true
+ case "SecurityCommandLongEvent_31Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes, true
+ case "SecurityCommandLongOn_0Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes, true
+ case "SecurityCommandLongOn_1Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes, true
+ case "SecurityCommandLongOn_2Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes, true
+ case "SecurityCommandLongOn_3Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes, true
+ case "SecurityCommandLongOn_4Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes, true
+ case "SecurityCommandLongOn_5Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes, true
+ case "SecurityCommandLongOn_6Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes, true
+ case "SecurityCommandLongOn_7Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes, true
+ case "SecurityCommandLongOn_8Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes, true
+ case "SecurityCommandLongOn_9Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes, true
+ case "SecurityCommandLongOn_10Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes, true
+ case "SecurityCommandLongOn_11Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes, true
+ case "SecurityCommandLongOn_12Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes, true
+ case "SecurityCommandLongOn_13Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes, true
+ case "SecurityCommandLongOn_14Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes, true
+ case "SecurityCommandLongOn_15Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes, true
+ case "SecurityCommandLongOn_16Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes, true
+ case "SecurityCommandLongOn_17Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes, true
+ case "SecurityCommandLongOn_18Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes, true
+ case "SecurityCommandLongOn_19Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes, true
+ case "SecurityCommandLongOn_20Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes, true
+ case "SecurityCommandLongOn_21Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes, true
+ case "SecurityCommandLongOn_22Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes, true
+ case "SecurityCommandLongOn_23Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes, true
+ case "SecurityCommandLongOn_24Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes, true
+ case "SecurityCommandLongOn_25Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes, true
+ case "SecurityCommandLongOn_26Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes, true
+ case "SecurityCommandLongOn_27Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes, true
+ case "SecurityCommandLongOn_28Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes, true
+ case "SecurityCommandLongOn_29Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes, true
+ case "SecurityCommandLongOn_30Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes, true
+ case "SecurityCommandLongOn_31Bytes":
+ return SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes, true
+ }
+ return 0, false
+}
+
+func SecurityCommandTypeContainerKnows(value uint8) bool {
+ for _, typeValue := range SecurityCommandTypeContainerValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastSecurityCommandTypeContainer(structType interface{}) SecurityCommandTypeContainer {
+ castFunc := func(typ interface{}) SecurityCommandTypeContainer {
+ if sSecurityCommandTypeContainer, ok := typ.(SecurityCommandTypeContainer); ok {
+ return sSecurityCommandTypeContainer
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m SecurityCommandTypeContainer) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m SecurityCommandTypeContainer) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityCommandTypeContainerParse(readBuffer utils.ReadBuffer) (SecurityCommandTypeContainer, error) {
+ val, err := readBuffer.ReadUint8("SecurityCommandTypeContainer", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading SecurityCommandTypeContainer")
+ }
+ if enum, ok := SecurityCommandTypeContainerByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return SecurityCommandTypeContainer(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e SecurityCommandTypeContainer) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("SecurityCommandTypeContainer", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e SecurityCommandTypeContainer) PLC4XEnumName() string {
+ switch e {
+ case SecurityCommandTypeContainer_SecurityCommandOff_0Bytes:
+ return "SecurityCommandOff_0Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_1Bytes:
+ return "SecurityCommandOff_1Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_2Bytes:
+ return "SecurityCommandOff_2Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_3Bytes:
+ return "SecurityCommandOff_3Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_4Bytes:
+ return "SecurityCommandOff_4Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_5Bytes:
+ return "SecurityCommandOff_5Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_6Bytes:
+ return "SecurityCommandOff_6Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOff_7Bytes:
+ return "SecurityCommandOff_7Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes:
+ return "SecurityCommandEvent_0Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes:
+ return "SecurityCommandEvent_1Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes:
+ return "SecurityCommandEvent_2Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes:
+ return "SecurityCommandEvent_3Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes:
+ return "SecurityCommandEvent_4Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes:
+ return "SecurityCommandEvent_5Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes:
+ return "SecurityCommandEvent_6Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes:
+ return "SecurityCommandEvent_7Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_0Bytes:
+ return "SecurityCommandOn_0Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_1Bytes:
+ return "SecurityCommandOn_1Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_2Bytes:
+ return "SecurityCommandOn_2Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_3Bytes:
+ return "SecurityCommandOn_3Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_4Bytes:
+ return "SecurityCommandOn_4Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_5Bytes:
+ return "SecurityCommandOn_5Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_6Bytes:
+ return "SecurityCommandOn_6Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandOn_7Bytes:
+ return "SecurityCommandOn_7Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes:
+ return "SecurityCommandLongOff_0Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes:
+ return "SecurityCommandLongOff_1Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes:
+ return "SecurityCommandLongOff_2Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes:
+ return "SecurityCommandLongOff_3Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes:
+ return "SecurityCommandLongOff_4Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes:
+ return "SecurityCommandLongOff_5Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes:
+ return "SecurityCommandLongOff_6Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes:
+ return "SecurityCommandLongOff_7Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes:
+ return "SecurityCommandLongOff_8Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes:
+ return "SecurityCommandLongOff_9Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes:
+ return "SecurityCommandLongOff_10Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes:
+ return "SecurityCommandLongOff_11Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes:
+ return "SecurityCommandLongOff_12Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes:
+ return "SecurityCommandLongOff_13Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes:
+ return "SecurityCommandLongOff_14Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes:
+ return "SecurityCommandLongOff_15Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes:
+ return "SecurityCommandLongOff_16Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes:
+ return "SecurityCommandLongOff_17Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes:
+ return "SecurityCommandLongOff_18Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes:
+ return "SecurityCommandLongOff_19Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes:
+ return "SecurityCommandLongOff_20Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes:
+ return "SecurityCommandLongOff_21Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes:
+ return "SecurityCommandLongOff_22Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes:
+ return "SecurityCommandLongOff_23Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes:
+ return "SecurityCommandLongOff_24Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes:
+ return "SecurityCommandLongOff_25Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes:
+ return "SecurityCommandLongOff_26Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes:
+ return "SecurityCommandLongOff_27Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes:
+ return "SecurityCommandLongOff_28Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes:
+ return "SecurityCommandLongOff_29Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes:
+ return "SecurityCommandLongOff_30Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes:
+ return "SecurityCommandLongOff_31Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes:
+ return "SecurityCommandLongEvent_0Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes:
+ return "SecurityCommandLongEvent_1Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes:
+ return "SecurityCommandLongEvent_2Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes:
+ return "SecurityCommandLongEvent_3Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes:
+ return "SecurityCommandLongEvent_4Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes:
+ return "SecurityCommandLongEvent_5Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes:
+ return "SecurityCommandLongEvent_6Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes:
+ return "SecurityCommandLongEvent_7Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes:
+ return "SecurityCommandLongEvent_8Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes:
+ return "SecurityCommandLongEvent_9Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes:
+ return "SecurityCommandLongEvent_10Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes:
+ return "SecurityCommandLongEvent_11Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes:
+ return "SecurityCommandLongEvent_12Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes:
+ return "SecurityCommandLongEvent_13Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes:
+ return "SecurityCommandLongEvent_14Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes:
+ return "SecurityCommandLongEvent_15Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes:
+ return "SecurityCommandLongEvent_16Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes:
+ return "SecurityCommandLongEvent_17Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes:
+ return "SecurityCommandLongEvent_18Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes:
+ return "SecurityCommandLongEvent_19Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes:
+ return "SecurityCommandLongEvent_20Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes:
+ return "SecurityCommandLongEvent_21Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes:
+ return "SecurityCommandLongEvent_22Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes:
+ return "SecurityCommandLongEvent_23Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes:
+ return "SecurityCommandLongEvent_24Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes:
+ return "SecurityCommandLongEvent_25Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes:
+ return "SecurityCommandLongEvent_26Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes:
+ return "SecurityCommandLongEvent_27Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes:
+ return "SecurityCommandLongEvent_28Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes:
+ return "SecurityCommandLongEvent_29Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes:
+ return "SecurityCommandLongEvent_30Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes:
+ return "SecurityCommandLongEvent_31Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes:
+ return "SecurityCommandLongOn_0Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes:
+ return "SecurityCommandLongOn_1Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes:
+ return "SecurityCommandLongOn_2Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes:
+ return "SecurityCommandLongOn_3Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes:
+ return "SecurityCommandLongOn_4Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes:
+ return "SecurityCommandLongOn_5Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes:
+ return "SecurityCommandLongOn_6Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes:
+ return "SecurityCommandLongOn_7Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes:
+ return "SecurityCommandLongOn_8Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes:
+ return "SecurityCommandLongOn_9Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes:
+ return "SecurityCommandLongOn_10Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes:
+ return "SecurityCommandLongOn_11Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes:
+ return "SecurityCommandLongOn_12Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes:
+ return "SecurityCommandLongOn_13Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes:
+ return "SecurityCommandLongOn_14Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes:
+ return "SecurityCommandLongOn_15Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes:
+ return "SecurityCommandLongOn_16Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes:
+ return "SecurityCommandLongOn_17Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes:
+ return "SecurityCommandLongOn_18Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes:
+ return "SecurityCommandLongOn_19Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes:
+ return "SecurityCommandLongOn_20Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes:
+ return "SecurityCommandLongOn_21Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes:
+ return "SecurityCommandLongOn_22Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes:
+ return "SecurityCommandLongOn_23Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes:
+ return "SecurityCommandLongOn_24Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes:
+ return "SecurityCommandLongOn_25Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes:
+ return "SecurityCommandLongOn_26Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes:
+ return "SecurityCommandLongOn_27Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes:
+ return "SecurityCommandLongOn_28Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes:
+ return "SecurityCommandLongOn_29Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes:
+ return "SecurityCommandLongOn_30Bytes"
+ case SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes:
+ return "SecurityCommandLongOn_31Bytes"
+ }
+ return ""
+}
+
+func (e SecurityCommandTypeContainer) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityData.go b/plc4go/protocols/cbus/readwrite/model/SecurityData.go
new file mode 100644
index 000000000..07b61b703
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityData.go
@@ -0,0 +1,363 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityData is the corresponding interface of SecurityData
+type SecurityData interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCommandTypeContainer returns CommandTypeContainer (property field)
+ GetCommandTypeContainer() SecurityCommandTypeContainer
+ // GetArgument returns Argument (property field)
+ GetArgument() byte
+ // GetCommandType returns CommandType (virtual field)
+ GetCommandType() SecurityCommandType
+}
+
+// SecurityDataExactly can be used when we want exactly this type and not a type which fulfills SecurityData.
+// This is useful for switch cases.
+type SecurityDataExactly interface {
+ SecurityData
+ isSecurityData() bool
+}
+
+// _SecurityData is the data-structure of this message
+type _SecurityData struct {
+ _SecurityDataChildRequirements
+ CommandTypeContainer SecurityCommandTypeContainer
+ Argument byte
+}
+
+type _SecurityDataChildRequirements interface {
+ utils.Serializable
+ GetLengthInBits() uint16
+ GetLengthInBitsConditional(lastItem bool) uint16
+}
+
+type SecurityDataParent interface {
+ SerializeParent(writeBuffer utils.WriteBuffer, child SecurityData, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type SecurityDataChild interface {
+ utils.Serializable
+ InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte)
+ GetParent() *SecurityData
+
+ GetTypeName() string
+ SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityData) GetCommandTypeContainer() SecurityCommandTypeContainer {
+ return m.CommandTypeContainer
+}
+
+func (m *_SecurityData) GetArgument() byte {
+ return m.Argument
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_SecurityData) GetCommandType() SecurityCommandType {
+ return CastSecurityCommandType(m.GetCommandTypeContainer().CommandType())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityData factory function for _SecurityData
+func NewSecurityData(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityData {
+ return &_SecurityData{CommandTypeContainer: commandTypeContainer, Argument: argument}
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityData(structType interface{}) SecurityData {
+ if casted, ok := structType.(SecurityData); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityData); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityData) GetTypeName() string {
+ return "SecurityData"
+}
+
+func (m *_SecurityData) GetParentLengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (commandTypeContainer)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (argument)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_SecurityData) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataParse(readBuffer utils.ReadBuffer) (SecurityData, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityData")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Validation
+ if !(KnowsSecurityCommandTypeContainer(readBuffer)) {
+ return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"})
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer")
+ }
+ _commandTypeContainer, _commandTypeContainerErr := SecurityCommandTypeContainerParse(readBuffer)
+ if _commandTypeContainerErr != nil {
+ return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of SecurityData")
+ }
+ commandTypeContainer := _commandTypeContainer
+ if closeErr := readBuffer.CloseContext("commandTypeContainer"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for commandTypeContainer")
+ }
+
+ // Virtual field
+ _commandType := commandTypeContainer.CommandType()
+ commandType := SecurityCommandType(_commandType)
+ _ = commandType
+
+ // Simple Field (argument)
+ _argument, _argumentErr := readBuffer.ReadByte("argument")
+ if _argumentErr != nil {
+ return nil, errors.Wrap(_argumentErr, "Error parsing 'argument' field of SecurityData")
+ }
+ argument := _argument
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ type SecurityDataChildSerializeRequirement interface {
+ SecurityData
+ InitializeParent(SecurityData, SecurityCommandTypeContainer, byte)
+ GetParent() SecurityData
+ }
+ var _childTemp interface{}
+ var _child SecurityDataChildSerializeRequirement
+ var typeSwitchError error
+ switch {
+ case commandType == SecurityCommandType_ON && argument == 0x80: // SecurityDataSystemArmedDisarmed
+ _childTemp, typeSwitchError = SecurityDataSystemArmedDisarmedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x80: // SecurityDataSystemDisarmed
+ _childTemp, typeSwitchError = SecurityDataSystemDisarmedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x81: // SecurityDataExitDelayStarted
+ _childTemp, typeSwitchError = SecurityDataExitDelayStartedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x82: // SecurityDataEntryDelayStarted
+ _childTemp, typeSwitchError = SecurityDataEntryDelayStartedParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x83: // SecurityDataAlarmOn
+ _childTemp, typeSwitchError = SecurityDataAlarmOnParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x83: // SecurityDataAlarmOff
+ _childTemp, typeSwitchError = SecurityDataAlarmOffParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x84: // SecurityDataTamperOn
+ _childTemp, typeSwitchError = SecurityDataTamperOnParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x84: // SecurityDataTamperOff
+ _childTemp, typeSwitchError = SecurityDataTamperOffParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x85: // SecurityDataPanicActivated
+ _childTemp, typeSwitchError = SecurityDataPanicActivatedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x85: // SecurityDataPanicCleared
+ _childTemp, typeSwitchError = SecurityDataPanicClearedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x86: // SecurityDataZoneUnsealed
+ _childTemp, typeSwitchError = SecurityDataZoneUnsealedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x87: // SecurityDataZoneSealed
+ _childTemp, typeSwitchError = SecurityDataZoneSealedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x88: // SecurityDataZoneOpen
+ _childTemp, typeSwitchError = SecurityDataZoneOpenParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x89: // SecurityDataZoneShort
+ _childTemp, typeSwitchError = SecurityDataZoneShortParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x89: // SecurityDataZoneIsolated
+ _childTemp, typeSwitchError = SecurityDataZoneIsolatedParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x8B: // SecurityDataLowBatteryDetected
+ _childTemp, typeSwitchError = SecurityDataLowBatteryDetectedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x8B: // SecurityDataLowBatteryCorrected
+ _childTemp, typeSwitchError = SecurityDataLowBatteryCorrectedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x8C: // SecurityDataLowBatteryCharging
+ _childTemp, typeSwitchError = SecurityDataLowBatteryChargingParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x8D: // SecurityDataZoneName
+ _childTemp, typeSwitchError = SecurityDataZoneNameParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x8E: // SecurityDataStatusReport1
+ _childTemp, typeSwitchError = SecurityDataStatusReport1Parse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x8F: // SecurityDataStatusReport2
+ _childTemp, typeSwitchError = SecurityDataStatusReport2Parse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x90: // SecurityDataPasswordEntryStatus
+ _childTemp, typeSwitchError = SecurityDataPasswordEntryStatusParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x91: // SecurityDataMainsFailure
+ _childTemp, typeSwitchError = SecurityDataMainsFailureParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x91: // SecurityDataMainsRestoredOrApplied
+ _childTemp, typeSwitchError = SecurityDataMainsRestoredOrAppliedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x92: // SecurityDataArmReadyNotReady
+ _childTemp, typeSwitchError = SecurityDataArmReadyNotReadyParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0x93: // SecurityDataCurrentAlarmType
+ _childTemp, typeSwitchError = SecurityDataCurrentAlarmTypeParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x94: // SecurityDataLineCutAlarmRaised
+ _childTemp, typeSwitchError = SecurityDataLineCutAlarmRaisedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x94: // SecurityDataLineCutAlarmCleared
+ _childTemp, typeSwitchError = SecurityDataLineCutAlarmClearedParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x95: // SecurityDataArmFailedRaised
+ _childTemp, typeSwitchError = SecurityDataArmFailedRaisedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x95: // SecurityDataArmFailedCleared
+ _childTemp, typeSwitchError = SecurityDataArmFailedClearedParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x96: // SecurityDataFireAlarmRaised
+ _childTemp, typeSwitchError = SecurityDataFireAlarmRaisedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x96: // SecurityDataFireAlarmCleared
+ _childTemp, typeSwitchError = SecurityDataFireAlarmClearedParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x97: // SecurityDataGasAlarmRaised
+ _childTemp, typeSwitchError = SecurityDataGasAlarmRaisedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x97: // SecurityDataGasAlarmCleared
+ _childTemp, typeSwitchError = SecurityDataGasAlarmClearedParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0x98: // SecurityDataOtherAlarmRaised
+ _childTemp, typeSwitchError = SecurityDataOtherAlarmRaisedParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0x98: // SecurityDataOtherAlarmCleared
+ _childTemp, typeSwitchError = SecurityDataOtherAlarmClearedParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0xA0: // SecurityDataStatus1Request
+ _childTemp, typeSwitchError = SecurityDataStatus1RequestParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0xA1: // SecurityDataStatus2Request
+ _childTemp, typeSwitchError = SecurityDataStatus2RequestParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0xA2: // SecurityDataArmSystem
+ _childTemp, typeSwitchError = SecurityDataArmSystemParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0xA3: // SecurityDataRaiseTamper
+ _childTemp, typeSwitchError = SecurityDataRaiseTamperParse(readBuffer)
+ case commandType == SecurityCommandType_OFF && argument == 0xA3: // SecurityDataDropTamper
+ _childTemp, typeSwitchError = SecurityDataDropTamperParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0xA4: // SecurityDataRaiseAlarm
+ _childTemp, typeSwitchError = SecurityDataRaiseAlarmParse(readBuffer)
+ case commandType == SecurityCommandType_EVENT && argument == 0xA5: // SecurityDataEmulatedKeypad
+ _childTemp, typeSwitchError = SecurityDataEmulatedKeypadParse(readBuffer)
+ case commandType == SecurityCommandType_ON && argument == 0xA6: // SecurityDataDisplayMessage
+ _childTemp, typeSwitchError = SecurityDataDisplayMessageParse(readBuffer, commandTypeContainer)
+ case commandType == SecurityCommandType_EVENT && argument == 0xA7: // SecurityDataRequestZoneName
+ _childTemp, typeSwitchError = SecurityDataRequestZoneNameParse(readBuffer)
+ case commandType == SecurityCommandType_OFF: // SecurityDataOff
+ _childTemp, typeSwitchError = SecurityDataOffParse(readBuffer, commandTypeContainer)
+ case commandType == SecurityCommandType_ON: // SecurityDataOn
+ _childTemp, typeSwitchError = SecurityDataOnParse(readBuffer, commandTypeContainer)
+ case commandType == SecurityCommandType_EVENT: // SecurityDataEvent
+ _childTemp, typeSwitchError = SecurityDataEventParse(readBuffer, commandTypeContainer)
+ default:
+ typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, argument=%v]", commandType, argument)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.Wrap(typeSwitchError, "Error parsing sub-type for type-switch of SecurityData")
+ }
+ _child = _childTemp.(SecurityDataChildSerializeRequirement)
+
+ if closeErr := readBuffer.CloseContext("SecurityData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityData")
+ }
+
+ // Finish initializing
+ _child.InitializeParent(_child, commandTypeContainer, argument)
+ return _child, nil
+}
+
+func (pm *_SecurityData) SerializeParent(writeBuffer utils.WriteBuffer, child SecurityData, serializeChildFunction func() error) error {
+ // We redirect all calls through client as some methods are only implemented there
+ m := child
+ _ = m
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("SecurityData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityData")
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pushErr := writeBuffer.PushContext("commandTypeContainer"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for commandTypeContainer")
+ }
+ _commandTypeContainerErr := writeBuffer.WriteSerializable(m.GetCommandTypeContainer())
+ if popErr := writeBuffer.PopContext("commandTypeContainer"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for commandTypeContainer")
+ }
+ if _commandTypeContainerErr != nil {
+ return errors.Wrap(_commandTypeContainerErr, "Error serializing 'commandTypeContainer' field")
+ }
+ // Virtual field
+ if _commandTypeErr := writeBuffer.WriteVirtual("commandType", m.GetCommandType()); _commandTypeErr != nil {
+ return errors.Wrap(_commandTypeErr, "Error serializing 'commandType' field")
+ }
+
+ // Simple Field (argument)
+ argument := byte(m.GetArgument())
+ _argumentErr := writeBuffer.WriteByte("argument", (argument))
+ if _argumentErr != nil {
+ return errors.Wrap(_argumentErr, "Error serializing 'argument' field")
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
+ return errors.Wrap(_typeSwitchErr, "Error serializing sub-type field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityData")
+ }
+ return nil
+}
+
+func (m *_SecurityData) isSecurityData() bool {
+ return true
+}
+
+func (m *_SecurityData) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go
new file mode 100644
index 000000000..8bf0cdce5
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataAlarmOff is the corresponding interface of SecurityDataAlarmOff
+type SecurityDataAlarmOff interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataAlarmOffExactly can be used when we want exactly this type and not a type which fulfills SecurityDataAlarmOff.
+// This is useful for switch cases.
+type SecurityDataAlarmOffExactly interface {
+ SecurityDataAlarmOff
+ isSecurityDataAlarmOff() bool
+}
+
+// _SecurityDataAlarmOff is the data-structure of this message
+type _SecurityDataAlarmOff struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataAlarmOff) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataAlarmOff) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataAlarmOff factory function for _SecurityDataAlarmOff
+func NewSecurityDataAlarmOff(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataAlarmOff {
+ _result := &_SecurityDataAlarmOff{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataAlarmOff(structType interface{}) SecurityDataAlarmOff {
+ if casted, ok := structType.(SecurityDataAlarmOff); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataAlarmOff); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataAlarmOff) GetTypeName() string {
+ return "SecurityDataAlarmOff"
+}
+
+func (m *_SecurityDataAlarmOff) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataAlarmOff) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataAlarmOff) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataAlarmOffParse(readBuffer utils.ReadBuffer) (SecurityDataAlarmOff, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataAlarmOff"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataAlarmOff")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataAlarmOff"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataAlarmOff")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataAlarmOff{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataAlarmOff) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataAlarmOff"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataAlarmOff")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataAlarmOff"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataAlarmOff")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataAlarmOff) isSecurityDataAlarmOff() bool {
+ return true
+}
+
+func (m *_SecurityDataAlarmOff) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go
new file mode 100644
index 000000000..c9b46d983
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataAlarmOn is the corresponding interface of SecurityDataAlarmOn
+type SecurityDataAlarmOn interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataAlarmOnExactly can be used when we want exactly this type and not a type which fulfills SecurityDataAlarmOn.
+// This is useful for switch cases.
+type SecurityDataAlarmOnExactly interface {
+ SecurityDataAlarmOn
+ isSecurityDataAlarmOn() bool
+}
+
+// _SecurityDataAlarmOn is the data-structure of this message
+type _SecurityDataAlarmOn struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataAlarmOn) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataAlarmOn) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataAlarmOn factory function for _SecurityDataAlarmOn
+func NewSecurityDataAlarmOn(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataAlarmOn {
+ _result := &_SecurityDataAlarmOn{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataAlarmOn(structType interface{}) SecurityDataAlarmOn {
+ if casted, ok := structType.(SecurityDataAlarmOn); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataAlarmOn); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataAlarmOn) GetTypeName() string {
+ return "SecurityDataAlarmOn"
+}
+
+func (m *_SecurityDataAlarmOn) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataAlarmOn) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataAlarmOn) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataAlarmOnParse(readBuffer utils.ReadBuffer) (SecurityDataAlarmOn, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataAlarmOn"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataAlarmOn")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataAlarmOn"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataAlarmOn")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataAlarmOn{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataAlarmOn) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataAlarmOn"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataAlarmOn")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataAlarmOn"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataAlarmOn")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataAlarmOn) isSecurityDataAlarmOn() bool {
+ return true
+}
+
+func (m *_SecurityDataAlarmOn) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go
new file mode 100644
index 000000000..0e3a2e6d8
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataArmFailedCleared is the corresponding interface of SecurityDataArmFailedCleared
+type SecurityDataArmFailedCleared interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataArmFailedClearedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataArmFailedCleared.
+// This is useful for switch cases.
+type SecurityDataArmFailedClearedExactly interface {
+ SecurityDataArmFailedCleared
+ isSecurityDataArmFailedCleared() bool
+}
+
+// _SecurityDataArmFailedCleared is the data-structure of this message
+type _SecurityDataArmFailedCleared struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataArmFailedCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataArmFailedCleared) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataArmFailedCleared factory function for _SecurityDataArmFailedCleared
+func NewSecurityDataArmFailedCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmFailedCleared {
+ _result := &_SecurityDataArmFailedCleared{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataArmFailedCleared(structType interface{}) SecurityDataArmFailedCleared {
+ if casted, ok := structType.(SecurityDataArmFailedCleared); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataArmFailedCleared); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataArmFailedCleared) GetTypeName() string {
+ return "SecurityDataArmFailedCleared"
+}
+
+func (m *_SecurityDataArmFailedCleared) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataArmFailedCleared) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataArmFailedCleared) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataArmFailedClearedParse(readBuffer utils.ReadBuffer) (SecurityDataArmFailedCleared, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataArmFailedCleared"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataArmFailedCleared")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataArmFailedCleared"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataArmFailedCleared")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataArmFailedCleared{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataArmFailedCleared) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataArmFailedCleared"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataArmFailedCleared")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataArmFailedCleared"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataArmFailedCleared")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataArmFailedCleared) isSecurityDataArmFailedCleared() bool {
+ return true
+}
+
+func (m *_SecurityDataArmFailedCleared) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go
new file mode 100644
index 000000000..632d201d0
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataArmFailedRaised is the corresponding interface of SecurityDataArmFailedRaised
+type SecurityDataArmFailedRaised interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataArmFailedRaisedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataArmFailedRaised.
+// This is useful for switch cases.
+type SecurityDataArmFailedRaisedExactly interface {
+ SecurityDataArmFailedRaised
+ isSecurityDataArmFailedRaised() bool
+}
+
+// _SecurityDataArmFailedRaised is the data-structure of this message
+type _SecurityDataArmFailedRaised struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataArmFailedRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataArmFailedRaised) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataArmFailedRaised factory function for _SecurityDataArmFailedRaised
+func NewSecurityDataArmFailedRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmFailedRaised {
+ _result := &_SecurityDataArmFailedRaised{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataArmFailedRaised(structType interface{}) SecurityDataArmFailedRaised {
+ if casted, ok := structType.(SecurityDataArmFailedRaised); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataArmFailedRaised); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataArmFailedRaised) GetTypeName() string {
+ return "SecurityDataArmFailedRaised"
+}
+
+func (m *_SecurityDataArmFailedRaised) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataArmFailedRaised) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataArmFailedRaised) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataArmFailedRaisedParse(readBuffer utils.ReadBuffer) (SecurityDataArmFailedRaised, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataArmFailedRaised"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataArmFailedRaised")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataArmFailedRaised"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataArmFailedRaised")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataArmFailedRaised{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataArmFailedRaised) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataArmFailedRaised"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataArmFailedRaised")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataArmFailedRaised"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataArmFailedRaised")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataArmFailedRaised) isSecurityDataArmFailedRaised() bool {
+ return true
+}
+
+func (m *_SecurityDataArmFailedRaised) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go
new file mode 100644
index 000000000..941851232
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataArmReadyNotReady is the corresponding interface of SecurityDataArmReadyNotReady
+type SecurityDataArmReadyNotReady interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetZoneNumber returns ZoneNumber (property field)
+ GetZoneNumber() uint8
+}
+
+// SecurityDataArmReadyNotReadyExactly can be used when we want exactly this type and not a type which fulfills SecurityDataArmReadyNotReady.
+// This is useful for switch cases.
+type SecurityDataArmReadyNotReadyExactly interface {
+ SecurityDataArmReadyNotReady
+ isSecurityDataArmReadyNotReady() bool
+}
+
+// _SecurityDataArmReadyNotReady is the data-structure of this message
+type _SecurityDataArmReadyNotReady struct {
+ *_SecurityData
+ ZoneNumber uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataArmReadyNotReady) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataArmReadyNotReady) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataArmReadyNotReady) GetZoneNumber() uint8 {
+ return m.ZoneNumber
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataArmReadyNotReady factory function for _SecurityDataArmReadyNotReady
+func NewSecurityDataArmReadyNotReady(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmReadyNotReady {
+ _result := &_SecurityDataArmReadyNotReady{
+ ZoneNumber: zoneNumber,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataArmReadyNotReady(structType interface{}) SecurityDataArmReadyNotReady {
+ if casted, ok := structType.(SecurityDataArmReadyNotReady); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataArmReadyNotReady); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataArmReadyNotReady) GetTypeName() string {
+ return "SecurityDataArmReadyNotReady"
+}
+
+func (m *_SecurityDataArmReadyNotReady) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataArmReadyNotReady) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneNumber)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataArmReadyNotReady) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataArmReadyNotReadyParse(readBuffer utils.ReadBuffer) (SecurityDataArmReadyNotReady, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataArmReadyNotReady"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataArmReadyNotReady")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneNumber)
+ _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8)
+ if _zoneNumberErr != nil {
+ return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataArmReadyNotReady")
+ }
+ zoneNumber := _zoneNumber
+
+ if closeErr := readBuffer.CloseContext("SecurityDataArmReadyNotReady"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataArmReadyNotReady")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataArmReadyNotReady{
+ ZoneNumber: zoneNumber,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataArmReadyNotReady) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataArmReadyNotReady"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataArmReadyNotReady")
+ }
+
+ // Simple Field (zoneNumber)
+ zoneNumber := uint8(m.GetZoneNumber())
+ _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber))
+ if _zoneNumberErr != nil {
+ return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataArmReadyNotReady"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataArmReadyNotReady")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataArmReadyNotReady) isSecurityDataArmReadyNotReady() bool {
+ return true
+}
+
+func (m *_SecurityDataArmReadyNotReady) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go
new file mode 100644
index 000000000..c0973826e
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go
@@ -0,0 +1,302 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataArmSystem is the corresponding interface of SecurityDataArmSystem
+type SecurityDataArmSystem interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetArmMode returns ArmMode (property field)
+ GetArmMode() byte
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+ // GetIsArmToAwayMode returns IsArmToAwayMode (virtual field)
+ GetIsArmToAwayMode() bool
+ // GetIsArmToNightMode returns IsArmToNightMode (virtual field)
+ GetIsArmToNightMode() bool
+ // GetIsArmToDayMode returns IsArmToDayMode (virtual field)
+ GetIsArmToDayMode() bool
+ // GetIsArmToVacationMode returns IsArmToVacationMode (virtual field)
+ GetIsArmToVacationMode() bool
+ // GetIsArmToHighestLevelOfProtection returns IsArmToHighestLevelOfProtection (virtual field)
+ GetIsArmToHighestLevelOfProtection() bool
+}
+
+// SecurityDataArmSystemExactly can be used when we want exactly this type and not a type which fulfills SecurityDataArmSystem.
+// This is useful for switch cases.
+type SecurityDataArmSystemExactly interface {
+ SecurityDataArmSystem
+ isSecurityDataArmSystem() bool
+}
+
+// _SecurityDataArmSystem is the data-structure of this message
+type _SecurityDataArmSystem struct {
+ *_SecurityData
+ ArmMode byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataArmSystem) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataArmSystem) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataArmSystem) GetArmMode() byte {
+ return m.ArmMode
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_SecurityDataArmSystem) GetIsReserved() bool {
+ return bool(bool(bool((m.GetArmMode()) == (0x00))) || bool(bool(bool(bool((m.GetArmMode()) >= (0x05))) && bool(bool((m.GetArmMode()) <= (0xFE))))))
+}
+
+func (m *_SecurityDataArmSystem) GetIsArmToAwayMode() bool {
+ return bool(bool((m.GetArmMode()) == (0x01)))
+}
+
+func (m *_SecurityDataArmSystem) GetIsArmToNightMode() bool {
+ return bool(bool((m.GetArmMode()) == (0x02)))
+}
+
+func (m *_SecurityDataArmSystem) GetIsArmToDayMode() bool {
+ return bool(bool((m.GetArmMode()) == (0x03)))
+}
+
+func (m *_SecurityDataArmSystem) GetIsArmToVacationMode() bool {
+ return bool(bool((m.GetArmMode()) == (0x04)))
+}
+
+func (m *_SecurityDataArmSystem) GetIsArmToHighestLevelOfProtection() bool {
+ return bool(bool((m.GetArmMode()) > (0xFE)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataArmSystem factory function for _SecurityDataArmSystem
+func NewSecurityDataArmSystem(armMode byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmSystem {
+ _result := &_SecurityDataArmSystem{
+ ArmMode: armMode,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataArmSystem(structType interface{}) SecurityDataArmSystem {
+ if casted, ok := structType.(SecurityDataArmSystem); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataArmSystem); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataArmSystem) GetTypeName() string {
+ return "SecurityDataArmSystem"
+}
+
+func (m *_SecurityDataArmSystem) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataArmSystem) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (armMode)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataArmSystem) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataArmSystemParse(readBuffer utils.ReadBuffer) (SecurityDataArmSystem, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataArmSystem"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataArmSystem")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (armMode)
+ _armMode, _armModeErr := readBuffer.ReadByte("armMode")
+ if _armModeErr != nil {
+ return nil, errors.Wrap(_armModeErr, "Error parsing 'armMode' field of SecurityDataArmSystem")
+ }
+ armMode := _armMode
+
+ // Virtual field
+ _isReserved := bool(bool((armMode) == (0x00))) || bool(bool(bool(bool((armMode) >= (0x05))) && bool(bool((armMode) <= (0xFE)))))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ // Virtual field
+ _isArmToAwayMode := bool((armMode) == (0x01))
+ isArmToAwayMode := bool(_isArmToAwayMode)
+ _ = isArmToAwayMode
+
+ // Virtual field
+ _isArmToNightMode := bool((armMode) == (0x02))
+ isArmToNightMode := bool(_isArmToNightMode)
+ _ = isArmToNightMode
+
+ // Virtual field
+ _isArmToDayMode := bool((armMode) == (0x03))
+ isArmToDayMode := bool(_isArmToDayMode)
+ _ = isArmToDayMode
+
+ // Virtual field
+ _isArmToVacationMode := bool((armMode) == (0x04))
+ isArmToVacationMode := bool(_isArmToVacationMode)
+ _ = isArmToVacationMode
+
+ // Virtual field
+ _isArmToHighestLevelOfProtection := bool((armMode) > (0xFE))
+ isArmToHighestLevelOfProtection := bool(_isArmToHighestLevelOfProtection)
+ _ = isArmToHighestLevelOfProtection
+
+ if closeErr := readBuffer.CloseContext("SecurityDataArmSystem"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataArmSystem")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataArmSystem{
+ ArmMode: armMode,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataArmSystem) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataArmSystem"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataArmSystem")
+ }
+
+ // Simple Field (armMode)
+ armMode := byte(m.GetArmMode())
+ _armModeErr := writeBuffer.WriteByte("armMode", (armMode))
+ if _armModeErr != nil {
+ return errors.Wrap(_armModeErr, "Error serializing 'armMode' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+ // Virtual field
+ if _isArmToAwayModeErr := writeBuffer.WriteVirtual("isArmToAwayMode", m.GetIsArmToAwayMode()); _isArmToAwayModeErr != nil {
+ return errors.Wrap(_isArmToAwayModeErr, "Error serializing 'isArmToAwayMode' field")
+ }
+ // Virtual field
+ if _isArmToNightModeErr := writeBuffer.WriteVirtual("isArmToNightMode", m.GetIsArmToNightMode()); _isArmToNightModeErr != nil {
+ return errors.Wrap(_isArmToNightModeErr, "Error serializing 'isArmToNightMode' field")
+ }
+ // Virtual field
+ if _isArmToDayModeErr := writeBuffer.WriteVirtual("isArmToDayMode", m.GetIsArmToDayMode()); _isArmToDayModeErr != nil {
+ return errors.Wrap(_isArmToDayModeErr, "Error serializing 'isArmToDayMode' field")
+ }
+ // Virtual field
+ if _isArmToVacationModeErr := writeBuffer.WriteVirtual("isArmToVacationMode", m.GetIsArmToVacationMode()); _isArmToVacationModeErr != nil {
+ return errors.Wrap(_isArmToVacationModeErr, "Error serializing 'isArmToVacationMode' field")
+ }
+ // Virtual field
+ if _isArmToHighestLevelOfProtectionErr := writeBuffer.WriteVirtual("isArmToHighestLevelOfProtection", m.GetIsArmToHighestLevelOfProtection()); _isArmToHighestLevelOfProtectionErr != nil {
+ return errors.Wrap(_isArmToHighestLevelOfProtectionErr, "Error serializing 'isArmToHighestLevelOfProtection' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataArmSystem"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataArmSystem")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataArmSystem) isSecurityDataArmSystem() bool {
+ return true
+}
+
+func (m *_SecurityDataArmSystem) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go
new file mode 100644
index 000000000..df0a50d97
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataCurrentAlarmType is the corresponding interface of SecurityDataCurrentAlarmType
+type SecurityDataCurrentAlarmType interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataCurrentAlarmTypeExactly can be used when we want exactly this type and not a type which fulfills SecurityDataCurrentAlarmType.
+// This is useful for switch cases.
+type SecurityDataCurrentAlarmTypeExactly interface {
+ SecurityDataCurrentAlarmType
+ isSecurityDataCurrentAlarmType() bool
+}
+
+// _SecurityDataCurrentAlarmType is the data-structure of this message
+type _SecurityDataCurrentAlarmType struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataCurrentAlarmType) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataCurrentAlarmType) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataCurrentAlarmType factory function for _SecurityDataCurrentAlarmType
+func NewSecurityDataCurrentAlarmType(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataCurrentAlarmType {
+ _result := &_SecurityDataCurrentAlarmType{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataCurrentAlarmType(structType interface{}) SecurityDataCurrentAlarmType {
+ if casted, ok := structType.(SecurityDataCurrentAlarmType); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataCurrentAlarmType); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataCurrentAlarmType) GetTypeName() string {
+ return "SecurityDataCurrentAlarmType"
+}
+
+func (m *_SecurityDataCurrentAlarmType) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataCurrentAlarmType) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataCurrentAlarmType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataCurrentAlarmTypeParse(readBuffer utils.ReadBuffer) (SecurityDataCurrentAlarmType, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataCurrentAlarmType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataCurrentAlarmType")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataCurrentAlarmType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataCurrentAlarmType")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataCurrentAlarmType{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataCurrentAlarmType) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataCurrentAlarmType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataCurrentAlarmType")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataCurrentAlarmType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataCurrentAlarmType")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataCurrentAlarmType) isSecurityDataCurrentAlarmType() bool {
+ return true
+}
+
+func (m *_SecurityDataCurrentAlarmType) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go
new file mode 100644
index 000000000..ae0766f7b
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataDisplayMessage is the corresponding interface of SecurityDataDisplayMessage
+type SecurityDataDisplayMessage interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetMessage returns Message (property field)
+ GetMessage() string
+}
+
+// SecurityDataDisplayMessageExactly can be used when we want exactly this type and not a type which fulfills SecurityDataDisplayMessage.
+// This is useful for switch cases.
+type SecurityDataDisplayMessageExactly interface {
+ SecurityDataDisplayMessage
+ isSecurityDataDisplayMessage() bool
+}
+
+// _SecurityDataDisplayMessage is the data-structure of this message
+type _SecurityDataDisplayMessage struct {
+ *_SecurityData
+ Message string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataDisplayMessage) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataDisplayMessage) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataDisplayMessage) GetMessage() string {
+ return m.Message
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataDisplayMessage factory function for _SecurityDataDisplayMessage
+func NewSecurityDataDisplayMessage(message string, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataDisplayMessage {
+ _result := &_SecurityDataDisplayMessage{
+ Message: message,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataDisplayMessage(structType interface{}) SecurityDataDisplayMessage {
+ if casted, ok := structType.(SecurityDataDisplayMessage); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataDisplayMessage); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataDisplayMessage) GetTypeName() string {
+ return "SecurityDataDisplayMessage"
+}
+
+func (m *_SecurityDataDisplayMessage) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataDisplayMessage) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (message)
+ lengthInBits += uint16(int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataDisplayMessage) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataDisplayMessageParse(readBuffer utils.ReadBuffer, commandTypeContainer SecurityCommandTypeContainer) (SecurityDataDisplayMessage, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataDisplayMessage"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataDisplayMessage")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (message)
+ _message, _messageErr := readBuffer.ReadString("message", uint32((commandTypeContainer.NumBytes())-(1)))
+ if _messageErr != nil {
+ return nil, errors.Wrap(_messageErr, "Error parsing 'message' field of SecurityDataDisplayMessage")
+ }
+ message := _message
+
+ if closeErr := readBuffer.CloseContext("SecurityDataDisplayMessage"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataDisplayMessage")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataDisplayMessage{
+ Message: message,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataDisplayMessage) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataDisplayMessage"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataDisplayMessage")
+ }
+
+ // Simple Field (message)
+ message := string(m.GetMessage())
+ _messageErr := writeBuffer.WriteString("message", uint32((m.GetCommandTypeContainer().NumBytes())-(1)), "UTF-8", (message))
+ if _messageErr != nil {
+ return errors.Wrap(_messageErr, "Error serializing 'message' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataDisplayMessage"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataDisplayMessage")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataDisplayMessage) isSecurityDataDisplayMessage() bool {
+ return true
+}
+
+func (m *_SecurityDataDisplayMessage) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go
new file mode 100644
index 000000000..8d3900584
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataDropTamper is the corresponding interface of SecurityDataDropTamper
+type SecurityDataDropTamper interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataDropTamperExactly can be used when we want exactly this type and not a type which fulfills SecurityDataDropTamper.
+// This is useful for switch cases.
+type SecurityDataDropTamperExactly interface {
+ SecurityDataDropTamper
+ isSecurityDataDropTamper() bool
+}
+
+// _SecurityDataDropTamper is the data-structure of this message
+type _SecurityDataDropTamper struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataDropTamper) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataDropTamper) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataDropTamper factory function for _SecurityDataDropTamper
+func NewSecurityDataDropTamper(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataDropTamper {
+ _result := &_SecurityDataDropTamper{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataDropTamper(structType interface{}) SecurityDataDropTamper {
+ if casted, ok := structType.(SecurityDataDropTamper); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataDropTamper); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataDropTamper) GetTypeName() string {
+ return "SecurityDataDropTamper"
+}
+
+func (m *_SecurityDataDropTamper) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataDropTamper) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataDropTamper) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataDropTamperParse(readBuffer utils.ReadBuffer) (SecurityDataDropTamper, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataDropTamper"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataDropTamper")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataDropTamper"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataDropTamper")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataDropTamper{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataDropTamper) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataDropTamper"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataDropTamper")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataDropTamper"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataDropTamper")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataDropTamper) isSecurityDataDropTamper() bool {
+ return true
+}
+
+func (m *_SecurityDataDropTamper) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go
new file mode 100644
index 000000000..d56863a7f
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go
@@ -0,0 +1,387 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataEmulatedKeypad is the corresponding interface of SecurityDataEmulatedKeypad
+type SecurityDataEmulatedKeypad interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetKey returns Key (property field)
+ GetKey() byte
+ // GetIsAscii returns IsAscii (virtual field)
+ GetIsAscii() bool
+ // GetIsCustom returns IsCustom (virtual field)
+ GetIsCustom() bool
+ // GetIsEnter returns IsEnter (virtual field)
+ GetIsEnter() bool
+ // GetIsShift returns IsShift (virtual field)
+ GetIsShift() bool
+ // GetIsPanic returns IsPanic (virtual field)
+ GetIsPanic() bool
+ // GetIsFire returns IsFire (virtual field)
+ GetIsFire() bool
+ // GetIsARM returns IsARM (virtual field)
+ GetIsARM() bool
+ // GetIsAway returns IsAway (virtual field)
+ GetIsAway() bool
+ // GetIsNight returns IsNight (virtual field)
+ GetIsNight() bool
+ // GetIsDay returns IsDay (virtual field)
+ GetIsDay() bool
+ // GetIsVacation returns IsVacation (virtual field)
+ GetIsVacation() bool
+}
+
+// SecurityDataEmulatedKeypadExactly can be used when we want exactly this type and not a type which fulfills SecurityDataEmulatedKeypad.
+// This is useful for switch cases.
+type SecurityDataEmulatedKeypadExactly interface {
+ SecurityDataEmulatedKeypad
+ isSecurityDataEmulatedKeypad() bool
+}
+
+// _SecurityDataEmulatedKeypad is the data-structure of this message
+type _SecurityDataEmulatedKeypad struct {
+ *_SecurityData
+ Key byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataEmulatedKeypad) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataEmulatedKeypad) GetKey() byte {
+ return m.Key
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_SecurityDataEmulatedKeypad) GetIsAscii() bool {
+ return bool(bool(bool((m.GetKey()) >= (0x00))) && bool(bool((m.GetKey()) <= (0x7F))))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsCustom() bool {
+ return bool(bool((m.GetKey()) >= (0x80)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsEnter() bool {
+ return bool(bool((m.GetKey()) == (0x0D)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsShift() bool {
+ return bool(bool((m.GetKey()) == (0x80)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsPanic() bool {
+ return bool(bool((m.GetKey()) == (0x81)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsFire() bool {
+ return bool(bool((m.GetKey()) == (0x82)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsARM() bool {
+ return bool(bool((m.GetKey()) == (0x83)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsAway() bool {
+ return bool(bool((m.GetKey()) == (0x84)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsNight() bool {
+ return bool(bool((m.GetKey()) == (0x85)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsDay() bool {
+ return bool(bool((m.GetKey()) == (0x86)))
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetIsVacation() bool {
+ return bool(bool((m.GetKey()) == (0x87)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataEmulatedKeypad factory function for _SecurityDataEmulatedKeypad
+func NewSecurityDataEmulatedKeypad(key byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataEmulatedKeypad {
+ _result := &_SecurityDataEmulatedKeypad{
+ Key: key,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataEmulatedKeypad(structType interface{}) SecurityDataEmulatedKeypad {
+ if casted, ok := structType.(SecurityDataEmulatedKeypad); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataEmulatedKeypad); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetTypeName() string {
+ return "SecurityDataEmulatedKeypad"
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (key)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataEmulatedKeypad) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataEmulatedKeypadParse(readBuffer utils.ReadBuffer) (SecurityDataEmulatedKeypad, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataEmulatedKeypad"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataEmulatedKeypad")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (key)
+ _key, _keyErr := readBuffer.ReadByte("key")
+ if _keyErr != nil {
+ return nil, errors.Wrap(_keyErr, "Error parsing 'key' field of SecurityDataEmulatedKeypad")
+ }
+ key := _key
+
+ // Virtual field
+ _isAscii := bool(bool((key) >= (0x00))) && bool(bool((key) <= (0x7F)))
+ isAscii := bool(_isAscii)
+ _ = isAscii
+
+ // Virtual field
+ _isCustom := bool((key) >= (0x80))
+ isCustom := bool(_isCustom)
+ _ = isCustom
+
+ // Virtual field
+ _isEnter := bool((key) == (0x0D))
+ isEnter := bool(_isEnter)
+ _ = isEnter
+
+ // Virtual field
+ _isShift := bool((key) == (0x80))
+ isShift := bool(_isShift)
+ _ = isShift
+
+ // Virtual field
+ _isPanic := bool((key) == (0x81))
+ isPanic := bool(_isPanic)
+ _ = isPanic
+
+ // Virtual field
+ _isFire := bool((key) == (0x82))
+ isFire := bool(_isFire)
+ _ = isFire
+
+ // Virtual field
+ _isARM := bool((key) == (0x83))
+ isARM := bool(_isARM)
+ _ = isARM
+
+ // Virtual field
+ _isAway := bool((key) == (0x84))
+ isAway := bool(_isAway)
+ _ = isAway
+
+ // Virtual field
+ _isNight := bool((key) == (0x85))
+ isNight := bool(_isNight)
+ _ = isNight
+
+ // Virtual field
+ _isDay := bool((key) == (0x86))
+ isDay := bool(_isDay)
+ _ = isDay
+
+ // Virtual field
+ _isVacation := bool((key) == (0x87))
+ isVacation := bool(_isVacation)
+ _ = isVacation
+
+ if closeErr := readBuffer.CloseContext("SecurityDataEmulatedKeypad"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataEmulatedKeypad")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataEmulatedKeypad{
+ Key: key,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataEmulatedKeypad) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataEmulatedKeypad"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataEmulatedKeypad")
+ }
+
+ // Simple Field (key)
+ key := byte(m.GetKey())
+ _keyErr := writeBuffer.WriteByte("key", (key))
+ if _keyErr != nil {
+ return errors.Wrap(_keyErr, "Error serializing 'key' field")
+ }
+ // Virtual field
+ if _isAsciiErr := writeBuffer.WriteVirtual("isAscii", m.GetIsAscii()); _isAsciiErr != nil {
+ return errors.Wrap(_isAsciiErr, "Error serializing 'isAscii' field")
+ }
+ // Virtual field
+ if _isCustomErr := writeBuffer.WriteVirtual("isCustom", m.GetIsCustom()); _isCustomErr != nil {
+ return errors.Wrap(_isCustomErr, "Error serializing 'isCustom' field")
+ }
+ // Virtual field
+ if _isEnterErr := writeBuffer.WriteVirtual("isEnter", m.GetIsEnter()); _isEnterErr != nil {
+ return errors.Wrap(_isEnterErr, "Error serializing 'isEnter' field")
+ }
+ // Virtual field
+ if _isShiftErr := writeBuffer.WriteVirtual("isShift", m.GetIsShift()); _isShiftErr != nil {
+ return errors.Wrap(_isShiftErr, "Error serializing 'isShift' field")
+ }
+ // Virtual field
+ if _isPanicErr := writeBuffer.WriteVirtual("isPanic", m.GetIsPanic()); _isPanicErr != nil {
+ return errors.Wrap(_isPanicErr, "Error serializing 'isPanic' field")
+ }
+ // Virtual field
+ if _isFireErr := writeBuffer.WriteVirtual("isFire", m.GetIsFire()); _isFireErr != nil {
+ return errors.Wrap(_isFireErr, "Error serializing 'isFire' field")
+ }
+ // Virtual field
+ if _isARMErr := writeBuffer.WriteVirtual("isARM", m.GetIsARM()); _isARMErr != nil {
+ return errors.Wrap(_isARMErr, "Error serializing 'isARM' field")
+ }
+ // Virtual field
+ if _isAwayErr := writeBuffer.WriteVirtual("isAway", m.GetIsAway()); _isAwayErr != nil {
+ return errors.Wrap(_isAwayErr, "Error serializing 'isAway' field")
+ }
+ // Virtual field
+ if _isNightErr := writeBuffer.WriteVirtual("isNight", m.GetIsNight()); _isNightErr != nil {
+ return errors.Wrap(_isNightErr, "Error serializing 'isNight' field")
+ }
+ // Virtual field
+ if _isDayErr := writeBuffer.WriteVirtual("isDay", m.GetIsDay()); _isDayErr != nil {
+ return errors.Wrap(_isDayErr, "Error serializing 'isDay' field")
+ }
+ // Virtual field
+ if _isVacationErr := writeBuffer.WriteVirtual("isVacation", m.GetIsVacation()); _isVacationErr != nil {
+ return errors.Wrap(_isVacationErr, "Error serializing 'isVacation' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataEmulatedKeypad"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataEmulatedKeypad")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataEmulatedKeypad) isSecurityDataEmulatedKeypad() bool {
+ return true
+}
+
+func (m *_SecurityDataEmulatedKeypad) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go
new file mode 100644
index 000000000..3b546dbb2
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataEntryDelayStarted is the corresponding interface of SecurityDataEntryDelayStarted
+type SecurityDataEntryDelayStarted interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataEntryDelayStartedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataEntryDelayStarted.
+// This is useful for switch cases.
+type SecurityDataEntryDelayStartedExactly interface {
+ SecurityDataEntryDelayStarted
+ isSecurityDataEntryDelayStarted() bool
+}
+
+// _SecurityDataEntryDelayStarted is the data-structure of this message
+type _SecurityDataEntryDelayStarted struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataEntryDelayStarted) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataEntryDelayStarted) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataEntryDelayStarted factory function for _SecurityDataEntryDelayStarted
+func NewSecurityDataEntryDelayStarted(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataEntryDelayStarted {
+ _result := &_SecurityDataEntryDelayStarted{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataEntryDelayStarted(structType interface{}) SecurityDataEntryDelayStarted {
+ if casted, ok := structType.(SecurityDataEntryDelayStarted); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataEntryDelayStarted); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataEntryDelayStarted) GetTypeName() string {
+ return "SecurityDataEntryDelayStarted"
+}
+
+func (m *_SecurityDataEntryDelayStarted) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataEntryDelayStarted) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataEntryDelayStarted) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataEntryDelayStartedParse(readBuffer utils.ReadBuffer) (SecurityDataEntryDelayStarted, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataEntryDelayStarted"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataEntryDelayStarted")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataEntryDelayStarted"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataEntryDelayStarted")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataEntryDelayStarted{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataEntryDelayStarted) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataEntryDelayStarted"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataEntryDelayStarted")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataEntryDelayStarted"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataEntryDelayStarted")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataEntryDelayStarted) isSecurityDataEntryDelayStarted() bool {
+ return true
+}
+
+func (m *_SecurityDataEntryDelayStarted) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go
new file mode 100644
index 000000000..8141466f4
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataEvent is the corresponding interface of SecurityDataEvent
+type SecurityDataEvent interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetData returns Data (property field)
+ GetData() []byte
+}
+
+// SecurityDataEventExactly can be used when we want exactly this type and not a type which fulfills SecurityDataEvent.
+// This is useful for switch cases.
+type SecurityDataEventExactly interface {
+ SecurityDataEvent
+ isSecurityDataEvent() bool
+}
+
+// _SecurityDataEvent is the data-structure of this message
+type _SecurityDataEvent struct {
+ *_SecurityData
+ Data []byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataEvent) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataEvent) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataEvent) GetData() []byte {
+ return m.Data
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataEvent factory function for _SecurityDataEvent
+func NewSecurityDataEvent(data []byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataEvent {
+ _result := &_SecurityDataEvent{
+ Data: data,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataEvent(structType interface{}) SecurityDataEvent {
+ if casted, ok := structType.(SecurityDataEvent); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataEvent); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataEvent) GetTypeName() string {
+ return "SecurityDataEvent"
+}
+
+func (m *_SecurityDataEvent) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataEvent) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.Data) > 0 {
+ lengthInBits += 8 * uint16(len(m.Data))
+ }
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataEvent) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataEventParse(readBuffer utils.ReadBuffer, commandTypeContainer SecurityCommandTypeContainer) (SecurityDataEvent, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataEvent"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataEvent")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+ // Byte Array field (data)
+ numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(1)))
+ data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of SecurityDataEvent")
+ }
+
+ if closeErr := readBuffer.CloseContext("SecurityDataEvent"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataEvent")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataEvent{
+ Data: data,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataEvent) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataEvent"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataEvent")
+ }
+
+ // Array Field (data)
+ // Byte Array field (data)
+ if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
+ return errors.Wrap(err, "Error serializing 'data' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataEvent"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataEvent")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataEvent) isSecurityDataEvent() bool {
+ return true
+}
+
+func (m *_SecurityDataEvent) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go
new file mode 100644
index 000000000..e8393b09f
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataExitDelayStarted is the corresponding interface of SecurityDataExitDelayStarted
+type SecurityDataExitDelayStarted interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataExitDelayStartedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataExitDelayStarted.
+// This is useful for switch cases.
+type SecurityDataExitDelayStartedExactly interface {
+ SecurityDataExitDelayStarted
+ isSecurityDataExitDelayStarted() bool
+}
+
+// _SecurityDataExitDelayStarted is the data-structure of this message
+type _SecurityDataExitDelayStarted struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataExitDelayStarted) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataExitDelayStarted) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataExitDelayStarted factory function for _SecurityDataExitDelayStarted
+func NewSecurityDataExitDelayStarted(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataExitDelayStarted {
+ _result := &_SecurityDataExitDelayStarted{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataExitDelayStarted(structType interface{}) SecurityDataExitDelayStarted {
+ if casted, ok := structType.(SecurityDataExitDelayStarted); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataExitDelayStarted); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataExitDelayStarted) GetTypeName() string {
+ return "SecurityDataExitDelayStarted"
+}
+
+func (m *_SecurityDataExitDelayStarted) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataExitDelayStarted) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataExitDelayStarted) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataExitDelayStartedParse(readBuffer utils.ReadBuffer) (SecurityDataExitDelayStarted, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataExitDelayStarted"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataExitDelayStarted")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataExitDelayStarted"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataExitDelayStarted")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataExitDelayStarted{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataExitDelayStarted) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataExitDelayStarted"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataExitDelayStarted")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataExitDelayStarted"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataExitDelayStarted")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataExitDelayStarted) isSecurityDataExitDelayStarted() bool {
+ return true
+}
+
+func (m *_SecurityDataExitDelayStarted) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go
new file mode 100644
index 000000000..d9d254a58
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataFireAlarmCleared is the corresponding interface of SecurityDataFireAlarmCleared
+type SecurityDataFireAlarmCleared interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataFireAlarmClearedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataFireAlarmCleared.
+// This is useful for switch cases.
+type SecurityDataFireAlarmClearedExactly interface {
+ SecurityDataFireAlarmCleared
+ isSecurityDataFireAlarmCleared() bool
+}
+
+// _SecurityDataFireAlarmCleared is the data-structure of this message
+type _SecurityDataFireAlarmCleared struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataFireAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataFireAlarmCleared) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataFireAlarmCleared factory function for _SecurityDataFireAlarmCleared
+func NewSecurityDataFireAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataFireAlarmCleared {
+ _result := &_SecurityDataFireAlarmCleared{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataFireAlarmCleared(structType interface{}) SecurityDataFireAlarmCleared {
+ if casted, ok := structType.(SecurityDataFireAlarmCleared); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataFireAlarmCleared); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataFireAlarmCleared) GetTypeName() string {
+ return "SecurityDataFireAlarmCleared"
+}
+
+func (m *_SecurityDataFireAlarmCleared) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataFireAlarmCleared) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataFireAlarmCleared) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataFireAlarmClearedParse(readBuffer utils.ReadBuffer) (SecurityDataFireAlarmCleared, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataFireAlarmCleared"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataFireAlarmCleared")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataFireAlarmCleared"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataFireAlarmCleared")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataFireAlarmCleared{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataFireAlarmCleared) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataFireAlarmCleared"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataFireAlarmCleared")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataFireAlarmCleared"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataFireAlarmCleared")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataFireAlarmCleared) isSecurityDataFireAlarmCleared() bool {
+ return true
+}
+
+func (m *_SecurityDataFireAlarmCleared) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go
new file mode 100644
index 000000000..dff3188ff
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataFireAlarmRaised is the corresponding interface of SecurityDataFireAlarmRaised
+type SecurityDataFireAlarmRaised interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataFireAlarmRaisedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataFireAlarmRaised.
+// This is useful for switch cases.
+type SecurityDataFireAlarmRaisedExactly interface {
+ SecurityDataFireAlarmRaised
+ isSecurityDataFireAlarmRaised() bool
+}
+
+// _SecurityDataFireAlarmRaised is the data-structure of this message
+type _SecurityDataFireAlarmRaised struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataFireAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataFireAlarmRaised) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataFireAlarmRaised factory function for _SecurityDataFireAlarmRaised
+func NewSecurityDataFireAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataFireAlarmRaised {
+ _result := &_SecurityDataFireAlarmRaised{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataFireAlarmRaised(structType interface{}) SecurityDataFireAlarmRaised {
+ if casted, ok := structType.(SecurityDataFireAlarmRaised); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataFireAlarmRaised); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataFireAlarmRaised) GetTypeName() string {
+ return "SecurityDataFireAlarmRaised"
+}
+
+func (m *_SecurityDataFireAlarmRaised) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataFireAlarmRaised) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataFireAlarmRaised) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataFireAlarmRaisedParse(readBuffer utils.ReadBuffer) (SecurityDataFireAlarmRaised, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataFireAlarmRaised"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataFireAlarmRaised")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataFireAlarmRaised"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataFireAlarmRaised")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataFireAlarmRaised{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataFireAlarmRaised) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataFireAlarmRaised"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataFireAlarmRaised")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataFireAlarmRaised"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataFireAlarmRaised")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataFireAlarmRaised) isSecurityDataFireAlarmRaised() bool {
+ return true
+}
+
+func (m *_SecurityDataFireAlarmRaised) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go
new file mode 100644
index 000000000..bf73dab10
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataGasAlarmCleared is the corresponding interface of SecurityDataGasAlarmCleared
+type SecurityDataGasAlarmCleared interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataGasAlarmClearedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataGasAlarmCleared.
+// This is useful for switch cases.
+type SecurityDataGasAlarmClearedExactly interface {
+ SecurityDataGasAlarmCleared
+ isSecurityDataGasAlarmCleared() bool
+}
+
+// _SecurityDataGasAlarmCleared is the data-structure of this message
+type _SecurityDataGasAlarmCleared struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataGasAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataGasAlarmCleared) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataGasAlarmCleared factory function for _SecurityDataGasAlarmCleared
+func NewSecurityDataGasAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataGasAlarmCleared {
+ _result := &_SecurityDataGasAlarmCleared{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataGasAlarmCleared(structType interface{}) SecurityDataGasAlarmCleared {
+ if casted, ok := structType.(SecurityDataGasAlarmCleared); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataGasAlarmCleared); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataGasAlarmCleared) GetTypeName() string {
+ return "SecurityDataGasAlarmCleared"
+}
+
+func (m *_SecurityDataGasAlarmCleared) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataGasAlarmCleared) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataGasAlarmCleared) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataGasAlarmClearedParse(readBuffer utils.ReadBuffer) (SecurityDataGasAlarmCleared, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataGasAlarmCleared"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataGasAlarmCleared")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataGasAlarmCleared"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataGasAlarmCleared")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataGasAlarmCleared{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataGasAlarmCleared) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataGasAlarmCleared"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataGasAlarmCleared")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataGasAlarmCleared"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataGasAlarmCleared")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataGasAlarmCleared) isSecurityDataGasAlarmCleared() bool {
+ return true
+}
+
+func (m *_SecurityDataGasAlarmCleared) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go
new file mode 100644
index 000000000..5a868a232
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataGasAlarmRaised is the corresponding interface of SecurityDataGasAlarmRaised
+type SecurityDataGasAlarmRaised interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataGasAlarmRaisedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataGasAlarmRaised.
+// This is useful for switch cases.
+type SecurityDataGasAlarmRaisedExactly interface {
+ SecurityDataGasAlarmRaised
+ isSecurityDataGasAlarmRaised() bool
+}
+
+// _SecurityDataGasAlarmRaised is the data-structure of this message
+type _SecurityDataGasAlarmRaised struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataGasAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataGasAlarmRaised) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataGasAlarmRaised factory function for _SecurityDataGasAlarmRaised
+func NewSecurityDataGasAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataGasAlarmRaised {
+ _result := &_SecurityDataGasAlarmRaised{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataGasAlarmRaised(structType interface{}) SecurityDataGasAlarmRaised {
+ if casted, ok := structType.(SecurityDataGasAlarmRaised); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataGasAlarmRaised); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataGasAlarmRaised) GetTypeName() string {
+ return "SecurityDataGasAlarmRaised"
+}
+
+func (m *_SecurityDataGasAlarmRaised) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataGasAlarmRaised) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataGasAlarmRaised) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataGasAlarmRaisedParse(readBuffer utils.ReadBuffer) (SecurityDataGasAlarmRaised, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataGasAlarmRaised"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataGasAlarmRaised")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataGasAlarmRaised"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataGasAlarmRaised")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataGasAlarmRaised{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataGasAlarmRaised) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataGasAlarmRaised"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataGasAlarmRaised")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataGasAlarmRaised"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataGasAlarmRaised")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataGasAlarmRaised) isSecurityDataGasAlarmRaised() bool {
+ return true
+}
+
+func (m *_SecurityDataGasAlarmRaised) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go
new file mode 100644
index 000000000..f25f2a3ed
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataLineCutAlarmCleared is the corresponding interface of SecurityDataLineCutAlarmCleared
+type SecurityDataLineCutAlarmCleared interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataLineCutAlarmClearedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataLineCutAlarmCleared.
+// This is useful for switch cases.
+type SecurityDataLineCutAlarmClearedExactly interface {
+ SecurityDataLineCutAlarmCleared
+ isSecurityDataLineCutAlarmCleared() bool
+}
+
+// _SecurityDataLineCutAlarmCleared is the data-structure of this message
+type _SecurityDataLineCutAlarmCleared struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataLineCutAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataLineCutAlarmCleared factory function for _SecurityDataLineCutAlarmCleared
+func NewSecurityDataLineCutAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLineCutAlarmCleared {
+ _result := &_SecurityDataLineCutAlarmCleared{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataLineCutAlarmCleared(structType interface{}) SecurityDataLineCutAlarmCleared {
+ if casted, ok := structType.(SecurityDataLineCutAlarmCleared); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataLineCutAlarmCleared); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) GetTypeName() string {
+ return "SecurityDataLineCutAlarmCleared"
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataLineCutAlarmClearedParse(readBuffer utils.ReadBuffer) (SecurityDataLineCutAlarmCleared, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataLineCutAlarmCleared"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataLineCutAlarmCleared")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataLineCutAlarmCleared"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataLineCutAlarmCleared")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataLineCutAlarmCleared{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataLineCutAlarmCleared"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataLineCutAlarmCleared")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataLineCutAlarmCleared"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataLineCutAlarmCleared")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) isSecurityDataLineCutAlarmCleared() bool {
+ return true
+}
+
+func (m *_SecurityDataLineCutAlarmCleared) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go
new file mode 100644
index 000000000..f7ff25a01
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataLineCutAlarmRaised is the corresponding interface of SecurityDataLineCutAlarmRaised
+type SecurityDataLineCutAlarmRaised interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataLineCutAlarmRaisedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataLineCutAlarmRaised.
+// This is useful for switch cases.
+type SecurityDataLineCutAlarmRaisedExactly interface {
+ SecurityDataLineCutAlarmRaised
+ isSecurityDataLineCutAlarmRaised() bool
+}
+
+// _SecurityDataLineCutAlarmRaised is the data-structure of this message
+type _SecurityDataLineCutAlarmRaised struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataLineCutAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataLineCutAlarmRaised factory function for _SecurityDataLineCutAlarmRaised
+func NewSecurityDataLineCutAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLineCutAlarmRaised {
+ _result := &_SecurityDataLineCutAlarmRaised{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataLineCutAlarmRaised(structType interface{}) SecurityDataLineCutAlarmRaised {
+ if casted, ok := structType.(SecurityDataLineCutAlarmRaised); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataLineCutAlarmRaised); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) GetTypeName() string {
+ return "SecurityDataLineCutAlarmRaised"
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataLineCutAlarmRaisedParse(readBuffer utils.ReadBuffer) (SecurityDataLineCutAlarmRaised, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataLineCutAlarmRaised"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataLineCutAlarmRaised")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataLineCutAlarmRaised"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataLineCutAlarmRaised")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataLineCutAlarmRaised{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataLineCutAlarmRaised"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataLineCutAlarmRaised")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataLineCutAlarmRaised"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataLineCutAlarmRaised")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) isSecurityDataLineCutAlarmRaised() bool {
+ return true
+}
+
+func (m *_SecurityDataLineCutAlarmRaised) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go
new file mode 100644
index 000000000..2e731d1be
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataLowBatteryCharging is the corresponding interface of SecurityDataLowBatteryCharging
+type SecurityDataLowBatteryCharging interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetStartStop returns StartStop (property field)
+ GetStartStop() byte
+ // GetChargeStopped returns ChargeStopped (virtual field)
+ GetChargeStopped() bool
+ // GetChargeStarted returns ChargeStarted (virtual field)
+ GetChargeStarted() bool
+}
+
+// SecurityDataLowBatteryChargingExactly can be used when we want exactly this type and not a type which fulfills SecurityDataLowBatteryCharging.
+// This is useful for switch cases.
+type SecurityDataLowBatteryChargingExactly interface {
+ SecurityDataLowBatteryCharging
+ isSecurityDataLowBatteryCharging() bool
+}
+
+// _SecurityDataLowBatteryCharging is the data-structure of this message
+type _SecurityDataLowBatteryCharging struct {
+ *_SecurityData
+ StartStop byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataLowBatteryCharging) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataLowBatteryCharging) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataLowBatteryCharging) GetStartStop() byte {
+ return m.StartStop
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_SecurityDataLowBatteryCharging) GetChargeStopped() bool {
+ return bool(bool((m.GetStartStop()) == (0x00)))
+}
+
+func (m *_SecurityDataLowBatteryCharging) GetChargeStarted() bool {
+ return bool(bool((m.GetStartStop()) > (0xFE)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataLowBatteryCharging factory function for _SecurityDataLowBatteryCharging
+func NewSecurityDataLowBatteryCharging(startStop byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLowBatteryCharging {
+ _result := &_SecurityDataLowBatteryCharging{
+ StartStop: startStop,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataLowBatteryCharging(structType interface{}) SecurityDataLowBatteryCharging {
+ if casted, ok := structType.(SecurityDataLowBatteryCharging); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataLowBatteryCharging); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataLowBatteryCharging) GetTypeName() string {
+ return "SecurityDataLowBatteryCharging"
+}
+
+func (m *_SecurityDataLowBatteryCharging) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataLowBatteryCharging) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (startStop)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataLowBatteryCharging) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataLowBatteryChargingParse(readBuffer utils.ReadBuffer) (SecurityDataLowBatteryCharging, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataLowBatteryCharging"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataLowBatteryCharging")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (startStop)
+ _startStop, _startStopErr := readBuffer.ReadByte("startStop")
+ if _startStopErr != nil {
+ return nil, errors.Wrap(_startStopErr, "Error parsing 'startStop' field of SecurityDataLowBatteryCharging")
+ }
+ startStop := _startStop
+
+ // Virtual field
+ _chargeStopped := bool((startStop) == (0x00))
+ chargeStopped := bool(_chargeStopped)
+ _ = chargeStopped
+
+ // Virtual field
+ _chargeStarted := bool((startStop) > (0xFE))
+ chargeStarted := bool(_chargeStarted)
+ _ = chargeStarted
+
+ if closeErr := readBuffer.CloseContext("SecurityDataLowBatteryCharging"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataLowBatteryCharging")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataLowBatteryCharging{
+ StartStop: startStop,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataLowBatteryCharging) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataLowBatteryCharging"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataLowBatteryCharging")
+ }
+
+ // Simple Field (startStop)
+ startStop := byte(m.GetStartStop())
+ _startStopErr := writeBuffer.WriteByte("startStop", (startStop))
+ if _startStopErr != nil {
+ return errors.Wrap(_startStopErr, "Error serializing 'startStop' field")
+ }
+ // Virtual field
+ if _chargeStoppedErr := writeBuffer.WriteVirtual("chargeStopped", m.GetChargeStopped()); _chargeStoppedErr != nil {
+ return errors.Wrap(_chargeStoppedErr, "Error serializing 'chargeStopped' field")
+ }
+ // Virtual field
+ if _chargeStartedErr := writeBuffer.WriteVirtual("chargeStarted", m.GetChargeStarted()); _chargeStartedErr != nil {
+ return errors.Wrap(_chargeStartedErr, "Error serializing 'chargeStarted' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataLowBatteryCharging"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataLowBatteryCharging")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataLowBatteryCharging) isSecurityDataLowBatteryCharging() bool {
+ return true
+}
+
+func (m *_SecurityDataLowBatteryCharging) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go
new file mode 100644
index 000000000..33cee22e6
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataLowBatteryCorrected is the corresponding interface of SecurityDataLowBatteryCorrected
+type SecurityDataLowBatteryCorrected interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataLowBatteryCorrectedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataLowBatteryCorrected.
+// This is useful for switch cases.
+type SecurityDataLowBatteryCorrectedExactly interface {
+ SecurityDataLowBatteryCorrected
+ isSecurityDataLowBatteryCorrected() bool
+}
+
+// _SecurityDataLowBatteryCorrected is the data-structure of this message
+type _SecurityDataLowBatteryCorrected struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataLowBatteryCorrected) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataLowBatteryCorrected) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataLowBatteryCorrected factory function for _SecurityDataLowBatteryCorrected
+func NewSecurityDataLowBatteryCorrected(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLowBatteryCorrected {
+ _result := &_SecurityDataLowBatteryCorrected{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataLowBatteryCorrected(structType interface{}) SecurityDataLowBatteryCorrected {
+ if casted, ok := structType.(SecurityDataLowBatteryCorrected); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataLowBatteryCorrected); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataLowBatteryCorrected) GetTypeName() string {
+ return "SecurityDataLowBatteryCorrected"
+}
+
+func (m *_SecurityDataLowBatteryCorrected) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataLowBatteryCorrected) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataLowBatteryCorrected) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataLowBatteryCorrectedParse(readBuffer utils.ReadBuffer) (SecurityDataLowBatteryCorrected, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataLowBatteryCorrected"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataLowBatteryCorrected")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataLowBatteryCorrected"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataLowBatteryCorrected")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataLowBatteryCorrected{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataLowBatteryCorrected) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataLowBatteryCorrected"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataLowBatteryCorrected")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataLowBatteryCorrected"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataLowBatteryCorrected")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataLowBatteryCorrected) isSecurityDataLowBatteryCorrected() bool {
+ return true
+}
+
+func (m *_SecurityDataLowBatteryCorrected) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go
new file mode 100644
index 000000000..a2b8e67ca
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataLowBatteryDetected is the corresponding interface of SecurityDataLowBatteryDetected
+type SecurityDataLowBatteryDetected interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataLowBatteryDetectedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataLowBatteryDetected.
+// This is useful for switch cases.
+type SecurityDataLowBatteryDetectedExactly interface {
+ SecurityDataLowBatteryDetected
+ isSecurityDataLowBatteryDetected() bool
+}
+
+// _SecurityDataLowBatteryDetected is the data-structure of this message
+type _SecurityDataLowBatteryDetected struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataLowBatteryDetected) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataLowBatteryDetected) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataLowBatteryDetected factory function for _SecurityDataLowBatteryDetected
+func NewSecurityDataLowBatteryDetected(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLowBatteryDetected {
+ _result := &_SecurityDataLowBatteryDetected{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataLowBatteryDetected(structType interface{}) SecurityDataLowBatteryDetected {
+ if casted, ok := structType.(SecurityDataLowBatteryDetected); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataLowBatteryDetected); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataLowBatteryDetected) GetTypeName() string {
+ return "SecurityDataLowBatteryDetected"
+}
+
+func (m *_SecurityDataLowBatteryDetected) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataLowBatteryDetected) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataLowBatteryDetected) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataLowBatteryDetectedParse(readBuffer utils.ReadBuffer) (SecurityDataLowBatteryDetected, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataLowBatteryDetected"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataLowBatteryDetected")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataLowBatteryDetected"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataLowBatteryDetected")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataLowBatteryDetected{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataLowBatteryDetected) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataLowBatteryDetected"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataLowBatteryDetected")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataLowBatteryDetected"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataLowBatteryDetected")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataLowBatteryDetected) isSecurityDataLowBatteryDetected() bool {
+ return true
+}
+
+func (m *_SecurityDataLowBatteryDetected) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go
new file mode 100644
index 000000000..f2c31a04b
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataMainsFailure is the corresponding interface of SecurityDataMainsFailure
+type SecurityDataMainsFailure interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataMainsFailureExactly can be used when we want exactly this type and not a type which fulfills SecurityDataMainsFailure.
+// This is useful for switch cases.
+type SecurityDataMainsFailureExactly interface {
+ SecurityDataMainsFailure
+ isSecurityDataMainsFailure() bool
+}
+
+// _SecurityDataMainsFailure is the data-structure of this message
+type _SecurityDataMainsFailure struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataMainsFailure) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataMainsFailure) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataMainsFailure factory function for _SecurityDataMainsFailure
+func NewSecurityDataMainsFailure(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataMainsFailure {
+ _result := &_SecurityDataMainsFailure{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataMainsFailure(structType interface{}) SecurityDataMainsFailure {
+ if casted, ok := structType.(SecurityDataMainsFailure); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataMainsFailure); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataMainsFailure) GetTypeName() string {
+ return "SecurityDataMainsFailure"
+}
+
+func (m *_SecurityDataMainsFailure) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataMainsFailure) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataMainsFailure) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataMainsFailureParse(readBuffer utils.ReadBuffer) (SecurityDataMainsFailure, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataMainsFailure"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataMainsFailure")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataMainsFailure"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataMainsFailure")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataMainsFailure{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataMainsFailure) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataMainsFailure"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataMainsFailure")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataMainsFailure"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataMainsFailure")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataMainsFailure) isSecurityDataMainsFailure() bool {
+ return true
+}
+
+func (m *_SecurityDataMainsFailure) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go
new file mode 100644
index 000000000..57bd27495
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataMainsRestoredOrApplied is the corresponding interface of SecurityDataMainsRestoredOrApplied
+type SecurityDataMainsRestoredOrApplied interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataMainsRestoredOrAppliedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataMainsRestoredOrApplied.
+// This is useful for switch cases.
+type SecurityDataMainsRestoredOrAppliedExactly interface {
+ SecurityDataMainsRestoredOrApplied
+ isSecurityDataMainsRestoredOrApplied() bool
+}
+
+// _SecurityDataMainsRestoredOrApplied is the data-structure of this message
+type _SecurityDataMainsRestoredOrApplied struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataMainsRestoredOrApplied) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataMainsRestoredOrApplied factory function for _SecurityDataMainsRestoredOrApplied
+func NewSecurityDataMainsRestoredOrApplied(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataMainsRestoredOrApplied {
+ _result := &_SecurityDataMainsRestoredOrApplied{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataMainsRestoredOrApplied(structType interface{}) SecurityDataMainsRestoredOrApplied {
+ if casted, ok := structType.(SecurityDataMainsRestoredOrApplied); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataMainsRestoredOrApplied); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) GetTypeName() string {
+ return "SecurityDataMainsRestoredOrApplied"
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataMainsRestoredOrAppliedParse(readBuffer utils.ReadBuffer) (SecurityDataMainsRestoredOrApplied, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataMainsRestoredOrApplied"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataMainsRestoredOrApplied")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataMainsRestoredOrApplied"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataMainsRestoredOrApplied")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataMainsRestoredOrApplied{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataMainsRestoredOrApplied"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataMainsRestoredOrApplied")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataMainsRestoredOrApplied"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataMainsRestoredOrApplied")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) isSecurityDataMainsRestoredOrApplied() bool {
+ return true
+}
+
+func (m *_SecurityDataMainsRestoredOrApplied) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go
new file mode 100644
index 000000000..f45f46142
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataOff is the corresponding interface of SecurityDataOff
+type SecurityDataOff interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetData returns Data (property field)
+ GetData() []byte
+}
+
+// SecurityDataOffExactly can be used when we want exactly this type and not a type which fulfills SecurityDataOff.
+// This is useful for switch cases.
+type SecurityDataOffExactly interface {
+ SecurityDataOff
+ isSecurityDataOff() bool
+}
+
+// _SecurityDataOff is the data-structure of this message
+type _SecurityDataOff struct {
+ *_SecurityData
+ Data []byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataOff) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataOff) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataOff) GetData() []byte {
+ return m.Data
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataOff factory function for _SecurityDataOff
+func NewSecurityDataOff(data []byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOff {
+ _result := &_SecurityDataOff{
+ Data: data,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataOff(structType interface{}) SecurityDataOff {
+ if casted, ok := structType.(SecurityDataOff); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataOff); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataOff) GetTypeName() string {
+ return "SecurityDataOff"
+}
+
+func (m *_SecurityDataOff) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataOff) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.Data) > 0 {
+ lengthInBits += 8 * uint16(len(m.Data))
+ }
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataOff) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataOffParse(readBuffer utils.ReadBuffer, commandTypeContainer SecurityCommandTypeContainer) (SecurityDataOff, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataOff"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataOff")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+ // Byte Array field (data)
+ numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(1)))
+ data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of SecurityDataOff")
+ }
+
+ if closeErr := readBuffer.CloseContext("SecurityDataOff"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataOff")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataOff{
+ Data: data,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataOff) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataOff"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataOff")
+ }
+
+ // Array Field (data)
+ // Byte Array field (data)
+ if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
+ return errors.Wrap(err, "Error serializing 'data' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataOff"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataOff")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataOff) isSecurityDataOff() bool {
+ return true
+}
+
+func (m *_SecurityDataOff) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go
new file mode 100644
index 000000000..dcd3d2aec
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataOn is the corresponding interface of SecurityDataOn
+type SecurityDataOn interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetData returns Data (property field)
+ GetData() []byte
+}
+
+// SecurityDataOnExactly can be used when we want exactly this type and not a type which fulfills SecurityDataOn.
+// This is useful for switch cases.
+type SecurityDataOnExactly interface {
+ SecurityDataOn
+ isSecurityDataOn() bool
+}
+
+// _SecurityDataOn is the data-structure of this message
+type _SecurityDataOn struct {
+ *_SecurityData
+ Data []byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataOn) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataOn) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataOn) GetData() []byte {
+ return m.Data
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataOn factory function for _SecurityDataOn
+func NewSecurityDataOn(data []byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOn {
+ _result := &_SecurityDataOn{
+ Data: data,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataOn(structType interface{}) SecurityDataOn {
+ if casted, ok := structType.(SecurityDataOn); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataOn); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataOn) GetTypeName() string {
+ return "SecurityDataOn"
+}
+
+func (m *_SecurityDataOn) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataOn) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.Data) > 0 {
+ lengthInBits += 8 * uint16(len(m.Data))
+ }
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataOn) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataOnParse(readBuffer utils.ReadBuffer, commandTypeContainer SecurityCommandTypeContainer) (SecurityDataOn, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataOn"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataOn")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+ // Byte Array field (data)
+ numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(1)))
+ data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of SecurityDataOn")
+ }
+
+ if closeErr := readBuffer.CloseContext("SecurityDataOn"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataOn")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataOn{
+ Data: data,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataOn) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataOn"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataOn")
+ }
+
+ // Array Field (data)
+ // Byte Array field (data)
+ if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
+ return errors.Wrap(err, "Error serializing 'data' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataOn"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataOn")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataOn) isSecurityDataOn() bool {
+ return true
+}
+
+func (m *_SecurityDataOn) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go
new file mode 100644
index 000000000..3eb6c985f
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataOtherAlarmCleared is the corresponding interface of SecurityDataOtherAlarmCleared
+type SecurityDataOtherAlarmCleared interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataOtherAlarmClearedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataOtherAlarmCleared.
+// This is useful for switch cases.
+type SecurityDataOtherAlarmClearedExactly interface {
+ SecurityDataOtherAlarmCleared
+ isSecurityDataOtherAlarmCleared() bool
+}
+
+// _SecurityDataOtherAlarmCleared is the data-structure of this message
+type _SecurityDataOtherAlarmCleared struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataOtherAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataOtherAlarmCleared) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataOtherAlarmCleared factory function for _SecurityDataOtherAlarmCleared
+func NewSecurityDataOtherAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOtherAlarmCleared {
+ _result := &_SecurityDataOtherAlarmCleared{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataOtherAlarmCleared(structType interface{}) SecurityDataOtherAlarmCleared {
+ if casted, ok := structType.(SecurityDataOtherAlarmCleared); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataOtherAlarmCleared); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataOtherAlarmCleared) GetTypeName() string {
+ return "SecurityDataOtherAlarmCleared"
+}
+
+func (m *_SecurityDataOtherAlarmCleared) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataOtherAlarmCleared) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataOtherAlarmCleared) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataOtherAlarmClearedParse(readBuffer utils.ReadBuffer) (SecurityDataOtherAlarmCleared, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataOtherAlarmCleared"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataOtherAlarmCleared")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataOtherAlarmCleared"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataOtherAlarmCleared")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataOtherAlarmCleared{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataOtherAlarmCleared) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataOtherAlarmCleared"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataOtherAlarmCleared")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataOtherAlarmCleared"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataOtherAlarmCleared")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataOtherAlarmCleared) isSecurityDataOtherAlarmCleared() bool {
+ return true
+}
+
+func (m *_SecurityDataOtherAlarmCleared) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go
new file mode 100644
index 000000000..fe33d7abb
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataOtherAlarmRaised is the corresponding interface of SecurityDataOtherAlarmRaised
+type SecurityDataOtherAlarmRaised interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataOtherAlarmRaisedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataOtherAlarmRaised.
+// This is useful for switch cases.
+type SecurityDataOtherAlarmRaisedExactly interface {
+ SecurityDataOtherAlarmRaised
+ isSecurityDataOtherAlarmRaised() bool
+}
+
+// _SecurityDataOtherAlarmRaised is the data-structure of this message
+type _SecurityDataOtherAlarmRaised struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataOtherAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataOtherAlarmRaised) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataOtherAlarmRaised factory function for _SecurityDataOtherAlarmRaised
+func NewSecurityDataOtherAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOtherAlarmRaised {
+ _result := &_SecurityDataOtherAlarmRaised{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataOtherAlarmRaised(structType interface{}) SecurityDataOtherAlarmRaised {
+ if casted, ok := structType.(SecurityDataOtherAlarmRaised); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataOtherAlarmRaised); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataOtherAlarmRaised) GetTypeName() string {
+ return "SecurityDataOtherAlarmRaised"
+}
+
+func (m *_SecurityDataOtherAlarmRaised) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataOtherAlarmRaised) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataOtherAlarmRaised) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataOtherAlarmRaisedParse(readBuffer utils.ReadBuffer) (SecurityDataOtherAlarmRaised, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataOtherAlarmRaised"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataOtherAlarmRaised")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataOtherAlarmRaised"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataOtherAlarmRaised")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataOtherAlarmRaised{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataOtherAlarmRaised) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataOtherAlarmRaised"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataOtherAlarmRaised")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataOtherAlarmRaised"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataOtherAlarmRaised")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataOtherAlarmRaised) isSecurityDataOtherAlarmRaised() bool {
+ return true
+}
+
+func (m *_SecurityDataOtherAlarmRaised) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go
new file mode 100644
index 000000000..0c356d3d8
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataPanicActivated is the corresponding interface of SecurityDataPanicActivated
+type SecurityDataPanicActivated interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataPanicActivatedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataPanicActivated.
+// This is useful for switch cases.
+type SecurityDataPanicActivatedExactly interface {
+ SecurityDataPanicActivated
+ isSecurityDataPanicActivated() bool
+}
+
+// _SecurityDataPanicActivated is the data-structure of this message
+type _SecurityDataPanicActivated struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataPanicActivated) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataPanicActivated) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataPanicActivated factory function for _SecurityDataPanicActivated
+func NewSecurityDataPanicActivated(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataPanicActivated {
+ _result := &_SecurityDataPanicActivated{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataPanicActivated(structType interface{}) SecurityDataPanicActivated {
+ if casted, ok := structType.(SecurityDataPanicActivated); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataPanicActivated); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataPanicActivated) GetTypeName() string {
+ return "SecurityDataPanicActivated"
+}
+
+func (m *_SecurityDataPanicActivated) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataPanicActivated) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataPanicActivated) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataPanicActivatedParse(readBuffer utils.ReadBuffer) (SecurityDataPanicActivated, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataPanicActivated"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataPanicActivated")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataPanicActivated"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataPanicActivated")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataPanicActivated{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataPanicActivated) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataPanicActivated"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataPanicActivated")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataPanicActivated"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataPanicActivated")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataPanicActivated) isSecurityDataPanicActivated() bool {
+ return true
+}
+
+func (m *_SecurityDataPanicActivated) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go
new file mode 100644
index 000000000..19914b59f
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataPanicCleared is the corresponding interface of SecurityDataPanicCleared
+type SecurityDataPanicCleared interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataPanicClearedExactly can be used when we want exactly this type and not a type which fulfills SecurityDataPanicCleared.
+// This is useful for switch cases.
+type SecurityDataPanicClearedExactly interface {
+ SecurityDataPanicCleared
+ isSecurityDataPanicCleared() bool
+}
+
+// _SecurityDataPanicCleared is the data-structure of this message
+type _SecurityDataPanicCleared struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataPanicCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataPanicCleared) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataPanicCleared factory function for _SecurityDataPanicCleared
+func NewSecurityDataPanicCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataPanicCleared {
+ _result := &_SecurityDataPanicCleared{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataPanicCleared(structType interface{}) SecurityDataPanicCleared {
+ if casted, ok := structType.(SecurityDataPanicCleared); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataPanicCleared); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataPanicCleared) GetTypeName() string {
+ return "SecurityDataPanicCleared"
+}
+
+func (m *_SecurityDataPanicCleared) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataPanicCleared) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataPanicCleared) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataPanicClearedParse(readBuffer utils.ReadBuffer) (SecurityDataPanicCleared, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataPanicCleared"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataPanicCleared")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataPanicCleared"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataPanicCleared")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataPanicCleared{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataPanicCleared) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataPanicCleared"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataPanicCleared")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataPanicCleared"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataPanicCleared")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataPanicCleared) isSecurityDataPanicCleared() bool {
+ return true
+}
+
+func (m *_SecurityDataPanicCleared) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go
new file mode 100644
index 000000000..d2d354a16
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go
@@ -0,0 +1,285 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataPasswordEntryStatus is the corresponding interface of SecurityDataPasswordEntryStatus
+type SecurityDataPasswordEntryStatus interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetCode returns Code (property field)
+ GetCode() byte
+ // GetIsPasswordEntrySucceeded returns IsPasswordEntrySucceeded (virtual field)
+ GetIsPasswordEntrySucceeded() bool
+ // GetIsPasswordEntryFailed returns IsPasswordEntryFailed (virtual field)
+ GetIsPasswordEntryFailed() bool
+ // GetIsPasswordEntryDisabled returns IsPasswordEntryDisabled (virtual field)
+ GetIsPasswordEntryDisabled() bool
+ // GetIsPasswordEntryEnabledAgain returns IsPasswordEntryEnabledAgain (virtual field)
+ GetIsPasswordEntryEnabledAgain() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+}
+
+// SecurityDataPasswordEntryStatusExactly can be used when we want exactly this type and not a type which fulfills SecurityDataPasswordEntryStatus.
+// This is useful for switch cases.
+type SecurityDataPasswordEntryStatusExactly interface {
+ SecurityDataPasswordEntryStatus
+ isSecurityDataPasswordEntryStatus() bool
+}
+
+// _SecurityDataPasswordEntryStatus is the data-structure of this message
+type _SecurityDataPasswordEntryStatus struct {
+ *_SecurityData
+ Code byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataPasswordEntryStatus) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataPasswordEntryStatus) GetCode() byte {
+ return m.Code
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_SecurityDataPasswordEntryStatus) GetIsPasswordEntrySucceeded() bool {
+ return bool(bool((m.GetCode()) == (0x01)))
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetIsPasswordEntryFailed() bool {
+ return bool(bool((m.GetCode()) == (0x02)))
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetIsPasswordEntryDisabled() bool {
+ return bool(bool((m.GetCode()) == (0x03)))
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetIsPasswordEntryEnabledAgain() bool {
+ return bool(bool((m.GetCode()) == (0x04)))
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetIsReserved() bool {
+ return bool(bool((m.GetCode()) >= (0x05)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataPasswordEntryStatus factory function for _SecurityDataPasswordEntryStatus
+func NewSecurityDataPasswordEntryStatus(code byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataPasswordEntryStatus {
+ _result := &_SecurityDataPasswordEntryStatus{
+ Code: code,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataPasswordEntryStatus(structType interface{}) SecurityDataPasswordEntryStatus {
+ if casted, ok := structType.(SecurityDataPasswordEntryStatus); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataPasswordEntryStatus); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetTypeName() string {
+ return "SecurityDataPasswordEntryStatus"
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (code)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataPasswordEntryStatus) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataPasswordEntryStatusParse(readBuffer utils.ReadBuffer) (SecurityDataPasswordEntryStatus, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataPasswordEntryStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataPasswordEntryStatus")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (code)
+ _code, _codeErr := readBuffer.ReadByte("code")
+ if _codeErr != nil {
+ return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of SecurityDataPasswordEntryStatus")
+ }
+ code := _code
+
+ // Virtual field
+ _isPasswordEntrySucceeded := bool((code) == (0x01))
+ isPasswordEntrySucceeded := bool(_isPasswordEntrySucceeded)
+ _ = isPasswordEntrySucceeded
+
+ // Virtual field
+ _isPasswordEntryFailed := bool((code) == (0x02))
+ isPasswordEntryFailed := bool(_isPasswordEntryFailed)
+ _ = isPasswordEntryFailed
+
+ // Virtual field
+ _isPasswordEntryDisabled := bool((code) == (0x03))
+ isPasswordEntryDisabled := bool(_isPasswordEntryDisabled)
+ _ = isPasswordEntryDisabled
+
+ // Virtual field
+ _isPasswordEntryEnabledAgain := bool((code) == (0x04))
+ isPasswordEntryEnabledAgain := bool(_isPasswordEntryEnabledAgain)
+ _ = isPasswordEntryEnabledAgain
+
+ // Virtual field
+ _isReserved := bool((code) >= (0x05))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ if closeErr := readBuffer.CloseContext("SecurityDataPasswordEntryStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataPasswordEntryStatus")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataPasswordEntryStatus{
+ Code: code,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataPasswordEntryStatus) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataPasswordEntryStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataPasswordEntryStatus")
+ }
+
+ // Simple Field (code)
+ code := byte(m.GetCode())
+ _codeErr := writeBuffer.WriteByte("code", (code))
+ if _codeErr != nil {
+ return errors.Wrap(_codeErr, "Error serializing 'code' field")
+ }
+ // Virtual field
+ if _isPasswordEntrySucceededErr := writeBuffer.WriteVirtual("isPasswordEntrySucceeded", m.GetIsPasswordEntrySucceeded()); _isPasswordEntrySucceededErr != nil {
+ return errors.Wrap(_isPasswordEntrySucceededErr, "Error serializing 'isPasswordEntrySucceeded' field")
+ }
+ // Virtual field
+ if _isPasswordEntryFailedErr := writeBuffer.WriteVirtual("isPasswordEntryFailed", m.GetIsPasswordEntryFailed()); _isPasswordEntryFailedErr != nil {
+ return errors.Wrap(_isPasswordEntryFailedErr, "Error serializing 'isPasswordEntryFailed' field")
+ }
+ // Virtual field
+ if _isPasswordEntryDisabledErr := writeBuffer.WriteVirtual("isPasswordEntryDisabled", m.GetIsPasswordEntryDisabled()); _isPasswordEntryDisabledErr != nil {
+ return errors.Wrap(_isPasswordEntryDisabledErr, "Error serializing 'isPasswordEntryDisabled' field")
+ }
+ // Virtual field
+ if _isPasswordEntryEnabledAgainErr := writeBuffer.WriteVirtual("isPasswordEntryEnabledAgain", m.GetIsPasswordEntryEnabledAgain()); _isPasswordEntryEnabledAgainErr != nil {
+ return errors.Wrap(_isPasswordEntryEnabledAgainErr, "Error serializing 'isPasswordEntryEnabledAgain' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataPasswordEntryStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataPasswordEntryStatus")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataPasswordEntryStatus) isSecurityDataPasswordEntryStatus() bool {
+ return true
+}
+
+func (m *_SecurityDataPasswordEntryStatus) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go
new file mode 100644
index 000000000..ff3b1c1cd
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataRaiseAlarm is the corresponding interface of SecurityDataRaiseAlarm
+type SecurityDataRaiseAlarm interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataRaiseAlarmExactly can be used when we want exactly this type and not a type which fulfills SecurityDataRaiseAlarm.
+// This is useful for switch cases.
+type SecurityDataRaiseAlarmExactly interface {
+ SecurityDataRaiseAlarm
+ isSecurityDataRaiseAlarm() bool
+}
+
+// _SecurityDataRaiseAlarm is the data-structure of this message
+type _SecurityDataRaiseAlarm struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataRaiseAlarm) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataRaiseAlarm) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataRaiseAlarm factory function for _SecurityDataRaiseAlarm
+func NewSecurityDataRaiseAlarm(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataRaiseAlarm {
+ _result := &_SecurityDataRaiseAlarm{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataRaiseAlarm(structType interface{}) SecurityDataRaiseAlarm {
+ if casted, ok := structType.(SecurityDataRaiseAlarm); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataRaiseAlarm); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataRaiseAlarm) GetTypeName() string {
+ return "SecurityDataRaiseAlarm"
+}
+
+func (m *_SecurityDataRaiseAlarm) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataRaiseAlarm) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataRaiseAlarm) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataRaiseAlarmParse(readBuffer utils.ReadBuffer) (SecurityDataRaiseAlarm, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataRaiseAlarm"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataRaiseAlarm")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataRaiseAlarm"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataRaiseAlarm")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataRaiseAlarm{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataRaiseAlarm) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataRaiseAlarm"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataRaiseAlarm")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataRaiseAlarm"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataRaiseAlarm")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataRaiseAlarm) isSecurityDataRaiseAlarm() bool {
+ return true
+}
+
+func (m *_SecurityDataRaiseAlarm) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go
new file mode 100644
index 000000000..8837efeb0
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataRaiseTamper is the corresponding interface of SecurityDataRaiseTamper
+type SecurityDataRaiseTamper interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+}
+
+// SecurityDataRaiseTamperExactly can be used when we want exactly this type and not a type which fulfills SecurityDataRaiseTamper.
+// This is useful for switch cases.
+type SecurityDataRaiseTamperExactly interface {
+ SecurityDataRaiseTamper
+ isSecurityDataRaiseTamper() bool
+}
+
+// _SecurityDataRaiseTamper is the data-structure of this message
+type _SecurityDataRaiseTamper struct {
+ *_SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataRaiseTamper) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataRaiseTamper) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+// NewSecurityDataRaiseTamper factory function for _SecurityDataRaiseTamper
+func NewSecurityDataRaiseTamper(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataRaiseTamper {
+ _result := &_SecurityDataRaiseTamper{
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataRaiseTamper(structType interface{}) SecurityDataRaiseTamper {
+ if casted, ok := structType.(SecurityDataRaiseTamper); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataRaiseTamper); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataRaiseTamper) GetTypeName() string {
+ return "SecurityDataRaiseTamper"
+}
+
+func (m *_SecurityDataRaiseTamper) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataRaiseTamper) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataRaiseTamper) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataRaiseTamperParse(readBuffer utils.ReadBuffer) (SecurityDataRaiseTamper, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataRaiseTamper"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataRaiseTamper")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("SecurityDataRaiseTamper"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataRaiseTamper")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataRaiseTamper{
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataRaiseTamper) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataRaiseTamper"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataRaiseTamper")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataRaiseTamper"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataRaiseTamper")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataRaiseTamper) isSecurityDataRaiseTamper() bool {
+ return true
+}
+
+func (m *_SecurityDataRaiseTamper) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go
new file mode 100644
index 000000000..a788af0ee
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// SecurityDataRequestZoneName is the corresponding interface of SecurityDataRequestZoneName
+type SecurityDataRequestZoneName interface {
+ utils.LengthAware
+ utils.Serializable
+ SecurityData
+ // GetZoneNumber returns ZoneNumber (property field)
+ GetZoneNumber() uint8
+}
+
+// SecurityDataRequestZoneNameExactly can be used when we want exactly this type and not a type which fulfills SecurityDataRequestZoneName.
+// This is useful for switch cases.
+type SecurityDataRequestZoneNameExactly interface {
+ SecurityDataRequestZoneName
+ isSecurityDataRequestZoneName() bool
+}
+
+// _SecurityDataRequestZoneName is the data-structure of this message
+type _SecurityDataRequestZoneName struct {
+ *_SecurityData
+ ZoneNumber uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SecurityDataRequestZoneName) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_SecurityDataRequestZoneName) GetParent() SecurityData {
+ return m._SecurityData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SecurityDataRequestZoneName) GetZoneNumber() uint8 {
+ return m.ZoneNumber
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSecurityDataRequestZoneName factory function for _SecurityDataRequestZoneName
+func NewSecurityDataRequestZoneName(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataRequestZoneName {
+ _result := &_SecurityDataRequestZoneName{
+ ZoneNumber: zoneNumber,
+ _SecurityData: NewSecurityData(commandTypeContainer, argument),
+ }
+ _result._SecurityData._SecurityDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSecurityDataRequestZoneName(structType interface{}) SecurityDataRequestZoneName {
+ if casted, ok := structType.(SecurityDataRequestZoneName); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SecurityDataRequestZoneName); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SecurityDataRequestZoneName) GetTypeName() string {
+ return "SecurityDataRequestZoneName"
+}
+
+func (m *_SecurityDataRequestZoneName) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SecurityDataRequestZoneName) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneNumber)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_SecurityDataRequestZoneName) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SecurityDataRequestZoneNameParse(readBuffer utils.ReadBuffer) (SecurityDataRequestZoneName, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SecurityDataRequestZoneName"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SecurityDataRequestZoneName")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneNumber)
+ _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8)
+ if _zoneNumberErr != nil {
+ return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataRequestZoneName")
+ }
+ zoneNumber := _zoneNumber
+
+ if closeErr := readBuffer.CloseContext("SecurityDataRequestZoneName"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SecurityDataRequestZoneName")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SecurityDataRequestZoneName{
+ ZoneNumber: zoneNumber,
+ _SecurityData: &_SecurityData{},
+ }
+ _child._SecurityData._SecurityDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SecurityDataRequestZoneName) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SecurityDataRequestZoneName"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SecurityDataRequestZoneName")
+ }
+
+ // Simple Field (zoneNumber)
+ zoneNumber := uint8(m.GetZoneNumber())
+ _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber))
+ if _zoneNumberErr != nil {
+ return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SecurityDataRequestZoneName"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SecurityDataRequestZoneName")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SecurityDataRequestZoneName) isSecurityDataRequestZoneName() bool {
+ return true
+}
+
+func (m *_SecurityDataRequestZoneName) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go
new file mode 100644
index 000000000..463aa6d91
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
... 3709 lines suppressed ...