FreeCalypso > hg > freecalypso-citrine
comparison g23m-aci/aci/psa_mmis.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 : GSM-PS (6147) | |
4 | Modul : PSA_MMI | |
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 signalling functions of the | |
18 | protocol stack adapter for the man machine interface. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef PSA_MMIS_C | |
23 #define PSA_MMIS_C | |
24 #endif | |
25 | |
26 #include "config.h" | |
27 #include "fixedconf.h" | |
28 #include "condat-features.h" | |
29 #include "aci_conf.h" | |
30 | |
31 #include "aci_all.h" | |
32 | |
33 /*==== INCLUDES ===================================================*/ | |
34 #include "aci_cmh.h" | |
35 #include "ati_cmd.h" | |
36 #include "aci_cmd.h" | |
37 | |
38 #ifdef FAX_AND_DATA | |
39 #include "aci_fd.h" | |
40 #endif /* of #ifdef FAX_AND_DATA */ | |
41 | |
42 #include "aci.h" | |
43 #include "psa.h" | |
44 #include "psa_sms.h" | |
45 #include "psa_mmi.h" | |
46 #include "cmh.h" | |
47 #include "cmh_sms.h" | |
48 #include "cmh_mmi.h" | |
49 | |
50 /*==== CONSTANTS ==================================================*/ | |
51 #ifdef FF_HOMEZONE | |
52 #define CBHZ_ON_MSG_ID 0xDD | |
53 #define CBHZ_OFF_MSG_ID 0xFFFF | |
54 #endif /* HOMEZONE */ | |
55 | |
56 /*==== TYPES ======================================================*/ | |
57 | |
58 | |
59 /*==== EXPORT =====================================================*/ | |
60 | |
61 | |
62 /*==== VARIABLES ==================================================*/ | |
63 | |
64 | |
65 /*==== FUNCTIONS ==================================================*/ | |
66 | |
67 /* | |
68 +-------------------------------------------------------------------+ | |
69 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIS | | |
70 | ROUTINE : psaMMI_Cbch | | |
71 +-------------------------------------------------------------------+ | |
72 | |
73 PURPOSE : cell broadcast channel request | |
74 | |
75 */ | |
76 | |
77 GLOBAL SHORT psaMMI_Cbch ( void ) | |
78 { | |
79 TRACE_FUNCTION ("psaMMI_Cbch()"); | |
80 | |
81 /* | |
82 *------------------------------------------------------------------- | |
83 * check owner id | |
84 *------------------------------------------------------------------- | |
85 */ | |
86 if(!psa_IsVldOwnId(smsShrdPrm.cbmPrm.cbchOwner)) | |
87 | |
88 return( -1 ); | |
89 | |
90 /* | |
91 *------------------------------------------------------------------- | |
92 * create and send primitive for CBCH request | |
93 *------------------------------------------------------------------- | |
94 */ | |
95 if (smsShrdPrm.cbmPrm.cbmHndl NEQ BM0) /* only if NMI for CBM is set*/ | |
96 { | |
97 PALLOC (mmi_cbch_req, MMI_CBCH_REQ); | |
98 | |
99 /* fill in primitive parameter: CBCH request */ | |
100 memcpy ( ( CHAR * ) mmi_cbch_req -> msg_id, | |
101 ( CHAR * ) smsShrdPrm.cbmPrm.msgId, | |
102 sizeof ( mmi_cbch_req -> msg_id ) ); | |
103 | |
104 memcpy ( ( CHAR * ) mmi_cbch_req -> dcs_id, | |
105 ( CHAR * ) smsShrdPrm.cbmPrm.dcsId, | |
106 sizeof ( mmi_cbch_req -> dcs_id ) ); | |
107 | |
108 mmi_cbch_req -> modus = smsShrdPrm.cbmPrm.cbmMode; | |
109 | |
110 PSENDX (PL, mmi_cbch_req); | |
111 } | |
112 else | |
113 { | |
114 PALLOC (mmi_cbch_req, MMI_CBCH_REQ); | |
115 | |
116 memset (mmi_cbch_req, NOT_PRESENT_8BIT, sizeof(T_MMI_CBCH_REQ)); | |
117 mmi_cbch_req -> modus = MMI_CBCH_STOP; | |
118 | |
119 PSENDX (PL, mmi_cbch_req); | |
120 } | |
121 return 0; | |
122 } | |
123 | |
124 #ifdef FF_HOMEZONE | |
125 /* | |
126 +-------------------------------------------------------------------+ | |
127 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIS | | |
128 | ROUTINE : psaMMI_homezone_req | | |
129 +-------------------------------------------------------------------+ | |
130 | |
131 PURPOSE : homezone request | |
132 | |
133 */ | |
134 | |
135 GLOBAL SHORT psaMMI_homezone_req( void ) | |
136 { | |
137 TRACE_FUNCTION ("psaMMI_homezone_req()"); | |
138 | |
139 /* | |
140 *------------------------------------------------------------------- | |
141 * check owner id | |
142 *------------------------------------------------------------------- | |
143 */ | |
144 if(!psa_IsVldOwnId(smsShrdPrm.cbmPrm.cbchOwner)) | |
145 { | |
146 return( -1 ); | |
147 } | |
148 | |
149 /* | |
150 *------------------------------------------------------------------- | |
151 * create and send primitive for CBCH request | |
152 *------------------------------------------------------------------- | |
153 */ | |
154 | |
155 { | |
156 PALLOC (mmi_cbch_req, MMI_CBCH_REQ); | |
157 | |
158 memset (mmi_cbch_req, NOT_PRESENT_8BIT, sizeof(T_MMI_CBCH_REQ)); | |
159 | |
160 /* fill in primitive parameter: CBCH request */ | |
161 mmi_cbch_req->modus = CBCH_HOMEZONE; | |
162 | |
163 if ( smsShrdPrm.cbmPrm.hzMode EQ CBHZ_MOD_Active ) | |
164 { | |
165 mmi_cbch_req->msg_id[0] = CBHZ_ON_MSG_ID; | |
166 } | |
167 else | |
168 { | |
169 mmi_cbch_req->msg_id[0] = CBHZ_OFF_MSG_ID; | |
170 } | |
171 | |
172 mmi_cbch_req->dcs_id[0] = smsShrdPrm.cbmPrm.hzDcs; | |
173 mmi_cbch_req->dcs_id[1] = smsShrdPrm.cbmPrm.hzTimeout; | |
174 | |
175 TRACE_EVENT_P2("MMI_CBCH_REQ: modus %d, msg_id %d", | |
176 mmi_cbch_req->modus, mmi_cbch_req->msg_id[0]); | |
177 | |
178 PSENDX (PL, mmi_cbch_req); | |
179 } | |
180 return 0; | |
181 } | |
182 #endif /* FF_HOMEZONE */ | |
183 | |
184 | |
185 /* | |
186 +-------------------------------------------------------------------+ | |
187 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIS | | |
188 | ROUTINE : psaMMI_Display | | |
189 +-------------------------------------------------------------------+ | |
190 | |
191 PURPOSE : set the parameters for display request | |
192 | |
193 */ | |
194 | |
195 GLOBAL SHORT psaMMI_Display ( void ) | |
196 { | |
197 | |
198 TRACE_FUNCTION ("psaMMI_Display()"); | |
199 | |
200 /* | |
201 *------------------------------------------------------------------- | |
202 * create and send primitive for display request | |
203 *------------------------------------------------------------------- | |
204 */ | |
205 { | |
206 PSENDX (PL, mmiShrdPrm.dspRq); | |
207 } | |
208 | |
209 return 0; | |
210 } | |
211 | |
212 | |
213 /* | |
214 +-------------------------------------------------------------------+ | |
215 | PROJECT : GSM-PS MODULE : PSA_MMIS | | |
216 | ROUTINE : psaMMI_ConfigPrim | | |
217 +-------------------------------------------------------------------+ | |
218 | |
219 PURPOSE : send a config message to a entity | |
220 | |
221 */ | |
222 #define CONFIG_STR 0x0 | |
223 | |
224 typedef struct | |
225 { | |
226 char config_str[80]; | |
227 } T_CONFIG_STR; | |
228 | |
229 | |
230 GLOBAL void psaMMI_ConfigPrim (T_HANDLE receiver_handle, | |
231 char *config_msg) | |
232 { | |
233 PALLOC (cfg_str, CONFIG_STR); | |
234 | |
235 D2P(cfg_str)->opc |= SYS_MASK; | |
236 strcpy (cfg_str->config_str, config_msg); | |
237 | |
238 PSEND (receiver_handle, cfg_str); | |
239 } | |
240 | |
241 | |
242 /*==== EOF ========================================================*/ | |
243 |