1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +-----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project :
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul :
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +-----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +-----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : This module provides the query functions related to the
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | protocol stack adapter for GPRS session management ( SM ).
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 +-----------------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #ifdef GPRS
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #ifndef CMH_SMQ_C
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 #define CMH_SMQ_C
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #endif
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "aci_all.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #include "cl_inline.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 /*==== INCLUDES ===================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "dti.h" /* functionality of the dti library */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "aci_cmh.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "ati_cmd.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "aci_cmd.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "pcm.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "dti_conn_mng.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "dti_cntrl_mng.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include "gaci.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "gaci_cmh.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #include "psa.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "psa_sm.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "cmh.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include "cmh_sm.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include "psa_gmm.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #include "gaci_cmh.h"
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 /*==== CONSTANTS ==================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 /*==== EXPORT =====================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 /*==== VARIABLES ==================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 EXTERN T_PDP_CONTEXT_INTERNAL *p_pdp_context_list;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 /*==== FUNCTIONS ==================================================*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 | PROJECT : GPRS (8441) MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 | STATE : finished ROUTINE : qAT_PlusCGQREQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 PURPOSE : This is the functional counterpart to the +CGQREG? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 command and returns current settings for the specified
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 PDP context. The function is called for all cids.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 Note: The QoS returned is always in Release 97 format.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 RETURNS: - AT_CMPL : Completed.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 - AT_FAIL : Command not valid for srcId.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 UPDATES: - qos: Quality of service for cid. Not updated if cid is undefined.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 - qos_valid: Indicates whether qos is updated not.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 GLOBAL T_ACI_RETURN qAT_PlusCGQREQ ( T_ACI_CMD_SRC srcId, U8 cid, BOOL *qos_valid, T_PS_qos *qos)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 TRACE_FUNCTION ("qAT_PlusCGQREQ()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 if ( !cmh_IsVldCmdSrc (srcId) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 if ( pdp_context_get_state_for_cid( cid ) EQ PDP_CONTEXT_STATE_DEFINED )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 p_pdp_context_node = pdp_context_find_node_from_cid( cid );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 if( p_pdp_context_node )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 if( p_pdp_context_node->ctrl_qos EQ PS_is_R97 )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 memcpy( qos, &p_pdp_context_node->qos.qos_r97, sizeof(T_PS_qos_r97) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 if( !cl_qos_convert_r99_to_r97( &p_pdp_context_node->qos.qos_r99, &qos->qos_r97 ) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 /* Failed to convert to Release 97. Never end here !!!! */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 *qos_valid = TRUE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 TRACE_ERROR( "ERROR: PDP context not found" );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 | PROJECT : GPRS (8441) MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 | STATE : finished ROUTINE : qAT_PlusCGQMIN |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 PURPOSE : This is the functional counterpart to the +CGQMIN? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 command and returns current settings for the specified
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 PDP context. The function is called for all cids.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 Note: The QoS returned is always in Release 97 format.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 RETURNS: - AT_CMPL : Completed.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 - AT_FAIL : Command not valid for srcId.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 UPDATES: - qos: Quality of service for cid. Not updated if cid is undefined.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 - qos_valid: Indicates whether qos is updated not.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 GLOBAL T_ACI_RETURN qAT_PlusCGQMIN ( T_ACI_CMD_SRC srcId, U8 cid, BOOL *qos_valid, T_PS_qos *qos)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 TRACE_FUNCTION ("qAT_PlusCGQMIN()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 if ( !cmh_IsVldCmdSrc (srcId) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 if ( pdp_context_get_state_for_cid( cid ) EQ PDP_CONTEXT_STATE_DEFINED )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 p_pdp_context_node = pdp_context_find_node_from_cid( cid );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 if( p_pdp_context_node )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 if( p_pdp_context_node->ctrl_min_qos EQ (T_PS_ctrl_min_qos)PS_is_R97 )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 memcpy( qos, &p_pdp_context_node->min_qos, sizeof(T_PS_qos) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 if( !cl_qos_convert_r99_to_r97( &p_pdp_context_node->min_qos.qos_r99, &qos->qos_r97 ) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 /* Failed to convert to Release 97. Never end here !!!! */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 *qos_valid = TRUE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 TRACE_ERROR( "ERROR: PDP context not found" );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 | PROJECT : GPRS (8441) MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 | STATE : finished ROUTINE : qAT_PlusCGDCONT |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 PURPOSE : This is the functional counterpart to the +CGCONT? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 command which returns current settings for each defined PDP context.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 GLOBAL T_ACI_RETURN qAT_PlusCGDCONT( T_ACI_CMD_SRC srcId, T_PDP_CONTEXT *p_pdp_context_array, SHORT *cid_array )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 int i = 0;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 TRACE_FUNCTION ("qAT_PlusCGDSCONT()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 if ( !cmh_IsVldCmdSrc( srcId ) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 p_pdp_context_node = p_pdp_context_list;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 while( p_pdp_context_node AND i < PDP_CONTEXT_CID_MAX )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 if( p_pdp_context_node->type EQ PDP_CONTEXT_TYPE_PRIMARY )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 memcpy( &p_pdp_context_array[i], &p_pdp_context_node->attributes, sizeof(T_PDP_CONTEXT) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 // memcpy( &p_pdp_context_array[i].pdp_type, &p_pdp_context_node->attributes.pdp_type, sizeof(T_PDP_CONTEXT_PDP_TYPE) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 // memcpy( &p_pdp_context_array[i].pdp_apn, &p_pdp_context_node->attributes.pdp_apn, sizeof(T_PDP_CONTEXT_APN) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 // memcpy( &p_pdp_context_array[i].pdp_addr, &p_pdp_context_node->attributes.pdp_addr, sizeof(T_PDP_CONTEXT_ADDR) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 cid_array[i] = p_pdp_context_node->cid;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 i++;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 p_pdp_context_node = p_pdp_context_node->p_next;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 | PROJECT : UMTS MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 | STATE : ROUTINE : qAT_PlusCGDSCONT |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 PURPOSE : This is the functional counterpart to the +CGCONT? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 command which returns current settings for each defined PDP context.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 GLOBAL T_ACI_RETURN qAT_PlusCGDSCONT( T_ACI_CMD_SRC srcId, T_PDP_CONTEXT *p_pdp_context_array, U8 *cid_array )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 int i = 0;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 TRACE_FUNCTION ("qAT_PlusCGDSCONT()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 if ( !cmh_IsVldCmdSrc( srcId ) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 p_pdp_context_node = p_pdp_context_list;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 while( p_pdp_context_node AND i < PDP_CONTEXT_CID_MAX )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 if( p_pdp_context_node->type EQ PDP_CONTEXT_TYPE_SECONDARY )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 p_pdp_context_array[i].p_cid = p_pdp_context_node->attributes.p_cid;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 p_pdp_context_array[i].d_comp = p_pdp_context_node->attributes.d_comp;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 p_pdp_context_array[i].h_comp = p_pdp_context_node->attributes.h_comp;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 cid_array[i] = p_pdp_context_node->cid;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 i++;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 p_pdp_context_node = p_pdp_context_node->p_next;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 GLOBAL T_ACI_RETURN qAT_PlusCGTFT( T_ACI_CMD_SRC srcId, U8 *cid_array )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 int i = 0;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 TRACE_FUNCTION ("qAT_PlusCGTFT()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 if ( !cmh_IsVldCmdSrc( srcId ) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 p_pdp_context_node = p_pdp_context_list;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 while( p_pdp_context_node AND i < PDP_CONTEXT_CID_MAX )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 if( p_pdp_context_node->p_tft_pf )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 cid_array[i++] = p_pdp_context_node->cid;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 p_pdp_context_node = p_pdp_context_node->p_next;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 | PROJECT : GPRS (8441) MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 | STATE : finished ROUTINE : qAT_PlusCGACT |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 PURPOSE : This is the functional counterpart to the +CGACT? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 command which returns current activation states for all defined PDP context.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 GLOBAL T_ACI_RETURN qAT_PlusCGACT ( T_ACI_CMD_SRC srcId, BOOL *states, SHORT *cid )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 T_PDP_CONTEXT_STATE state = PDP_CONTEXT_STATE_INVALID;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 U8 i = 0,
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 j = 0;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 TRACE_FUNCTION ("qAT_PlusCGACT()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 if ( !cmh_IsVldCmdSrc (srcId) ) {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 for ( i=0; i < PDP_CONTEXT_CID_MAX; i++ )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 state = get_state_over_cid( (U8)(i+1) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 /*if ( state NEQ PDP_CONTEXT_STATE_UNDEFINED AND state NEQ PDP_CONTEXT_STATE_INVALID )*/
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 if ( state NEQ PDP_CONTEXT_STATE_INVALID )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 if ( state EQ PDP_CONTEXT_STATE_ACTIVATED OR state EQ PDP_CONTEXT_STATE_DATA_LINK )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 states[j] = TRUE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 states[j] = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 cid[j] = i + 1 ;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 j++;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 cid [j] = PDP_CONTEXT_CID_INVALID;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 | PROJECT : GPRS (8441) MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 | STATE : finished ROUTINE : qAT_PlusCGAUTO |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 PURPOSE : This is the functional counterpart to the +CGAUTO? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 command which returns current mode of automatic response
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 to network requests.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 GLOBAL T_ACI_RETURN qAT_PlusCGAUTO ( T_ACI_CMD_SRC srcId, T_CGAUTO_N *n)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 TRACE_FUNCTION ("qAT_PlusCGAUTO()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 if ( !cmh_IsVldCmdSrc (srcId) ) {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 *n = (T_CGAUTO_N) automatic_response_mode;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 GLOBAL T_ACI_RETURN qAT_PlusCGEREP ( T_ACI_CMD_SRC srcId, T_CGEREP_MODE *mode, T_CGEREP_BFR *bfr )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 TRACE_FUNCTION ("qAT_PlusCGEREP()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 if ( !cmh_IsVldCmdSrc (srcId) ) {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 *mode = sm_cgerep_mode;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 *bfr = sm_cgerep_bfr;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 GLOBAL T_ACI_RETURN qAT_PlusCGSMS( T_ACI_CMD_SRC srcId, T_CGSMS_SERVICE *service )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 TRACE_FUNCTION ("qAT_PlusCGSMS()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 if ( !cmh_IsVldCmdSrc (srcId) ) {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 *service = sm_cgsms_service;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 #ifdef REL99
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 | PROJECT : UMTS MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 | STATE : finished ROUTINE : qAT_PlusCGEQREQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 PURPOSE : This is the functional counterpart to the +CGEQREG? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 command and returns current settings for the specified
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 PDP context. The function is called for all cids.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 Note: The QoS returned is always in Release 99 format (3GPP).
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 RETURNS: - AT_CMPL : Completed.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 - AT_FAIL : Command not valid for srcId.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 UPDATES: - qos: Quality of service for cid. Not updated if cid is undefined.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 - qos_valid: Indicates whether qos is updated not.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 GLOBAL T_ACI_RETURN qAT_PlusCGEQREQ( T_ACI_CMD_SRC srcId, U8 cid, BOOL *qos_valid, T_PS_qos *qos)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 TRACE_FUNCTION ("qAT_PlusCGEQREQ()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 p_pdp_context_node = pdp_context_find_node_from_cid( cid );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 if( !p_pdp_context_node )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 if( !cmh_IsVldCmdSrc (srcId) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 if( get_state_over_cid(cid) EQ PDP_CONTEXT_STATE_DEFINED )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 if( p_pdp_context_node->ctrl_qos EQ PS_is_R99 )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 memcpy( qos, &p_pdp_context_node->qos, sizeof(T_PS_qos_r99) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 /* The QoS is in Release 97 format and must be converted first. */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 if( !cl_qos_convert_r97_to_r99( &p_pdp_context_node->qos.qos_r97, &(qos->qos_r99)) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 /* Failed to convert to Release 99. Never end here !!!! */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 *qos_valid = TRUE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 | PROJECT : UMTS MODULE : CMH_SMQ |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 | STATE : finished ROUTINE : qAT_PlusCGEQMIN |
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 +--------------------------------------------------------------------+
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 PURPOSE : This is the functional counterpart to the +CGEQMIN? AT
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 command and returns current settings for the specified
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 PDP context. The function is called for all cids.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 The QoS returned is always in Release 99 format (3GPP).
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 RETURNS: - AT_CMPL : Completed.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 - AT_FAIL : Command not valid for srcId.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 UPDATES: - qos: Quality of service for cid. Not updated if cid is undefined.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 - qos_valid: Indicates whether qos is updated not.
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 GLOBAL T_ACI_RETURN qAT_PlusCGEQMIN( T_ACI_CMD_SRC srcId, U8 cid, BOOL *qos_valid, T_PS_min_qos *qos)
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 TRACE_FUNCTION ("qAT_PlusCGEQMIN()");
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 p_pdp_context_node = pdp_context_find_node_from_cid( cid );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 if( !p_pdp_context_node )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 * check command source - should be Serial link ?
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 if ( !cmh_IsVldCmdSrc (srcId) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 /*
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 * fill in parameters
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 *-------------------------------------------------------------------
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 if ( get_state_over_cid(cid) EQ PDP_CONTEXT_STATE_DEFINED )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 if( p_pdp_context_node->ctrl_min_qos EQ (T_PS_ctrl_min_qos)PS_is_R99 )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 memcpy( qos, &p_pdp_context_node->min_qos, sizeof(T_PS_qos) );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 /* The QoS is in Release 97 format and must be converted first. */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 if( !cl_qos_convert_r97_to_r99(&p_pdp_context_node->min_qos.qos_r97, &qos->qos_r99) )
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 /* Failed to convert to Release 99. Never end here !!!! */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 return( AT_FAIL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 *qos_valid = TRUE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 else
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 {
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 *qos_valid = FALSE;
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 return( AT_CMPL );
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 }
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 #endif /* REL99 */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 #endif /* GPRS */
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 /*==== EOF ========================================================*/
|