diff options
Diffstat (limited to 'src/modules/stdio.lua')
-rw-r--r-- | src/modules/stdio.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/stdio.lua b/src/modules/stdio.lua index 4069a87..597386b 100644 --- a/src/modules/stdio.lua +++ b/src/modules/stdio.lua @@ -37,10 +37,11 @@ local stdio = {} stdio.properties = { type=defines.INOUT_MODULE, name="stdio", max_instances=1 } -- create new instance of stdio module class -function stdio:new(config) +function stdio:new(config, runtype) local inst = {} inst.class = self.properties.name inst.config = config + inst.config.runtype = runtype if(config.name == nil or config.name == "") then inst.name = self.properties.name else @@ -62,10 +63,12 @@ function stdio:new(config) end self.in_buffer = self.in_buffer .. buffer - self.in_buffer = dispatch_table:dispatch(self.in_buffer) - - -- TODO: part of expected response handling - command_queue:command_completed() + if(inst.config.runtype == defines.IN_MODULE) then + self.in_buffer = dispatch_table:dispatch(self.in_buffer) + else + -- TODO: part of expected response handling + command_queue:command_completed() + end return defines.OK end |