class
MQTT::V5::Reasoned
- MQTT::V5::Reasoned
- MQTT::Header
- BinData
- Reference
- Object
Overview
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
Included Modules
Direct Known Subclasses
Defined in:
mqtt/v5/ack.crConstant Summary
-
AFTER_DESERIALIZE =
[] of Nil -
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
-
BEFORE_SERIALIZE =
[] of Nil -
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
-
ENDIAN =
["big"] -
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
-
KLASS_NAME =
[MQTT::V5::Reasoned] -
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
-
PARTS =
[{type: "basic", name: raw_reason_code, cls: UInt8, onlyif: -> do packet_length > 0 end, verify: nil, value: nil, endian: nil}, {type: "basic", name: properties, cls: MQTT::V5::Properties, onlyif: -> do packet_length > 1 end, verify: nil, value: nil}] of Nil -
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
-
REMAINING =
[] of Nil -
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
Class Method Summary
-
.bit_fields
DISCONNECT and AUTH have the same shape, minus the packet identifier.
Instance Method Summary
-
#__format__ : IO::ByteFormat
A
grouporbit_fieldcaptures the endianness at its declaration point, so declaringendianafter one would silently leave it system-endian. - #add_user_property(key : String, value : String) : Nil
- #calculate_length : UInt32
- #properties : Properties
- #properties=(properties : Properties)
- #raw_reason_code : UInt8
- #raw_reason_code=(raw_reason_code : UInt8)
- #reason_string : String | Nil
- #reason_string=(value : String | Nil)
- #user_properties : Array(Tuple(String, String))
Instance methods inherited from module MQTT::V5::ReasonCoded
error? : Bool
error?,
reason_code : ReasonCode | Nil
reason_code,
reason_code=(code : ReasonCode) : ReasonCode
reason_code=,
reason_description : String
reason_description,
success? : Bool
success?
Instance methods inherited from class MQTT::Header
__format__ : IO::ByteFormat
__format__,
duplicate : Bool
duplicate,
duplicate=(duplicate : UInt8)duplicate=(value : Bool) duplicate=, fixed_header_size : Int32 fixed_header_size, id : MQTT::RequestType id, id=(id : UInt8)
id=(value : MQTT::RequestType) id=, packet_length : UInt32 packet_length, packet_length=(size : UInt32) : UInt32 packet_length=, qos : MQTT::QoS qos, qos=(qos : UInt8)
qos=(value : MQTT::QoS) qos=, qos? qos?, retain : Bool retain, retain=(retain : UInt8)
retain=(value : Bool) retain=, variable_length1 : UInt8 variable_length1, variable_length1=(value : UInt8) : UInt8 variable_length1=, variable_length2 : UInt8 variable_length2, variable_length2=(value : UInt8) : UInt8 variable_length2=, variable_length3 : UInt8 variable_length3, variable_length3=(value : UInt8) : UInt8 variable_length3=, variable_length4 : UInt8 variable_length4, variable_length4=(value : UInt8) : UInt8 variable_length4=
Class methods inherited from class MQTT::Header
bit_fields
bit_fields
Class Method Detail
DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express
Instance Method Detail
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.