Tegmen 0.1.0
Lightweight C library for FT8/FT4 encoding and decoding
Loading...
Searching...
No Matches
tegmen.h File Reference

Tegmen C API Header. More...

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Macros

#define TEGMEN_SUCCESS   0
 Success return code.
#define TEGMEN_ERROR_INVALID_MESSAGE   -1
 Invalid message format.
#define TEGMEN_ERROR_ENCODING_FAILED   -2
 Encoding operation failed.
#define TEGMEN_ERROR_DECODING_FAILED   -3
 Decoding operation failed.
#define TEGMEN_ERROR_INVALID_PARAMETERS   -4
 Invalid function parameters.
#define TEGMEN_SAMPLE_RATE   12000
 FT8/FT4 sample rate in Hz.
#define TEGMEN_FT8_MESSAGE_LEN   37
 Maximum FT8 message length (characters).
#define TEGMEN_FT4_MESSAGE_LEN   37
 Maximum FT4 message length (characters).

Typedefs

typedef void(* tegmen_decode_callback_t) (float sync, int snr, float dt, float freq, const char *decoded, int nap, float qual, void *user_data)
 Decode callback function type.

Functions

int tegmen_ft8_encode (const char *message, float *samples, int *nsamples)
int tegmen_ft8_decode (const int16_t *samples, int nsamples, tegmen_decode_callback_t callback, void *user_data)
int tegmen_ft4_encode (const char *message, float *samples, int *nsamples)
 Encode a message into FT4 audio samples.
int tegmen_ft4_decode (const int16_t *samples, int nsamples, tegmen_decode_callback_t callback, void *user_data)
 Decode FT4 signals from audio samples.

Detailed Description

Tegmen C API Header.

A minimal C library wrapper for WSJT-X FT8/FT4 encoding and decoding.

\license GPL v3 (same as WSJT-X)