Provides basic functionality for connection and communication with the BCI2000 operator module.
More...
|
|
void | Disconnect () |
| | Disconnects from the operator. Terminated the operator if TerminateOperatorOnDisconnect is set.
|
| |
| void | StartOperator (string operatorPath, string address="127.0.0.1", int port=3999, int delay=200) |
| | Starts an instance of the BCI2000 Operator on the local machine.
|
| |
| void | Connect (string address="127.0.0.1", int port=3999) |
| | Establishes a connection to an instance of BCI2000 running at the specified address and port.
|
| |
| bool | Connected () |
| | Gets whether or not this BCI2000Remote instance is currently connected to the BCI2000 Operator.
|
| |
|
void | Quit () |
| | Shuts down the connected BCI2000 instance.
|
| |
|
T | Execute< T > () |
| |
| string | ExecuteString (string command) |
| | Executes the given command and returns the result.
|
| |
| UInt32 | ExecuteUInt32 (string command) |
| | Executees the command and returns the result parsed as UInt32.
|
| |
| double | ExecuteDouble (string command) |
| | Executees the command and returns the result parsed as double.
|
| |
| bool | ExecuteBool (string command) |
| | Executees the command and returns the result parsed as bool.
|
| |
| void | Execute (string command, bool expectEmptyResponse=true) |
| | Executes the given command. Will throw if a non-blank response is received from BCI2000 and expectEmptyResponse is not set to false.
|
| |
|
|
int | Timeout = 1000 [get, set] |
| | Timeout value (in milliseconds) of connection to BCI2000.
|
| |
|
bool | TerminateOperatorOnDisconnect = true [get, set] |
| | Terminate operator when this object is deleted.
|
| |
|
string | WindowTitle [get, set] |
| | The title of the BCI2000 window.
|
| |
Provides basic functionality for connection and communication with the BCI2000 operator module.
◆ Connect()
| void BCI2000RemoteNET.BCI2000Connection.Connect |
( |
string | address = "127.0.0.1", |
|
|
int | port = 3999 ) |
|
inline |
Establishes a connection to an instance of BCI2000 running at the specified address and port.
- Parameters
-
| address | The IPv4 address to connect to. Note that this may not necessarily be the same as the one used in StartOperator , even if running BCI2000 locally. For example, if the operator was started on the local machine with address 0.0.0.0 , you would connect to it at address 127.0.0.1 |
| port | The port on which BCI2000 is listening. If BCI2000 was started locally with StartOperator , this must be the same value. |
◆ Connected()
| bool BCI2000RemoteNET.BCI2000Connection.Connected |
( |
| ) |
|
|
inline |
Gets whether or not this BCI2000Remote instance is currently connected to the BCI2000 Operator.
- Returns
- Whether or not this object is currently connected to BCI2000
◆ Execute()
| void BCI2000RemoteNET.BCI2000Connection.Execute |
( |
string | command, |
|
|
bool | expectEmptyResponse = true ) |
|
inline |
Executes the given command. Will throw if a non-blank response is received from BCI2000 and expectEmptyResponse is not set to false.
- Parameters
-
| command | The command to send to BCI2000 |
| expectEmptyResponse | By default, this function will throw if its command receives a non-empty response from BCI2000. This is because most BCI2000 commands which do not return a value will not send a response if they succeed. If set to false, this function will acceept non-empty responses from BCI2000. |
◆ ExecuteBool()
| bool BCI2000RemoteNET.BCI2000Connection.ExecuteBool |
( |
string | command | ) |
|
|
inline |
Executees the command and returns the result parsed as bool.
- Parameters
-
| command | The command to execute |
◆ ExecuteDouble()
| double BCI2000RemoteNET.BCI2000Connection.ExecuteDouble |
( |
string | command | ) |
|
|
inline |
Executees the command and returns the result parsed as double.
- Parameters
-
| command | The command to execute |
◆ ExecuteString()
| string BCI2000RemoteNET.BCI2000Connection.ExecuteString |
( |
string | command | ) |
|
|
inline |
Executes the given command and returns the result.
- Parameters
-
| command | The command to execute |
◆ ExecuteUInt32()
| UInt32 BCI2000RemoteNET.BCI2000Connection.ExecuteUInt32 |
( |
string | command | ) |
|
|
inline |
Executees the command and returns the result parsed as UInt32.
- Parameters
-
| command | The command to execute |
◆ StartOperator()
| void BCI2000RemoteNET.BCI2000Connection.StartOperator |
( |
string | operatorPath, |
|
|
string | address = "127.0.0.1", |
|
|
int | port = 3999, |
|
|
int | delay = 200 ) |
|
inline |
Starts an instance of the BCI2000 Operator on the local machine.
- Parameters
-
| operatorPath | The location of the operator binary |
| address | The address on which the Operator will listen for input. Leave as default if you will only connect from the local system. Note on security: BCI2000Remote uses an unencrypted, unsecured telnet connection. Anyone who can access the connection can run BCI2000 shell scripts. This includes the capability to run arbitrary system shell code from the BCI2000 shell interface. Use extreme caution when exposing BCI2000 to the open internet, that is, setting address to a value other than the loopback address (127.0.0.1). Do not leave a connection across machines open unattended. A secure interface is planned for a future release, until then using BCI2000 to communicate between machines on different LANs (not on the same Wi-Fi, in different buildings, etc.) is not recommended. Communication between different machines on the same LAN should be safe provided that the network router does not forward the BCI2000's host machine's BCI2000 port (by default 3999, but can be set on startup.) |
| port | The port on which the Operator will listen for input. Leave as default unless a specific port is needed. |
| delay | Time in milliseconds to wait after starting operator. This is to prevent failure to connect when the operator takes time to start up. |
The documentation for this class was generated from the following file: