1 #define TX_PULSESHAPER_GAIN 0.829192f
2 #define TX_PULSESHAPER_COEFF_SETS 40
3 static const int16_t tx_pulseshaper[TX_PULSESHAPER_COEFF_SETS][9] =
uint32_t scramble_reg
The register for the data scrambler.
Definition: private/v22bis.h:100
int32_t carrier_phase_rate
The update rate for the phase of the carrier (i.e. the DDS increment).
Definition: private/v22bis.h:116
v22bis_state_t * v22bis_init(v22bis_state_t *s, int bit_rate, int guard, int 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.22bis modem context.
Definition: v22bis_tx.c:634
void v22bis_set_modem_status_handler(v22bis_state_t *s, modem_status_func_t handler, void *user_data)
Change the modem status report function associated with a V.22bis modem receive context.
Definition: v22bis_tx.c:555
int v22bis_request_retrain(v22bis_state_t *s, int bit_rate)
Request a retrain for a V.22bis modem context.
Definition: v22bis_tx.c:586
@ SIG_STATUS_MODEM_RETRAIN_OCCURRED
Notification that a modem retrain has occurred.
Definition: async.h:83
Definition: private/v22bis.h:73
int shutdown
An indicator to mark that we are tidying up to stop transmission.
Definition: private/v22bis.h:240
void v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data)
Change the put_bit function associated with a V.22bis modem context.
Definition: v22bis_tx.c:548
void(* modem_status_func_t)(void *user_data, int status)
Definition: async.h:114
uint32_t carrier_phase
The current phase of the carrier (i.e. the DDS parameter).
Definition: private/v22bis.h:114
void v22bis_tx_power(v22bis_state_t *s, float power)
Adjust a V.22bis modem transmit context's output power.
Definition: v22bis_tx.c:493
void v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
Definition: v22bis_rx.c:877
Definition: line_model.h:121
logging_state_t logging
Error and flow logging control.
Definition: private/v22bis.h:246
int32_t dds_phase_ratef(float frequency)
Find the phase rate equivalent to a frequency, in Hz.
Definition: dds_float.c:2109
v22bis_state_t * v22bis_init(v22bis_state_t *s, int bit_rate, int guard, int 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.22bis modem context.
Definition: v22bis_tx.c:634
complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
Generate a complex floating point tone sample.
Definition: dds_float.c:2165
void(* put_bit_func_t)(void *user_data, int bit)
Definition: async.h:105
get_bit_func_t current_get_bit
The get_bit function in use at any instant.
Definition: private/v22bis.h:242
int training_count
A count of how far through the current training step we are.
Definition: private/v22bis.h:108
int scrambler_pattern_count
A counter for the number of consecutive bits of repeating pattern through the scrambler.
Definition: private/v22bis.h:103
const char * signal_status_to_str(int status)
Convert a signal status to a short text description.
Definition: async.c:42
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
float v22bis_rx_symbol_timing_correction(v22bis_state_t *s)
Definition: v22bis_rx.c:145
void * get_bit_user_data
A user specified opaque pointer passed to the get_bit callback routine.
Definition: private/v22bis.h:81
Definition: private/bert.h:61
uint32_t guard_phase
The current phase of the guard tone (i.e. the DDS parameter).
Definition: private/v22bis.h:232
float im
Imaginary part.
Definition: complex.h:47
int32_t guard_phase_rate
The update rate for the phase of the guard tone (i.e. the DDS increment).
Definition: private/v22bis.h:234
int training
0 if receiving user data. A training stage value during training
Definition: private/v22bis.h:106
int(* get_bit_func_t)(void *user_data)
Definition: async.h:108
int bit_rate
The maximum permitted bit rate of the modem. Valid values are 1200 and 2400.
Definition: private/v22bis.h:75
void v22bis_tx_power(v22bis_state_t *s, float power)
Adjust a V.22bis modem transmit context's output power.
Definition: v22bis_tx.c:493
put_bit_func_t put_bit
The callback function used to put each bit received.
Definition: private/v22bis.h:83
modem_status_func_t status_handler
The callback function used to report modem status changes.
Definition: private/v22bis.h:87
logging_state_t * v22bis_get_logging_state(v22bis_state_t *s)
Get the logging context associated with a V.22bis modem context.
Definition: v22bis_tx.c:562
int v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
Get a snapshot of the current equalizer coefficients.
Definition: v22bis_rx.c:173
void * status_user_data
A user specified opaque pointer passed to the status function.
Definition: private/v22bis.h:89
int v22bis_restart(v22bis_state_t *s, int bit_rate)
Reinitialise an existing V.22bis modem context.
Definition: v22bis_tx.c:568
float v22bis_rx_carrier_frequency(v22bis_state_t *s)
Definition: v22bis_rx.c:139
void * put_bit_user_data
A user specified opaque pointer passed to the put_bit callback routine.
Definition: private/v22bis.h:85
int baud_phase
The current fractional phase of the baud timing.
Definition: private/v22bis.h:188
void v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data)
Change the get_bit function associated with a V.22bis modem context.
Definition: v22bis_tx.c:541
get_bit_func_t get_bit
The callback function used to get the next bit to be transmitted.
Definition: private/v22bis.h:79
int rrc_filter_step
Current offset into the RRC pulse shaping filter buffer.
Definition: private/v22bis.h:97
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
int v22bis_restart(v22bis_state_t *s, int bit_rate)
Reinitialise an existing V.22bis modem context.
Definition: v22bis_tx.c:568
int v22bis_free(v22bis_state_t *s)
Free a V.22bis modem receive context.
Definition: v22bis_tx.c:699
int v22bis_get_current_bit_rate(v22bis_state_t *s)
Report the current operating bit rate of a V.22bis modem context.
Definition: v22bis_tx.c:628
float dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
Generate a floating point tone sample, with modulation.
Definition: dds_float.c:2155
float v22bis_rx_signal_power(v22bis_state_t *s)
Definition: v22bis_rx.c:151
int v22bis_remote_loopback(v22bis_state_t *s, int enable)
Request a loopback 2 for a V.22bis modem context.
Definition: v22bis_tx.c:621
int constellation_state
The code number for the current position in the constellation.
Definition: private/v22bis.h:132
int v22bis_get_current_bit_rate(v22bis_state_t *s)
Report the current operating bit rate of a V.22bis modem context.
Definition: v22bis_tx.c:628
int v22bis_release(v22bis_state_t *s)
Release a V.22bis modem receive context.
Definition: v22bis_tx.c:693
int calling_party
TRUE is this is the calling side modem.
Definition: private/v22bis.h:77
float re
Real part.
Definition: complex.h:45
float rrc_filter[27]
The root raised cosine (RRC) pulse shaping filter buffer.
Definition: private/v22bis.h:158
Definition: v22bis_tests.c:73
int v22bis_rx_restart(v22bis_state_t *s)
Reinitialise an existing V.22bis modem receive context.
Definition: v22bis_rx.c:835
float guard_level
The guard tone level.
Definition: private/v22bis.h:208
@ SIG_STATUS_TRAINING_SUCCEEDED
The modem has trained, and is ready for data exchange.
Definition: async.h:65
qam_report_handler_t qam_report
A callback function which may be enabled to report every symbol's constellation position.
Definition: private/v22bis.h:120
Definition: private/logging.h:34
float gain
The gain factor needed to achieve the specified output power.
Definition: private/v22bis.h:210
@ SIG_STATUS_END_OF_DATA
The data stream has ended.
Definition: async.h:71