class MQTT::V3::Header

Overview

Performs binary encoding and decoding of headers

Direct Known Subclasses

Defined in:

mqtt/v3/header.cr

Constant Summary

ENDIAN = ["big"]

Performs binary encoding and decoding of headers

KLASS_NAME = [MQTT::V3::Header]

Performs binary encoding and decoding of headers

PARTS = [{type: "bitfield", name: 0, cls: MQTT::V3::Header, onlyif: nil, verify: nil}, {type: "basic", name: variable_length1, cls: UInt8, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "basic", name: variable_length2, cls: UInt8, onlyif: -> do (variable_length1 & 128) > 0 end, verify: nil, value: nil, endian: nil}, {type: "basic", name: variable_length3, cls: UInt8, onlyif: -> do (variable_length2 & 128) > 0 end, verify: nil, value: nil, endian: nil}, {type: "basic", name: variable_length4, cls: UInt8, onlyif: -> do (variable_length3 & 128) > 0 end, verify: nil, value: nil, endian: nil}] of Nil

Performs binary encoding and decoding of headers

REMAINING = [] of Nil

Performs binary encoding and decoding of headers

Class Method Summary

Macro Summary

Instance Method Summary

Class Method Detail

def self.bit_fields #

Performs binary encoding and decoding of headers


[View source]

Macro Detail

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

Performs binary encoding and decoding of headers


[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

[View source]
def duplicate : Bool #

[View source]
def duplicate=(duplicate : UInt8) #

def duplicate=(value : Bool) #

[View source]
def id : MQTT::RequestType #

[View source]
def id=(id : UInt8) #

def id=(value : MQTT::RequestType) #

[View source]
def packet_length : UInt32 #

[View source]
def packet_length=(size : UInt32) : UInt32 #

[View source]
def qos : MQTT::QoS #

[View source]
def qos=(qos : UInt8) #

def qos=(value : MQTT::QoS) #

[View source]
def qos? #

[View source]
def retain : Bool #

[View source]
def retain=(retain : UInt8) #

def retain=(value : Bool) #

[View source]
def variable_length1 : UInt8 #

def variable_length1=(variable_length1 : UInt8) #

def variable_length2 : UInt8 #

def variable_length2=(variable_length2 : UInt8) #

def variable_length3 : UInt8 #

def variable_length3=(variable_length3 : UInt8) #

def variable_length4 : UInt8 #

def variable_length4=(variable_length4 : UInt8) #