mne.realtime.StimServer

class mne.realtime.StimServer(port=4218, n_clients=1)[source]

Stimulation Server.

Server to communicate with StimClient(s).

Parameters
portint

The port to which the stimulation server must bind to.

n_clientsint

The number of clients which will connect to the server.

See also

StimClient

Methods

__hash__(self, /)

Return hash(self).

add_trigger(self, trigger[, verbose])

Add a trigger.

shutdown(self[, verbose])

Shutdown the client and server.

start(self[, timeout, verbose])

Start the server.

__hash__(self, /)

Return hash(self).

add_trigger(self, trigger, verbose=None)[source]

Add a trigger.

Parameters
triggerint

The trigger to be added to the queue for sending to StimClient.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). Defaults to self.verbose.

shutdown(self, verbose=None)[source]

Shutdown the client and server.

Parameters
verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

start(self, timeout=inf, verbose=None)[source]

Start the server.

Parameters
timeoutfloat

Maximum time to wait for clients to be added.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Examples using mne.realtime.StimServer