FreeCalypso > hg > fc-magnetite
comparison src/aci2/aci/psa_wapp.c @ 3:93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Sep 2016 00:29:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:c41a534f33c6 | 3:93999a60b835 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_PPPP | |
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 defines the processing functions for the | |
18 | primitives sent to the protocol stack adapter by the PPP | |
19 | module. | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #if defined (FF_WAP) && defined (DTI) | |
24 | |
25 #ifndef PSA_WAPP_C | |
26 #define PSA_WAPP_C | |
27 #endif /* of PSA_PPPP_C */ | |
28 | |
29 #include "aci_all.h" | |
30 /*==== INCLUDES ===================================================*/ | |
31 #include "aci_cmh.h" | |
32 #include "ati_cmd.h" | |
33 #include "aci_cmd.h" | |
34 | |
35 #ifdef FAX_AND_DATA | |
36 //#include "aci_fd.h" | |
37 #endif /* of #ifdef FAX_AND_DATA */ | |
38 | |
39 #include "dti.h" | |
40 #include "dti_conn_mng.h" | |
41 #include "dti_cntrl_mng.h" | |
42 | |
43 #include "aci.h" | |
44 #include "psa.h" | |
45 #include "psa_sim.h" | |
46 #include "psa_sms.h" | |
47 #include "psa_mmi.h" | |
48 #include "cmh.h" | |
49 #include "cmh_sim.h" | |
50 #include "phb.h" | |
51 #include "aoc.h" | |
52 | |
53 #ifdef SIM_TOOLKIT | |
54 #include "psa_cc.h" | |
55 #include "psa_sat.h" | |
56 #endif /* SIM_TOOLKIT */ | |
57 | |
58 #include "wap_aci.h" | |
59 | |
60 /*==== CONSTANTS ==================================================*/ | |
61 | |
62 | |
63 /*==== TYPES ======================================================*/ | |
64 | |
65 | |
66 /*==== EXPORT =====================================================*/ | |
67 | |
68 | |
69 /*==== VARIABLES ==================================================*/ | |
70 | |
71 | |
72 /*==== FUNCTIONS ==================================================*/ | |
73 | |
74 | |
75 /* | |
76 +--------------------------------------------------------------------+ | |
77 | PROJECT : GSM-WAP (8444) MODULE : ACI | | |
78 | STATE : code ROUTINE : psa_wap_mmi_ind | | |
79 +--------------------------------------------------------------------+ | |
80 | |
81 PURPOSE : Process primitive WAP_MMI_IND received from WAP | |
82 */ | |
83 | |
84 GLOBAL const void psa_wap_mmi_ind ( | |
85 T_WAP_MMI_IND *wap_mmi_ind | |
86 ) | |
87 { | |
88 PACCESS(wap_mmi_ind); | |
89 TRACE_FUNCTION("wap_mmi_ind()"); | |
90 | |
91 | |
92 { | |
93 UBYTE *event_store; | |
94 USHORT total_size; | |
95 | |
96 /* | |
97 sprintf(temp,"wap_mmi_ind->event_id %d",wap_mmi_ind->event_id); | |
98 TRACE_EVENT(temp); | |
99 sprintf(temp,"wap_mmi_ind->sdu.l_buf %d",wap_mmi_ind->sdu.l_buf); | |
100 TRACE_EVENT(temp); | |
101 */ | |
102 total_size = wap_mmi_ind->sdu.l_buf/8; | |
103 event_store = (UBYTE*)wap_mmi_ind->sdu.buf; | |
104 // Memory dump, REMOVE | |
105 /*TRACE_EVENT("WAP memory dump, received event"); | |
106 for (offsetIndex = 0; (offsetIndex<total_size && offsetIndex<80); offsetIndex++) | |
107 { | |
108 sprintf(temp,"%8x %2x %3d %c", event_store+offsetIndex, *(event_store+offsetIndex), *(event_store+offsetIndex), *(event_store+offsetIndex)); | |
109 TRACE_EVENT(temp); | |
110 }*/ | |
111 // End of memory dump | |
112 } | |
113 | |
114 #ifdef MFW | |
115 mmi_decoder(wap_mmi_ind->event_id, (void*)wap_mmi_ind->sdu.buf); | |
116 #endif | |
117 | |
118 PFREE(wap_mmi_ind); | |
119 | |
120 } | |
121 /* | |
122 +--------------------------------------------------------------------+ | |
123 | PROJECT : GSM-WAP (8444) MODULE : ACI | | |
124 | STATE : code ROUTINE : psa_wap_mmi_req | | |
125 +--------------------------------------------------------------------+ | |
126 | |
127 PURPOSE : Process primitive WAP_MMI_REQ received from WAP | |
128 */ | |
129 | |
130 GLOBAL const void psa_wap_mmi_req ( | |
131 T_WAP_MMI_REQ *wap_mmi_req | |
132 ) | |
133 { | |
134 PACCESS(wap_mmi_req); | |
135 TRACE_EVENT("wap_mmi_req()"); | |
136 | |
137 | |
138 { | |
139 char temp[50]; | |
140 sprintf(temp,"wap_mmi_req->event_id %d",wap_mmi_req->event_id); | |
141 TRACE_EVENT(temp); | |
142 sprintf(temp,"wap_mmi_req->sdu.l_buf %d",wap_mmi_req->sdu.l_buf); | |
143 TRACE_EVENT(temp); | |
144 sprintf(temp,"wap_mmi_req->sdu.buf %s",(char*)wap_mmi_req->sdu.buf); | |
145 TRACE_EVENT(temp); | |
146 | |
147 | |
148 } | |
149 | |
150 PFREE(wap_mmi_req); | |
151 } | |
152 | |
153 /* | |
154 +--------------------------------------------------------------------+ | |
155 | PROJECT : GSM-WAP (8444) MODULE : ACI | | |
156 | STATE : code ROUTINE : psa_wap_mmi_cnf | | |
157 +--------------------------------------------------------------------+ | |
158 | |
159 PURPOSE : Process primitive MMI_WAP_CNF received from WAP | |
160 */ | |
161 | |
162 GLOBAL const void psa_wap_mmi_cnf ( | |
163 T_WAP_MMI_CNF *wap_mmi_cnf | |
164 ) | |
165 { | |
166 PACCESS(wap_mmi_cnf); | |
167 TRACE_EVENT("wap_mmi_cnf()"); | |
168 | |
169 | |
170 { | |
171 char temp[50]; | |
172 sprintf(temp,"wap_mmi_cnf->event_id %d",wap_mmi_cnf->event_id); | |
173 TRACE_EVENT(temp); | |
174 sprintf(temp,"wap_mmi_cnf->sdu.l_buf %d",wap_mmi_cnf->sdu.l_buf); | |
175 TRACE_EVENT(temp); | |
176 sprintf(temp,"wap_mmi_cnf->sdu.buf %s",(char*)wap_mmi_cnf->sdu.buf); | |
177 TRACE_EVENT(temp); | |
178 } | |
179 | |
180 PFREE(wap_mmi_cnf); | |
181 } | |
182 | |
183 /* | |
184 +-------------------------------------------------------------------+ | |
185 | PROJECT : GSM-PS (6147) MODULE : PSA_WAPP | | |
186 | ROUTINE : psa_wap_dti_cnf | | |
187 +-------------------------------------------------------------------+ | |
188 | |
189 PURPOSE : processes WAP_DTI_CNF received from WAP. | |
190 | |
191 */ | |
192 | |
193 GLOBAL const void psa_wap_dti_cnf( T_WAP_DTI_CNF *wap_dti_cnf ) | |
194 { | |
195 T_DTI_CONN_LINK_ID link_id = dti_cntrl_get_link_id( DTI_ENTITY_WAP, DTI_INSTANCE_NOTPRESENT, DTI_SUB_NO_NOTPRESENT ); | |
196 | |
197 TRACE_FUNCTION ("psa_wap_dti_cnf()"); | |
198 | |
199 switch( wap_dti_cnf->dti_conn ) | |
200 { | |
201 case(WAP_CONNECT_DTI): | |
202 dti_cntrl_entity_connected( link_id, DTI_ENTITY_WAP, DTI_OK ); | |
203 break; | |
204 | |
205 case(WAP_DISCONNECT_DTI): | |
206 dti_cntrl_entity_disconnected( link_id, DTI_ENTITY_WAP ); | |
207 break; | |
208 | |
209 } | |
210 PFREE(wap_dti_cnf); | |
211 } | |
212 | |
213 | |
214 /* | |
215 +-------------------------------------------------------------------+ | |
216 | PROJECT : GSM-PS (6147) MODULE : PSA_WAPP | | |
217 | ROUTINE : psa_wap_dti_ind | | |
218 +-------------------------------------------------------------------+ | |
219 | |
220 PURPOSE : processes WAP_DTI_IND received from WAP. | |
221 | |
222 */ | |
223 | |
224 GLOBAL const void psa_wap_dti_ind( T_WAP_DTI_IND *wap_dti_ind ) | |
225 { | |
226 T_DTI_CONN_LINK_ID link_id = dti_cntrl_get_link_id( DTI_ENTITY_WAP, DTI_INSTANCE_NOTPRESENT, DTI_SUB_NO_NOTPRESENT ); | |
227 | |
228 TRACE_FUNCTION ("psa_wap_dti_ind()"); | |
229 | |
230 dti_cntrl_entity_disconnected( link_id, DTI_ENTITY_WAP ); | |
231 | |
232 PFREE(wap_dti_ind); | |
233 } | |
234 | |
235 #endif | |
236 |