API#
CLI#
- class pupil_labs.lsl_relay.cli.DeviceDiscoverer(search_timeout: float)#
Bases:
object
- async get_device_from_list()#
- pupil_labs.lsl_relay.cli.evaluate_user_input(user_input: str, device_list: Sequence[DiscoveredDeviceInfo]) DiscoveredDeviceInfo | None #
- async pupil_labs.lsl_relay.cli.input_async()#
Relay#
- class pupil_labs.lsl_relay.relay.DataReceiver(device_ip: str, device_port: int)#
Bases:
object
- async cleanup()#
- async estimate_clock_offset()#
Estimate the Companion-Device-to-Relay clock offset.
Uses the
Pupil Labs Time Echo Protocol
to measure the clock offset between the Companion Device and the relay. The offset is used to transform incoming gaze and event timestamps from Companion to relay time domain. If the Companion app version does not support the time echo protocol or the clock offset estimation fails, the relay will fall back to NTP-based time sync.
- async make_status_update_notifier()#
- class pupil_labs.lsl_relay.relay.Relay(device_ip: str, device_port: int, receiver: DataReceiver, device_identifier: str, outlet_prefix: str, model: str, module_serial: str, time_sync_interval: int)#
Bases:
object
- async publish_event_from_queue()#
- async receive_gaze_sample()#
- async relay_receiver_to_publisher()#
- async classmethod run(device_ip: str, device_port: int, device_identifier: str, outlet_prefix: str, model: str, module_serial: str, time_sync_interval: int)#
- async start_publishing_event()#
- async start_publishing_gaze()#
- async start_receiving_task()#
- pupil_labs.lsl_relay.relay.handle_done_pending_tasks(done: Iterable[Task[NoReturn]], pending: Iterable[Task[NoReturn]])#
Channels#
- class pupil_labs.lsl_relay.channels.CompanionChannel(sample_query: Callable[[Any], Any], channel_information_dict: Dict[str, str])#
Bases:
object
- append_to(channels: XMLElement)#
- pupil_labs.lsl_relay.channels.companion_event_channels()#
- pupil_labs.lsl_relay.channels.companion_gaze_channels() List[CompanionChannel] #
Outlets#
- class pupil_labs.lsl_relay.outlets.PupilCompanionEventOutlet(device_id: str, outlet_prefix: str, model: str, module_serial: str, session_id: str, clock_offset_ns: int = 0)#
Bases:
PupilCompanionOutlet
- class pupil_labs.lsl_relay.outlets.PupilCompanionGazeOutlet(device_id: str, outlet_prefix: str, model: str, module_serial: str, session_id: str, clock_offset_ns: int = 0)#
Bases:
PupilCompanionOutlet
- class pupil_labs.lsl_relay.outlets.PupilCompanionOutlet(channel_func: Callable[[], List[CompanionChannel]], outlet_type: str, outlet_format: Literal[1, 2, 3, 4, 5, 6, 7, 0], outlet_name_prefix: str, outlet_uuid: str, acquisition_info: Dict[str, str])#
Bases:
object
- class pupil_labs.lsl_relay.outlets.Sample(*args, **kwargs)#
Bases:
Protocol
- pupil_labs.lsl_relay.outlets.compose_acquisition_info(version: str, module_serial: str, session_id: str, manufacturer: str = 'Pupil Labs', model: str = 'Pupil Labs Device', clock_offset_ns: int = 0) Dict[str, str] #
- pupil_labs.lsl_relay.outlets.get_lsl_time_offset()#