Build JSON-safe receiver snapshots without coupling DSP to networking.
More...
|
| Any | _json_value (Any value) |
| dict[str, Any] | spectrum_snapshot (np.ndarray power_db, *, int center_frequency_hz, int sample_rate_hz, int|None timestamp_ns=None) |
| | Describe ordered FFT bins spanning the given sample rate.
|
| dict[str, Any] | receiver_snapshot (Any receiver, *, int|None timestamp_ns=None, str mode="WFM", int|None bandwidth_hz=None, int|None frequency_hz=None, bool running=True) |
| | Build a common receiver status payload, with WFM-only metadata.
|
Build JSON-safe receiver snapshots without coupling DSP to networking.
◆ _json_value()
| Any sdrforge.telemetry.snapshots._json_value |
( |
Any | value | ) |
|
|
protected |
Convert common DSP and metadata values to strict JSON values.
◆ receiver_snapshot()
| dict[str, Any] sdrforge.telemetry.snapshots.receiver_snapshot |
( |
Any | receiver, |
|
|
* | , |
|
|
int | None | timestamp_ns = None, |
|
|
str | mode = "WFM", |
|
|
int | None | bandwidth_hz = None, |
|
|
int | None | frequency_hz = None, |
|
|
bool | running = True ) |
Build a common receiver status payload, with WFM-only metadata.
- Parameters
-
| receiver | The receiver value. |
| timestamp_ns | The timestamp ns value. |
| mode | The mode value. |
| bandwidth_hz | The bandwidth hz value. |
| frequency_hz | The frequency hz value. |
| running | The running value. |
- Returns
- The operation result.
◆ spectrum_snapshot()
| dict[str, Any] sdrforge.telemetry.snapshots.spectrum_snapshot |
( |
np.ndarray | power_db, |
|
|
* | , |
|
|
int | center_frequency_hz, |
|
|
int | sample_rate_hz, |
|
|
int | None | timestamp_ns = None ) |
Describe ordered FFT bins spanning the given sample rate.
power_db must already be fftshift-ordered and converted to dB by the upstream spectrum analyzer. No FFT work is performed here.
- Parameters
-
| power_db | The power_db value. |
| center_frequency_hz | The center_frequency_hz value. |
| sample_rate_hz | The sample rate in hertz. |
| timestamp_ns | The timestamp_ns value. |
- Returns
- The operation result.