Manage a redsea process without coupling it to the WBFM receiver.
More...
|
| None | __init__ (self, *, str executable="redsea", float amplitude=0.2, int samplerate_hz=240_000, int queue_capacity=32) |
| | Initialize the instance.
|
| bool | running (self) |
| | Return the running.
|
| None | start (self) |
| | Start the component.
|
| bool | feed (self, np.ndarray multiplex) |
| | Queue multiplex samples without blocking the caller.
|
| tuple[RedseaRecord,...] | drain (self) |
| | Drain the component.
|
| None | close (self) |
| | Close the component.
|
| Self | __enter__ (self) |
| | Enter the managed context.
|
| None | __exit__ (self, *object _args) |
| | Exit the managed context.
|
Manage a redsea process without coupling it to the WBFM receiver.
The background reader prevents stdout pipe deadlocks. drain() returns records decoded since the previous drain; a caller can feed complete records into metadata and TMC consumers. Not safe for concurrent writes.
◆ __init__()
| None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.__init__ |
( |
| self, |
|
|
* | , |
|
|
str | executable = "redsea", |
|
|
float | amplitude = 0.2, |
|
|
int | samplerate_hz = 240_000, |
|
|
int | queue_capacity = 32 ) |
Initialize the instance.
- Parameters
-
| self | The current instance. |
| executable | The executable value. |
| amplitude | The amplitude value. |
| samplerate_hz | The samplerate_hz value. |
| queue_capacity | The queue_capacity value. |
◆ __enter__()
| Self sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.__enter__ |
( |
| self | ) |
|
Enter the managed context.
- Parameters
-
| self | The current instance. |
- Returns
- The operation result.
◆ __exit__()
| None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.__exit__ |
( |
| self, |
|
|
*object | _args ) |
Exit the managed context.
- Parameters
-
| self | The current instance. |
| _args | The _args value. |
◆ _read_output()
| None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._read_output |
( |
| self, |
|
|
BinaryIO | stdout ) |
|
protected |
◆ _write_input()
| None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._write_input |
( |
| self | ) |
|
|
protected |
◆ close()
| None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.close |
( |
| self | ) |
|
Close the component.
- Parameters
-
| self | The current instance. |
◆ drain()
| tuple[RedseaRecord, ...] sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.drain |
( |
| self | ) |
|
Drain the component.
- Parameters
-
| self | The current instance. |
- Returns
- The operation result.
◆ feed()
| bool sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.feed |
( |
| self, |
|
|
np.ndarray | multiplex ) |
Queue multiplex samples without blocking the caller.
Returns False when the bounded queue is full; the newest block is dropped to avoid delaying live audio.
- Parameters
-
| self | The current instance. |
| multiplex | The multiplex value. |
- Returns
- The operation result.
◆ running()
| bool sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.running |
( |
| self | ) |
|
Return the running.
- Parameters
-
| self | The current instance. |
- Returns
- The operation result.
◆ start()
| None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.start |
( |
| self | ) |
|
Start the component.
- Parameters
-
| self | The current instance. |
◆ _input
| queue.Queue[bytes | None] sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._input = queue.Queue(maxsize=queue_capacity) |
|
protected |
◆ _lock
| sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._lock = threading.Lock() |
|
protected |
◆ _pending
| list sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._pending = [] |
|
protected |
◆ _process
| subprocess.Popen[bytes] | None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._process = None |
|
protected |
◆ _reader
| threading.Thread | None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._reader = None |
|
protected |
◆ _writer
| threading.Thread | None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._writer = None |
|
protected |
◆ _writer_error
| str | None sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter._writer_error = None |
|
protected |
◆ amplitude
| sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.amplitude = amplitude |
◆ dropped_blocks
| int sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.dropped_blocks = 0 |
◆ executable
| sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.executable = executable |
◆ samplerate_hz
| sdrforge.protocols.rds.redsea_adapter.RedseaRdsAdapter.samplerate_hz = samplerate_hz |
The documentation for this class was generated from the following file: