spandsp 3.0.0
|
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include "spandsp/stdbool.h"
#include "floating_fudge.h"
#include "spandsp/telephony.h"
#include "spandsp/alloc.h"
#include "spandsp/logging.h"
#include "spandsp/complex.h"
#include "spandsp/vector_float.h"
#include "spandsp/complex_vector_float.h"
#include "spandsp/async.h"
#include "spandsp/power_meter.h"
#include "spandsp/arctan2.h"
#include "spandsp/dds.h"
#include "spandsp/complex_filters.h"
#include "spandsp/modem_echo.h"
#include "spandsp/v29rx.h"
#include "spandsp/v17tx.h"
#include "spandsp/v17rx.h"
#include "spandsp/v32bis.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/power_meter.h"
#include "spandsp/private/v17tx.h"
#include "spandsp/private/v17rx.h"
#include "spandsp/private/v32bis.h"
#include "v17_v32bis_tx_constellation_maps.h"
#include "v17_v32bis_rx_constellation_maps.h"
#include "v17_v32bis_tx_rrc.h"
#include "v17_v32bis_rx_rrc.h"
Macros | |
#define | FP_SCALE(x) |
#define | FP_CONSTELLATION_SCALE(x) |
Functions | |
int | v32bis_equalizer_state (v32bis_state_t *s, complexf_t **coeffs) |
Get a snapshot of the current equalizer coefficients. | |
float | v32bis_rx_carrier_frequency (v32bis_state_t *s) |
float | v32bis_rx_symbol_timing_correction (v32bis_state_t *s) |
float | v32bis_rx_signal_power (v32bis_state_t *s) |
int | v32bis_tx (v32bis_state_t *s, int16_t amp[], int len) |
Generate a block of V.32bis modem audio samples. | |
int | v32bis_rx (v32bis_state_t *s, const int16_t amp[], int len) |
Process a block of received V.32bis modem audio samples. | |
int | v32bis_rx_fillin (v32bis_state_t *s, int len) |
Fake processing of a missing block of received V.32bis modem audio samples. | |
void | v32bis_tx_power (v32bis_state_t *s, float power) |
Adjust a V.32bis modem transmit context's output power. | |
void | v32bis_set_get_bit (v32bis_state_t *s, span_get_bit_func_t get_bit, void *user_data) |
Change the get_bit function associated with a V.32bis modem context. | |
void | v32bis_set_put_bit (v32bis_state_t *s, span_put_bit_func_t put_bit, void *user_data) |
Change the put_bit function associated with a V.32bis modem context. | |
int | v32bis_set_supported_bit_rates (v32bis_state_t *s, int rates) |
Set the supported bit rates for a V.32bis modem context. | |
int | v32bis_current_bit_rate (v32bis_state_t *s) |
Report the current operating bit rate of a V.22bis modem context. | |
logging_state_t * | v32bis_get_logging_state (v32bis_state_t *s) |
Get the logging context associated with a V.32bis modem context. | |
int | v32bis_restart (v32bis_state_t *s, int bit_rate) |
Reinitialise an existing V.32bis modem context. | |
v32bis_state_t * | v32bis_init (v32bis_state_t *s, int bit_rate, bool calling_party, span_get_bit_func_t get_bit, void *get_bit_user_data, span_put_bit_func_t put_bit, void *put_bit_user_data) |
Initialise a V.32bis modem context. | |
int | v32bis_release (v32bis_state_t *s) |
Release a V.32bis modem receive context. | |
int | v32bis_free (v32bis_state_t *s) |
Free a V.32bis modem receive context. | |
void | v32bis_set_qam_report_handler (v32bis_state_t *s, qam_report_handler_t handler, void *user_data) |
#define FP_CONSTELLATION_SCALE | ( | x | ) |
#define FP_SCALE | ( | x | ) |
int v32bis_current_bit_rate | ( | v32bis_state_t * | s | ) |
Report the current operating bit rate of a V.22bis modem context.
Report the current operating bit rate of a V.32bis modem context.
s | The modem context. |
int v32bis_equalizer_state | ( | v32bis_state_t * | s, |
complexf_t ** | coeffs ) |
Get a snapshot of the current equalizer coefficients.
Get a snapshot of the current equalizer coefficients.
coeffs | The vector of complex coefficients. |
References v17_rx_equalizer_state().
int v32bis_free | ( | v32bis_state_t * | s | ) |
Free a V.32bis modem receive context.
Free a V.32bis modem receive context.
s | The modem context. |
logging_state_t * v32bis_get_logging_state | ( | v32bis_state_t * | s | ) |
Get the logging context associated with a V.32bis modem context.
Get the logging context associated with a V.32bis modem context.
s | The modem context. |
References v32bis_state_s::logging.
v32bis_state_t * v32bis_init | ( | v32bis_state_t * | s, |
int | bit_rate, | ||
bool | calling_party, | ||
get_bit_func_t | get_bit, | ||
void * | get_bit_user_data, | ||
put_bit_func_t | put_bit, | ||
void * | put_bit_user_data ) |
Initialise a V.32bis modem context.
Initialise a V.32bis modem context. This must be called before the first use of the context, to initialise its contents.
s | The modem context. |
bit_rate | The bit rate of the modem. Valid values are 4800, 7200, 9600, 12000 and 14400. |
calling_party | True if this is the calling modem. |
get_bit | The callback routine used to get the data to be transmitted. |
get_bit_user_data | An opaque pointer, passed in calls to the get routine. |
put_bit | The callback routine used to get the data to be transmitted. |
put_bit_user_data | An opaque pointer, passed in calls to the put routine. |
get_bit_user_data | An opaque pointer, passed in calls to the put routine. |
References v32bis_state_s::bit_rate, v32bis_state_s::calling_party, v32bis_state_s::logging, v17_rx_state_s::scrambler_tap, v17_tx_state_s::scrambler_tap, v17_rx_init(), v17_tx_init(), v32bis_restart(), and v32bis_set_supported_bit_rates().
int v32bis_release | ( | v32bis_state_t * | s | ) |
Release a V.32bis modem receive context.
Release a V.32bis modem receive context.
s | The modem context. |
int v32bis_restart | ( | v32bis_state_t * | s, |
int | bit_rate ) |
Reinitialise an existing V.32bis modem context.
Reinitialise an existing V.32bis modem context, so it may be reused.
s | The modem context. |
bit_rate | The bit rate of the modem. Valid values are 4800, 7200, 9600, 12000 and 14400. |
References v17_rx_state_s::logging, span_log(), v17_rx_restart(), and v17_tx_restart().
Referenced by v32bis_init().
int v32bis_rx | ( | v32bis_state_t * | s, |
const int16_t | amp[], | ||
int | len ) |
Process a block of received V.32bis modem audio samples.
Process a block of received V.32bis modem audio samples.
s | The modem context. |
amp | The audio sample buffer. |
len | The number of samples in the buffer. |
References v17_rx().
float v32bis_rx_carrier_frequency | ( | v32bis_state_t * | s | ) |
Get the current received carrier frequency.
s | The modem context. |
References v17_rx_carrier_frequency().
int v32bis_rx_fillin | ( | v32bis_state_t * | s, |
int | len ) |
Fake processing of a missing block of received V.32bis modem audio samples.
Fake processing of a missing block of received V.32bis modem audio samples. (e.g due to packet loss).
s | The modem context. |
len | The number of samples to fake. |
References v17_rx_fillin().
float v32bis_rx_signal_power | ( | v32bis_state_t * | s | ) |
Get a current received signal power.
s | The modem context. |
References v17_rx_signal_power().
float v32bis_rx_symbol_timing_correction | ( | v32bis_state_t * | s | ) |
Get the current symbol timing correction since startup.
s | The modem context. |
References v17_rx_symbol_timing_correction().
void v32bis_set_get_bit | ( | v32bis_state_t * | s, |
get_bit_func_t | get_bit, | ||
void * | user_data ) |
Change the get_bit function associated with a V.32bis modem context.
Change the get_bit function associated with a V.32bis modem context.
s | The modem context. |
get_bit | The callback routine used to get the data to be transmitted. |
user_data | An opaque pointer. |
References v17_tx_set_get_bit().
void v32bis_set_put_bit | ( | v32bis_state_t * | s, |
put_bit_func_t | put_bit, | ||
void * | user_data ) |
Change the put_bit function associated with a V.32bis modem context.
Change the get_bit function associated with a V.32bis modem context.
s | The modem context. |
put_bit | The callback routine used to process the data received. |
user_data | An opaque pointer. |
References v17_rx_set_put_bit().
void v32bis_set_qam_report_handler | ( | v32bis_state_t * | s, |
qam_report_handler_t | handler, | ||
void * | user_data ) |
Set a handler routine to process QAM status reports
s | The modem context. |
handler | The handler routine. |
user_data | An opaque pointer passed to the handler routine. |
References v17_rx_state_s::qam_report, and v17_rx_state_s::qam_user_data.
int v32bis_set_supported_bit_rates | ( | v32bis_state_t * | s, |
int | rates ) |
Set the supported bit rates for a V.32bis modem context.
Set the supported bit rates for a V.32bis modem context.
s | The modem context. |
rates | The bit rate mask |
Referenced by v32bis_init().
int v32bis_tx | ( | v32bis_state_t * | s, |
int16_t | amp[], | ||
int | len ) |
Generate a block of V.32bis modem audio samples.
Generate a block of V.32bis modem audio samples.
s | The modem context. |
amp | The audio sample buffer. |
len | The number of samples to be generated. |
References v17_tx().
void v32bis_tx_power | ( | v32bis_state_t * | s, |
float | power ) |
Adjust a V.32bis modem transmit context's output power.
Adjust a V.32bis modem transmit context's power output.
s | The modem context. |
power | The power level, in dBm0 |
References v17_tx_power().