spandsp 0.0.6
private/v8.h
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
26#if !defined(_SPANDSP_PRIVATE_V8_H_)
27#define _SPANDSP_PRIVATE_V8_H_
28
30{
31 /*! \brief TRUE if we are the calling party */
33
34 /*! \brief A handler to process the V.8 signals */
35 v8_result_handler_t result_handler;
36 /*! \brief An opaque pointer passed to result_handler */
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;
51
52 v8_parms_t parms;
53 v8_parms_t result;
54
55 /*! \brief The number of modulation bytes to use when sending. */
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 */
75};
76
77#endif
78/*- End of file ------------------------------------------------------------*/
Definition: private/fsk.h:59
Definition: private/fsk.h:34
Definition: private/logging.h:34
Definition: private/modem_connect_tones.h:58
Definition: private/modem_connect_tones.h:38
Definition: private/queue.h:34
Definition: v8.h:118
Definition: private/v8.h:30
void * result_handler_user_data
An opaque pointer passed to result_handler.
Definition: private/v8.h:37
int modulation_bytes
The number of modulation bytes to use when sending.
Definition: private/v8.h:56
uint8_t cm_jm_data[64]
a reference copy of the last CM or JM message, used when testing for matches.
Definition: private/v8.h:68
int calling_party
TRUE if we are the calling party.
Definition: private/v8.h:32
int state
The current state of the V.8 protocol.
Definition: private/v8.h:40
logging_state_t logging
Error and flow logging control.
Definition: private/v8.h:74
v8_result_handler_t result_handler
A handler to process the V.8 signals.
Definition: private/v8.h:35