private/v8.h
/*
* SpanDSP - a series of DSP components for telephony
*
* private/v8.h - V.8 modem negotiation processing.
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2004 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(_SPANDSP_PRIVATE_V8_H_)
#define _SPANDSP_PRIVATE_V8_H_
struct v8_state_s
{
/*! \brief TRUE if we are the calling party */
int calling_party;
/*! \brief A handler to process the V.8 signals */
v8_result_handler_t result_handler;
/*! \brief An opaque pointer passed to result_handler */
void *result_handler_user_data;
/*! \brief The current state of the V.8 protocol */
int state;
int fsk_tx_on;
int modem_connect_tone_tx_on;
int negotiation_timer;
int ci_timer;
int ci_count;
fsk_tx_state_t v21tx;
fsk_rx_state_t v21rx;
queue_state_t *tx_queue;
modem_connect_tones_tx_state_t ansam_tx;
modem_connect_tones_rx_state_t ansam_rx;
v8_parms_t parms;
v8_parms_t result;
/*! \brief The number of modulation bytes to use when sending. */
int modulation_bytes;
/* V.8 data parsing */
uint32_t bit_stream;
int bit_cnt;
/* Indicates the type of message coming up */
int preamble_type;
uint8_t rx_data[64];
int rx_data_ptr;
/*! \brief a reference copy of the last CM or JM message, used when
testing for matches. */
uint8_t cm_jm_data[64];
int cm_jm_len;
int got_cm_jm;
int got_cj;
int zero_byte_count;
/*! \brief Error and flow logging control */
logging_state_t logging;
};
#endif
/*- End of file ------------------------------------------------------------*/
fsk_rx_state_t
struct fsk_rx_state_s fsk_rx_state_t
Definition fsk.h:142
fsk_tx_state_t
struct fsk_tx_state_s fsk_tx_state_t
Definition fsk.h:133
logging_state_t
struct logging_state_s logging_state_t
Definition logging.h:75
modem_connect_tones_tx_state_t
struct modem_connect_tones_tx_state_s modem_connect_tones_tx_state_t
Definition modem_connect_tones.h:93
modem_connect_tones_rx_state_t
struct modem_connect_tones_rx_state_s modem_connect_tones_rx_state_t
Definition modem_connect_tones.h:99
queue_state_t
struct queue_state_s queue_state_t
Definition queue.h:54
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