Bounded queue of immutable frames; oldest frames drop on overflow.
More...
|
| None | __init__ (self, int max_frames) |
| | Initialize the instance.
|
| SpectrumFrame|None | poll (self) |
| | Return the oldest pending frame without blocking.
|
| SpectrumFrame|None | poll_latest (self) |
| | Return the newest frame, discarding obsolete queued frames.
|
| None | close (self) |
| | Close the component.
|
Bounded queue of immutable frames; oldest frames drop on overflow.
◆ __init__()
| None spectrum_publisher.SpectrumSubscription.__init__ |
( |
| self, |
|
|
int | max_frames ) |
Initialize the instance.
- Parameters
-
| self | The current instance. |
| max_frames | The max_frames value. |
◆ _offer()
| None spectrum_publisher.SpectrumSubscription._offer |
( |
| self, |
|
|
SpectrumFrame | frame ) |
|
protected |
◆ close()
| None spectrum_publisher.SpectrumSubscription.close |
( |
| self | ) |
|
Close the component.
- Parameters
-
| self | The current instance. |
◆ poll()
| SpectrumFrame | None spectrum_publisher.SpectrumSubscription.poll |
( |
| self | ) |
|
Return the oldest pending frame without blocking.
- Parameters
-
| self | The current instance. |
- Returns
- The operation result.
◆ poll_latest()
| SpectrumFrame | None spectrum_publisher.SpectrumSubscription.poll_latest |
( |
| self | ) |
|
Return the newest frame, discarding obsolete queued frames.
- Parameters
-
| self | The current instance. |
- Returns
- The operation result.
◆ _closed
| bool spectrum_publisher.SpectrumSubscription._closed = False |
|
protected |
◆ _frames
| deque[SpectrumFrame] spectrum_publisher.SpectrumSubscription._frames = deque(maxlen=max_frames) |
|
protected |
◆ _lock
| spectrum_publisher.SpectrumSubscription._lock = RLock() |
|
protected |
The documentation for this class was generated from the following file: