OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
radio.unconfigured_radio_controller.UnconfiguredRadioController Class Reference

Report that radio control has not been configured. More...

Inheritance diagram for radio.unconfigured_radio_controller.UnconfiguredRadioController:
radio.radio_controller_if.RadioControllerIf

Public Member Functions

bool is_started (self)
 Return whether the receiver backend is started.
bool is_available (self)
 Return whether radio control is configured and available.
str|None status_message (self)
 Return an availability message, if one applies.
tuple[RadioPreset,...] presets (self)
 Return configured radio presets.
int start (self)
 Start the receiver and return its initial frequency.
None stop (self)
 Stop the receiver.
int get_frequency (self)
 Return the controller's current frequency in hertz.
int refresh_frequency (self)
 Refresh the current frequency from the receiver backend.
RadioMode set_mode (self, RadioMode mode)
 Set and return the active demodulation mode.
RadioPreset tune_preset (self, RadioPreset preset)
 Tune and return a preset.
RadioPreset tune_preset_index (self, int index)
 Tune a configured preset by wrapping index.
RadioPreset next_preset (self)
 Tune and return the next preset.
RadioPreset previous_preset (self)
 Tune and return the previous preset.
RadioPreset next_station (self)
 Compatibility name for tuning the next preset.
RadioPreset previous_station (self)
 Compatibility name for tuning the previous preset.
int frequency_up (self, int|None delta_hz=None)
 Increase frequency by an explicit or mode-defined step.
int frequency_down (self, int|None delta_hz=None)
 Decrease frequency by an explicit or mode-defined step.
int set_frequency (self, int frequency_hz)
 Tune and return a validated frequency in hertz.
float|str|None get_signal_strength (self)
 Return receiver signal strength when available.
float|str|None get_snr (self)
 Return receiver signal-to-noise ratio when available.
str|None get_rds (self)
 Return decoded Radio Data System text when available.

Detailed Description

Report that radio control has not been configured.

Member Function Documentation

◆ frequency_down()

int radio.unconfigured_radio_controller.UnconfiguredRadioController.frequency_down ( self,
int | None delta_hz = None )

Decrease frequency by an explicit or mode-defined step.

Parameters
delta_hzExplicit positive step in hertz, or None to use the active mode's configured step.
Returns
Resulting tuned frequency in hertz.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ frequency_up()

int radio.unconfigured_radio_controller.UnconfiguredRadioController.frequency_up ( self,
int | None delta_hz = None )

Increase frequency by an explicit or mode-defined step.

Parameters
delta_hzExplicit positive step in hertz, or None to use the active mode's configured step.
Returns
Resulting tuned frequency in hertz.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ get_frequency()

int radio.unconfigured_radio_controller.UnconfiguredRadioController.get_frequency ( self)

Return the controller's current frequency in hertz.

Returns
Current tuned frequency in hertz.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ get_rds()

str | None radio.unconfigured_radio_controller.UnconfiguredRadioController.get_rds ( self)

Return decoded Radio Data System text when available.

Returns
Decoded RDS text, or None when unavailable.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ get_signal_strength()

float | str | None radio.unconfigured_radio_controller.UnconfiguredRadioController.get_signal_strength ( self)

Return receiver signal strength when available.

Returns
Signal strength reported by the backend, or None when unavailable.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ get_snr()

float | str | None radio.unconfigured_radio_controller.UnconfiguredRadioController.get_snr ( self)

Return receiver signal-to-noise ratio when available.

Returns
Signal-to-noise ratio reported by the backend, or None when unavailable.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ is_available()

bool radio.unconfigured_radio_controller.UnconfiguredRadioController.is_available ( self)

Return whether radio control is configured and available.

Return values
TrueRadio control is available.
FalseRadio control is unavailable.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ is_started()

bool radio.unconfigured_radio_controller.UnconfiguredRadioController.is_started ( self)

Return whether the receiver backend is started.

Return values
TrueThe receiver backend is started.
FalseThe receiver backend is stopped.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ next_preset()

RadioPreset radio.unconfigured_radio_controller.UnconfiguredRadioController.next_preset ( self)

Tune and return the next preset.

Returns
Newly tuned preset.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ next_station()

RadioPreset radio.unconfigured_radio_controller.UnconfiguredRadioController.next_station ( self)

Compatibility name for tuning the next preset.

Returns
Newly tuned preset.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ presets()

tuple[RadioPreset, ...] radio.unconfigured_radio_controller.UnconfiguredRadioController.presets ( self)

Return configured radio presets.

Returns
Ordered configured radio presets.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ previous_preset()

RadioPreset radio.unconfigured_radio_controller.UnconfiguredRadioController.previous_preset ( self)

Tune and return the previous preset.

Returns
Newly tuned preset.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ previous_station()

RadioPreset radio.unconfigured_radio_controller.UnconfiguredRadioController.previous_station ( self)

Compatibility name for tuning the previous preset.

Returns
Newly tuned preset.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ refresh_frequency()

int radio.unconfigured_radio_controller.UnconfiguredRadioController.refresh_frequency ( self)

Refresh the current frequency from the receiver backend.

Returns
Refreshed tuned frequency in hertz.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ set_frequency()

int radio.unconfigured_radio_controller.UnconfiguredRadioController.set_frequency ( self,
int frequency_hz )

Tune and return a validated frequency in hertz.

Parameters
frequency_hzTarget frequency in hertz.
Returns
Validated tuned frequency in hertz.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ set_mode()

RadioMode radio.unconfigured_radio_controller.UnconfiguredRadioController.set_mode ( self,
RadioMode mode )

Set and return the active demodulation mode.

Parameters
modeDemodulation mode to activate.
Returns
Active demodulation mode.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ start()

int radio.unconfigured_radio_controller.UnconfiguredRadioController.start ( self)

Start the receiver and return its initial frequency.

Returns
Initial tuned frequency in hertz.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ status_message()

str | None radio.unconfigured_radio_controller.UnconfiguredRadioController.status_message ( self)

Return an availability message, if one applies.

Returns
Human-readable status, or None when no message applies.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ tune_preset()

RadioPreset radio.unconfigured_radio_controller.UnconfiguredRadioController.tune_preset ( self,
RadioPreset preset )

Tune and return a preset.

Parameters
presetPreset to tune.
Returns
Tuned preset.

Reimplemented from radio.radio_controller_if.RadioControllerIf.

◆ tune_preset_index()

RadioPreset radio.unconfigured_radio_controller.UnconfiguredRadioController.tune_preset_index ( self,
int index )

Tune a configured preset by wrapping index.

Parameters
indexPreset index, wrapped into the configured preset list.
Returns
Tuned preset.

Reimplemented from radio.radio_controller_if.RadioControllerIf.


The documentation for this class was generated from the following file:
  • controllers/radio/unconfigured_radio_controller.py