summaryrefslogtreecommitdiff
path: root/devicemon.erl
diff options
context:
space:
mode:
Diffstat (limited to 'devicemon.erl')
-rw-r--r--devicemon.erl9
1 files changed, 4 insertions, 5 deletions
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