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