diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /lib/wsprd/wsprd_stream.h | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'lib/wsprd/wsprd_stream.h')
| -rw-r--r-- | lib/wsprd/wsprd_stream.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/wsprd/wsprd_stream.h b/lib/wsprd/wsprd_stream.h new file mode 100644 index 00000000..0eed120e --- /dev/null +++ b/lib/wsprd/wsprd_stream.h @@ -0,0 +1,33 @@ +/* + * wsprd streaming layer — public API consumed by wsprd.c. + * See wsprd_stream.c for protocol + scope notes. + */ +#ifndef WSPRD_STREAM_H +#define WSPRD_STREAM_H + +struct wsprd_stream_config { + char date[7]; // YYMMDD\0 + char uttime[5]; // HHMM\0 + double dialfreq; // MHz + int wspr_type; // 2 or 15 + char mycall[13]; // up to 12-char callsign + NUL + char mygrid[7]; // up to 6-char grid + NUL + int configure_received; +}; + +void wsprd_stream_emit_ready(void); +void wsprd_stream_emit_decode(const char *date, const char *uttime, + float snr, float dt, double freq, + int drift, const char *message); +void wsprd_stream_emit_decode_finished(const char *date, const char *uttime); +void wsprd_stream_emit_error(const char *msg); +void wsprd_stream_emit_error_code(const char *code, const char *detail); + +// Reads WSJT header + frames from stdin until halt or EOF. On success, +// populates *cfg and the supplied I/Q buffers (idat/qdat must hold +// at least 46080 floats each). Returns the number of complex samples +// populated (nfft2 = 46080), or 1 on protocol error. +unsigned long wsprd_stream_read(struct wsprd_stream_config *cfg, + float *idat, float *qdat); + +#endif |
