class MQTT::V3::Connect
- MQTT::V3::Connect
- MQTT::V3::Header
- BinData
- Reference
- Object
Overview
Class representing an MQTT Connect Packet
Defined in:
mqtt/v3/connect.crConstant Summary
-
ENDIAN =
["big"]
-
Class representing an MQTT Connect Packet
-
KLASS_NAME =
[MQTT::V3::Connect]
-
Class representing an MQTT Connect Packet
-
PARTS =
[{type: "basic", name: name_size, cls: UInt16, onlyif: nil, verify: nil, value: -> do name.bytesize end, endian: nil}, {type: "string", name: name, cls: String, onlyif: nil, verify: nil, length: -> do name_size end, value: nil, encoding: nil}, {type: "enum", name: version, cls: typeof(Version::V311.value), onlyif: nil, verify: nil, value: nil, encoding: nil, enum_type: MQTT::Version}, {type: "bitfield", name: 2, cls: MQTT::V3::Connect, onlyif: nil, verify: nil}, {type: "basic", name: keep_alive_seconds, cls: UInt16, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "basic", name: client_id_size, cls: UInt16, onlyif: nil, verify: nil, value: -> do client_id.bytesize end, endian: nil}, {type: "string", name: client_id, cls: String, onlyif: nil, verify: nil, length: -> do client_id_size end, value: nil, encoding: nil}, {type: "basic", name: will_topic_size, cls: UInt16, onlyif: -> do will_flag end, verify: nil, value: -> do will_topic.bytesize end, endian: nil}, {type: "string", name: will_topic, cls: String, onlyif: -> do will_flag end, verify: nil, length: -> do will_topic_size end, value: nil, encoding: nil}, {type: "basic", name: will_payload_size, cls: UInt16, onlyif: -> do will_flag end, verify: nil, value: -> do will_payload.bytesize end, endian: nil}, {type: "string", name: will_payload, cls: String, onlyif: -> do will_flag end, verify: nil, length: -> do will_payload_size end, value: nil, encoding: nil}, {type: "basic", name: username_size, cls: UInt16, onlyif: -> do has_username end, verify: nil, value: -> do username.bytesize end, endian: nil}, {type: "string", name: username, cls: String, onlyif: -> do has_username end, verify: nil, length: -> do username_size end, value: nil, encoding: nil}, {type: "basic", name: password_size, cls: UInt16, onlyif: -> do has_password end, verify: nil, value: -> do password.bytesize end, endian: nil}, {type: "string", name: password, cls: String, onlyif: -> do has_password end, verify: nil, length: -> do password_size end, value: nil, encoding: nil}] of Nil
-
Class representing an MQTT Connect Packet
-
REMAINING =
[] of Nil
-
Class representing an MQTT Connect Packet
Class Method Summary
-
.bit_fields
Class representing an MQTT Connect Packet
Macro Summary
-
mqtt_v3_ack(name, onlyif = nil, verify = nil, value = nil)
Class representing an MQTT Connect Packet
-
mqtt_v3_connack(name, onlyif = nil, verify = nil, value = nil)
Class representing an MQTT Connect Packet
-
mqtt_v3_connect(name, onlyif = nil, verify = nil, value = nil)
Class representing an MQTT Connect Packet
-
mqtt_v3_header(name, onlyif = nil, verify = nil, value = nil)
Class representing an MQTT Connect Packet
Instance Method Summary
- #__format__ : IO::ByteFormat
- #_reserved_ : UInt8
- #_reserved_=(_reserved_ : UInt8)
-
#calculate_length : UInt32
Packet length, excluding header
-
#clean_start : Bool
Set to false to keep a persistent session with the server http://www.steves-internet-guide.com/mqtt-clean-sessions-example/
-
#clean_start=(clean_start : UInt8)
Set to false to keep a persistent session with the server http://www.steves-internet-guide.com/mqtt-clean-sessions-example/
-
#clean_start=(value : Bool)
Set to false to keep a persistent session with the server http://www.steves-internet-guide.com/mqtt-clean-sessions-example/
- #client_id : String
- #client_id=(client_id : String)
- #client_id_size : UInt16
- #client_id_size=(client_id_size : UInt16)
- #has_password : Bool
- #has_password=(has_password : UInt8)
- #has_password=(value : Bool)
- #has_username : Bool
- #has_username=(has_username : UInt8)
- #has_username=(value : Bool)
- #keep_alive_seconds : UInt16
- #keep_alive_seconds=(keep_alive_seconds : UInt16)
- #name : String
- #name=(name : String)
- #name_size : UInt16
- #name_size=(name_size : UInt16)
- #password : String
- #password=(str : String)
- #password_size : UInt16
- #password_size=(password_size : UInt16)
- #username : String
- #username=(str : String)
- #username_size : UInt16
- #username_size=(username_size : UInt16)
-
#version : Version
The version number of the protocol
-
#version=(version : Version)
The version number of the protocol
-
#will_flag : Bool
flag to indicate if the will topic will be set
-
#will_flag=(will_flag : UInt8)
flag to indicate if the will topic will be set
-
#will_flag=(value : Bool)
flag to indicate if the will topic will be set
- #will_payload : String
- #will_payload=(will_payload : String)
- #will_payload_size : UInt16
- #will_payload_size=(will_payload_size : UInt16)
-
#will_qos : MQTT::QoS
The QoS level to send the Will message as
-
#will_qos=(will_qos : UInt8)
The QoS level to send the Will message as
-
#will_qos=(value : MQTT::QoS)
The QoS level to send the Will message as
-
#will_retain : Bool
Set to true to make the Will message retained
-
#will_retain=(will_retain : UInt8)
Set to true to make the Will message retained
-
#will_retain=(value : Bool)
Set to true to make the Will message retained
- #will_topic : String
- #will_topic=(str : String)
- #will_topic_size : UInt16
- #will_topic_size=(will_topic_size : UInt16)
Instance methods inherited from class MQTT::V3::Header
__format__ : IO::ByteFormat
__format__,
duplicate : Bool
duplicate,
duplicate=(duplicate : UInt8)duplicate=(value : Bool) duplicate=, 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=(variable_length1 : UInt8) variable_length1=, variable_length2 : UInt8 variable_length2, variable_length2=(variable_length2 : UInt8) variable_length2=, variable_length3 : UInt8 variable_length3, variable_length3=(variable_length3 : UInt8) variable_length3=, variable_length4 : UInt8 variable_length4, variable_length4=(variable_length4 : UInt8) variable_length4=
Class methods inherited from class MQTT::V3::Header
bit_fields
bit_fields
Macros inherited from class MQTT::V3::Header
mqtt_v3_header(name, onlyif = nil, verify = nil, value = nil)
mqtt_v3_header
Class Method Detail
Macro Detail
Class representing an MQTT Connect Packet
Class representing an MQTT Connect Packet
Class representing an MQTT Connect Packet
Class representing an MQTT Connect Packet
Instance Method Detail
Set to false to keep a persistent session with the server http://www.steves-internet-guide.com/mqtt-clean-sessions-example/
Set to false to keep a persistent session with the server http://www.steves-internet-guide.com/mqtt-clean-sessions-example/
Set to false to keep a persistent session with the server http://www.steves-internet-guide.com/mqtt-clean-sessions-example/