115template <
class Rep,
class Period>
116std::chrono::seconds
to_seconds(
const std::chrono::duration<Rep, Period>& dur) {
117 return std::chrono::duration_cast<std::chrono::seconds>(dur);
126template <
class Rep,
class Period>
137template <
class Rep,
class Period>
138std::chrono::milliseconds
to_milliseconds(
const std::chrono::duration<Rep, Period>& dur) {
139 return std::chrono::duration_cast<std::chrono::milliseconds>(dur);
148template <
class Rep,
class Period>
167inline int to_int(
bool b) {
return b ? (!0) : 0; }
Definition async_client.h:49
ReasonCode
Definition types.h:57
@ SERVER_SHUTTING_DOWN
Definition types.h:79
@ PACKET_IDENTIFIER_NOT_FOUND
Definition types.h:86
@ NO_SUBSCRIPTION_FOUND
Definition types.h:65
@ PACKET_IDENTIFIER_IN_USE
Definition types.h:85
@ BAD_AUTHENTICATION_METHOD
Definition types.h:80
@ MALFORMED_PACKET
Definition types.h:69
@ NOT_AUTHORIZED
Definition types.h:75
@ MAXIMUM_CONNECT_TIME
Definition types.h:100
@ TOPIC_NAME_INVALID
Definition types.h:84
@ NO_MATCHING_SUBSCRIBERS
Definition types.h:64
@ GRANTED_QOS_0
Definition types.h:60
@ IMPLEMENTATION_SPECIFIC_ERROR
Definition types.h:71
@ USE_ANOTHER_SERVER
Definition types.h:96
@ SUCCESS
Definition types.h:58
@ SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
Definition types.h:101
@ KEEP_ALIVE_TIMEOUT
Definition types.h:81
@ PAYLOAD_FORMAT_INVALID
Definition types.h:93
@ UNSPECIFIED_ERROR
Definition types.h:68
@ WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
Definition types.h:102
@ QOS_NOT_SUPPORTED
Definition types.h:95
@ SERVER_UNAVAILABLE
Definition types.h:76
@ TOPIC_FILTER_INVALID
Definition types.h:83
@ RETAIN_NOT_SUPPORTED
Definition types.h:94
@ SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
Definition types.h:98
@ QUOTA_EXCEEDED
Definition types.h:91
@ RE_AUTHENTICATE
Definition types.h:67
@ SERVER_BUSY
Definition types.h:77
@ SESSION_TAKEN_OVER
Definition types.h:82
@ SERVER_MOVED
Definition types.h:97
@ BANNED
Definition types.h:78
@ DISCONNECT_WITH_WILL_MESSAGE
Definition types.h:63
@ GRANTED_QOS_1
Definition types.h:61
@ NORMAL_DISCONNECTION
Definition types.h:59
@ BAD_USER_NAME_OR_PASSWORD
Definition types.h:74
@ MESSAGE_RATE_TOO_HIGH
Definition types.h:90
@ UNSUPPORTED_PROTOCOL_VERSION
Definition types.h:72
@ PROTOCOL_ERROR
Definition types.h:70
@ CONTINUE_AUTHENTICATION
Definition types.h:66
@ GRANTED_QOS_2
Definition types.h:62
@ ADMINISTRATIVE_ACTION
Definition types.h:92
@ TOPIC_ALIAS_INVALID
Definition types.h:88
@ PACKET_TOO_LARGE
Definition types.h:89
@ RECEIVE_MAXIMUM_EXCEEDED
Definition types.h:87
@ CLIENT_IDENTIFIER_NOT_VALID
Definition types.h:73
@ CONNECTION_RATE_EXCEEDED
Definition types.h:99
@ MQTTPP_V3_CODE
Definition types.h:103
long to_seconds_count(const std::chrono::duration< Rep, Period > &dur)
Definition types.h:127
bool to_bool(int n)
Definition types.h:161
std::shared_ptr< const string > string_ptr
Definition types.h:45
std::string binary
Definition types.h:42
std::chrono::milliseconds to_milliseconds(const std::chrono::duration< Rep, Period > &dur)
Definition types.h:138
string to_string(const char *cstr)
Definition types.h:175
std::chrono::seconds to_seconds(const std::chrono::duration< Rep, Period > &dur)
Definition types.h:116
uint8_t byte
Definition types.h:37
std::string string
Definition types.h:40
std::shared_ptr< const binary > binary_ptr
Definition types.h:47
int to_int(bool b)
Definition types.h:167
long to_milliseconds_count(const std::chrono::duration< Rep, Period > &dur)
Definition types.h:149