ソースを参照

修改

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)}}, Port ! {self(), {command, term_to_binary(Msg)}},
receive receive
{Port, {data, DataBin}} -> {Port, {data, DataBin}} ->
io:format("~p~n", [DataBin]),
{ok, binary_to_term(DataBin)}; {ok, binary_to_term(DataBin)};
{Port, closed} -> {Port, closed} ->
{error, closed}; {error, closed};

+ 4
- 4
src/ePortSrv.erl ファイルの表示

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

読み込み中…
キャンセル
保存