iblrig.video.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:
- status
This status will be returned when messages received during the main loop and determines response to remote events.
- Type:
- communicator
A Communicator object that can be used to communicate with the behaviour rig.
- close()[source]
End experiment and cleanup object.
This should be called before destroying the session object.
- async listen(service_uri=None)[source]
Listen for remote rig.
- Parameters:
service_uri (
str
) – The service URI.
- async on_init(data, addr)[source]
Process init command from remote rig.
This method will initialize the recording and send a response to the remote rig. If an acquisition is already running it will assert that the received experiment description matches the current one (this should be the case when running chained protocols). If the expRef is wrong, the method will raise an error before responding, which should be caught by the calling run method. Thus one should be able to re-start the behaviour session with the correct subject expRef or turn off UDPs at the behaviour rig without affecting the camera session.