sockets#

Abstract description of socket topology.

Each entry in each dict is a set of sockets to be run in an independent process.

perceptivo.networking.sockets.CLINICIAN = {'gui': (Socket(id='clinician.command', socket_type='PUB', protocol='tcp', mode='bind', port=5000, ip='*', to=None), Socket(id='clinician.data', socket_type='ROUTER', protocol='tcp', mode='bind', port=5001, ip='*', to=None))}#

Sockets used by the clinician object

  • clinician.command - PUB socket for dispersing control commands to subordinate computers

  • clincian.data - ROUTER for receiving data from subordinate computers

perceptivo.networking.sockets.EXAMINER = {'data': (Socket(id='examiner.data_in', socket_type='ROUTER', protocol='ipc', mode='bind', port=5003, ip='*', to=None), Socket(id='examiner.data_out', socket_type='DEALER', protocol='tcp', mode='connect', port=5001, ip='192.168.0.100', to=None)), 'manager': (Socket(id='examiner.manager.command', socket_type='SUB', protocol='tcp', mode='connect', port=5000, ip='192.168.0.100', to=None), Socket(id='examiner.manager.process', socket_type='ROUTER', protocol='ipc', mode='bind', port=5002, ip='*', to=None), Socket(id='examiner.manager.data_out', socket_type='DEALER', protocol='ipc', mode='connect', port=5003, ip='localhost', to=None)), 'picamera': (Socket(id='examiner.picamera.data_out', socket_type='DEALER', protocol='ipc', mode='connect', port=5002, ip='*', to=None),)}#

Sockets used by the ‘examiner’ machine responsible for managing the exam - measuring the pupil, presenting sounds, and maintaining the psychoacoustic model

Processes:

manager

  • examiner.manager.command - SUB - subscriber to clinician commands

  • examiner.manager.process - ROUTER - receives data from picamera

  • examiner.manager.data_out - DEALER - sends data to the data process to forward to clinician

picamera

  • examiner.picamera.data_out - DEALER - sends frames to the process socket

data

  • examiner.data.data_in - ROUTER - receives data from process

  • examiner.data.data_out - DEALER - sends data to clinician

perceptivo.networking.sockets.STIM = {'stim': (Socket(id='stim.command', socket_type='SUB', protocol='tcp', mode='connect', port=5000, ip='192.168.0.100', to=None), Socket(id='stim.manager', socket_type='DEALER', protocol='tcp', mode='connect', port=5002, ip='192.168.0.101', to=None))}#

Sockets used by the stimulus delivery machine

  • stim.command - SUB - subscriber to clinician commands

  • stim.manager - DEALER - subscriber to the process socket of the examiner, receives commands to present stimuli, etc.