comparison src/g23m-gsm/sms/sms_pei.c @ 104:27a4235405c6

src/g23m-gsm: import from LoCosto source
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 04 Oct 2016 18:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
103:76d139c7a25e 104:27a4235405c6
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 process body interface
18 | for the entity SMS of the mobile station.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef SMS_PEI_C
23 #define SMS_PEI_C
24
25 #define ENTITY_SMS
26
27 /*==== INCLUDES ===================================================*/
28
29 #include <string.h>
30 #include <stdlib.h>
31 #include <stddef.h>
32 #include "typedefs.h"
33 #include "pcm.h"
34 #include "vsi.h"
35 #include "custom.h"
36 #include "gsm.h"
37 #include "message.h"
38 #include "ccdapi.h"
39 #include "prim.h"
40 #include "cus_sms.h"
41 #include "cnf_sms.h"
42 #include "mon_sms.h"
43 #include "pei.h"
44 #include "tok.h"
45 #include "sms.h"
46 #include "sms_em.h"
47
48 #ifdef GPRS
49 #include "gprs.h"
50 #endif /* #ifdef GPRS */
51
52 /*==== EXPORT =====================================================*/
53 #ifdef TI_PS_HCOMM_CHANGE
54 #else
55 GLOBAL T_HANDLE hCommSIM = VSI_ERROR; /* SIM Communication */
56 GLOBAL T_HANDLE hCommMMI = VSI_ERROR; /* MMI Communication */
57 GLOBAL T_HANDLE hCommMM = VSI_ERROR; /* MM Communication */
58 #endif /* TI_PS_HCOMM_CHANGE */
59 #ifdef GPRS
60 GLOBAL T_HANDLE hCommLLC = VSI_ERROR; /* LL Communication */
61 GLOBAL T_HANDLE hCommGMM = VSI_ERROR; /* GMM Communication */
62 #endif /* #ifdef GPRS */
63 GLOBAL T_HANDLE sms_handle;
64
65 GLOBAL T_SMS_DATA sms_data_base;
66
67 /*==== PRIVATE ====================================================*/
68
69 static void pei_not_supported (void *data);
70
71 /*==== VARIABLES ==================================================*/
72 #ifdef _SIMULATION_
73 static BOOL first_access = TRUE;
74 #endif /* _SIMULATION_ */
75 static T_MONITOR sms_mon;
76
77 /*==== FUNCTIONS ==================================================*/
78
79 LOCAL const T_FUNC mnsms_table[] = {
80 MAK_FUNC_0( tl_mnsms_delete_req, MNSMS_DELETE_REQ ),
81 MAK_FUNC_0( tl_mnsms_read_req, MNSMS_READ_REQ ),
82 MAK_FUNC_0( tl_mnsms_store_req, MNSMS_STORE_REQ ),
83 MAK_FUNC_0( tl_mnsms_submit_req, MNSMS_SUBMIT_REQ ),
84 MAK_FUNC_0( tl_mnsms_command_req, MNSMS_COMMAND_REQ ),
85 MAK_FUNC_0( tl_mnsms_configure_req, MNSMS_CONFIGURE_REQ ),
86 MAK_FUNC_0( tl_mnsms_pause_req, MNSMS_PAUSE_REQ ),
87 MAK_FUNC_0( tl_mnsms_resume_req, MNSMS_RESUME_REQ ),
88 MAK_FUNC_0( tl_mnsms_ack_res, MNSMS_ACK_RES ),
89 #ifdef REL99
90 MAK_FUNC_0( tl_mnsms_retrans_req, MNSMS_RETRANS_REQ ),
91 #else
92 MAK_FUNC_N( pei_not_supported, 0 ),
93 #endif
94 MAK_FUNC_N( pei_not_supported, 0 ),
95 MAK_FUNC_0( tl_mnsms_query_req, MNSMS_QUERY_REQ )
96
97 #ifdef GPRS
98 ,
99 MAK_FUNC_0( tl_mnsms_mo_serv_req, MNSMS_MO_SERV_REQ )
100 #endif /* #ifdef GPRS */
101 #ifdef SIM_PERS_OTA
102 ,
103 MAK_FUNC_0( tl_mnsms_OTA_message_res, MNSMS_OTA_MESSAGE_RES )
104 #endif
105 };
106
107 LOCAL const T_FUNC mmsms_table[] = {
108 MAK_FUNC_S( for_mmsms_data_ind, MMSMS_DATA_IND ),
109 MAK_FUNC_0( cp_mmsms_error_ind, MMSMS_ERROR_IND ),
110 MAK_FUNC_0( cp_mmsms_establish_cnf, MMSMS_ESTABLISH_CNF ),
111 MAK_FUNC_S( for_mmsms_establish_ind, MMSMS_ESTABLISH_IND ),
112 MAK_FUNC_0( cp_mmsms_release_ind, MMSMS_RELEASE_IND ),
113 MAK_FUNC_N( pei_not_supported, MMSMS_UNITDATA_IND )
114 };
115
116 LOCAL const T_FUNC sim_table[] = {
117 #if defined(SIM_TOOLKIT) OR defined(FF_CPHS)
118 MAK_FUNC_0( tl_sim_read_cnf, SIM_READ_CNF ),
119 #else
120 MAK_FUNC_N( pei_not_supported, SIM_READ_CNF ),
121 #endif /* else, #if defined(SIM_TOOLKIT) OR defined(FF_CPHS) */
122 MAK_FUNC_0( tl_sim_update_cnf, SIM_UPDATE_CNF ),
123 MAK_FUNC_0( tl_sim_read_record_cnf, SIM_READ_RECORD_CNF ),
124 MAK_FUNC_N( pei_not_supported, 0 ),
125 MAK_FUNC_0( tl_sim_update_record_cnf, SIM_UPDATE_RECORD_CNF ),
126 MAK_FUNC_N( pei_not_supported, 0 ),
127 MAK_FUNC_N( pei_not_supported, 0 ),
128 MAK_FUNC_N( pei_not_supported, 0 ),
129 MAK_FUNC_N( pei_not_supported, SIM_INCREMENT_CNF ),
130 MAK_FUNC_N( pei_not_supported, SIM_VERIFY_PIN_CNF ),
131 MAK_FUNC_N( pei_not_supported, SIM_CHANGE_PIN_CNF ),
132 MAK_FUNC_N( pei_not_supported, SIM_DISABLE_PIN_CNF ),
133 MAK_FUNC_N( pei_not_supported, SIM_ENABLE_PIN_CNF ),
134 MAK_FUNC_N( pei_not_supported, SIM_UNBLOCK_CNF ),
135 MAK_FUNC_N( pei_not_supported, SIM_AUTHENTICATION_CNF),
136 MAK_FUNC_N( pei_not_supported, SIM_MMI_INSERT_IND ),
137 MAK_FUNC_N( pei_not_supported, SIM_MM_INSERT_IND ),
138 MAK_FUNC_0( tl_sim_remove_ind, SIM_REMOVE_IND ),
139 MAK_FUNC_N( pei_not_supported, SIM_SYNC_CNF ),
140 MAK_FUNC_N( pei_not_supported, SIM_ACTIVATE_CNF ),
141 MAK_FUNC_0( tl_sim_sms_insert_ind, SIM_SMS_INSERT_IND ),
142 #if defined(SIM_TOOLKIT) AND defined(SAT_SMS_DNL_SUPPORT)
143 MAK_FUNC_N( pei_not_supported, SIM_TOOLKIT_IND ),
144 MAK_FUNC_0( tl_sim_toolkit_cnf, SIM_TOOLKIT_CNF ),
145 #else
146 MAK_FUNC_N( pei_not_supported, SIM_TOOLKIT_IND ),
147 MAK_FUNC_N( pei_not_supported, SIM_TOOLKIT_CNF ),
148 #endif /* else, #if defined(SIM_TOOLKIT) AND defined(SAT_SMS_DNL_SUPPORT) */
149 MAK_FUNC_N( pei_not_supported, 0 ),
150 MAK_FUNC_N( pei_not_supported, 0 ),
151 MAK_FUNC_N( pei_not_supported, 0 ),
152 #ifdef SIM_TOOLKIT
153 MAK_FUNC_0( tl_sim_file_update_ind, SIM_FILE_UPDATE_IND )
154 #else
155 MAK_FUNC_N( pei_not_supported, SIM_FILE_UPDATE_IND )
156 #endif /* else, #ifdef SIM_TOOLKIT */
157 };
158
159 #ifdef GPRS
160 LOCAL const T_FUNC ll_table[] = {
161 MAK_FUNC_N( pei_not_supported, 0 ),
162 MAK_FUNC_N( pei_not_supported, 0 ),
163 MAK_FUNC_N( pei_not_supported, 0 ),
164 MAK_FUNC_N( pei_not_supported, 0 ),
165 MAK_FUNC_N( pei_not_supported, 0 ),
166 MAK_FUNC_N( pei_not_supported, 0 ),
167 MAK_FUNC_N( pei_not_supported, 0 ),
168 MAK_FUNC_N( pei_not_supported, 0 ),
169 MAK_FUNC_0( for_ll_unitready_ind, LL_UNITREADY_IND ),
170 MAK_FUNC_N( pei_not_supported, 0 ),
171 MAK_FUNC_N( pei_not_supported, 0 ),
172 MAK_FUNC_0( for_ll_unitdata_ind, LL_UNITDATA_IND )
173 };
174
175 LOCAL const T_FUNC gmmsms_table[] = {
176 MAK_FUNC_0( cp_gmmsms_reg_state_cnf, GMMSMS_REG_STATE_CNF )
177 };
178 #endif /* #ifdef GPRS */
179
180 #ifdef FF_EM_MODE
181 LOCAL const T_FUNC em_table[] = {
182 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x00 */
183 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x01 */
184 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x02 */
185 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x03 */
186 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x04 */
187 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x05 */
188 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x06 */
189 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x07 */
190 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x08 */
191 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x09 */
192 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x0A */
193 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x0B */
194 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x0C */
195 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x0D */
196 MAK_FUNC_N (pei_not_supported , 0 ), /* 0x0E */
197 MAK_FUNC_0 (sms_em_sms_event_req, EM_SMS_EVENT_REQ) /* 0x0F */
198 };
199 #endif /* #ifdef FF_EM_MODE */
200
201 /*
202 +--------------------------------------------------------------------+
203 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
204 | STATE : code ROUTINE : pei_primitive |
205 +--------------------------------------------------------------------+
206
207 PURPOSE : Process protocol specific primitive.
208
209 */
210
211 LOCAL SHORT pei_primitive (void * ptr)
212 {
213 T_PRIM *prim = ptr;
214
215 /*
216 * | | |
217 * MNSMS SIM EM UPLINK
218 * | | |
219 * +-----v----------v-----v----+
220 * | |
221 * | SMS |
222 * | |
223 * +-------------^-------------+
224 * |
225 * MMSMS/LLC DOWNLINK
226 * |
227 *
228 */
229
230 TRACE_FUNCTION ("pei_primitive()");
231
232 if (prim NEQ NULL)
233 {
234 ULONG opc = prim->custom.opc;
235 USHORT n;
236 const T_FUNC *table;
237
238 VSI_PPM_REC ((T_PRIM_HEADER*)prim, __FILE__, __LINE__);
239
240 PTRACE_IN (opc);
241
242 switch (SAP_NR(opc))
243 {
244 case SAP_NR(MNSMS_UL): table = mnsms_table; n = TAB_SIZE ( mnsms_table); break;
245 case SAP_NR(MMSMS_DL): table = mmsms_table; n = TAB_SIZE ( mmsms_table); break;
246 case SAP_NR(SIM_UL): table = sim_table; n = TAB_SIZE ( sim_table); break;
247 #ifdef GPRS
248 case LL_DL: table = ll_table; n = TAB_SIZE ( ll_table); break;
249 case GMMSMS_DL: table = gmmsms_table; n = TAB_SIZE (gmmsms_table); break;
250 #endif /* #ifdef GPRS */
251 #ifdef FF_EM_MODE
252 case EM_Ul: table = em_table; n = TAB_SIZE (em_table) ; break;
253 #endif /* #ifdef FF_EM_MODE */
254 default : table = NULL; n = 0; break;
255 }
256
257 if (table != NULL )
258 {
259 if (PRIM_NR(opc) < n)
260 {
261 table += PRIM_NR(opc);
262 #ifdef PALLOC_TRANSITION
263 P_SDU(prim) = table->soff ? (T_sdu*) (((char*)&prim->data) + table->soff) : 0;
264 #ifndef NO_COPY_ROUTING
265 P_LEN(prim) = table->size + sizeof (T_PRIM_HEADER);
266 #endif /* NO_COPY_ROUTING */
267 #endif /* PALLOC_TRANSITION */
268 JUMP (table->func) (P2D(prim));
269 }
270 else
271 {
272 pei_not_supported (P2D(prim));
273 }
274 return PEI_OK;
275 }
276
277 /*
278 * Primitive is no GSM Primitive
279 * then forward to the environment
280 */
281
282 #ifdef GSM_ONLY
283 PFREE (P2D(prim))
284
285 return PEI_ERROR;
286 #else
287 if (opc & SYS_MASK)
288 vsi_c_primitive (VSI_CALLER prim);
289 else
290 {
291 PFREE (P2D(prim));
292 return PEI_ERROR;
293 }
294 #endif /* else, #ifdef GSM_ONLY */
295 }
296 return PEI_OK;
297 }
298
299 /*
300 +--------------------------------------------------------------------+
301 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
302 | STATE : code ROUTINE : pei_not_supported |
303 +--------------------------------------------------------------------+
304
305 PURPOSE : An unsupported primitive is received.
306
307 */
308
309 static void pei_not_supported (void *data)
310 {
311 TRACE_FUNCTION ("pei_not_supported()");
312
313 PFREE (data);
314 }
315
316
317 /*
318 +--------------------------------------------------------------------+
319 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
320 | STATE : code ROUTINE : pei_init |
321 +--------------------------------------------------------------------+
322
323 PURPOSE : Initialize Protocol Stack Entity
324
325 */
326
327 LOCAL SHORT pei_init (T_HANDLE handle)
328 {
329 sms_handle = handle;
330
331 TRACE_FUNCTION ("pei_init()");
332
333 #ifdef TI_PS_HCOMM_CHANGE
334 if (!cl_hcom_all_handles_open())
335 {
336 return PEI_ERROR;
337 }
338 #else /* for hCommHandles backward compatibility */
339 if (hCommMMI < VSI_OK)
340 {
341 /*
342 * Open MMI (Layer 4)
343 */
344
345 if ((hCommMMI = vsi_c_open (VSI_CALLER ACI_NAME)) < VSI_OK)
346 return PEI_ERROR;
347 }
348
349 if (hCommMM < VSI_OK)
350 {
351 if ((hCommMM = vsi_c_open (VSI_CALLER MM_NAME)) < VSI_OK)
352 return PEI_ERROR;
353 }
354
355 if (hCommSIM < VSI_OK)
356 {
357 if ((hCommSIM = vsi_c_open (VSI_CALLER SIM_NAME)) < VSI_OK)
358 return PEI_ERROR;
359 }
360 #endif /* TI_PS_HCOMM_CHANGE */
361 #if defined (GPRS)
362 /*
363 * Open LLC for GPRS GSMS handling
364 */
365 if (hCommLLC < VSI_OK)
366 {
367 if ((hCommLLC = vsi_c_open (VSI_CALLER LLC_NAME)) < VSI_OK)
368 return PEI_ERROR;
369 }
370 /*
371 * Open GMM for GPRS registration inquiry
372 */
373 if (hCommGMM < VSI_OK)
374 {
375 if ((hCommGMM = vsi_c_open (VSI_CALLER GMM_NAME)) < VSI_OK)
376 return PEI_ERROR;
377 }
378 #endif /* GPRS */
379
380 /*
381 * Initialize data base
382 */
383 cp_init ();
384 rl_init ();
385 tl_init ();
386 for_init_sms ();
387 pcm_Init ();
388
389 ccd_init ();
390
391 #ifdef FF_EM_MODE
392 em_init_sms_event_trace();
393 #endif /* #ifdef FF_EM_MODE */
394
395 return PEI_OK;
396 }
397
398 /*
399 +--------------------------------------------------------------------+
400 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
401 | STATE : code ROUTINE : pei_timeout |
402 +--------------------------------------------------------------------+
403
404 PURPOSE : Process timeout
405
406 */
407
408 LOCAL SHORT pei_timeout (USHORT index)
409 {
410 tim_exec_timeout (index);
411 return PEI_OK;
412 }
413
414 #ifdef _SIMULATION_
415 /*
416 +--------------------------------------------------------------------+
417 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
418 | STATE : code ROUTINE : pei_exit |
419 +--------------------------------------------------------------------+
420
421 PURPOSE : Close Resources and terminate
422
423 */
424
425 LOCAL SHORT pei_exit (void)
426 {
427 TRACE_FUNCTION ("pei_exit()");
428
429 /*
430 * clean up communication
431 */
432 #ifdef TI_PS_HCOMM_CHANGE
433 #else /* for hCommHandles backward compatibility */
434 vsi_c_close (VSI_CALLER hCommMMI);
435 hCommMMI = VSI_ERROR;
436
437 vsi_c_close (VSI_CALLER hCommMM);
438 hCommMM = VSI_ERROR;
439
440 vsi_c_close (VSI_CALLER hCommSIM);
441 hCommSIM = VSI_ERROR;
442 #endif /* TI_PS_HCOMM_CHANGE */
443 #ifdef GPRS
444 vsi_c_close (VSI_CALLER hCommLLC);
445 hCommLLC = VSI_ERROR;
446
447 vsi_c_close (VSI_CALLER hCommGMM);
448 hCommGMM = VSI_ERROR;
449 #endif /* #ifdef GPRS */
450
451 return PEI_OK;
452 }
453 #endif /* _SIMULATION_ */
454
455 /*
456 +--------------------------------------------------------------------+
457 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
458 | STATE : code ROUTINE : pei_config |
459 +--------------------------------------------------------------------+
460
461 PURPOSE : Dynamic Configuration
462
463 */
464
465 #ifndef NCONFIG
466 LOCAL const KW_DATA kwtab[] = {
467 SMS_CONF_STRING_PAUSE, SMS_CONF_EVENT_PAUSE,
468 SMS_CONF_STRING_RESUME, SMS_CONF_EVENT_RESUME,
469 "", 0
470 };
471 #endif /* #ifndef NCONFIG */
472
473 #if !defined(NTRACE) && !defined(NCONFIG)
474 GLOBAL const KW_DATA partab[] = {
475 TC1M_NAME, TC1M,
476 TR1M_NAME, TR1M,
477 TR2M_NAME, TR2M,
478 TRAM_NAME, TRAM,
479 TLCT_NAME, TLCT,
480 TMMS_NAME, TMMS,
481 "", 0
482 };
483 #endif /* #if !defined(NTRACE) && !defined(NCONFIG) */
484
485 /* Implements Measure#36 */
486 #ifndef NCONFIG
487 LOCAL SHORT pei_config (T_PEI_CONFIG inString)
488 {
489 #ifndef NCONFIG
490 char * s = inString;
491 char * keyw;
492 char * val [10];
493
494 GET_INSTANCE_DATA;
495
496 TRACE_FUNCTION ("pei_config()");
497
498 TRACE_FUNCTION (s);
499
500 tok_init(s);
501
502 /*
503 * Parse next keyword and number of variables
504 */
505 while ((tok_next(&keyw,val)) NEQ TOK_EOCS)
506 {
507 switch ((tok_key((KW_DATA *)kwtab,keyw)))
508 {
509 case TOK_NOT_FOUND:
510 TRACE_ERROR ("[PEI_CONFIG]: Illegal Keyword");
511 break;
512
513 case SMS_CONF_EVENT_PAUSE:
514 TRACE_EVENT("SMS_CONF_EVENT_PAUSE");
515 tl_pause();
516 break;
517 case SMS_CONF_EVENT_RESUME:
518 TRACE_EVENT("SMS_CONF_EVENT_RESUME");
519 /* tl_resume(sms_data); */
520
521 GET_MO_INSTANCE(sms_data);
522 /*
523 * TL state transition TL_ESTABLISH
524 * EST state transition EST_SMMA
525 * MMI state transition MMI_RESUME
526 *
527 */
528 SET_STATE (STATE_MMI, MMI_RESUME);
529 SET_STATE (STATE_EST, EST_SMMA);
530 SMS_INST_SET_STATE (STATE_TL, TL_ESTABLISH);
531 /*
532 * 1st shot
533 */
534 SMS_INST.retrans = FALSE;
535 /*
536 * establish connection
537 */
538 tl_establish_connection(FALSE);
539 break;
540 default:
541 break;
542 }
543 }
544 #endif /* #ifndef NCONFIG */
545
546 return PEI_OK;
547 }
548 #endif /* NCONFIG */
549
550
551 /*
552 +--------------------------------------------------------------------+
553 | PROJECT : GSM-PS (6147) MODULE : SMS_PEI |
554 | STATE : code ROUTINE : sms_pei_config |
555 +--------------------------------------------------------------------+
556
557 PURPOSE : Dynamic Configuration
558
559 */
560 /* Implements Measure#36 */
561 #ifndef NCONFIG
562 GLOBAL SHORT sms_pei_config ( char * inString, char * dummy )
563 {
564 pei_config ( inString );
565
566 return PEI_OK;
567 }
568 #endif /* NCONFIG */
569
570
571 /*
572 +--------------------------------------------------------------------+
573 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
574 | STATE : code ROUTINE : pei_monitor |
575 +--------------------------------------------------------------------+
576
577 PURPOSE : Monitoring of physical Parameters
578
579 */
580
581 LOCAL SHORT pei_monitor (void ** monitor)
582 {
583 TRACE_FUNCTION ("pei_monitor()");
584
585 /* Implements Measure#32: Row 20 */
586
587 * monitor = &sms_mon;
588
589 return PEI_OK;
590 }
591
592 /*
593 +--------------------------------------------------------------------+
594 | PROJECT : GSM-PS (8410) MODULE : SMS_PEI |
595 | STATE : code ROUTINE : pei_create |
596 +--------------------------------------------------------------------+
597
598 PURPOSE : Create the Protocol Stack Entity
599
600 */
601
602 GLOBAL SHORT sms_pei_create (T_PEI_INFO **info)
603 {
604 static const T_PEI_INFO pei_info =
605 {
606 "SMS",
607 {
608 pei_init,
609 #ifdef _SIMULATION_
610 pei_exit,
611 #else
612 NULL,
613 #endif
614 pei_primitive,
615 pei_timeout,
616 NULL, /* no signal function */
617 NULL, /* no run function */
618 /* Implements Measure#36 */
619 #ifdef NCONFIG
620 NULL, /* no pei_config function */
621 #else /* not NCONFIG */
622 pei_config,
623 #endif /* NCONFIG */
624 pei_monitor,
625 },
626 #if defined (GPRS)
627 1792, /* Stack Size */
628 #else
629 #if defined (FAX_AND_DATA)
630 1792, /* Stack Size */
631 #else
632 1500, /* Stacksize */
633 #endif
634 #endif
635 10, /* Queue Entries */
636 135, /* Priority */
637 MAX_SMS_TIMER*MAX_SMS_CALLS, /* number of timer */
638 0x03|PRIM_NO_SUSPEND /* flags */
639 };
640
641 TRACE_FUNCTION ("pei_create()");
642
643 /*
644 * Close Resources if open
645 */
646
647 #ifdef _SIMULATION_
648 if (first_access)
649 first_access = FALSE;
650 else
651 pei_exit ();
652 #endif
653
654 /*
655 * Export startup configuration data
656 */
657
658 *info = (T_PEI_INFO *)&pei_info;
659
660 return PEI_OK;
661 }
662
663 #endif /* #ifndef SMS_PEI_C */