From 98e15ebbf4e3799d7ef9c6126e9ea7eb4df11f26 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Mon, 6 Mar 2017 18:11:09 +0800 Subject: [PATCH] Prepare for MQTT/5.0 --- include/emqttd.hrl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/emqttd.hrl b/include/emqttd.hrl index a65086858..a02c86129 100644 --- a/include/emqttd.hrl +++ b/include/emqttd.hrl @@ -22,9 +22,9 @@ -define(LICENSE_MESSAGE, "Licensed under the Apache License, Version 2.0"). --define(PROTOCOL_VERSION, "MQTT/3.1.1"). +-define(PROTOCOL_VERSION, "MQTT/5.0"). --define(ERTS_MINIMUM, "7.0"). +-define(ERTS_MINIMUM, "8.0"). %%-------------------------------------------------------------------- %% Sys/Queue/Share Topics' Prefix @@ -42,7 +42,7 @@ -type(pubsub() :: publish | subscribe). --define(PUBSUB(PS), (PS =:= publish orelse PS =:= subscribe)). +-define(PS(PS), (PS =:= publish orelse PS =:= subscribe)). %%-------------------------------------------------------------------- %% MQTT Topic @@ -172,7 +172,7 @@ severity :: warning | error | critical, title :: iolist() | binary(), summary :: iolist() | binary(), - timestamp :: erlang:timestamp() %% Timestamp + timestamp :: erlang:timestamp() }). -type(mqtt_alarm() :: #mqtt_alarm{}). @@ -186,8 +186,7 @@ -type(mqtt_plugin() :: #mqtt_plugin{}). %%-------------------------------------------------------------------- -%% MQTT CLI Command -%% For example: 'broker metrics' +%% MQTT CLI Command. For example: 'broker metrics' %%-------------------------------------------------------------------- -record(mqtt_cli, { name, action, args = [], opts = [], usage, descr }).