comparison spandsp-0.0.6pre17/src/spandsp/private/v8.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/v8.h - V.8 modem negotiation processing.
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2004 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: v8.h,v 1.3.4.1 2009/12/28 12:20:47 steveu Exp $
26 */
27
28 #if !defined(_SPANDSP_PRIVATE_V8_H_)
29 #define _SPANDSP_PRIVATE_V8_H_
30
31 struct v8_state_s
32 {
33 /*! \brief TRUE if we are the calling modem */
34 int calling_party;
35
36 v8_result_handler_t *result_handler;
37 void *result_handler_user_data;
38
39 /*! \brief The current state of the V.8 protocol */
40 int state;
41 int fsk_tx_on;
42 int modem_connect_tone_tx_on;
43 int negotiation_timer;
44 int ci_timer;
45 int ci_count;
46 fsk_tx_state_t v21tx;
47 fsk_rx_state_t v21rx;
48 queue_state_t *tx_queue;
49 modem_connect_tones_tx_state_t ansam_tx;
50 modem_connect_tones_rx_state_t ansam_rx;
51
52 /*! \brief Modulation schemes available at this end. */
53 unsigned int far_end_modulations;
54
55 v8_parms_t parms;
56 v8_parms_t result;
57
58 /* V.8 data parsing */
59 uint32_t bit_stream;
60 int bit_cnt;
61 /* Indicates the type of message coming up */
62 int preamble_type;
63 uint8_t rx_data[64];
64 int rx_data_ptr;
65
66 /*! \brief a reference copy of the last CM or JM message, used when
67 testing for matches. */
68 uint8_t cm_jm_data[64];
69 int cm_jm_len;
70 int got_cm_jm;
71 int got_cj;
72 int zero_byte_count;
73 /*! \brief Error and flow logging control */
74 logging_state_t logging;
75 };
76
77 #endif
78 /*- End of file ------------------------------------------------------------*/

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