瀏覽代碼

修改

master
SisMaker 4 年之前
父節點
當前提交
874d3ba600
共有 2 個檔案被更改,包括 5 行新增4 行删除
  1. +1
    -0
      src/ePortMsg.erl
  2. +4
    -4
      src/ePortSrv.erl

+ 1
- 0
src/ePortMsg.erl 查看文件

@ -9,6 +9,7 @@ port_call(Port, Msg) ->
Port ! {self(), {command, term_to_binary(Msg)}},
receive
{Port, {data, DataBin}} ->
io:format("~p~n", [DataBin]),
{ok, binary_to_term(DataBin)};
{Port, closed} ->
{error, closed};

+ 4
- 4
src/ePortSrv.erl 查看文件

@ -45,7 +45,7 @@ tt() ->
ignore
end,
ePortMsg:port_call(get(ppp), term_to_binary({$g, 12432, 4324})).
ePortMsg:port_call(get(ppp), {$g, 12432, 4324}).
tt(CmdId) ->
case get(ppp) of
@ -57,13 +57,13 @@ tt(CmdId) ->
end,
case CmdId of
$g ->
ePortMsg:port_call(get(ppp), term_to_binary({CmdId, 12432, 4324}));
ePortMsg:port_call(get(ppp), {CmdId, 12432, 4324});
$u ->
ePortMsg:port_call(get(ppp), term_to_binary({CmdId, 12432, 4324}));
ePortMsg:port_call(get(ppp), {CmdId, 12432, 4324});
$t ->
ignore;
_ ->
ePortMsg:port_call(get(ppp), term_to_binary({CmdId, 12432, 4324}))
ePortMsg:port_call(get(ppp), {CmdId, 12432, 4324})
end.
%%-----------------------------------------------------------------

Loading…
取消
儲存