spandsp 0.0.6
private/adsi.h
Go to the documentation of this file.
00001 /*
00002  * SpanDSP - a series of DSP components for telephony
00003  *
00004  * private/adsi.h - Analogue display services interface and other call ID related handling.
00005  *
00006  * Written by Steve Underwood <steveu@coppice.org>
00007  *
00008  * Copyright (C) 2003 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 /*! \file */
00027 
00028 #if !defined(_SPANDSP_PRIVATE_ADSI_H_)
00029 #define _SPANDSP_PRIVATE_ADSI_H_
00030 
00031 /*!
00032     ADSI transmitter descriptor. This contains all the state information for an ADSI
00033     (caller ID, CLASS, CLIP, ACLIP) transmit channel.
00034  */
00035 struct adsi_tx_state_s
00036 {
00037     /*! */
00038     int standard;
00039 
00040     /*! */
00041     tone_gen_descriptor_t alert_tone_desc;
00042     /*! */
00043     tone_gen_state_t alert_tone_gen;
00044     /*! */
00045     fsk_tx_state_t fsktx;
00046     /*! */
00047     dtmf_tx_state_t dtmftx;
00048     /*! */
00049     async_tx_state_t asynctx;
00050 
00051     /*! */
00052     int tx_signal_on;
00053 
00054     /*! */
00055     int byte_no;
00056     /*! */
00057     int bit_pos;
00058     /*! */
00059     int bit_no;
00060     /*! */
00061     uint8_t msg[256];
00062     /*! */
00063     int msg_len;
00064     /*! */
00065     int preamble_len;
00066     /*! */
00067     int preamble_ones_len;
00068     /*! */
00069     int postamble_ones_len;
00070     /*! */
00071     int stop_bits;
00072     /*! */
00073     int baudot_shift;
00074     
00075     /*! */
00076     logging_state_t logging;
00077 };
00078 
00079 /*!
00080     ADSI receiver descriptor. This contains all the state information for an ADSI
00081     (caller ID, CLASS, CLIP, ACLIP, JCLIP) receive channel.
00082  */
00083 struct adsi_rx_state_s
00084 {
00085     /*! */
00086     int standard;
00087     /*! */
00088     put_msg_func_t put_msg;
00089     /*! */
00090     void *user_data;
00091 
00092     /*! */
00093     fsk_rx_state_t fskrx;
00094     /*! */
00095     dtmf_rx_state_t dtmfrx;
00096 
00097     /*! */
00098     int consecutive_ones;
00099     /*! */
00100     int bit_pos;
00101     /*! */
00102     int in_progress;
00103     /*! */
00104     uint8_t msg[256];
00105     /*! */
00106     int msg_len;
00107     /*! */
00108     int baudot_shift;
00109     
00110     /*! A count of the framing errors. */
00111     int framing_errors;
00112 
00113     /*! */
00114     logging_state_t logging;
00115 };
00116 
00117 #endif
00118 /*- End of file ------------------------------------------------------------*/