From 26f9d9ce2650dd225e011fec49641572f3b85796 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Fri, 23 May 2014 19:06:08 +0800 Subject: Global emu debugged --- devicemon.erl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'devicemon.erl') diff --git a/devicemon.erl b/devicemon.erl index 84c2849..703dca5 100644 --- a/devicemon.erl +++ b/devicemon.erl @@ -86,9 +86,8 @@ deviceloop(Devices) -> deviceloop(Devices) end. -devicemon() -> +devmon() -> register(?MODULE,self()), - spawn(?MODULE,devicepool,[?ADDRANGE]), deviceloop(orddict:new()). getStat(Addr) -> @@ -100,13 +99,13 @@ getStat(Addr) -> error end. -getStaus(Addr) -> +getStatus(Addr) -> case getStat(Addr) of error -> error; - Val -> Val + Val -> ready %% device status multiplexer %% ready | busy end. start() -> - spawn(?MODULE,devicemon,[]). \ No newline at end of file + spawn(?MODULE,devmon,[]). \ No newline at end of file -- cgit v1.2.3-70-g09d2