class KNX::Header::Wrapper

Overview

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

Defined in:

knx/header.cr

Constant Summary

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}, {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 Method Summary

Macro Summary

Instance Method Summary

Class Method Detail

def self.bit_fields #

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


Macro Detail

macro knx_header(name, onlyif = nil, verify = nil, value = nil) #

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


macro knx_header_wrapper(name, onlyif = nil, verify = nil, value = nil) #

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


Instance Method Detail

def __format__ : IO::ByteFormat #

def cmac : String #

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


def cmac=(cmac : String) #

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


def encrypted_frame : String #

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


def encrypted_frame=(encrypted_frame : String) #

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


def knx_serial_number : UInt64 #

def knx_serial_number=(knx_serial_number : UInt64) #

def message_tag : UInt16 #

Random number


def message_tag=(message_tag : UInt16) #

Random number


def parent #

Group fields might need access to data in the parent


[View source]
def parent=(parent : KNX::Header | Nil) #

Group fields might need access to data in the parent


def session_id : UInt16 #

def session_id=(session_id : UInt16) #

def timestamp : UInt64 #

def timestamp=(timestamp : UInt64) #