Directories | |
| adapters | |
controllers.radio provides transport-independent radio behavior. It coordinates tuning, modes, presets, frequency ranges, selectable radio profiles, and radio-specific metadata without depending on a particular frontend.
The package owns radio-domain behavior:
Protocol packages own command formatting, socket communication, and response parsing. Native radio display controls and SDRForge transport adapters live in the radio controller layer. Frontends own presentation and user interaction.
ORC's compact FM dashboard and spectrum view share one receiver session. Showing or hiding the plots changes presentation and spectrum polling while preserving tuning and playback. MusicForge Trending uses its own read-only Airplay connection and does not open an RF receiver session.
RadioProfileCatalog loads shipped profiles from config/radio/common and the configured locale directory, currently defaulting to config/radio/romeo. Locale profiles override common profiles with the same key.
User-created presets are stored separately from repository configuration so normal UI edits never mutate shipped JSON files.
RadioProfileController composes a RadioController for the active profile and provides profile/preset operations to frontends.
RDS is radio metadata and belongs in the radio path and is published in SDRForge receiver telemetry.
The current ORC path is:
RDS should be requested asynchronously by graphical frontends. Reading ordinary controller state must not cause hidden network I/O.
ORC renders station identity and RadioText from receiver telemetry for WFM/FM profiles.
See RF radio contracts.
Run the deterministic component test from the repository root:
Live receiver checks require a running SDRForge service. See the Rigctl protocol component tools for endpoint testing.
Core users should depend on controller interfaces/types. Concrete transport adapters are imported explicitly:
This prevents optional transport dependencies from leaking into unrelated applications.
StreamingRadioBrowser handles asynchronous directory discovery, stable favorite identifiers, playback requests, artwork downloads, and stale completion rejection. Frontends bind through ui.radio.StreamingRadioUiIf, render immutable browser state, and emit semantic station-ID requests. Composition supplies the directory, playback backend, favorites storage, worker schedulers, and frontend dispatcher. Artwork uses a separate bounded worker pool so logos cannot delay playback.
StreamingRadioController owns serialized audio operations and immutable playback snapshots. StreamingRadioStateSourceIf is the read-only Home contract; reading a snapshot does not wait for native startup or shutdown. Hiding a browser retires its callbacks and unstarted requests while existing audio continues. Application shutdown uses terminal close() to stop audio and reject late starts.
Filter values and classification helpers live in ui/radio/station_filters.py. controllers.radio.streaming_radio_filters retains compatibility reexports. The migrated streaming path is covered by the strict UI type gate and import boundary checks. RF profile/telemetry presentation remains a separate migration.