fix
This commit is contained in:
parent
4862fdc94b
commit
83cfb76470
@ -2,9 +2,8 @@
|
|||||||
%%% @author anlicheng
|
%%% @author anlicheng
|
||||||
%%% @copyright (C) 2025, <COMPANY>
|
%%% @copyright (C) 2025, <COMPANY>
|
||||||
%%% @doc
|
%%% @doc
|
||||||
%%% 扩展部分, 1: 支持基于topic的pub/sub机制; 2. 基于target的单点通讯和广播
|
%%% 传输层协议常量定义
|
||||||
%%% @end
|
%%% @end
|
||||||
%%% Created : 21. 4月 2025 17:28
|
|
||||||
%%%-------------------------------------------------------------------
|
%%%-------------------------------------------------------------------
|
||||||
-author("anlicheng").
|
-author("anlicheng").
|
||||||
|
|
||||||
@ -39,48 +38,3 @@
|
|||||||
%%%% 命令类型子分类, 不需要返回值
|
%%%% 命令类型子分类, 不需要返回值
|
||||||
%% 授权
|
%% 授权
|
||||||
-define(COMMAND_AUTH, 16#08).
|
-define(COMMAND_AUTH, 16#08).
|
||||||
|
|
||||||
-record(auth_request, {
|
|
||||||
uuid :: binary(),
|
|
||||||
username :: binary(),
|
|
||||||
salt :: binary(),
|
|
||||||
token :: binary(),
|
|
||||||
timestamp :: integer()
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(auth_reply, {
|
|
||||||
code :: integer(),
|
|
||||||
payload :: binary()
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(pub, {
|
|
||||||
topic :: binary(),
|
|
||||||
qos = 0 :: integer(),
|
|
||||||
content :: binary()
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(command, {
|
|
||||||
command_type :: integer(),
|
|
||||||
command :: binary()
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(jsonrpc_request, {
|
|
||||||
method :: binary(),
|
|
||||||
params = <<>> :: any()
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(jsonrpc_reply, {
|
|
||||||
result :: any() | undefined,
|
|
||||||
error :: any() | undefined
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(data, {
|
|
||||||
route_key :: binary(),
|
|
||||||
metric :: binary()
|
|
||||||
}).
|
|
||||||
|
|
||||||
-record(task_event_stream, {
|
|
||||||
task_id :: integer(),
|
|
||||||
type :: binary(),
|
|
||||||
stream :: binary()
|
|
||||||
}).
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
-module(iot_host).
|
-module(iot_host).
|
||||||
-author("aresei").
|
-author("aresei").
|
||||||
-include("iot.hrl").
|
-include("iot.hrl").
|
||||||
-include("message.hrl").
|
-include("protocol.hrl").
|
||||||
-include("message_pb.hrl").
|
-include("message_pb.hrl").
|
||||||
|
|
||||||
-behaviour(gen_statem).
|
-behaviour(gen_statem).
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
%%%-------------------------------------------------------------------
|
%%%-------------------------------------------------------------------
|
||||||
-module(tcp_channel).
|
-module(tcp_channel).
|
||||||
-author("licheng5").
|
-author("licheng5").
|
||||||
-include("message.hrl").
|
-include("protocol.hrl").
|
||||||
-include("message_pb.hrl").
|
-include("message_pb.hrl").
|
||||||
-behaviour(ranch_protocol).
|
-behaviour(ranch_protocol).
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user