From 718599b9a061677769fdd32734d5b38257c45581 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Sat, 22 Jun 2024 11:00:36 +0800 Subject: [PATCH] fix code --- apps/iot/src/endpoint/iot_jinzhi_endpoint.erl | 6 +++--- apps/iot/src/endpoint/iot_zd_endpoint.erl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl b/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl index 8ca2bcb..e11fd00 100644 --- a/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl +++ b/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl @@ -46,9 +46,9 @@ get_pid() -> whereis(?MODULE). --spec forward(LocationCode :: binary(), RealLocationCode :: binary(), EventType :: integer(), Params :: map()) -> no_return(). -forward(LocationCode, RealLocationCode, EventType, Params) when is_binary(LocationCode), is_binary(RealLocationCode), is_integer(EventType), is_map(Params) -> - gen_statem:cast(?MODULE, {forward, LocationCode, RealLocationCode, EventType, Params}). +-spec forward(LocationCode :: binary(), DynamicLocationCode :: binary(), EventType :: integer(), Params :: map()) -> no_return(). +forward(LocationCode, DynamicLocationCode, EventType, Params) when is_binary(LocationCode), is_binary(DynamicLocationCode), is_integer(EventType), is_map(Params) -> + gen_statem:cast(?MODULE, {forward, LocationCode, DynamicLocationCode, EventType, Params}). -spec get_stat() -> {ok, Stat :: #{}}. get_stat() -> diff --git a/apps/iot/src/endpoint/iot_zd_endpoint.erl b/apps/iot/src/endpoint/iot_zd_endpoint.erl index 94eeb6c..a4c0d96 100644 --- a/apps/iot/src/endpoint/iot_zd_endpoint.erl +++ b/apps/iot/src/endpoint/iot_zd_endpoint.erl @@ -46,9 +46,9 @@ get_pid() -> whereis(?MODULE). --spec forward(LocationCode :: binary(), RealLocationCode :: binary(), Fields :: list(), Timestamp :: integer()) -> no_return(). -forward(LocationCode, RealLocationCode, Fields, Timestamp) when is_binary(LocationCode), is_binary(RealLocationCode), is_list(Fields); is_binary(Fields), is_integer(Timestamp) -> - gen_statem:cast(?MODULE, {forward, LocationCode, RealLocationCode, Fields, Timestamp}). +-spec forward(LocationCode :: binary(), DynamicLocationCode :: binary(), Fields :: list(), Timestamp :: integer()) -> no_return(). +forward(LocationCode, DynamicLocationCode, Fields, Timestamp) when is_binary(LocationCode), is_binary(DynamicLocationCode), is_list(Fields); is_binary(Fields), is_integer(Timestamp) -> + gen_statem:cast(?MODULE, {forward, LocationCode, DynamicLocationCode, Fields, Timestamp}). -spec get_stat() -> {ok, Stat :: #{}}. get_stat() ->