summaryrefslogtreecommitdiff
path: root/src/module_list.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/module_list.lua')
-rw-r--r--src/module_list.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/module_list.lua b/src/module_list.lua
index b5766aa..e343cf1 100644
--- a/src/module_list.lua
+++ b/src/module_list.lua
@@ -1,15 +1,15 @@
--
-- gcsd
--
--- gcsd the generic command sequencer daemon can be used to serialize
+-- gcsd the generic command sequencer daemon can be used to serialize
-- commands sent over various paralell communication channels to a
-- single command output. It can be seen as a multiplexer for any
-- kind of communication between a single resource and various clients
-- which want to submit commands to it or query information from it.
--- gcsd is written in C and Lua. The goal is to provide an easy to
+-- gcsd is written in C and Lua. The goal is to provide an easy to
-- understand high level API based on Lua which can be used to
-- implement the business logic of the so formed multiplexer daemon.
---
+--
--
-- Copyright (C) 2009-2010 Markus Grueneis <gimpf@spreadspace.org>
-- Christian Pointner <equinox@spreadspace.org>
@@ -37,7 +37,7 @@ local mt = {}
function mt.__index(table, key)
local value = rawget(table, key)
if(value ~= nil) then return value end
-
+
log.printf(log.DEBUG, "load module class: %s", key)
local filename = defines.MODULES_PATH .. "/" .. key .. ".lua"
@@ -57,7 +57,7 @@ module_list.output = nil
function module_list:new_instance(class_name, config, runtype)
class = self.classes[class_name]
if(class.__num_inst) then
- if(class.properties.max_instances >= 1 and
+ if(class.properties.max_instances >= 1 and
class.__num_inst >= class.properties.max_instances) then
error("max instances of " .. class_name .. " reached");
end
@@ -72,7 +72,7 @@ end
function module_list:init(opt)
local class, config = self:parse_config(opt.cmd_out)
if(not class) then return defines.KILL_DAEMON end
- if(self.classes[class].properties.type ~= defines.OUT_MODULE and
+ if(self.classes[class].properties.type ~= defines.OUT_MODULE and
self.classes[class].properties.type ~= defines.INOUT_MODULE) then
log.printf(log.ERROR, "module class '%s' cannot be used as output module", class);
return defines.KILL_DAEMON
@@ -86,7 +86,7 @@ function module_list:init(opt)
for idx, input in ipairs(opt.cmd_ins) do
local class, config = self:parse_config(input)
if(not class) then return defines.KILL_DAEMON end
- if(self.classes[class].properties.type ~= defines.IN_MODULE and
+ if(self.classes[class].properties.type ~= defines.IN_MODULE and
self.classes[class].properties.type ~= defines.INOUT_MODULE and
self.classes[class].properties.type ~= defines.MISC_MODULE) then
log.printf(log.ERROR, "module class '%s' cannot be used as input module", class);
@@ -113,7 +113,7 @@ function module_list:parse_config(module_config)
for k, v in string.gmatch(config_string .. ",", "([^,=]+)=([^,=]+),") do
config[k] = v
end
-
+
return class, config
end