Utilities
Utility classes and functions for eyelink-wrapper.
This module contains shared utilities used across the package, including the RingBuffer class for efficient sample storage.
- class pyelink.utils.RingBuffer(maxlen=200)[source]
Bases:
objectA simple ring buffer based on the deque class.
- Parameters:
maxlen (int)
- __init__(maxlen=200)[source]
Initialize ring buffer with specified maximum length.
- Parameters:
maxlen (
int) – Maximum number of elements the buffer can hold- Return type:
None
- get_all()[source]
Return all samples from buffer and empty the buffer.
- Returns:
All samples that were in the buffer
- Return type:
- peek()[source]
Return all samples from buffer without emptying the buffer.
Creates a temporary copy of the buffer to read values non-destructively.
- Returns:
All samples currently in the buffer
- Return type: