spandsp
0.0.6
|
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "floating_fudge.h"
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
#include "spandsp/complex.h"
#include "spandsp/vector_float.h"
#include "spandsp/complex_vector_float.h"
#include "spandsp/vector_int.h"
#include "spandsp/complex_vector_int.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/v29rx.h"
#include "spandsp/v22bis.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/v22bis.h"
#include "v22bis_rx_1200_floating_rrc.h"
#include "v22bis_rx_2400_floating_rrc.h"
Macros | |
#define | ms_to_symbols(t) (((t)*600)/1000) |
#define | EQUALIZER_DELTA 0.25f |
#define | PULSESHAPER_COEFF_SETS 12 |
Functions | |
float | v22bis_rx_carrier_frequency (v22bis_state_t *s) |
float | v22bis_rx_symbol_timing_correction (v22bis_state_t *s) |
float | v22bis_rx_signal_power (v22bis_state_t *s) |
void | v22bis_rx_signal_cutoff (v22bis_state_t *s, float cutoff) |
void | v22bis_report_status_change (v22bis_state_t *s, int status) |
int | v22bis_rx_equalizer_state (v22bis_state_t *s, complexf_t **coeffs) |
Get a snapshot of the current equalizer coefficients. More... | |
void | v22bis_equalizer_coefficient_reset (v22bis_state_t *s) |
int | v22bis_rx (v22bis_state_t *s, const int16_t amp[], int len) |
int | v22bis_rx_fillin (v22bis_state_t *s, int len) |
int | v22bis_rx_restart (v22bis_state_t *s) |
Reinitialise an existing V.22bis modem receive context. More... | |
void | v22bis_rx_set_qam_report_handler (v22bis_state_t *s, qam_report_handler_t handler, void *user_data) |
#define EQUALIZER_DELTA 0.25f |
The adaption rate coefficient for the equalizer
Referenced by v22bis_rx_equalizer_state().
#define PULSESHAPER_COEFF_SETS 12 |
The number of phase shifted coefficient set for the pulse shaping/bandpass filter
Referenced by v22bis_rx_equalizer_state(), and v22bis_rx_symbol_timing_correction().
float v22bis_rx_carrier_frequency | ( | v22bis_state_t * | s | ) |
Get the current received carrier frequency.
s | The modem context. |
References dds_frequencyf().
int v22bis_rx_equalizer_state | ( | v22bis_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 v22bis_state_s::agc_scaling, v22bis_state_s::baud_phase, v22bis_state_s::bit_rate, v22bis_state_s::calling_party, v22bis_state_s::carrier_phase, v22bis_state_s::carrier_phase_rate, v22bis_state_s::carrier_track_i, v22bis_state_s::carrier_track_p, v22bis_state_s::constellation_state, dds_advance(), dds_advancef(), dds_complexf(), v22bis_state_s::eq_delta, v22bis_state_s::eq_put_step, v22bis_state_s::eq_step, EQUALIZER_DELTA, v22bis_state_s::gardner_integrate, v22bis_state_s::gardner_step, complexf_t::im, v22bis_state_s::logging, power_meter_update(), PULSESHAPER_COEFF_SETS, v22bis_state_s::put_bit, v22bis_state_s::put_bit_user_data, v22bis_state_s::qam_report, v22bis_state_s::qam_user_data, complexf_t::re, v22bis_state_s::rrc_filter, v22bis_state_s::rrc_filter_step, v22bis_state_s::rx_power, v22bis_state_s::scramble_reg, v22bis_state_s::scrambler_pattern_count, SIG_STATUS_CARRIER_DOWN, SIG_STATUS_CARRIER_UP, SIG_STATUS_MODEM_RETRAIN_OCCURRED, v22bis_state_s::signal_present, SPAN_DECLARE_NONSTD(), span_log(), v22bis_state_s::total_baud_timing_correction, v22bis_state_s::training, v22bis_state_s::training_count, v22bis_restart(), vec_circular_dot_prodf(), and vec_circular_dot_prodi16().
int v22bis_rx_restart | ( | v22bis_state_t * | s | ) |
Reinitialise an existing V.22bis modem receive context.
Reinitialise an existing V.22bis modem receive context.
s | The modem context. |
References v22bis_state_s::agc_scaling, v22bis_state_s::baud_phase, v22bis_state_s::calling_party, v22bis_state_s::carrier_phase, v22bis_state_s::carrier_phase_rate, v22bis_state_s::carrier_track_i, v22bis_state_s::carrier_track_p, v22bis_state_s::constellation_state, dds_phase_ratef(), v22bis_state_s::gardner_integrate, v22bis_state_s::gardner_step, power_meter_init(), v22bis_state_s::rrc_filter, v22bis_state_s::rrc_filter_step, v22bis_state_s::rx_power, v22bis_state_s::scramble_reg, v22bis_state_s::scrambler_pattern_count, v22bis_state_s::signal_present, v22bis_state_s::total_baud_timing_correction, v22bis_state_s::training, v22bis_state_s::training_count, v22bis_state_s::training_error, and v22bis_rx_signal_cutoff().
Referenced by v22bis_restart().
void v22bis_rx_set_qam_report_handler | ( | v22bis_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. |
void v22bis_rx_signal_cutoff | ( | v22bis_state_t * | s, |
float | cutoff | ||
) |
Set the power level at which the carrier detection will cut in
s | The modem context. |
cutoff | The signal cutoff power, in dBm0. |
References power_meter_level_dbm0(), v22bis_state_s::put_bit, v22bis_state_s::put_bit_user_data, v22bis_state_s::status_handler, and v22bis_state_s::status_user_data.
Referenced by v22bis_rx_restart().
float v22bis_rx_signal_power | ( | v22bis_state_t * | s | ) |
Get a current received signal power.
s | The modem context. |
References power_meter_current_dbm0().
float v22bis_rx_symbol_timing_correction | ( | v22bis_state_t * | s | ) |
Get the current symbol timing correction since startup.
s | The modem context. |
References PULSESHAPER_COEFF_SETS.