brainaccess_board.message_queue#

Classes#

BoardControl

Control BrainAccess Board via messages

SocketClient

Client to send messages to server

Module Contents#

class brainaccess_board.message_queue.BoardControl(logger=None, request_timeout=5000)[source]#

Bases: SocketClient

Control BrainAccess Board via messages

Parameters:
  • logger (Logger | None)

  • request_timeout (int)

class brainaccess_board.message_queue.SocketClient(port, commands, mode='json', request_timeout=5000, logger=None)[source]#

Client to send messages to server

Parameters:
  • port (int)

  • commands (dict)

  • mode (str)

  • request_timeout (int)

  • logger (Logger | None)

command(command)[source]#

Send command to board

Parameters:

command (dict) – message to send

Returns:

reply from board

Return type:

reply (dict)

get_commands()[source]#

Get all possible commands

Returns:

all possible commands

Return type:

dict

log(message, level='info')[source]#

Log message

Parameters:
  • message (str) – message to log

  • level (str, optional) – log level. Defaults to

  • values ("info". Possible) – “debug”, “info”, “warning”, “error”, “critical”

Return type:

None