FreeCalypso > hg > freecalypso-citrine
comparison g23m-aci/aci/cmh_smt.c @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This module implements the test fuinctions related to the | |
18 | protocol stack adapter for GPRS session management ( SM ). | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifdef GPRS | |
23 | |
24 #ifndef CMH_SMT_C | |
25 #define CMH_SMT_C | |
26 #endif | |
27 | |
28 #include "aci_all.h" | |
29 /*==== INCLUDES ===================================================*/ | |
30 #include "dti.h" /* functionality of the dti library */ | |
31 #include "aci_cmh.h" | |
32 | |
33 #include "dti_conn_mng.h" | |
34 #include "dti_cntrl_mng.h" | |
35 | |
36 #include "gaci.h" | |
37 #include "gaci_cmh.h" | |
38 #include "psa.h" | |
39 #include "psa_sm.h" | |
40 #include "psa_gppp.h" | |
41 #include "psa_gmm.h" | |
42 | |
43 #include "cmh.h" | |
44 #include "cmh_sm.h" | |
45 #include "cmh_gppp.h" | |
46 | |
47 #include "cmh_gmm.h" | |
48 | |
49 | |
50 /*==== CONSTANTS ==================================================*/ | |
51 | |
52 /*==== EXPORT =====================================================*/ | |
53 | |
54 /*==== VARIABLES ==================================================*/ | |
55 | |
56 /*==== FUNCTIONS ==================================================*/ | |
57 | |
58 /* | |
59 +--------------------------------------------------------------------+ | |
60 | PROJECT : GSM-PS (8441) MODULE : CMH_SMS | | |
61 | STATE : finnished ROUTINE : tAT_PlusCGPADDR | | |
62 +--------------------------------------------------------------------+ | |
63 | |
64 PURPOSE : This is the functional counterpart to the +CGPADDR= AT | |
65 command which sets the requested QOS. | |
66 */ | |
67 | |
68 GLOBAL T_ACI_RETURN tAT_PlusCGPADDR ( T_ACI_CMD_SRC srcId, U8 *cids) | |
69 { | |
70 T_PDP_CONTEXT_STATE con_state; | |
71 U8 cid; | |
72 U8 index = 0; | |
73 | |
74 TRACE_FUNCTION ("tAT_PlusCGPADDR()"); | |
75 | |
76 for( cid = PDP_CONTEXT_CID_MIN; cid <= PDP_CONTEXT_CID_MAX; cid++ ) | |
77 { | |
78 con_state = get_state_over_cid(cid); | |
79 /*if ( (con_state NEQ PDP_CONTEXT_STATE_UNDEFINED)AND | |
80 (con_state NEQ PDP_CONTEXT_STATE_INVALID) )*/ | |
81 if ( (con_state NEQ PDP_CONTEXT_STATE_INVALID) ) | |
82 { | |
83 cids[index ++] = cid; | |
84 } | |
85 cids[index] = PDP_CONTEXT_CID_INVALID; | |
86 } | |
87 | |
88 return AT_CMPL; | |
89 } | |
90 | |
91 GLOBAL T_ACI_RETURN tAT_PlusCGSMS( T_ACI_CMD_SRC srcId, SHORT *service_list) | |
92 { | |
93 | |
94 TRACE_FUNCTION ("tAT_PlusCGSMS()"); | |
95 | |
96 *service_list = 15; | |
97 | |
98 return AT_CMPL; | |
99 } | |
100 | |
101 #ifdef REL99 | |
102 /* | |
103 +--------------------------------------------------------------------+ | |
104 | PROJECT : UMTS MODULE : CMH_SMQ | | |
105 | STATE : finished ROUTINE : qAT_PlusCGEQNEG | | |
106 +--------------------------------------------------------------------+ | |
107 | |
108 PURPOSE : This is the functional counterpart to the +CGEQNEG=? or | |
109 +CGCMOD AT command and returns context_activated. | |
110 RETURNS: - AT_CMPL : Completed. | |
111 - AT_FAIL : Command not valid for srcId. | |
112 UPDATES: - context_activated: true - context is activated for cid. | |
113 false - context is not activated. | |
114 */ | |
115 GLOBAL T_ACI_RETURN tAT_PlusCGEQNEG_CGCMOD ( T_ACI_CMD_SRC srcId, U8 cid, BOOL *context_activated) | |
116 { | |
117 TRACE_FUNCTION ("tAT_PlusCGEQNEG_CGCMOD()"); | |
118 | |
119 /* | |
120 *------------------------------------------------------------------- | |
121 * check command source - should be Serial link ? | |
122 *------------------------------------------------------------------- | |
123 */ | |
124 if ( !cmh_IsVldCmdSrc (srcId) ) | |
125 { | |
126 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
127 return( AT_FAIL ); | |
128 } | |
129 | |
130 /* | |
131 *------------------------------------------------------------------- | |
132 * fill in parameters | |
133 *------------------------------------------------------------------- | |
134 */ | |
135 if (( get_state_over_cid(cid) EQ PDP_CONTEXT_STATE_ACTIVATED ) OR ( get_state_over_cid(cid) EQ PDP_CONTEXT_STATE_DATA_LINK )) | |
136 *context_activated = TRUE; | |
137 else | |
138 *context_activated = FALSE; | |
139 | |
140 return( AT_CMPL ); | |
141 } | |
142 | |
143 | |
144 /* | |
145 +--------------------------------------------------------------------+ | |
146 | PROJECT : UMTS MODULE : CMH_SMT | | |
147 | STATE : finished ROUTINE : tAT_PlusCGDSCONT | | |
148 +--------------------------------------------------------------------+ | |
149 | |
150 PURPOSE : This is the functional counterpart to the +CGDSCONT=? | |
151 | |
152 RETURNS: - AT_CMPL : Completed. | |
153 - AT_FAIL : Command not valid for srcId. | |
154 UPDATES: - context_activated: true - primary context is activated for cid. | |
155 false - context is not activated or not primary. | |
156 */ | |
157 GLOBAL T_ACI_RETURN tAT_PlusCGDSCONT( T_ACI_CMD_SRC srcId, U8 cid, BOOL *context_activated ) | |
158 { | |
159 T_PDP_CONTEXT_INTERNAL *p_pdp_context_node = NULL; | |
160 TRACE_FUNCTION ("tAT_PlusCGDSCONT()"); | |
161 | |
162 /* | |
163 *------------------------------------------------------------------- | |
164 * check command source - should be Serial link ? | |
165 *------------------------------------------------------------------- | |
166 */ | |
167 if( !cmh_IsVldCmdSrc (srcId) ) | |
168 { | |
169 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
170 return( AT_FAIL ); | |
171 } | |
172 | |
173 /* | |
174 *------------------------------------------------------------------- | |
175 * fill in parameters | |
176 *------------------------------------------------------------------- | |
177 */ | |
178 | |
179 p_pdp_context_node = pdp_context_find_node_from_cid( cid ); | |
180 if( p_pdp_context_node ) | |
181 { | |
182 if( p_pdp_context_node->type EQ PDP_CONTEXT_TYPE_PRIMARY ) | |
183 { | |
184 if( p_pdp_context_node->internal_data.state EQ PDP_CONTEXT_STATE_ACTIVATED OR | |
185 p_pdp_context_node->internal_data.state EQ PDP_CONTEXT_STATE_DATA_LINK ) | |
186 { | |
187 *context_activated = TRUE; | |
188 return AT_CMPL; | |
189 } | |
190 else | |
191 { | |
192 *context_activated = FALSE; | |
193 return AT_CMPL; | |
194 } | |
195 } | |
196 else | |
197 { | |
198 *context_activated = FALSE; | |
199 return AT_CMPL; | |
200 } | |
201 } | |
202 else | |
203 { | |
204 *context_activated = FALSE; | |
205 return AT_CMPL; | |
206 } | |
207 } | |
208 #endif /* REL99 */ | |
209 | |
210 #endif /* GPRS */ | |
211 | |
212 | |
213 /*==== EOF ========================================================*/ |