spandsp 3.0.0
|
Go to the source code of this file.
Classes | |
struct | fsk_spec_t |
Macros | |
#define | FSK_MAX_WINDOW_LEN 128 |
Typedefs | |
typedef struct fsk_tx_state_s | fsk_tx_state_t |
typedef struct fsk_rx_state_s | fsk_rx_state_t |
Functions | |
fsk_tx_state_t * | fsk_tx_init (fsk_tx_state_t *s, const fsk_spec_t *spec, span_get_bit_func_t get_bit, void *user_data) |
Initialise an FSK modem transmit context. | |
int | fsk_tx_restart (fsk_tx_state_t *s, const fsk_spec_t *spec) |
int | fsk_tx_release (fsk_tx_state_t *s) |
int | fsk_tx_free (fsk_tx_state_t *s) |
void | fsk_tx_power (fsk_tx_state_t *s, float power) |
Adjust an FSK modem transmit context's power output. | |
void | fsk_tx_set_get_bit (fsk_tx_state_t *s, span_get_bit_func_t get_bit, void *user_data) |
void | fsk_tx_set_modem_status_handler (fsk_tx_state_t *s, span_modem_status_func_t handler, void *user_data) |
Change the modem status report function associated with an FSK modem transmit context. | |
int | fsk_tx (fsk_tx_state_t *s, int16_t amp[], int len) |
Generate a block of FSK modem audio samples. | |
float | fsk_rx_signal_power (fsk_rx_state_t *s) |
void | fsk_rx_set_signal_cutoff (fsk_rx_state_t *s, float cutoff) |
Adjust an FSK modem receive context's carrier detect power threshold. | |
void | fsk_rx_set_frame_parameters (fsk_rx_state_t *s, int data_bits, int parity, int stop_bits) |
Set the framing parameters. | |
int | fsk_rx_get_parity_errors (fsk_rx_state_t *s, bool reset) |
int | fsk_rx_get_framing_errors (fsk_rx_state_t *s, bool reset) |
fsk_rx_state_t * | fsk_rx_init (fsk_rx_state_t *s, const fsk_spec_t *spec, int framing_mode, span_put_bit_func_t put_bit, void *user_data) |
Initialise an FSK modem receive context. | |
int | fsk_rx_restart (fsk_rx_state_t *s, const fsk_spec_t *spec, int framing_mode) |
int | fsk_rx_release (fsk_rx_state_t *s) |
int | fsk_rx_free (fsk_rx_state_t *s) |
int | fsk_rx (fsk_rx_state_t *s, const int16_t *amp, int len) |
Process a block of received FSK modem audio samples. | |
int | fsk_rx_fillin (fsk_rx_state_t *s, int len) |
Fake processing of a missing block of received FSK modem audio samples. | |
void | fsk_rx_set_put_bit (fsk_rx_state_t *s, span_put_bit_func_t put_bit, void *user_data) |
void | fsk_rx_set_modem_status_handler (fsk_rx_state_t *s, span_modem_status_func_t handler, void *user_data) |
Change the modem status report function associated with an FSK modem receive context. | |
Variables | |
SPAN_DECLARE_DATA const fsk_spec_t | preset_fsk_specs [] |
typedef struct fsk_rx_state_s fsk_rx_state_t |
FSK modem receive descriptor. This defines the state of a single working instance of an FSK modem receiver.
typedef struct fsk_tx_state_s fsk_tx_state_t |
FSK modem transmit descriptor. This defines the state of a single working instance of an FSK modem transmitter.
int fsk_rx | ( | fsk_rx_state_t * | s, |
const int16_t * | amp, | ||
int | len ) |
Process a block of received FSK modem audio samples.
Process a block of received FSK modem audio samples.
s | The modem context. |
amp | The audio sample buffer. |
len | The number of samples in the buffer. |
References dds_complexi(), fsk_rx_state_s::framing_errors, fsk_rx_state_s::framing_mode, complexi32_t::im, complexi_t::im, fsk_rx_state_s::last_sample, power_meter_update(), fsk_rx_state_s::put_bit, fsk_rx_state_s::put_bit_user_data, complexi32_t::re, complexi_t::re, SIG_STATUS_CARRIER_DOWN, SIG_STATUS_CARRIER_UP, and fsk_rx_state_s::signal_present.
Referenced by adsi_rx(), modem_connect_tones_rx(), v18_rx(), v8_decode_rx(), and v8_rx().
int fsk_rx_fillin | ( | fsk_rx_state_t * | s, |
int | len ) |
Fake processing of a missing block of received FSK modem audio samples.
Fake processing of a missing block of received FSK modem audio samples (e.g due to packet loss).
s | The modem context. |
len | The number of samples to fake. |
References dds_advance(), complexi32_t::im, and complexi32_t::re.
Referenced by v18_rx_fillin().
fsk_rx_state_t * fsk_rx_init | ( | fsk_rx_state_t * | s, |
const fsk_spec_t * | spec, | ||
int | framing_mode, | ||
span_put_bit_func_t | put_bit, | ||
void * | user_data ) |
Initialise an FSK modem receive context.
Initialise an FSK modem receive context.
s | The modem context. |
spec | The specification of the modem tones and rate. |
framing_mode | |
put_bit | The callback routine used to put the received data. |
user_data | An opaque pointer. |
References fsk_rx_state_s::put_bit, and fsk_rx_state_s::put_bit_user_data.
Referenced by adsi_rx_init(), and modem_connect_tones_rx_init().
void fsk_rx_set_frame_parameters | ( | fsk_rx_state_t * | s, |
int | data_bits, | ||
int | parity, | ||
int | stop_bits ) |
Set the framing parameters.
Set the framing parameters for a an FSK modem receive context in FSK_FRAME_MODE_FRAMED mode.
s | The modem context. |
data_bits; | |
parity; | |
stop_bits; |
References ASYNC_PARITY_NONE, and fsk_rx_state_s::framing_mode.
Referenced by adsi_rx_init().
void fsk_rx_set_modem_status_handler | ( | fsk_rx_state_t * | s, |
span_modem_status_func_t | handler, | ||
void * | user_data ) |
Change the modem status report function associated with an FSK modem receive context.
Change the modem status report function associated with an FSK modem receive context.
s | The modem context. |
handler | The callback routine used to report modem status changes. |
user_data | An opaque pointer. |
References fsk_rx_state_s::status_handler, and fsk_rx_state_s::status_user_data.
void fsk_rx_set_signal_cutoff | ( | fsk_rx_state_t * | s, |
float | cutoff ) |
Adjust an FSK modem receive context's carrier detect power threshold.
Adjust an FSK modem receive context's carrier detect power threshold.
s | The modem context. |
cutoff | The power level, in dBm0 |
References power_meter_level_dbm0().
Referenced by modem_connect_tones_rx_init().
float fsk_rx_signal_power | ( | fsk_rx_state_t * | s | ) |
Get the current received signal power.
s | The modem context. |
References power_meter_current_dbm0().
int fsk_tx | ( | fsk_tx_state_t * | s, |
int16_t | amp[], | ||
int | len ) |
Generate a block of FSK modem audio samples.
Generate a block of FSK modem audio samples.
s | The modem context. |
amp | The audio sample buffer. |
len | The number of samples to be generated. |
References dds_mod(), fsk_tx_state_s::get_bit, fsk_tx_state_s::get_bit_user_data, SIG_STATUS_END_OF_DATA, SIG_STATUS_SHUTDOWN_COMPLETE, fsk_tx_state_s::status_handler, and fsk_tx_state_s::status_user_data.
fsk_tx_state_t * fsk_tx_init | ( | fsk_tx_state_t * | s, |
const fsk_spec_t * | spec, | ||
span_get_bit_func_t | get_bit, | ||
void * | user_data ) |
Initialise an FSK modem transmit context.
Initialise an FSK modem transmit context.
s | The modem context. |
spec | The specification of the modem tones and rate. |
get_bit | The callback routine used to get the data to be transmitted. |
user_data | An opaque pointer. |
References fsk_tx_state_s::get_bit, and fsk_tx_state_s::get_bit_user_data.
Referenced by v8_rx().
void fsk_tx_power | ( | fsk_tx_state_t * | s, |
float | power ) |
Adjust an FSK modem transmit context's power output.
Adjust an FSK modem transmit context's power output.
s | The modem context. |
power | The power level, in dBm0 |
References dds_scaling_dbm0().
void fsk_tx_set_modem_status_handler | ( | fsk_tx_state_t * | s, |
span_modem_status_func_t | handler, | ||
void * | user_data ) |
Change the modem status report function associated with an FSK modem transmit context.
Change the modem status report function associated with an FSK modem transmit context.
s | The modem context. |
handler | The callback routine used to report modem status changes. |
user_data | An opaque pointer. |
References fsk_tx_state_s::status_handler, and fsk_tx_state_s::status_user_data.