private/v18.h

00001 /*
00002  * SpanDSP - a series of DSP components for telephony
00003  *
00004  * private/v18.h - V.18 text telephony for the deaf.
00005  *
00006  * Written by Steve Underwood <steveu@coppice.org>
00007  *
00008  * Copyright (C) 2004-2009 Steve Underwood
00009  *
00010  * All rights reserved.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 2.1,
00014  * as published by the Free Software Foundation.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024  */
00025  
00026 #if !defined(_SPANDSP_PRIVATE_V18_H_)
00027 #define _SPANDSP_PRIVATE_V18_H_
00028 
00029 struct v18_state_s
00030 {
00031     /*! \brief TRUE if we are the calling modem */
00032     int calling_party;
00033     int mode;
00034     put_msg_func_t put_msg;
00035     void *user_data;
00036 
00037     union
00038     {
00039         queue_state_t queue;
00040         uint8_t buf[QUEUE_STATE_T_SIZE(128)];
00041     } queue;
00042     tone_gen_descriptor_t alert_tone_desc;
00043     tone_gen_state_t alert_tone_gen;
00044     fsk_tx_state_t fsktx;
00045     dtmf_tx_state_t dtmftx;
00046     async_tx_state_t asynctx;
00047     int baudot_tx_shift;
00048     int tx_signal_on;
00049     int byte_no;
00050 
00051     fsk_rx_state_t fskrx;
00052     dtmf_rx_state_t dtmfrx;
00053     int baudot_rx_shift;
00054     int consecutive_ones;
00055     uint8_t rx_msg[256 + 1];
00056     int rx_msg_len;
00057     int bit_pos;
00058     int in_progress;
00059 
00060     /*! \brief Error and flow logging control */
00061     logging_state_t logging;
00062 };
00063 
00064 #endif
00065 /*- End of file ------------------------------------------------------------*/

Generated on Fri Apr 15 16:14:39 2011 for spandsp by  doxygen 1.4.7