spandsp  0.0.6
v22bis_tx_fixed_rrc.h
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] =
4 {
5  {
6  -128, /* Filter 0 */
7  -228,
8  -237,
9  239,
10  13893,
11  13893,
12  239,
13  -237,
14  -228
15  },
16  {
17  -121, /* Filter 1 */
18  -242,
19  -302,
20  63,
21  15293,
22  12507,
23  393,
24  -172,
25  -210
26  },
27  {
28  -111, /* Filter 2 */
29  -252,
30  -365,
31  -132,
32  16699,
33  11146,
34  525,
35  -106,
36  -188
37  },
38  {
39  -99, /* Filter 3 */
40  -258,
41  -425,
42  -345,
43  18102,
44  9816,
45  634,
46  -42,
47  -164
48  },
49  {
50  -84, /* Filter 4 */
51  -260,
52  -480,
53  -575,
54  19492,
55  8526,
56  719,
57  18,
58  -138
59  },
60  {
61  -68, /* Filter 5 */
62  -256,
63  -530,
64  -817,
65  20859,
66  7283,
67  782,
68  75,
69  -110
70  },
71  {
72  -49, /* Filter 6 */
73  -248,
74  -573,
75  -1069,
76  22194,
77  6093,
78  821,
79  128,
80  -81
81  },
82  {
83  -30, /* Filter 7 */
84  -235,
85  -607,
86  -1326,
87  23486,
88  4962,
89  839,
90  176,
91  -51
92  },
93  {
94  -9, /* Filter 8 */
95  -217,
96  -633,
97  -1586,
98  24728,
99  3896,
100  837,
101  218,
102  -21
103  },
104  {
105  12, /* Filter 9 */
106  -195,
107  -650,
108  -1843,
109  25908,
110  2898,
111  815,
112  254,
113  8
114  },
115  {
116  33, /* Filter 10 */
117  -169,
118  -656,
119  -2093,
120  27019,
121  1972,
122  776,
123  282,
124  36
125  },
126  {
127  55, /* Filter 11 */
128  -138,
129  -651,
130  -2331,
131  28052,
132  1122,
133  721,
134  304,
135  63
136  },
137  {
138  76, /* Filter 12 */
139  -105,
140  -634,
141  -2552,
142  29000,
143  349,
144  653,
145  319,
146  88
147  },
148  {
149  97, /* Filter 13 */
150  -69,
151  -607,
152  -2751,
153  29854,
154  -344,
155  573,
156  326,
157  111
158  },
159  {
160  116, /* Filter 14 */
161  -30,
162  -568,
163  -2922,
164  30608,
165  -960,
166  483,
167  326,
168  131
169  },
170  {
171  133, /* Filter 15 */
172  9,
173  -517,
174  -3059,
175  31257,
176  -1497,
177  387,
178  320,
179  148
180  },
181  {
182  148, /* Filter 16 */
183  49,
184  -456,
185  -3158,
186  31794,
187  -1956,
188  286,
189  307,
190  161
191  },
192  {
193  161, /* Filter 17 */
194  90,
195  -385,
196  -3212,
197  32217,
198  -2340,
199  182,
200  289,
201  171
202  },
203  {
204  171, /* Filter 18 */
205  130,
206  -306,
207  -3217,
208  32522,
209  -2649,
210  78,
211  265,
212  178
213  },
214  {
215  177, /* Filter 19 */
216  168,
217  -218,
218  -3168,
219  32705,
220  -2888,
221  -24,
222  236,
223  181
224  },
225  {
226  181, /* Filter 20 */
227  204,
228  -123,
229  -3060,
230  32767,
231  -3060,
232  -123,
233  204,
234  181
235  },
236  {
237  181, /* Filter 21 */
238  236,
239  -24,
240  -2888,
241  32705,
242  -3168,
243  -218,
244  168,
245  177
246  },
247  {
248  178, /* Filter 22 */
249  265,
250  78,
251  -2649,
252  32522,
253  -3217,
254  -306,
255  130,
256  171
257  },
258  {
259  171, /* Filter 23 */
260  289,
261  182,
262  -2340,
263  32217,
264  -3212,
265  -385,
266  90,
267  161
268  },
269  {
270  161, /* Filter 24 */
271  307,
272  286,
273  -1956,
274  31794,
275  -3158,
276  -456,
277  49,
278  148
279  },
280  {
281  148, /* Filter 25 */
282  320,
283  387,
284  -1497,
285  31257,
286  -3059,
287  -517,
288  9,
289  133
290  },
291  {
292  131, /* Filter 26 */
293  326,
294  483,
295  -960,
296  30608,
297  -2922,
298  -568,
299  -30,
300  116
301  },
302  {
303  111, /* Filter 27 */
304  326,
305  573,
306  -344,
307  29854,
308  -2751,
309  -607,
310  -69,
311  97
312  },
313  {
314  88, /* Filter 28 */
315  319,
316  653,
317  349,
318  29000,
319  -2552,
320  -634,
321  -105,
322  76
323  },
324  {
325  63, /* Filter 29 */
326  304,
327  721,
328  1122,
329  28052,
330  -2331,
331  -651,
332  -138,
333  55
334  },
335  {
336  36, /* Filter 30 */
337  282,
338  776,
339  1972,
340  27019,
341  -2093,
342  -656,
343  -169,
344  33
345  },
346  {
347  8, /* Filter 31 */
348  254,
349  815,
350  2898,
351  25908,
352  -1843,
353  -650,
354  -195,
355  12
356  },
357  {
358  -21, /* Filter 32 */
359  218,
360  837,
361  3896,
362  24728,
363  -1586,
364  -633,
365  -217,
366  -9
367  },
368  {
369  -51, /* Filter 33 */
370  176,
371  839,
372  4962,
373  23486,
374  -1326,
375  -607,
376  -235,
377  -30
378  },
379  {
380  -81, /* Filter 34 */
381  128,
382  821,
383  6093,
384  22194,
385  -1069,
386  -573,
387  -248,
388  -49
389  },
390  {
391  -110, /* Filter 35 */
392  75,
393  782,
394  7283,
395  20859,
396  -817,
397  -530,
398  -256,
399  -68
400  },
401  {
402  -138, /* Filter 36 */
403  18,
404  719,
405  8526,
406  19492,
407  -575,
408  -480,
409  -260,
410  -84
411  },
412  {
413  -164, /* Filter 37 */
414  -42,
415  634,
416  9816,
417  18102,
418  -345,
419  -425,
420  -258,
421  -99
422  },
423  {
424  -188, /* Filter 38 */
425  -106,
426  525,
427  11146,
428  16699,
429  -132,
430  -365,
431  -252,
432  -111
433  },
434  {
435  -210, /* Filter 39 */
436  -172,
437  393,
438  12507,
439  15293,
440  63,
441  -302,
442  -242,
443  -121
444  }
445 };
v22bis_state_s::scramble_reg
uint32_t scramble_reg
The register for the data scrambler.
Definition: private/v22bis.h:100
v22bis_state_s::carrier_phase_rate
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_init
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
v22bis_set_modem_status_handler
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
v22bis_request_retrain
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
@ SIG_STATUS_MODEM_RETRAIN_OCCURRED
Notification that a modem retrain has occurred.
Definition: async.h:83
v22bis_state_s
Definition: private/v22bis.h:72
v22bis_state_s::shutdown
int shutdown
An indicator to mark that we are tidying up to stop transmission.
Definition: private/v22bis.h:240
v22bis_set_put_bit
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
modem_status_func_t
void(* modem_status_func_t)(void *user_data, int status)
Definition: async.h:114
v22bis_state_s::carrier_phase
uint32_t carrier_phase
The current phase of the carrier (i.e. the DDS parameter).
Definition: private/v22bis.h:114
v22bis_tx_power
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
complexf_t
Definition: complex.h:42
async.h
v22bis_rx_set_qam_report_handler
void v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
Definition: v22bis_rx.c:877
both_ways_line_model_state_t
Definition: line_model.h:120
v22bis_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition: private/v22bis.h:246
dds_phase_ratef
int32_t dds_phase_ratef(float frequency)
Find the phase rate equivalent to a frequency, in Hz.
Definition: dds_float.c:2109
v22bis_init
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
dds_complexf
complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
Generate a complex floating point tone sample.
Definition: dds_float.c:2165
put_bit_func_t
void(* put_bit_func_t)(void *user_data, int bit)
Definition: async.h:105
v22bis_state_s::current_get_bit
get_bit_func_t current_get_bit
The get_bit function in use at any instant.
Definition: private/v22bis.h:242
v22bis_state_s::training_count
int training_count
A count of how far through the current training step we are.
Definition: private/v22bis.h:108
v22bis_state_s::scrambler_pattern_count
int scrambler_pattern_count
A counter for the number of consecutive bits of repeating pattern through the scrambler.
Definition: private/v22bis.h:103
v22bis.h
signal_status_to_str
const char * signal_status_to_str(int status)
Convert a signal status to a short text description.
Definition: async.c:42
SPAN_DECLARE_NONSTD
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
v22bis_rx_symbol_timing_correction
float v22bis_rx_symbol_timing_correction(v22bis_state_t *s)
Definition: v22bis_rx.c:145
v22bis_state_s::get_bit_user_data
void * get_bit_user_data
A user specified opaque pointer passed to the get_bit callback routine.
Definition: private/v22bis.h:81
bert_state_s
Definition: private/bert.h:60
complex.h
v22bis_state_s::guard_phase
uint32_t guard_phase
The current phase of the guard tone (i.e. the DDS parameter).
Definition: private/v22bis.h:232
complexf_t::im
float im
Imaginary part.
Definition: complex.h:47
v22bis_state_s::guard_phase_rate
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
v22bis_state_s::training
int training
0 if receiving user data. A training stage value during training
Definition: private/v22bis.h:106
get_bit_func_t
int(* get_bit_func_t)(void *user_data)
Definition: async.h:108
v22bis_state_s::bit_rate
int bit_rate
The maximum permitted bit rate of the modem. Valid values are 1200 and 2400.
Definition: private/v22bis.h:75
v22bis_tx_power
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
v22bis_state_s::put_bit
put_bit_func_t put_bit
The callback function used to put each bit received.
Definition: private/v22bis.h:83
v22bis_state_s::status_handler
modem_status_func_t status_handler
The callback function used to report modem status changes.
Definition: private/v22bis.h:87
v22bis_get_logging_state
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
v22bis_rx_equalizer_state
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
v22bis_state_s::status_user_data
void * status_user_data
A user specified opaque pointer passed to the status function.
Definition: private/v22bis.h:89
v22bis_restart
int v22bis_restart(v22bis_state_t *s, int bit_rate)
Reinitialise an existing V.22bis modem context.
Definition: v22bis_tx.c:568
v22bis_rx_carrier_frequency
float v22bis_rx_carrier_frequency(v22bis_state_t *s)
Definition: v22bis_rx.c:139
v22bis_state_s::put_bit_user_data
void * put_bit_user_data
A user specified opaque pointer passed to the put_bit callback routine.
Definition: private/v22bis.h:85
v22bis_state_s::baud_phase
int baud_phase
The current fractional phase of the baud timing.
Definition: private/v22bis.h:188
v22bis_set_get_bit
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
v22bis_state_s::get_bit
get_bit_func_t get_bit
The callback function used to get the next bit to be transmitted.
Definition: private/v22bis.h:79
v22bis_state_s::rrc_filter_step
int rrc_filter_step
Current offset into the RRC pulse shaping filter buffer.
Definition: private/v22bis.h:97
complexi16_t
Definition: complex.h:88
span_log
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
v22bis_restart
int v22bis_restart(v22bis_state_t *s, int bit_rate)
Reinitialise an existing V.22bis modem context.
Definition: v22bis_tx.c:568
v22bis_free
int v22bis_free(v22bis_state_t *s)
Free a V.22bis modem receive context.
Definition: v22bis_tx.c:699
v22bis_get_current_bit_rate
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
v29rx.h
dds_modf
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
v22bis_rx_signal_power
float v22bis_rx_signal_power(v22bis_state_t *s)
Definition: v22bis_rx.c:151
spandsp-sim.h
v22bis_remote_loopback
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
v22bis_state_s::constellation_state
int constellation_state
The code number for the current position in the constellation.
Definition: private/v22bis.h:132
v22bis_get_current_bit_rate
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
v22bis_release
int v22bis_release(v22bis_state_t *s)
Release a V.22bis modem receive context.
Definition: v22bis_tx.c:693
logging.h
v22bis_state_s::calling_party
int calling_party
TRUE is this is the calling side modem.
Definition: private/v22bis.h:77
complexf_t::re
float re
Real part.
Definition: complex.h:45
v22bis_state_s::rrc_filter
float rrc_filter[27]
The root raised cosine (RRC) pulse shaping filter buffer.
Definition: private/v22bis.h:158
endpoint_t
Definition: v22bis_tests.c:72
v22bis_rx_restart
int v22bis_rx_restart(v22bis_state_t *s)
Reinitialise an existing V.22bis modem receive context.
Definition: v22bis_rx.c:835
v22bis_state_s::guard_level
float guard_level
The guard tone level.
Definition: private/v22bis.h:208
SIG_STATUS_TRAINING_SUCCEEDED
@ SIG_STATUS_TRAINING_SUCCEEDED
The modem has trained, and is ready for data exchange.
Definition: async.h:65
v22bis_state_s::qam_report
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
logging_state_s
Definition: private/logging.h:33
v22bis_state_s::gain
float gain
The gain factor needed to achieve the specified output power.
Definition: private/v22bis.h:210
SIG_STATUS_END_OF_DATA
@ SIG_STATUS_END_OF_DATA
The data stream has ended.
Definition: async.h:71
bert_results_t
Definition: bert.h:94
dds.h