Loading...
Searching...
No Matches
reason_code.h
Go to the documentation of this file.
/*******************************************************************************
* Copyright (c) 2024 Frank Pagliughi <fpagliughi@mindspring.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v20.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Frank Pagliughi - initial implementation and documentation
*******************************************************************************/
#ifndef __reason_code_h
#define __reason_code_h
#include <iostream>
#include <string>
namespace mqtt {
enum ReasonCode {
SUCCESS = 0,
NORMAL_DISCONNECTION = 0,
GRANTED_QOS_0 = 0,
GRANTED_QOS_1 = 1,
GRANTED_QOS_2 = 2,
DISCONNECT_WITH_WILL_MESSAGE = 4,
NO_MATCHING_SUBSCRIBERS = 16,
NO_SUBSCRIPTION_FOUND = 17,
CONTINUE_AUTHENTICATION = 24,
RE_AUTHENTICATE = 25,
UNSPECIFIED_ERROR = 128,
MALFORMED_PACKET = 129,
PROTOCOL_ERROR = 130,
IMPLEMENTATION_SPECIFIC_ERROR = 131,
UNSUPPORTED_PROTOCOL_VERSION = 132,
CLIENT_IDENTIFIER_NOT_VALID = 133,
BAD_USER_NAME_OR_PASSWORD = 134,
NOT_AUTHORIZED = 135,
SERVER_UNAVAILABLE = 136,
SERVER_BUSY = 137,
BANNED = 138,
SERVER_SHUTTING_DOWN = 139,
BAD_AUTHENTICATION_METHOD = 140,
KEEP_ALIVE_TIMEOUT = 141,
SESSION_TAKEN_OVER = 142,
TOPIC_FILTER_INVALID = 143,
TOPIC_NAME_INVALID = 144,
PACKET_IDENTIFIER_IN_USE = 145,
PACKET_IDENTIFIER_NOT_FOUND = 146,
RECEIVE_MAXIMUM_EXCEEDED = 147,
TOPIC_ALIAS_INVALID = 148,
PACKET_TOO_LARGE = 149,
MESSAGE_RATE_TOO_HIGH = 150,
QUOTA_EXCEEDED = 151,
ADMINISTRATIVE_ACTION = 152,
PAYLOAD_FORMAT_INVALID = 153,
RETAIN_NOT_SUPPORTED = 154,
QOS_NOT_SUPPORTED = 155,
USE_ANOTHER_SERVER = 156,
SERVER_MOVED = 157,
SHARED_SUBSCRIPTIONS_NOT_SUPPORTED = 158,
CONNECTION_RATE_EXCEEDED = 159,
MAXIMUM_CONNECT_TIME = 160,
SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED = 161,
WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED = 162,
// This is not a protocol code; used internally by the library (obsolete)
MQTTPP_V3_CODE = 0
};
std::string to_string(ReasonCode reasonCode);
std::ostream& operator<<(std::ostream& os, ReasonCode reasonCode);
} // namespace mqtt
#endif // __reason_code_h
mqtt
Definition async_client.h:60
mqtt::ReasonCode
ReasonCode
Definition reason_code.h:39
mqtt::SERVER_SHUTTING_DOWN
@ SERVER_SHUTTING_DOWN
Definition reason_code.h:61
mqtt::PACKET_IDENTIFIER_NOT_FOUND
@ PACKET_IDENTIFIER_NOT_FOUND
Definition reason_code.h:68
mqtt::NO_SUBSCRIPTION_FOUND
@ NO_SUBSCRIPTION_FOUND
Definition reason_code.h:47
mqtt::PACKET_IDENTIFIER_IN_USE
@ PACKET_IDENTIFIER_IN_USE
Definition reason_code.h:67
mqtt::BAD_AUTHENTICATION_METHOD
@ BAD_AUTHENTICATION_METHOD
Definition reason_code.h:62
mqtt::MALFORMED_PACKET
@ MALFORMED_PACKET
Definition reason_code.h:51
mqtt::NOT_AUTHORIZED
@ NOT_AUTHORIZED
Definition reason_code.h:57
mqtt::MAXIMUM_CONNECT_TIME
@ MAXIMUM_CONNECT_TIME
Definition reason_code.h:82
mqtt::TOPIC_NAME_INVALID
@ TOPIC_NAME_INVALID
Definition reason_code.h:66
mqtt::NO_MATCHING_SUBSCRIBERS
@ NO_MATCHING_SUBSCRIBERS
Definition reason_code.h:46
mqtt::GRANTED_QOS_0
@ GRANTED_QOS_0
Definition reason_code.h:42
mqtt::IMPLEMENTATION_SPECIFIC_ERROR
@ IMPLEMENTATION_SPECIFIC_ERROR
Definition reason_code.h:53
mqtt::USE_ANOTHER_SERVER
@ USE_ANOTHER_SERVER
Definition reason_code.h:78
mqtt::SUCCESS
@ SUCCESS
Definition reason_code.h:40
mqtt::SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
@ SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
Definition reason_code.h:83
mqtt::KEEP_ALIVE_TIMEOUT
@ KEEP_ALIVE_TIMEOUT
Definition reason_code.h:63
mqtt::PAYLOAD_FORMAT_INVALID
@ PAYLOAD_FORMAT_INVALID
Definition reason_code.h:75
mqtt::UNSPECIFIED_ERROR
@ UNSPECIFIED_ERROR
Definition reason_code.h:50
mqtt::WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
@ WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
Definition reason_code.h:84
mqtt::QOS_NOT_SUPPORTED
@ QOS_NOT_SUPPORTED
Definition reason_code.h:77
mqtt::SERVER_UNAVAILABLE
@ SERVER_UNAVAILABLE
Definition reason_code.h:58
mqtt::TOPIC_FILTER_INVALID
@ TOPIC_FILTER_INVALID
Definition reason_code.h:65
mqtt::RETAIN_NOT_SUPPORTED
@ RETAIN_NOT_SUPPORTED
Definition reason_code.h:76
mqtt::SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
@ SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
Definition reason_code.h:80
mqtt::QUOTA_EXCEEDED
@ QUOTA_EXCEEDED
Definition reason_code.h:73
mqtt::RE_AUTHENTICATE
@ RE_AUTHENTICATE
Definition reason_code.h:49
mqtt::SERVER_BUSY
@ SERVER_BUSY
Definition reason_code.h:59
mqtt::SESSION_TAKEN_OVER
@ SESSION_TAKEN_OVER
Definition reason_code.h:64
mqtt::SERVER_MOVED
@ SERVER_MOVED
Definition reason_code.h:79
mqtt::BANNED
@ BANNED
Definition reason_code.h:60
mqtt::DISCONNECT_WITH_WILL_MESSAGE
@ DISCONNECT_WITH_WILL_MESSAGE
Definition reason_code.h:45
mqtt::GRANTED_QOS_1
@ GRANTED_QOS_1
Definition reason_code.h:43
mqtt::NORMAL_DISCONNECTION
@ NORMAL_DISCONNECTION
Definition reason_code.h:41
mqtt::BAD_USER_NAME_OR_PASSWORD
@ BAD_USER_NAME_OR_PASSWORD
Definition reason_code.h:56
mqtt::MESSAGE_RATE_TOO_HIGH
@ MESSAGE_RATE_TOO_HIGH
Definition reason_code.h:72
mqtt::UNSUPPORTED_PROTOCOL_VERSION
@ UNSUPPORTED_PROTOCOL_VERSION
Definition reason_code.h:54
mqtt::PROTOCOL_ERROR
@ PROTOCOL_ERROR
Definition reason_code.h:52
mqtt::CONTINUE_AUTHENTICATION
@ CONTINUE_AUTHENTICATION
Definition reason_code.h:48
mqtt::GRANTED_QOS_2
@ GRANTED_QOS_2
Definition reason_code.h:44
mqtt::ADMINISTRATIVE_ACTION
@ ADMINISTRATIVE_ACTION
Definition reason_code.h:74
mqtt::TOPIC_ALIAS_INVALID
@ TOPIC_ALIAS_INVALID
Definition reason_code.h:70
mqtt::PACKET_TOO_LARGE
@ PACKET_TOO_LARGE
Definition reason_code.h:71
mqtt::RECEIVE_MAXIMUM_EXCEEDED
@ RECEIVE_MAXIMUM_EXCEEDED
Definition reason_code.h:69
mqtt::CLIENT_IDENTIFIER_NOT_VALID
@ CLIENT_IDENTIFIER_NOT_VALID
Definition reason_code.h:55
mqtt::CONNECTION_RATE_EXCEEDED
@ CONNECTION_RATE_EXCEEDED
Definition reason_code.h:81
mqtt::MQTTPP_V3_CODE
@ MQTTPP_V3_CODE
Definition reason_code.h:86
mqtt::operator<<
std::ostream & operator<<(std::ostream &os, const buffer_ref< T > &buf)
Definition buffer_ref.h:286
mqtt::to_string
std::string to_string(ReasonCode reasonCode)