Jump to content

User Reference:Module Command Line Options: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
No edit summary
 
Mellinger (talk | contribs)
Line 6: Line 6:


==Core Modules==
==Core Modules==
Core modules (i.e., [[Data Acquisition]], [[Signal Processing]], and [[Application Module]], share the same command line syntax:
[[Technical Reference:Core Modules|Core modules]] (i.e., Data Acquisition, Signal Processing, and Application Module), share the same command line syntax:
  <ModuleName> <operator IP>:<operator port> --<option1>-<value1> --<option2>-<value2> ...
  <ModuleName> <operator IP>:<operator port> --<option1>-<value1> --<option2>-<value2> ...
All arguments are optional.
All arguments are optional.
Line 12: Line 12:
===Specifying the Operator Module's Network Address===
===Specifying the Operator Module's Network Address===
At startup, each core module connects to the operator module. If no IP address is specified on the command line, the connection is opened to the local machine using 127.0.0.1 as an IP address.
At startup, each core module connects to the operator module. If no IP address is specified on the command line, the connection is opened to the local machine using 127.0.0.1 as an IP address.
When no port is given, each module uses its default port as defined [[Technical Reference:Networking Protocol|here]].
When no port is given, each module uses its default port as defined [[Technical Reference:States of Operation#Startup Sequence|here]].
Normally, there is no need to change port numbers.
Normally, there is no need to change port numbers.


Line 20: Line 20:
Each option is translated into a BCI2000 parameter using its name as a parameter name, and its value as a parameter value.
Each option is translated into a BCI2000 parameter using its name as a parameter name, and its value as a parameter value.
When a parameter with the given name already exists, its value will be changed from the default to match the value given on the command line. When no parameter with that name exists, it is added to the ''System'' parameter section.
When a parameter with the given name already exists, its value will be changed from the default to match the value given on the command line. When no parameter with that name exists, it is added to the ''System'' parameter section.
Parameter values must not contain white spaces on the command line; however, white space may be encoded in HTTP fashion as described [[Technical Reference:Parameter Definitions|here]], e.g., using '%20' as a replacement for a single space character.
Parameter values must not contain white spaces on the command line; however, white space may be encoded in HTTP fashion as described [[Technical Reference:Parameter Definition|here]], e.g., using '%20' as a replacement for a single space character.


====Special Options====
====Special Options====
*The ''FileFormat'' option will switch between [[User Reference:Data File Formats|File Formats]] used for data recording. The output file format is determined at module startup, and cannot be changed by modifying the FileFormat parameter from the operator module's parameter dialog.
*The ''FileFormat'' option will switch between [[User Reference:Data File Formats|File Formats]] used for data recording. The output file format is determined at module startup, and cannot be changed by modifying the FileFormat parameter from the operator module's parameter dialog.
*The ''Debug'' option will make a module send [[Programming Reference:Debug Messages|Debug Messages]] that appear in the operator module's log window.
*The ''Debug'' option will make a module send [[Programming Reference:Debug Output|Debug Messages]] that appear in the operator module's log window.


==Operator Module==
==Operator Module==

Revision as of 15:19, 7 November 2007

Using command line options allows you to

  • distribute BCI2000 modules over a network,
  • change the data format for brain signal recordings,
  • switch on debugging messages,
  • automate BCI2000 operation.

Core Modules

Core modules (i.e., Data Acquisition, Signal Processing, and Application Module), share the same command line syntax:

<ModuleName> <operator IP>:<operator port> --<option1>-<value1> --<option2>-<value2> ...

All arguments are optional.

Specifying the Operator Module's Network Address

At startup, each core module connects to the operator module. If no IP address is specified on the command line, the connection is opened to the local machine using 127.0.0.1 as an IP address. When no port is given, each module uses its default port as defined here. Normally, there is no need to change port numbers.

Specifying Options

Any number of options may be given, starting with a double minus sign. As indicated above, option names and values are combined with a single minus sign, to form a continuous character string. Each option is translated into a BCI2000 parameter using its name as a parameter name, and its value as a parameter value. When a parameter with the given name already exists, its value will be changed from the default to match the value given on the command line. When no parameter with that name exists, it is added to the System parameter section. Parameter values must not contain white spaces on the command line; however, white space may be encoded in HTTP fashion as described here, e.g., using '%20' as a replacement for a single space character.

Special Options

  • The FileFormat option will switch between File Formats used for data recording. The output file format is determined at module startup, and cannot be changed by modifying the FileFormat parameter from the operator module's parameter dialog.
  • The Debug option will make a module send Debug Messages that appear in the operator module's log window.

Operator Module

The operator module allows to specify scripts from the command line. Command line options correspond to script entries in the operator's preferences dialog. The following options exist:

--OnConnect
--OnExit
--OnSetConfig
--OnSuspend
--OnResume
--OnStart

After the option, white space is expected, followed with a double-quote enclosed string. Examples:

--OnConnect "C:\scripts\onconnect.bciscript"
--OnConnect "-LOAD PARAMETERFILE ..\parms\myparms.prm"

For further details and examples, see User Reference:Operator Module Scripting.

See also

BCI2000 System Design|Operator Module Scripting|Data File Formats|Debug Messages