spandsp: at_interpreter.h Source File

spandsp 0.0.6

private/at_interpreter.h
Go to the documentation of this file.
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/at_interpreter.h - AT command interpreter to V.251, V.252, V.253, T.31 and the 3GPP specs.
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2004, 2005, 2006 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26/*! \file */
27
28#if !defined(_SPANDSP_PRIVATE_AT_INTERPRETER_H_)
29#define _SPANDSP_PRIVATE_AT_INTERPRETER_H_
30
31typedef struct at_call_id_s at_call_id_t;
32
33 struct at_call_id_s
34{
35 char *id;
36 char *value;
37 at_call_id_t *next;
38};
39
40/*!
41 AT descriptor. This defines the working state for a single instance of
42 the AT interpreter.
43*/
44 struct at_state_s
45{
46 at_profile_t p;
47 /*! Value set by +GCI */
48 int country_of_installation;
49 /*! Value set by +FIT */
50 int dte_inactivity_timeout;
51 /*! Value set by +FIT */
52 int dte_inactivity_action;
53 /*! Value set by L */
54 int speaker_volume;
55 /*! Value set by M */
56 int speaker_mode;
57 /*! This is no real DTE rate. This variable is for compatibility this serially
58 connected modems. */
59 /*! Value set by +IPR/+FPR */
60 int dte_rate;
61 /*! Value set by +ICF */
62 int dte_char_format;
63 /*! Value set by +ICF */
64 int dte_parity;
65 /*! Value set by &C */
66 int rlsd_behaviour;
67 /*! Value set by &D */
68 int dtr_behaviour;
69 /*! Value set by +FCL */
70 int carrier_loss_timeout;
71 /*! Value set by X */
72 int result_code_mode;
73 /*! Value set by +IDSR */
74 int dsr_option;
75 /*! Value set by +ILSD */
76 int long_space_disconnect_option;
77 /*! Value set by +ICLOK */
78 int sync_tx_clock_source;
79 /*! Value set by +EWIND */
80 int rx_window;
81 /*! Value set by +EWIND */
82 int tx_window;
83
84 int v8bis_signal;
85 int v8bis_1st_message;
86 int v8bis_2nd_message;
87 int v8bis_sig_en;
88 int v8bis_msg_en;
89 int v8bis_supp_delay;
90
91 uint8_t rx_data[256];
92 int rx_data_bytes;
93
94 int display_call_info;
95 int call_info_displayed;
96 at_call_id_t *call_id;
97 char *local_id;
98 /*! The currently select FAX modem class. 0 = data modem mode. */
99 int fclass_mode;
100 int at_rx_mode;
101 int rings_indicated;
102 int do_hangup;
103 int silent_dial;
104 int command_dial;
105 int ok_is_pending;
106 int dte_is_waiting;
107 /*! \brief TRUE if a carrier is presnt. Otherwise FALSE. */
108 int rx_signal_present;
109 /*! \brief TRUE if a modem has trained, Otherwise FALSE. */
110 int rx_trained;
111 int transmit;
112
113 char line[256];
114 int line_ptr;
115
116 at_modem_control_handler_t *modem_control_handler;
117 void *modem_control_user_data;
118 at_tx_handler_t *at_tx_handler;
119 void *at_tx_user_data;
120 at_class1_handler_t *class1_handler;
121 void *class1_user_data;
122
123 /*! \brief Error and flow logging control */
124 logging_state_t logging;
125};
126
127#endif
128/*- End of file ------------------------------------------------------------*/
at_call_id_s
Definition private/at_interpreter.h:34
at_profile_t
Definition at_interpreter.h:117
at_state_s
Definition private/at_interpreter.h:45
at_state_s::dte_char_format
int dte_char_format
Definition private/at_interpreter.h:62
at_state_s::country_of_installation
int country_of_installation
Definition private/at_interpreter.h:48
at_state_s::carrier_loss_timeout
int carrier_loss_timeout
Definition private/at_interpreter.h:70
at_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition private/at_interpreter.h:124
at_state_s::speaker_volume
int speaker_volume
Definition private/at_interpreter.h:54
at_state_s::dte_inactivity_action
int dte_inactivity_action
Definition private/at_interpreter.h:52
at_state_s::fclass_mode
int fclass_mode
Definition private/at_interpreter.h:99
at_state_s::rlsd_behaviour
int rlsd_behaviour
Definition private/at_interpreter.h:66
at_state_s::dtr_behaviour
int dtr_behaviour
Definition private/at_interpreter.h:68
at_state_s::rx_window
int rx_window
Definition private/at_interpreter.h:80
at_state_s::dte_rate
int dte_rate
Definition private/at_interpreter.h:60
at_state_s::speaker_mode
int speaker_mode
Definition private/at_interpreter.h:56
at_state_s::sync_tx_clock_source
int sync_tx_clock_source
Definition private/at_interpreter.h:78
at_state_s::tx_window
int tx_window
Definition private/at_interpreter.h:82
at_state_s::result_code_mode
int result_code_mode
Definition private/at_interpreter.h:72
at_state_s::dte_inactivity_timeout
int dte_inactivity_timeout
Definition private/at_interpreter.h:50
at_state_s::long_space_disconnect_option
int long_space_disconnect_option
Definition private/at_interpreter.h:76
at_state_s::rx_signal_present
int rx_signal_present
TRUE if a carrier is presnt. Otherwise FALSE.
Definition private/at_interpreter.h:108
at_state_s::rx_trained
int rx_trained
TRUE if a modem has trained, Otherwise FALSE.
Definition private/at_interpreter.h:110
at_state_s::dte_parity
int dte_parity
Definition private/at_interpreter.h:64
at_state_s::dsr_option
int dsr_option
Definition private/at_interpreter.h:74
logging_state_s
Definition private/logging.h:34