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