This commit is contained in:
anlicheng 2026-04-18 16:58:24 +08:00
parent 4862fdc94b
commit 83cfb76470
3 changed files with 3 additions and 49 deletions

View File

@ -2,9 +2,8 @@
%%% @author anlicheng
%%% @copyright (C) 2025, <COMPANY>
%%% @doc
%%% , 1: topic的pub/sub机制; 2. target的单点通讯和广播
%%%
%%% @end
%%% Created : 21. 4 2025 17:28
%%%-------------------------------------------------------------------
-author("anlicheng").
@ -39,48 +38,3 @@
%%%% ,
%%
-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()
}).

View File

@ -9,7 +9,7 @@
-module(iot_host).
-author("aresei").
-include("iot.hrl").
-include("message.hrl").
-include("protocol.hrl").
-include("message_pb.hrl").
-behaviour(gen_statem).

View File

@ -8,7 +8,7 @@
%%%-------------------------------------------------------------------
-module(tcp_channel).
-author("licheng5").
-include("message.hrl").
-include("protocol.hrl").
-include("message_pb.hrl").
-behaviour(ranch_protocol).