spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/fsk.h
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/fsk.h - FSK modem transmit and receive parts
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_FSK_H_)
27
#define _SPANDSP_PRIVATE_FSK_H_
28
29
/*!
30
FSK modem transmit descriptor. This defines the state of a single working
31
instance of an FSK modem transmitter.
32
*/
33
struct
fsk_tx_state_s
34
{
35
int
baud_rate;
36
/*! \brief The callback function used to get the next bit to be transmitted. */
37
get_bit_func_t
get_bit
;
38
/*! \brief A user specified opaque pointer passed to the get_bit function. */
39
void
*
get_bit_user_data
;
40
41
/*! \brief The callback function used to report modem status changes. */
42
modem_tx_status_func_t
status_handler
;
43
/*! \brief A user specified opaque pointer passed to the status function. */
44
void
*
status_user_data
;
45
46
int32_t phase_rates[2];
47
int16_t scaling;
48
int32_t current_phase_rate;
49
uint32_t phase_acc;
50
int
baud_frac;
51
int
shutdown;
52
};
53
54
/*!
55
FSK modem receive descriptor. This defines the state of a single working
56
instance of an FSK modem receiver.
57
*/
58
struct
fsk_rx_state_s
59
{
60
int
baud_rate;
61
/*! \brief Synchronous/asynchronous framing control */
62
int
framing_mode
;
63
/*! \brief The callback function used to put each bit received. */
64
put_bit_func_t
put_bit
;
65
/*! \brief A user specified opaque pointer passed to the put_bit routine. */
66
void
*
put_bit_user_data
;
67
68
/*! \brief The callback function used to report modem status changes. */
69
modem_tx_status_func_t
status_handler
;
70
/*! \brief A user specified opaque pointer passed to the status function. */
71
void
*
status_user_data
;
72
73
int32_t carrier_on_power;
74
int32_t carrier_off_power;
75
power_meter_t
power;
76
/*! \brief The value of the last signal sample, using the a simple HPF for signal power estimation. */
77
int16_t
last_sample
;
78
/*! \brief >0 if a signal above the minimum is present. It may or may not be a V.29 signal. */
79
int
signal_present
;
80
81
int32_t phase_rate[2];
82
uint32_t phase_acc[2];
83
84
int
correlation_span;
85
86
complexi32_t
window[2][FSK_MAX_WINDOW_LEN];
87
complexi32_t
dot[2];
88
int
buf_ptr;
89
90
int
frame_state;
91
int
frame_bits;
92
int
baud_phase;
93
int
last_bit;
94
int
scaling_shift;
95
};
96
97
#endif
98
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
fsk.h
Generated on Mon Sep 10 2012 11:04:48 for spandsp by
1.8.1.2