KNX::InformationBlock
Inherits BinData < Reference < Object
Generic block
Constants
AFTER_DESERIALIZE = [] of Nil
Generic block
BEFORE_SERIALIZE = [] of Nil
Generic block
ENDIAN = ["big"]
Generic block
KLASS_NAME = [KNX::InformationBlock]
Generic block
PARTS = [{type: "basic", name: length, cls: UInt8, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "enum", name: description_type, cls: typeof(DescriptionType::DeviceInformation.value),
onlyif: nil, verify: nil, value: nil, encoding: nil, enum_type: KNX::DescriptionType}, {type: "basic", name: device_info, cls: KNX::DIB, onlyif: -> do
description_type == DescriptionType::DeviceInformation
end,
verify: nil, value: nil}, {type: "array", name: supported_services, cls: KNX::ServiceFamily, container: Array(KNX::ServiceFamily), onlyif: -> do
description_type == DescriptionType::SupportedServiceFamilies
end,
verify: nil, length: -> do
(length - 2) // 2
end,
value: nil}, {type: "bytes", name: raw_data, cls: Slice(UInt8), onlyif: -> do
!({DescriptionType::DeviceInformation, DescriptionType::SupportedServiceFamilies}.includes?(description_type))
end,
verify: nil, length: -> do
length - 2
end,
value: nil}] of Nil
Generic block
REMAINING = [] of Nil
Generic block
Class methods
Instance methods
__format__
A group or bit_field captures the endianness at its declaration point, so
declaring endian after one would silently leave it system-endian. Fail loudly.
description_type
description_type=(description_type : DescriptionType)
device_info
device_info=(device_info : DIB)
length
length=(length : UInt8)
raw_data
Ignore data for information we can't parse
raw_data=(raw_data : Bytes)
Ignore data for information we can't parse
supported_services