This commit is contained in:
安礼成 2023-02-16 16:13:59 +08:00
parent b2d56f628e
commit 8b4c149651
2 changed files with 29 additions and 5 deletions

View File

@ -14,6 +14,10 @@
-define(HOST_STATUS_OFFLINE, 2).
-define(HOST_STATUS_DELETE, 3).
%%
-define(TERMINAL_STATUS_OFFLINE, 0).
-define(TERMINAL_STATUS_ONLINE, 1).
%% cpu相关
-record(cpu_metric, {
%% cpu编号
@ -48,6 +52,20 @@
status
}).
%%
-record(terminal_metric, {
%%
symbol :: binary(),
%%
name :: binary(),
%%
last_value = 0 :: number(),
%% , 100, : [{ts, value}]
serial_values = [] :: queue(),
%%
update_ts = 0 :: integer()
}).
%%
-record(host, {
%% ID
@ -66,10 +84,10 @@
status = ?HOST_STATUS_INACTIVE :: integer()
}).
%%
%% ,
-record(host_metric, {
%% ID
id :: binary(),
host_id :: binary(),
%% cpu相关
cpus = [],
%% cpu温度
@ -82,14 +100,18 @@
interfaces = []
}).
%%
%%
-record(terminal, {
%% ID
%% ID
id :: binary(),
%%
host_id :: binary(),
%%
name :: binary(),
%%
code :: binary(),
%%
access_protocol :: binary(),
%% ID
product_id :: integer(),
%% ID
@ -98,6 +120,8 @@
model :: binary(),
%% ID
cell_id :: integer(),
%% ,
metrics = [] :: [#terminal_metric{}],
%%
status = 0 :: integer(),
%% 线

View File

@ -13,7 +13,7 @@
[iot,
sasl]},
{mode, dev},
% {mode, dev},
%% automatically picked up if the files
%% exist but can be set manually, which