00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * private/at_interpreter.h - AT command interpreter to V.251, V.252, V.253, T.31 and the 3GPP specs. 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2004, 2005, 2006 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 * $Id: at_interpreter.h,v 1.1 2008/11/30 05:43:37 steveu Exp $ 00026 */ 00027 00028 /*! \file */ 00029 00030 #if !defined(_SPANDSP_PRIVATE_AT_INTERPRETER_H_) 00031 #define _SPANDSP_PRIVATE_AT_INTERPRETER_H_ 00032 00033 typedef struct at_call_id_s at_call_id_t; 00034 00035 struct at_call_id_s 00036 { 00037 char *id; 00038 char *value; 00039 at_call_id_t *next; 00040 }; 00041 00042 /*! 00043 AT descriptor. This defines the working state for a single instance of 00044 the AT interpreter. 00045 */ 00046 struct at_state_s 00047 { 00048 at_profile_t p; 00049 /*! Value set by +GCI */ 00050 int country_of_installation; 00051 /*! Value set by +FIT */ 00052 int dte_inactivity_timeout; 00053 /*! Value set by +FIT */ 00054 int dte_inactivity_action; 00055 /*! Value set by L */ 00056 int speaker_volume; 00057 /*! Value set by M */ 00058 int speaker_mode; 00059 /*! This is no real DTE rate. This variable is for compatibility this serially 00060 connected modems. */ 00061 /*! Value set by +IPR/+FPR */ 00062 int dte_rate; 00063 /*! Value set by +ICF */ 00064 int dte_char_format; 00065 /*! Value set by +ICF */ 00066 int dte_parity; 00067 /*! Value set by &C */ 00068 int rlsd_behaviour; 00069 /*! Value set by &D */ 00070 int dtr_behaviour; 00071 /*! Value set by +FCL */ 00072 int carrier_loss_timeout; 00073 /*! Value set by X */ 00074 int result_code_mode; 00075 /*! Value set by +IDSR */ 00076 int dsr_option; 00077 /*! Value set by +ILSD */ 00078 int long_space_disconnect_option; 00079 /*! Value set by +ICLOK */ 00080 int sync_tx_clock_source; 00081 /*! Value set by +EWIND */ 00082 int rx_window; 00083 /*! Value set by +EWIND */ 00084 int tx_window; 00085 00086 int v8bis_signal; 00087 int v8bis_1st_message; 00088 int v8bis_2nd_message; 00089 int v8bis_sig_en; 00090 int v8bis_msg_en; 00091 int v8bis_supp_delay; 00092 00093 uint8_t rx_data[256]; 00094 int rx_data_bytes; 00095 00096 int display_call_info; 00097 int call_info_displayed; 00098 at_call_id_t *call_id; 00099 char *local_id; 00100 /*! The currently select FAX modem class. 0 = data modem mode. */ 00101 int fclass_mode; 00102 int at_rx_mode; 00103 int rings_indicated; 00104 int do_hangup; 00105 int silent_dial; 00106 int command_dial; 00107 int ok_is_pending; 00108 int dte_is_waiting; 00109 /*! \brief TRUE if a carrier is presnt. Otherwise FALSE. */ 00110 int rx_signal_present; 00111 /*! \brief TRUE if a modem has trained, Otherwise FALSE. */ 00112 int rx_trained; 00113 int transmit; 00114 00115 char line[256]; 00116 int line_ptr; 00117 00118 at_modem_control_handler_t *modem_control_handler; 00119 void *modem_control_user_data; 00120 at_tx_handler_t *at_tx_handler; 00121 void *at_tx_user_data; 00122 at_class1_handler_t *class1_handler; 00123 void *class1_user_data; 00124 00125 /*! \brief Error and flow logging control */ 00126 logging_state_t logging; 00127 }; 00128 00129 #endif 00130 /*- End of file ------------------------------------------------------------*/