Basic ring buffer using a bytearray.
Not threadsafe.
Definition at line 4 of file ring_buffer.py.
◆ __init__()
| None homeassistant.components.assist_pipeline.ring_buffer.RingBuffer.__init__ |
( |
|
self, |
|
|
int |
maxlen |
|
) |
| |
◆ __len__()
| int homeassistant.components.assist_pipeline.ring_buffer.RingBuffer.__len__ |
( |
|
self | ) |
|
Return the length of data stored in the buffer.
Definition at line 27 of file ring_buffer.py.
◆ getvalue()
| bytes homeassistant.components.assist_pipeline.ring_buffer.RingBuffer.getvalue |
( |
|
self | ) |
|
◆ maxlen()
| int homeassistant.components.assist_pipeline.ring_buffer.RingBuffer.maxlen |
( |
|
self | ) |
|
Return the maximum size of the buffer.
Definition at line 18 of file ring_buffer.py.
◆ pos()
| int homeassistant.components.assist_pipeline.ring_buffer.RingBuffer.pos |
( |
|
self | ) |
|
◆ put()
| None homeassistant.components.assist_pipeline.ring_buffer.RingBuffer.put |
( |
|
self, |
|
|
bytes |
data |
|
) |
| |
Put a chunk of data into the buffer, possibly wrapping around.
Definition at line 31 of file ring_buffer.py.
◆ _buffer
| homeassistant.components.assist_pipeline.ring_buffer.RingBuffer._buffer |
|
private |
◆ _length
| homeassistant.components.assist_pipeline.ring_buffer.RingBuffer._length |
|
private |
◆ _maxlen
| homeassistant.components.assist_pipeline.ring_buffer.RingBuffer._maxlen |
|
private |
◆ _pos
| homeassistant.components.assist_pipeline.ring_buffer.RingBuffer._pos |
|
private |
The documentation for this class was generated from the following file: