bpod_core.bpod.threads.SoftcodeThread
- class bpod_core.bpod.threads.SoftcodeThread
Bases:
ThreadConsumer thread that executes softcode handlers sent from the Bpod.
ReadThreadfeedsRawSoftcodeitems intoqueue;SoftcodeThreaddrains that queue and calls the registered handler for each softcode.The handler can be swapped at any time via
set_handler()without restarting the thread — the new handler takes effect on the next softcode.Handler exceptions are caught, logged, and execution continues.
- set_time_reference(time_ref) None
Update the session clock reference used for Bpod-relative latency logging.
- Return type:
- Parameters:
time_ref (TimeReferences)
-
queue:
SimpleQueue[RawSoftcode] Softcode queue shared with
ReadThread.