spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/v27ter_tx.h
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
26
#if !defined(_SPANDSP_PRIVATE_V27TER_TX_H_)
27
#define _SPANDSP_PRIVATE_V27TER_TX_H_
28
29
/*! The number of taps in the pulse shaping/bandpass filter */
30
#define V27TER_TX_FILTER_STEPS 9
31
32
/*!
33
V.27ter modem transmit side descriptor. This defines the working state for a
34
single instance of a V.27ter modem transmitter.
35
*/
36
struct
v27ter_tx_state_s
37
{
38
/*! \brief The bit rate of the modem. Valid values are 2400 and 4800. */
39
int
bit_rate
;
40
/*! \brief The callback function used to get the next bit to be transmitted. */
41
get_bit_func_t
get_bit
;
42
/*! \brief A user specified opaque pointer passed to the get_bit function. */
43
void
*
get_bit_user_data
;
44
45
/*! \brief The callback function used to report modem status changes. */
46
modem_tx_status_func_t
status_handler
;
47
/*! \brief A user specified opaque pointer passed to the status function. */
48
void
*
status_user_data
;
49
50
#if defined(SPANDSP_USE_FIXED_POINT)
51
/*! \brief The gain factor needed to achieve the specified output power at 2400bps. */
52
int32_t
gain_2400
;
53
/*! \brief The gain factor needed to achieve the specified output power at 4800bps. */
54
int32_t
gain_4800
;
55
#else
56
/*! \brief The gain factor needed to achieve the specified output power at 2400bps. */
57
float
gain_2400
;
58
/*! \brief The gain factor needed to achieve the specified output power at 4800bps. */
59
float
gain_4800
;
60
#endif
61
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
62
#if defined(SPANDSP_USE_FIXED_POINT)
63
complexi16_t
rrc_filter
[2*V27TER_TX_FILTER_STEPS];
64
#else
65
complexf_t
rrc_filter
[2*V27TER_TX_FILTER_STEPS];
66
#endif
67
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
68
int
rrc_filter_step
;
69
70
/*! \brief The register for the training and data scrambler. */
71
unsigned
int
scramble_reg
;
72
/*! \brief A counter for the number of consecutive bits of repeating pattern through
73
the scrambler. */
74
int
scrambler_pattern_count
;
75
/*! \brief TRUE if transmitting the training sequence, or shutting down transmission.
76
FALSE if transmitting user data. */
77
int
in_training
;
78
/*! \brief A counter used to track progress through sending the training sequence. */
79
int
training_step
;
80
81
/*! \brief The current phase of the carrier (i.e. the DDS parameter). */
82
uint32_t
carrier_phase
;
83
/*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
84
int32_t
carrier_phase_rate
;
85
/*! \brief The current fractional phase of the baud timing. */
86
int
baud_phase
;
87
/*! \brief The code number for the current position in the constellation. */
88
int
constellation_state
;
89
/*! \brief The get_bit function in use at any instant. */
90
get_bit_func_t
current_get_bit
;
91
/*! \brief Error and flow logging control */
92
logging_state_t
logging
;
93
};
94
95
#endif
96
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
v27ter_tx.h
Generated on Wed Oct 16 2013 09:59:54 for spandsp by
1.8.4