From 9adcb32af31d22a046881f5d690d068e232be773 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Mon, 9 Jun 2014 20:24:43 +0800 Subject: Comments & maintenance --- cmdiface.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmdiface.erl') diff --git a/cmdiface.erl b/cmdiface.erl index 3113c03..b44e0f4 100644 --- a/cmdiface.erl +++ b/cmdiface.erl @@ -21,7 +21,7 @@ reg_feedbackOps(Addr,Name,T,MsgReq,MsgRes,To) -> fun () -> rsbusserv ! {devicemon,comm,Addr,[]} end, - Pid = spawn(?MODULE,res_manip,[Init,Exit,To]), + Pid = spawn(?MODULE,res_manip,[Init,Exit,To,[0,Addr,MsgReq]]), Call = fun () -> Pid ! rsbusserv:rsbusreq(Addr,MsgRes) @@ -32,10 +32,10 @@ invoke_cmd(Addr,Name,MsgReq) -> io:format("Command: ~p ~n",[Name]), rsbusserv! {devicemon,comm,Addr,MsgReq}. -res_manip(Init,Exit,To) -> +res_manip(Init,Exit,To,Pre) -> Init(), receive - {stat,_Type,Stat} -> To ! {self(),comm,Stat}; - {error,_Cause} -> ok + {stat,Type,Msg} -> To ! {self(),comm,Pre++[Type]++Msg}; + {error,_Reason} -> ok end, Exit(). \ No newline at end of file -- cgit v1.2.3-70-g09d2