|
libSDRForge
|
Coordinate a single radio session and its worker threads. More...
Public Member Functions | |
| None | __init__ (self, TelemetryStream stream, *, int frequency_hz=104_300_000, float|None gain_db=29.7, bool rds_enabled=True, float warmup_seconds=2.0, bool simulate=False) |
| Initialize controller state and resources. | |
| bool | worker_alive (self) |
| Report acquisition worker liveness. | |
| str|None | worker_error (self) |
| Report the latest acquisition failure. | |
| None | start (self) |
| Start the capture or acquisition worker. | |
| None | stop (self) |
| Stop the active worker or capture. | |
| dict[str, object] | start_iq_capture (self, int duration_seconds, str filename) |
| Start recording IQ from an active receiver. | |
| dict[str, object] | start_automated_iq_capture (self, int duration_seconds, str filename) |
| Start the receiver if needed and record IQ asynchronously. | |
| dict[str, object] | iq_capture_status (self) |
| Return current IQ capture status. | |
| dict[str, object] | cancel_iq_capture (self) |
| Cancel an active IQ capture. | |
| None | pan_acquisition (self, int center_hz) |
| Queue a change to the acquisition center. | |
| None | recenter (self) |
| Queue a one-shot acquisition recenter. | |
| None | set_frequency (self, int hz) |
| Set the requested tuning frequency. | |
| dict[str, object] | get_rf_configuration (self) |
| Return current RF hardware settings. | |
| None | set_rf_configuration (self, dict[str, object] changes) |
| Validate RF settings for the next acquisition. | |
| None | set_muted (self, bool muted) |
| Set local audio mute state. | |
| dict[str, object] | get_audio_diagnostics (self) |
| Return local playback diagnostics. | |
| bool | get_muted (self) |
| Return local audio mute state. | |
| int | get_frequency (self) |
| Return requested frequency in Hz. | |
| None | set_mode (self, str mode, int bandwidth) |
| Validate and select demodulation and bandwidth. | |
| tuple[str, int] | get_mode (self) |
| Return selected demodulation and bandwidth. | |
| float|None | get_signal_strength (self) |
| Return signal strength when available. | |
| float|None | get_snr (self) |
| Return signal-to-noise ratio when available. | |
| dict[str, object]|None | get_rds_status (self) |
| Return structured broadcast RDS status. | |
| str|None | get_rds (self) |
| Return radio text or program service when available. | |
Public Attributes | |
| frequency_hz = frequency_hz | |
| gain_db = gain_db | |
| int | sample_rate_hz = 2_400_000 |
| bool | rtl_agc_enabled = False |
| int | ppm_correction = 0 |
| rds_enabled = rds_enabled | |
| warmup_seconds = warmup_seconds | |
| stream = stream | |
| simulate = simulate | |
| audio = LocalAudioSink() | |
| capture | |
Protected Member Functions | |
| RtlSdrSource | _make_source (self) |
| None | _run (self) |
| None | _service_audio (self) |
Protected Attributes | |
| str|None | _audio_error = None |
| _audio_stop = threading.Event() | |
| threading.Thread|None | _audio_thread = None |
| RadioSession|None | _session = None |
| threading.Thread|None | _thread = None |
| _stop = threading.Event() | |
| str|None | _error = None |
| tuple | _mode = ("WFM", 200_000) |
| _tune_lock = threading.Lock() | |
| int|None | _pending_frequency = None |
| bool | _pending_recenter = False |
| int|None | _pending_pan = None |
| tuple[str, int]|None | _pending_mode = None |
| ReceiverManager|None | _capture_manager = None |
| threading.Thread|None | _auto_capture_thread = None |
Coordinate a single radio session and its worker threads.
| None sdrforge.live_transport_server.LiveRadioControl.__init__ | ( | self, | |
| TelemetryStream | stream, | ||
| * | , | ||
| int | frequency_hz = 104_300_000, | ||
| float | None | gain_db = 29.7, | ||
| bool | rds_enabled = True, | ||
| float | warmup_seconds = 2.0, | ||
| bool | simulate = False ) |
Initialize controller state and resources.
| self | Instance. |
| stream | Telemetry publication stream. |
| frequency_hz | Center or initial tuning frequency in Hz. |
| gain_db | RF gain in dB, or None for automatic gain. |
| rds_enabled | Enable broadcast RDS decoding. |
| warmup_seconds | RF warmup duration in seconds. |
| simulate | Use synthetic acquisition instead of USB hardware. |
|
protected |
|
protected |
|
protected |
| dict[str, object] sdrforge.live_transport_server.LiveRadioControl.cancel_iq_capture | ( | self | ) |
Cancel an active IQ capture.
| self | Instance. |
| dict[str, object] sdrforge.live_transport_server.LiveRadioControl.get_audio_diagnostics | ( | self | ) |
Return local playback diagnostics.
| self | Instance. |
| int sdrforge.live_transport_server.LiveRadioControl.get_frequency | ( | self | ) |
Return requested frequency in Hz.
| self | Instance. |
| tuple[str, int] sdrforge.live_transport_server.LiveRadioControl.get_mode | ( | self | ) |
Return selected demodulation and bandwidth.
| self | Instance. |
| bool sdrforge.live_transport_server.LiveRadioControl.get_muted | ( | self | ) |
Return local audio mute state.
| self | Instance. |
| str | None sdrforge.live_transport_server.LiveRadioControl.get_rds | ( | self | ) |
Return radio text or program service when available.
| self | Instance. |
| dict[str, object] | None sdrforge.live_transport_server.LiveRadioControl.get_rds_status | ( | self | ) |
Return structured broadcast RDS status.
| self | Instance. |
| dict[str, object] sdrforge.live_transport_server.LiveRadioControl.get_rf_configuration | ( | self | ) |
Return current RF hardware settings.
| self | Instance. |
| float | None sdrforge.live_transport_server.LiveRadioControl.get_signal_strength | ( | self | ) |
Return signal strength when available.
| self | Instance. |
| float | None sdrforge.live_transport_server.LiveRadioControl.get_snr | ( | self | ) |
Return signal-to-noise ratio when available.
| self | Instance. |
| dict[str, object] sdrforge.live_transport_server.LiveRadioControl.iq_capture_status | ( | self | ) |
Return current IQ capture status.
| self | Instance. |
| None sdrforge.live_transport_server.LiveRadioControl.pan_acquisition | ( | self, | |
| int | center_hz ) |
Queue a change to the acquisition center.
| self | Instance. |
| center_hz | Requested acquisition center in Hz. |
| None sdrforge.live_transport_server.LiveRadioControl.recenter | ( | self | ) |
Queue a one-shot acquisition recenter.
| self | Instance. |
| None sdrforge.live_transport_server.LiveRadioControl.set_frequency | ( | self, | |
| int | hz ) |
Set the requested tuning frequency.
| self | Instance. |
| hz | Requested tuning frequency in Hz. |
| None sdrforge.live_transport_server.LiveRadioControl.set_mode | ( | self, | |
| str | mode, | ||
| int | bandwidth ) |
Validate and select demodulation and bandwidth.
| self | Instance. |
| mode | Requested demodulation mode. |
| bandwidth | Requested bandwidth in Hz, or zero for default. |
| None sdrforge.live_transport_server.LiveRadioControl.set_muted | ( | self, | |
| bool | muted ) |
Set local audio mute state.
| self | Instance. |
| muted | Whether audio is muted. |
| None sdrforge.live_transport_server.LiveRadioControl.set_rf_configuration | ( | self, | |
| dict[str, object] | changes ) |
Validate RF settings for the next acquisition.
| self | Instance. |
| changes | RF settings to update. |
| None sdrforge.live_transport_server.LiveRadioControl.start | ( | self | ) |
Start the capture or acquisition worker.
| self | Instance. |
| dict[str, object] sdrforge.live_transport_server.LiveRadioControl.start_automated_iq_capture | ( | self, | |
| int | duration_seconds, | ||
| str | filename ) |
Start the receiver if needed and record IQ asynchronously.
| self | Instance. |
| duration_seconds | Requested recording duration in seconds. |
| filename | Simple IQ output filename. |
| dict[str, object] sdrforge.live_transport_server.LiveRadioControl.start_iq_capture | ( | self, | |
| int | duration_seconds, | ||
| str | filename ) |
Start recording IQ from an active receiver.
| self | Instance. |
| duration_seconds | Requested recording duration in seconds. |
| filename | Simple IQ output filename. |
| None sdrforge.live_transport_server.LiveRadioControl.stop | ( | self | ) |
Stop the active worker or capture.
| self | Instance. |
| bool sdrforge.live_transport_server.LiveRadioControl.worker_alive | ( | self | ) |
Report acquisition worker liveness.
| self | Instance. |
| str | None sdrforge.live_transport_server.LiveRadioControl.worker_error | ( | self | ) |
Report the latest acquisition failure.
| self | Instance. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| sdrforge.live_transport_server.LiveRadioControl.audio = LocalAudioSink() |
| sdrforge.live_transport_server.LiveRadioControl.capture |
| sdrforge.live_transport_server.LiveRadioControl.frequency_hz = frequency_hz |
| sdrforge.live_transport_server.LiveRadioControl.gain_db = gain_db |
| sdrforge.live_transport_server.LiveRadioControl.ppm_correction = 0 |
| sdrforge.live_transport_server.LiveRadioControl.rds_enabled = rds_enabled |
| sdrforge.live_transport_server.LiveRadioControl.rtl_agc_enabled = False |
| sdrforge.live_transport_server.LiveRadioControl.sample_rate_hz = 2_400_000 |
| sdrforge.live_transport_server.LiveRadioControl.simulate = simulate |
| sdrforge.live_transport_server.LiveRadioControl.stream = stream |
| sdrforge.live_transport_server.LiveRadioControl.warmup_seconds = warmup_seconds |