fsk.h File Reference

Go to the source code of this file.

Classes

struct  fsk_spec_t
struct  fsk_tx_state_t
struct  fsk_rx_state_t

Defines

#define _FSK_H_
#define FSK_V21CH1   0
#define FSK_V21CH2   1
#define FSK_V23CH1   2
#define FSK_V23CH2   3
#define FSK_BELL103CH1   4
#define FSK_BELL103CH2   5
#define FSK_BELL202   6
#define FSK_WEITBRECHT   7
#define FSK_MAX_WINDOW_LEN   128

Functions

fsk_tx_state_tfsk_tx_init (fsk_tx_state_t *s, fsk_spec_t *spec, get_bit_func_t get_bit, void *user_data)
 Initialise an FSK modem transmit context.
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)
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_signal_cutoff (fsk_rx_state_t *s, float cutoff)
 Adjust an FSK modem receive context's carrier detect power threshold.
fsk_rx_state_tfsk_rx_init (fsk_rx_state_t *s, fsk_spec_t *spec, int sync_mode, put_bit_func_t put_bit, void *user_data)
 Initialise an FSK modem receive context.
int fsk_rx (fsk_rx_state_t *s, const int16_t *amp, int len)
 Process a block of received FSK modem audio samples.
void fsk_rx_set_put_bit (fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data)

Variables

fsk_spec_t preset_fsk_specs []


Detailed Description


Function Documentation

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.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

fsk_rx_state_t* fsk_rx_init ( fsk_rx_state_t s,
fsk_spec_t spec,
int  sync_mode,
put_bit_func_t  put_bit,
void *  user_data 
)

Initialise an FSK modem receive context.

Initialise an FSK modem receive context.

Parameters:
s The modem context.
spec The specification of the modem tones and rate.
sync_mode TRUE for synchronous modem. FALSE for asynchronous mode.
put_bit The callback routine used to put the received data.
user_data An opaque pointer.
Returns:
A pointer to the modem context, or NULL if there was a problem.

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.

Parameters:
s The modem context.
power The power level, in dBm0

float fsk_rx_signal_power ( fsk_rx_state_t s  ) 

Get the current received signal power.

Parameters:
s The modem context.
Returns:
The signal power, in 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.

Parameters:
s The modem context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.

fsk_tx_state_t* fsk_tx_init ( fsk_tx_state_t s,
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.

Parameters:
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.
Returns:
A pointer to the modem context, or NULL if there was a problem.

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.

Parameters:
s The modem context.
power The power level, in dBm0


Generated on Fri Nov 10 09:40:24 2006 for libspandsp by  doxygen 1.5.1