fix mock
This commit is contained in:
parent
a1343cb992
commit
5aa588f990
@ -15,7 +15,7 @@
|
||||
|
||||
%% API
|
||||
-export([start_link/0]).
|
||||
-export([mock/4]).
|
||||
-export([mock/5]).
|
||||
|
||||
%% gen_server callbacks
|
||||
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
|
||||
@ -43,12 +43,13 @@
|
||||
%%% API
|
||||
%%%===================================================================
|
||||
|
||||
mock(LocationCode, SType, CType, Value) when is_binary(LocationCode), is_integer(SType), is_integer(CType) ->
|
||||
mock(LocationCode, Para, SType, CType, Value) when is_binary(LocationCode), is_integer(SType), is_integer(CType), is_integer(Para) ->
|
||||
Req = #{
|
||||
<<"version">> => <<"1.0">>,
|
||||
<<"ts">> => iot_util:current_time(),
|
||||
<<"properties">> => #{
|
||||
<<"type">> => <<"ctrl">>,
|
||||
<<"para">> => Para,
|
||||
<<"stype">> => SType,
|
||||
<<"ctype">> => CType,
|
||||
<<"value">> => Value,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user