BpodWithLatencyTest

class BpodWithLatencyTest(*args, **kwargs)[source]

Bases: object

Class to test Bpod latency by measuring round-trip time of softcodes.

__init__(*args, **kwargs)[source]

Initializes the test class with a Bpod instance and synchronization events.

Methods

__init__(*args, **kwargs)

Initializes the test class with a Bpod instance and synchronization events.

softcode_handler_function(data)

Callback executed when a softcode is received from Bpod.

softcode_handler_function(data: int)[source]

Callback executed when a softcode is received from Bpod.

This function is used to measure the time when the softcode response arrives. It sets the _softcode_event to signal completion of a round trip.

Parameters:

data (int) – The softcode data received (opcode).