iblrig.video.CameraSessionNetworked

Inheritance diagram of CameraSessionNetworked

class iblrig.video.CameraSessionNetworked[source]
__init__(subject=None, config_name='default', **kwargs)[source]

A camera session that listens for run commands from a remote computer.

Parameters:
  • subject (str, optional) – The subject name.

  • config_name (str=``’default’``) – The name of the camera configuration key in the hardware settings to use.

status

This status will be returned when messages received during the main loop and determines response to remote events.

Type:

str

communicator

A Communicator object that can be used to communicate with the behaviour rig.

Type:

iblutil.io.net.app.EchoProtocol

close()[source]

End experiment and cleanup object.

This should be called before destroying the session object.

async initialize_recording()[source]
async listen(service_uri=None)[source]

Listen for remote rig.

Parameters:

service_uri (str) – The service URI.

async on_alyx(data, addr)[source]
async on_cleanup(data, addr)[source]
async on_end(data, addr)[source]
async on_info(_, addr)[source]
async on_init(data, addr)[source]

Process init command from remote rig.

async on_interrupt(data, addr)[source]
async on_start(data, addr)[source]

Process init command from remote rig.

async on_status(_, addr)[source]
reset()[source]

Reset object for next session.

async run(service_uri=None)[source]

Main loop networked with behaviour rig.

start_recording()[source]

Start cameras (i.e. spawn Bonsai process).

async stop_recording()[source]
property is_connected: bool

True if communicator is connected.

Type:

bool