OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
radio.adapters.rigctl_radio_backend.RigctlRadioBackend Class Reference

Adapt the rigctl protocol client to the radio backend contract. More...

Inheritance diagram for radio.adapters.rigctl_radio_backend.RigctlRadioBackend:
radio.radio_backend_if.RadioBackendIf

Public Member Functions

str start (self)
 Start the receiver backend.
str stop (self)
 Stop the receiver backend.
str set_frequency (self, int frequency_hz)
 Tune to a frequency.
int get_frequency (self)
 Return the current tuned frequency.
str set_mode (self, str mode, int bandwidth)
 Set the receiver demodulation mode.
Optional[str] get_signal_strength (self)
 Return receiver signal strength.
Optional[str] get_snr (self)
 Return the signal-to-noise ratio.
Optional[str] get_rds (self)
 Return decoded Radio Data System text.

Static Protected Member Functions

Optional[str] _normalize_optional_response (Optional[str] response)
 Normalize an optional rigctl response.

Detailed Description

Adapt the rigctl protocol client to the radio backend contract.

Member Function Documentation

◆ _normalize_optional_response()

Optional[str] radio.adapters.rigctl_radio_backend.RigctlRadioBackend._normalize_optional_response ( Optional[str] response)
staticprotected

Normalize an optional rigctl response.

Empty or whitespace-only responses are treated as unavailable.

◆ get_frequency()

int radio.adapters.rigctl_radio_backend.RigctlRadioBackend.get_frequency ( self)

Return the current tuned frequency.

Returns
Tuned frequency in hertz.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ get_rds()

Optional[str] radio.adapters.rigctl_radio_backend.RigctlRadioBackend.get_rds ( self)

Return decoded Radio Data System text.

Returns
RDS text, or None when unavailable.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ get_signal_strength()

Optional[str] radio.adapters.rigctl_radio_backend.RigctlRadioBackend.get_signal_strength ( self)

Return receiver signal strength.

Returns
Signal strength in dBFS, or None when unavailable.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ get_snr()

Optional[str] radio.adapters.rigctl_radio_backend.RigctlRadioBackend.get_snr ( self)

Return the signal-to-noise ratio.

Returns
Ratio in decibels, or None when unavailable.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ set_frequency()

str radio.adapters.rigctl_radio_backend.RigctlRadioBackend.set_frequency ( self,
int frequency_hz )

Tune to a frequency.

Parameters
frequency_hzTarget frequency in hertz.
Returns
Backend-specific tuning result.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ set_mode()

str radio.adapters.rigctl_radio_backend.RigctlRadioBackend.set_mode ( self,
str mode,
int bandwidth )

Set the receiver demodulation mode.

Parameters
modeBackend demodulation mode name.
bandwidthReceiver bandwidth in hertz.
Returns
Backend-specific mode-setting result.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ start()

str radio.adapters.rigctl_radio_backend.RigctlRadioBackend.start ( self)

Start the receiver backend.

Returns
Backend-specific start result.

Reimplemented from radio.radio_backend_if.RadioBackendIf.

◆ stop()

str radio.adapters.rigctl_radio_backend.RigctlRadioBackend.stop ( self)

Stop the receiver backend.

Returns
Backend-specific stop result.

Reimplemented from radio.radio_backend_if.RadioBackendIf.


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