class

KNX::Header::Wrapper

Inherits BinData < Reference < Object

See: https://youtu.be/UjOBudAG654?t=42m20s

Constants

AFTER_DESERIALIZE = [] of Nil

See: https://youtu.be/UjOBudAG654?t=42m20s

BEFORE_SERIALIZE = [] of Nil

See: https://youtu.be/UjOBudAG654?t=42m20s

ENDIAN = ["big"]

See: https://youtu.be/UjOBudAG654?t=42m20s

KLASS_NAME = [KNX::Header::Wrapper]

See: https://youtu.be/UjOBudAG654?t=42m20s

PARTS = [{type: "basic", name: session_id, cls: UInt16, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "bitfield", name: 0, cls: KNX::Header::Wrapper, onlyif: nil, verify: nil, endian: IO::ByteFormat::BigEndian}, {type: "basic", name: message_tag, cls: UInt16, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "string", name: encrypted_frame, cls: String, onlyif: nil, verify: nil, length: -> do parent.request_length - 38 end, value: nil, encoding: nil}, {type: "string", name: cmac, cls: String, onlyif: nil, verify: nil, length: -> do 16 end, value: nil, encoding: nil}] of Nil

See: https://youtu.be/UjOBudAG654?t=42m20s

REMAINING = [] of Nil

See: https://youtu.be/UjOBudAG654?t=42m20s

Class methods

bit_fields

See: https://youtu.be/UjOBudAG654?t=42m20s

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.

cmac

https://en.wikipedia.org/wiki/CBC-MAC (always 128bit (16bytes) in KNX) Timestamp + Serial Number + Tag + frame length (2 bytes)

cmac=(cmac : String)

https://en.wikipedia.org/wiki/CBC-MAC (always 128bit (16bytes) in KNX) Timestamp + Serial Number + Tag + frame length (2 bytes)

encrypted_frame

header + security info + cbc_mac == 38 6 16 16 == 38

encrypted_frame=(encrypted_frame : String)

header + security info + cbc_mac == 38 6 16 16 == 38

knx_serial_number
knx_serial_number=(knx_serial_number : UInt64)
message_tag

Random number

message_tag=(message_tag : UInt16)

Random number

parent

Group fields might need access to data in the parent

Source
parent=(parent : KNX::Header | Nil)

Group fields might need access to data in the parent

session_id
session_id=(session_id : UInt16)
timestamp
timestamp=(timestamp : UInt64)