reasoncode

package
v0.0.0-...-ae9b5cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReasonCode

type ReasonCode byte

ReasonCode MQTT reason code that indicates the result of an operation MQTT sec 2.4. Only the reasoncodes that are common across the MQTT packets are defined here. The specific packet based error codes can found in their respective packet encoders/decoders

const (
	Success                           ReasonCode = 0x00 // CONNACK, PUBACK, PUBREC, PUBREL, PUBCOMP, UNSUBACK, AUTH
	NoMatchingSubscribers             ReasonCode = 0x10 // PUBACK, PUBREC
	UnspecifiedError                  ReasonCode = 0x80 // CONNACK, PUBACK, PUBREC, SUBACK, UNSUBACK, DISCONNECT
	MalformedPacket                   ReasonCode = 0x81 // CONNACK, DISCONNECT
	ProtocolError                     ReasonCode = 0x82 // CONNACK, DISCONNECT
	ImplSpecificError                 ReasonCode = 0x83 // CONNACK, PUBACK, PUBREC, SUBACK, UNSUBACK, DISCONNECT
	NotAuthorized                     ReasonCode = 0x87 // CONNACK, PUBACK, PUBREC, SUBACK, UNSUBACK, DISCONNECT
	ServerBusy                        ReasonCode = 0x89 // CONNACK, DISCONNECT
	BadAuthMethod                     ReasonCode = 0x8C // CONNACK, DISCONNECT
	TopicFilterInvalid                ReasonCode = 0x8F // SUBACK, UNSUBACK, DISCONNECT
	TopicNameInvalid                  ReasonCode = 0x90 // CONNACK, PUBACK, PUBREC, DISCONNECT
	PacketIdentifierInUse             ReasonCode = 0x91 // PUBACK, SUBACK, UNSUBACK
	PacketIdentifierNotFound          ReasonCode = 0x92 // PUBREL, PUBCOMP
	PacketTooLarge                    ReasonCode = 0x95 // CONNACK, PUBACK, PUBREC, DISCONNECT
	QuotaExceeded                     ReasonCode = 0x97 // PUBACK, PUBREC, SUBACK, DISCONNECT
	PayloadFormatInvalid              ReasonCode = 0x99 // CONNACK, DISCONNECT
	RetainNotSupported                ReasonCode = 0x9A // CONNACK, DISCONNECT
	QoSNotSupported                   ReasonCode = 0x9B // CONNACK, DISCONNECT
	UseAnotherServer                  ReasonCode = 0x9C // CONNACK, DISCONNECT
	ServerMoved                       ReasonCode = 0x9D // CONNACK, DISCONNECT
	SharedSubscriptionsNotSupported   ReasonCode = 0x9E // SUBACK, DISCONNECT
	ConnectionRateExceeded            ReasonCode = 0x9F // CONNACK, DISCONNECT
	SubscriptionIdsNotSupported       ReasonCode = 0xA1 // SUBACK, DISCONNECT
	WildcardSubscriptionsNotSupported ReasonCode = 0xA2 // SUBACK, DISCONNECT
)

func (ReasonCode) Text

func (code ReasonCode) Text() string

Text returns a text for the MQTT reason code. Returns the empty string if the reason code is unknown.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL