diff options
author | Christian Pointner <equinox@spreadspace.org> | 2010-11-13 16:38:31 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2010-11-13 16:38:31 +0000 |
commit | 0673495c83aa4954f1ef1513543f557321bb450e (patch) | |
tree | ad5599eb255c6027504e41387d125e05a7b6b310 | |
parent | fixed dummy modules missing require (diff) |
changed module configuration syntax
git-svn-id: https://svn.spreadspace.org/gcsd/trunk@26 ac14a137-c7f1-4531-abe0-07747231d213
-rw-r--r-- | doc/gcsd.8 | 18 | ||||
-rw-r--r-- | doc/gcsd.8.txt | 15 | ||||
-rw-r--r-- | src/modules/dummy.lua | 2 | ||||
-rw-r--r-- | src/options.c | 8 |
4 files changed, 22 insertions, 21 deletions
@@ -2,12 +2,12 @@ .\" Title: gcsd .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/> -.\" Date: 10/02/2010 +.\" Date: 11/13/2010 .\" Manual: gcsd user manual .\" Source: gcsd trunk .\" Language: English .\" -.TH "GCSD" "8" "10/02/2010" "gcsd trunk" "gcsd user manual" +.TH "GCSD" "8" "11/13/2010" "gcsd trunk" "gcsd user manual" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- @@ -33,8 +33,8 @@ gcsd \- generic command sequencer daemon [ \fB\-L|\-\-log\fR <target>:<level>[,<param1>[,<param2>[\&.\&.]]] ] [ \fB\-U|\-\-debug\fR ] [ \fB\-l|\-\-lua\-code\fR <lua\-file> ] - [ \fB\-o|\-\-output\fR <module>:[<param1>[,<param2>[,<param3>[\&.\&.]]]] ] - [ \fB\-i|\-\-input\fR <module>:[<param1>[,<param2>[,<param3>[\&.\&.]]]] ] + [ \fB\-o|\-\-output\fR <module>:[<param1>=<value>[,<param2>=<value>[\&.\&.]]] ] + [ \fB\-i|\-\-input\fR <module>:[<param1>=<value>[,<param2>=<value>[\&.\&.]]] ] .fi .SH "DESCRIPTION" .sp @@ -123,16 +123,16 @@ Load the dispatch table and callback functions from this file\&. If no file is s will run in basic mode and just sends any command submitted by a client to the output und broadcasts any response to all connected clients\&. .RE .PP -\fB\-o, \-\-output <module>:[<param1>[,<param2>[,<param3>[\&.\&.]]]]\fR +\fB\-o, \-\-output <module>:[<param1>=<value>[,<param2>=<value>[\&.\&.]]]\fR .RS 4 set and configure the command output module\&. See Modules section for further information on which modules exist and how they can be configured\&. By default the output module is set to -\fBserial:/dev/ttyS0,9600,8n1\fR +\fBserial:device=/dev/ttyS0,baudrate=9600,data=8,stop=1,parity=no\fR .RE .PP -\fB\-i, \-\-input <module>:[<param1>[,<param2>[,<param3>[\&.\&.]]]]\fR +\fB\-i, \-\-input <module>:[<param1>=<value>[,<param2>=<value>[\&.\&.]]]\fR .RS 4 set and configure command input modules\&. This can be invoked several times\&. gcsd will use all input modules in paralell\&. See Modules section for further information on which modules exist and how they can be configured\&. By default a single input module with the config -\fBunix:/var/run/gcsd\&.sock,660\fR +\fBunix:file=/var/run/gcsd\&.sock,mode=660\fR is used\&. .RE .SH "MODULES" @@ -149,7 +149,7 @@ Most likely there are some bugs in \fBgcsd\fR\&. If you find a bug, please let t nothing yet\&.\&. .SH "AUTHORS" .sp -Markus Grueneis <gimpf@spreadspace\&.org> Christian Pointner <equinox@spreadspace\&.org> +Markus Grueneis <gimpf@spreadspace\&.org>, Christian Pointner <equinox@spreadspace\&.org> .SH "RESOURCES" .sp Main web site: http://www\&.spreadspace\&.org/gcsd/ diff --git a/doc/gcsd.8.txt b/doc/gcsd.8.txt index c3aa180..8d89ed7 100644 --- a/doc/gcsd.8.txt +++ b/doc/gcsd.8.txt @@ -21,8 +21,8 @@ gcsd [ -L|--log <target>:<level>[,<param1>[,<param2>[..]]] ] [ -U|--debug ] [ -l|--lua-code <lua-file> ] - [ -o|--output <module>:[<param1>[,<param2>[,<param3>[..]]]] ] - [ -i|--input <module>:[<param1>[,<param2>[,<param3>[..]]]] ] + [ -o|--output <module>:[<param1>=<value>[,<param2>=<value>[..]]] ] + [ -i|--input <module>:[<param1>=<value>[,<param2>=<value>[..]]] ] .... @@ -91,16 +91,17 @@ The following options can be passed to the *gcsd* daemon: specified *gcsd* will run in basic mode and just sends any command submitted by a client to the output und broadcasts any response to all connected clients. -*-o, --output <module>:[<param1>[,<param2>[,<param3>[..]]]]*:: +*-o, --output <module>:[<param1>=<value>[,<param2>=<value>[..]]]*:: set and configure the command output module. See Modules section for further information on which modules exist and how they can be configured. By default - the output module is set to *serial:/dev/ttyS0,9600,8n1* + the output module is set to *serial:device=/dev/ttyS0,baudrate=9600,data=8,stop=1,parity=no* -*-i, --input <module>:[<param1>[,<param2>[,<param3>[..]]]]*:: +*-i, --input <module>:[<param1>=<value>[,<param2>=<value>[..]]]*:: set and configure command input modules. This can be invoked several times. gcsd will use all input modules in paralell. See Modules section for further information on which modules exist and how they can be configured. By default - a single input module with the config *unix:/var/run/gcsd.sock,660* is used. + a single input module with the config *unix:file=/var/run/gcsd.sock,mode=660* + is used. Modules @@ -128,7 +129,7 @@ nothing yet.. AUTHORS ------- -Markus Grueneis <gimpf@spreadspace.org> +Markus Grueneis <gimpf@spreadspace.org>, Christian Pointner <equinox@spreadspace.org> diff --git a/src/modules/dummy.lua b/src/modules/dummy.lua index 09004ab..08a95b9 100644 --- a/src/modules/dummy.lua +++ b/src/modules/dummy.lua @@ -70,7 +70,7 @@ function dummy:new(config) function inst:cleanup() client_list:unregister_by_module(self) end - function inst:get_read_handles() + function inst:get_read_handles() return {} end function inst:get_write_handles() diff --git a/src/options.c b/src/options.c index a23523b..d1c7c50 100644 --- a/src/options.c +++ b/src/options.c @@ -208,9 +208,9 @@ int options_parse(options_t* opt, int argc, char* argv[]) if(!opt->cmd_ins_.first_) { #ifndef WINVER - string_list_add(&opt->cmd_ins_, "unix:/var/run/gcsd.sock,660"); + string_list_add(&opt->cmd_ins_, "unix:file=/var/run/gcsd.sock,mode=660"); #else - string_list_add(&opt->cmd_ins_, "tcp:127.0.0.1,1234"); + string_list_add(&opt->cmd_ins_, "tcp:host=127.0.0.1,port=1234"); #endif } @@ -239,9 +239,9 @@ void options_default(options_t* opt) string_list_init(&opt->log_targets_); opt->lua_code_ = NULL; #ifndef WINVER - opt->cmd_out_ = strdup("serial:/dev/ttyS0,9600,8n1"); + opt->cmd_out_ = strdup("serial:device=/dev/ttyS0,baudrate=9600,data=8,stop=1,parity=no"); #else - opt->cmd_out_ = strdup("serial:COM0,9600,8n1"); + opt->cmd_out_ = strdup("serial:device=COM0,baudrate=9600,data=8,stop=1,parity=no"); #endif string_list_init(&opt->cmd_ins_); opt->debug_ = 0; |