spandsp: v8.h Source File

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
29 struct v8_state_s
30{
31 /*! \brief TRUE if we are the calling party */
32 int 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 */
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 v8_parms_t parms;
53 v8_parms_t result;
54
55 /*! \brief The number of modulation bytes to use when sending. */
56 int modulation_bytes;
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 ------------------------------------------------------------*/
fsk_rx_state_s
Definition private/fsk.h:59
fsk_tx_state_s
Definition private/fsk.h:34
logging_state_s
Definition private/logging.h:34
modem_connect_tones_rx_state_s
Definition private/modem_connect_tones.h:58
modem_connect_tones_tx_state_s
Definition private/modem_connect_tones.h:38
queue_state_s
Definition private/queue.h:34
v8_parms_s
Definition v8.h:118
v8_state_s
Definition private/v8.h:30
v8_state_s::result_handler_user_data
void * result_handler_user_data
An opaque pointer passed to result_handler.
Definition private/v8.h:37
v8_state_s::modulation_bytes
int modulation_bytes
The number of modulation bytes to use when sending.
Definition private/v8.h:56
v8_state_s::cm_jm_data
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
v8_state_s::calling_party
int calling_party
TRUE if we are the calling party.
Definition private/v8.h:32
v8_state_s::state
int state
The current state of the V.8 protocol.
Definition private/v8.h:40
v8_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition private/v8.h:74
v8_state_s::result_handler
v8_result_handler_t result_handler
A handler to process the V.8 signals.
Definition private/v8.h:35