#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <tgmath.h>
#include <math.h>
#include "floating_fudge.h"
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"
#include "spandsp/power_meter.h"
#include "spandsp/async.h"
#include "spandsp/fsk.h"
#include "spandsp/private/fsk.h"
Functions | |
int | fsk_tx_restart (fsk_tx_state_t *s, const fsk_spec_t *spec) |
fsk_tx_state_t * | fsk_tx_init (fsk_tx_state_t *s, const fsk_spec_t *spec, get_bit_func_t get_bit, void *user_data) |
Initialise an FSK modem transmit context. | |
int | fsk_tx_release (fsk_tx_state_t *s) |
int | fsk_tx_free (fsk_tx_state_t *s) |
SPAN_DECLARE_NONSTD (int) | |
Get the next bit of a transmitted serial bit stream. | |
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, get_bit_func_t get_bit, void *user_data) |
void | fsk_tx_set_modem_status_handler (fsk_tx_state_t *s, modem_tx_status_func_t handler, void *user_data) |
Change the modem status report function associated with an FSK modem transmit context. | |
void | fsk_rx_signal_cutoff (fsk_rx_state_t *s, float cutoff) |
Adjust an FSK modem receive context's carrier detect power threshold. | |
float | fsk_rx_signal_power (fsk_rx_state_t *s) |
void | fsk_rx_set_put_bit (fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data) |
void | fsk_rx_set_modem_status_handler (fsk_rx_state_t *s, modem_tx_status_func_t handler, void *user_data) |
Change the modem status report function associated with an FSK modem receive context. | |
int | fsk_rx_restart (fsk_rx_state_t *s, const fsk_spec_t *spec, int framing_mode) |
fsk_rx_state_t * | fsk_rx_init (fsk_rx_state_t *s, const fsk_spec_t *spec, int framing_mode, put_bit_func_t put_bit, void *user_data) |
Initialise an FSK modem receive context. | |
int | fsk_rx_release (fsk_rx_state_t *s) |
int | fsk_rx_free (fsk_rx_state_t *s) |
Variables | |
const fsk_spec_t | preset_fsk_specs [] |
fsk_rx_state_t* fsk_rx_init | ( | fsk_rx_state_t * | s, | |
const fsk_spec_t * | spec, | |||
int | framing_mode, | |||
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 | 0 for fully asynchronous mode. 1 for synchronous mode. >1 for this many bits per asynchronous character frame. | |
put_bit | The callback routine used to put the received data. | |
user_data | An opaque pointer. |
Referenced by adsi_rx_init(), modem_connect_tones_rx_init(), and v18_init().
void fsk_rx_set_modem_status_handler | ( | fsk_rx_state_t * | s, | |
modem_rx_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. |
void fsk_rx_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().
fsk_tx_state_t* fsk_tx_init | ( | fsk_tx_state_t * | s, | |
const fsk_spec_t * | spec, | |||
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. |
Referenced by SPAN_DECLARE_NONSTD(), and v18_init().
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, | |
modem_tx_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. |
SPAN_DECLARE_NONSTD | ( | int | ) |
Get the next bit of a transmitted serial bit stream.
Get the next bit of data from a T.38 rate adapting non-ECM buffer context.
Get a bit of received non-ECM image data.
Get the next bit of a transmitted serial bit stream.
user_data | An opaque point which must point to a transmitter context. |
Get the next bit of a transmitted serial bit stream.
Process a block of received V.8 audio samples.
Fake processing of a missing block of received V.29 modem audio samples.
Fake processing of a missing block of received V.27ter modem audio samples.
Generate a block of V.22bis modem audio samples.
Fake processing of a missing block of received V.22bis modem audio samples.
Process a block of received V.18 audio samples.
Fake processing of a missing block of received V.17 modem audio samples.
Generate a block of FAX audio samples.
Apply fake received audio processing.
Generate a block of T.31 modem audio samples.
Fake processing of a missing block of received T.31 modem audio samples.
Dummy receive fillin callback.
Dummy receive callback.
Process a block of samples through an instance of the modem connect tones detector.
Get the next sequence of bytes for transmission.
Get the next byte for transmission.
Fake processing of a missing block of received FSK modem audio samples.
Process a block of received FSK modem audio samples.
Apply T.30 transmit processing to generate a block of audio samples.
Apply fake T.30 receive processing when a block of audio samples is missing (e.g due to packet loss).
s | The FAX context. | |
len | The number of samples to fake. |
Apply T.30 transmit processing to generate a block of audio samples.
s | The FAX context. | |
amp | The audio sample buffer. | |
max_len | The number of samples to be generated. |
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. |
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. |
s | A pointer to an HDLC transmitter context. |
s | A pointer to an HDLC transmitter context. | |
buf | The buffer for the data. | |
max_len | The number of bytes to get. |
s | The context. | |
amp | An array of signal samples. | |
len | The number of samples in the array. |
A dummy routine to use as a receive callback, when we aren't really trying to process what is received. It just absorbs and ignores the data.
user_data | The context. | |
amp | The signal.buffer | |
len | The length of the signal buffer |
A dummy routine to use as a receive fillin callback, when we aren't really trying to process what is received. It just absorbs and ignores the request.
user_data | The context. | |
len | The length of the signal buffer |
Fake processing of a missing block of received T.31 modem audio samples (e.g due to packet loss).
s | The T.31 modem context. | |
len | The number of samples to fake. |
Generate a block of T.31 modem audio samples.
s | The T.31 modem context. | |
amp | The audio sample buffer. | |
max_len | The number of samples to be generated. |
Apply fake processing when a block of audio samples is missing (e.g due to packet loss).
s | The T.38 context. | |
len | The number of samples to fake. |
Generate a block of FAX audio samples.
s | The T.38 context. | |
amp | The audio sample buffer. | |
max_len | The number of samples to be generated. |
Fake processing of a missing block of received V.17 modem audio samples. (e.g due to packet loss).
s | The modem context. | |
len | The number of samples to fake. |
Process a block of received V.18 audio samples.
s | The V.18 context. | |
amp | The audio sample buffer. | |
len | The number of samples in the buffer. |
Fake processing of a missing block of received V.22bis modem audio samples. (e.g due to packet loss).
s | The modem context. | |
len | The number of samples to fake. |
Generate a block of V.22bis modem audio samples.
s | The modem context. | |
amp | The audio sample buffer. | |
len | The number of samples to be generated. |
Fake processing of a missing block of received V.27ter modem audio samples. (e.g due to packet loss).
s | The modem context. | |
len | The number of samples to fake. |
Fake processing of a missing block of received V.29 modem audio samples. (e.g due to packet loss).
s | The modem context. | |
len | The number of samples to fake. |
Process a block of received V.8 audio samples.
s | The V.8 context. | |
amp | The audio sample buffer. | |
len | The number of samples in the buffer. |