comparison spandsp-0.0.6pre17/src/spandsp/private/v27ter_tx.h @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 /*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/v27ter_tx.h - ITU V.27ter modem transmit part
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2003 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * $Id: v27ter_tx.h,v 1.3 2009/07/09 13:52:09 steveu Exp $
26 */
27
28 #if !defined(_SPANDSP_PRIVATE_V27TER_TX_H_)
29 #define _SPANDSP_PRIVATE_V27TER_TX_H_
30
31 /*! The number of taps in the pulse shaping/bandpass filter */
32 #define V27TER_TX_FILTER_STEPS 9
33
34 /*!
35 V.27ter modem transmit side descriptor. This defines the working state for a
36 single instance of a V.27ter modem transmitter.
37 */
38 struct v27ter_tx_state_s
39 {
40 /*! \brief The bit rate of the modem. Valid values are 2400 and 4800. */
41 int bit_rate;
42 /*! \brief The callback function used to get the next bit to be transmitted. */
43 get_bit_func_t get_bit;
44 /*! \brief A user specified opaque pointer passed to the get_bit function. */
45 void *get_bit_user_data;
46
47 /*! \brief The callback function used to report modem status changes. */
48 modem_tx_status_func_t status_handler;
49 /*! \brief A user specified opaque pointer passed to the status function. */
50 void *status_user_data;
51
52 #if defined(SPANDSP_USE_FIXED_POINT)
53 /*! \brief The gain factor needed to achieve the specified output power at 2400bps. */
54 int32_t gain_2400;
55 /*! \brief The gain factor needed to achieve the specified output power at 4800bps. */
56 int32_t gain_4800;
57 #else
58 /*! \brief The gain factor needed to achieve the specified output power at 2400bps. */
59 float gain_2400;
60 /*! \brief The gain factor needed to achieve the specified output power at 4800bps. */
61 float gain_4800;
62 #endif
63 /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
64 #if defined(SPANDSP_USE_FIXED_POINT)
65 complexi16_t rrc_filter[2*V27TER_TX_FILTER_STEPS];
66 #else
67 complexf_t rrc_filter[2*V27TER_TX_FILTER_STEPS];
68 #endif
69 /*! \brief Current offset into the RRC pulse shaping filter buffer. */
70 int rrc_filter_step;
71
72 /*! \brief The register for the training and data scrambler. */
73 unsigned int scramble_reg;
74 /*! \brief A counter for the number of consecutive bits of repeating pattern through
75 the scrambler. */
76 int scrambler_pattern_count;
77 /*! \brief TRUE if transmitting the training sequence, or shutting down transmission.
78 FALSE if transmitting user data. */
79 int in_training;
80 /*! \brief A counter used to track progress through sending the training sequence. */
81 int training_step;
82
83 /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
84 uint32_t carrier_phase;
85 /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
86 int32_t carrier_phase_rate;
87 /*! \brief The current fractional phase of the baud timing. */
88 int baud_phase;
89 /*! \brief The code number for the current position in the constellation. */
90 int constellation_state;
91 /*! \brief The get_bit function in use at any instant. */
92 get_bit_func_t current_get_bit;
93 /*! \brief Error and flow logging control */
94 logging_state_t logging;
95 };
96
97 #endif
98 /*- End of file ------------------------------------------------------------*/

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.