class Homekit::TLV::Atom

Defined in:

homekit-tlv/atom.cr

Constant Summary

ENDIAN = ["little"]
KLASS_NAME = [Homekit::TLV::Atom]
PARTS = [{type: "basic", name: type_id, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: length, cls: UInt8, onlyif: nil, verify: nil, value: -> do raw_data.size.to_u8 end}, {type: "bytes", name: raw_data, cls: Bytes, onlyif: nil, verify: nil, length: -> do length end, value: nil}] of Nil
REMAINING = [] of Nil

Class Method Summary

Instance Method Summary

Macro Summary

Class Method Detail

def self.bit_fields #

[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

[View source]
def acknowledgment? : Bool #

[View source]
def data #

[View source]
def error? : TLV::PairError | Nil #

[View source]
def identifier #

[View source]
def ignore? : Bool #

[View source]
def known_type? : TLV::Type | Nil #

[View source]
def length : UInt8 #

def length=(length : UInt8) #

def method #

[View source]
def next_fragment : Atom | Nil #

[View source]
def next_fragment=(next_fragment : Atom | Nil) #

[View source]
def permissions #

[View source]
def raw_data : Bytes #

def raw_data=(raw_data : Bytes) #

def separator? : Bool #

[View source]
def to_f #

[View source]
def to_f32 #

[View source]
def to_f64 #

[View source]
def to_i #

[View source]
def to_i16 #

[View source]
def to_i32 #

[View source]
def to_i64 #

[View source]
def to_i8 #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def to_u16 #

[View source]
def to_u32 #

[View source]
def to_u64 #

[View source]
def to_u8 #

[View source]
def type : TLV::Type #

[View source]
def type_id : UInt8 #

we don't use enum_field so we can ignore new types that we don't know of yet


def type_id=(type_id : UInt8) #

we don't use enum_field so we can ignore new types that we don't know of yet


Macro Detail

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

[View source]