This commit is contained in:
anlicheng 2024-06-22 11:00:36 +08:00
parent 7c6f4a7198
commit 718599b9a0
2 changed files with 6 additions and 6 deletions

View File

@ -46,9 +46,9 @@
get_pid() -> get_pid() ->
whereis(?MODULE). whereis(?MODULE).
-spec forward(LocationCode :: binary(), RealLocationCode :: binary(), EventType :: integer(), Params :: map()) -> no_return(). -spec forward(LocationCode :: binary(), DynamicLocationCode :: 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) -> forward(LocationCode, DynamicLocationCode, EventType, Params) when is_binary(LocationCode), is_binary(DynamicLocationCode), is_integer(EventType), is_map(Params) ->
gen_statem:cast(?MODULE, {forward, LocationCode, RealLocationCode, EventType, Params}). gen_statem:cast(?MODULE, {forward, LocationCode, DynamicLocationCode, EventType, Params}).
-spec get_stat() -> {ok, Stat :: #{}}. -spec get_stat() -> {ok, Stat :: #{}}.
get_stat() -> get_stat() ->

View File

@ -46,9 +46,9 @@
get_pid() -> get_pid() ->
whereis(?MODULE). whereis(?MODULE).
-spec forward(LocationCode :: binary(), RealLocationCode :: binary(), Fields :: list(), Timestamp :: integer()) -> no_return(). -spec forward(LocationCode :: binary(), DynamicLocationCode :: 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) -> 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, RealLocationCode, Fields, Timestamp}). gen_statem:cast(?MODULE, {forward, LocationCode, DynamicLocationCode, Fields, Timestamp}).
-spec get_stat() -> {ok, Stat :: #{}}. -spec get_stat() -> {ok, Stat :: #{}}.
get_stat() -> get_stat() ->