FreeCalypso > hg > fc-tourmaline
comparison src/g23m-aci/aci/psa_mm.h @ 1:fa8dc04885d8
src/g23m-*: import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:25:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:4e78acac3d88 | 1:fa8dc04885d8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_MM | |
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 : Definitions for the protocol stack adapter | |
18 | Mobility Management ( MM ) | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef PSA_MM_H | |
23 #define PSA_MM_H | |
24 | |
25 | |
26 /*==== CONSTANTS ==================================================*/ | |
27 #define VLD_PLMN (0x01) /* marks a valid PLMN */ | |
28 #define INVLD_PLMN (0xFF) /* marks an invalid PLMN */ | |
29 #define INVLD_TZ (0xFF) /* marks an invalid time zone */ | |
30 | |
31 #define DEF_REG_MODE (MODE_AUTO) /* default registration mode */ | |
32 | |
33 #define TEST_STR_LEN (80) /* maximum length of test parameter string */ | |
34 | |
35 #define NO_ENTRY (-1) /* not a valid entry */ | |
36 | |
37 typedef enum /* registration status */ | |
38 { | |
39 NO_VLD_RS = 0, /* not a valid registration status */ | |
40 RS_NO_SRV, /* registration status no service */ | |
41 RS_LMTD_SRV, /* registration status limited service */ | |
42 RS_FULL_SRV /* registration status full service */ | |
43 } T_MM_RGST; | |
44 | |
45 /*==== TYPES ======================================================*/ | |
46 | |
47 /* | |
48 * Compare this with the similiar struct T_pnn in psa_sim.h | |
49 */ | |
50 typedef struct _T_pnn_name | |
51 { | |
52 T_plmn plmn; /* serving network PLMN */ | |
53 USHORT lac; /* serving network LAC */ | |
54 UBYTE long_len; /* length of operator long name */ | |
55 UBYTE long_ext_dcs; /* octet 3 of IEI */ | |
56 UBYTE long_name [MAX_LONG_OPER_LEN-1]; /* long name for operator */ | |
57 UBYTE shrt_len; /* length of operator short name */ | |
58 UBYTE shrt_ext_dcs; /* octet 3 of IEI */ | |
59 UBYTE shrt_name [MAX_SHRT_OPER_LEN-1]; /* short name for operator */ | |
60 UBYTE pnn_rec_num; /* the PNN record this data is read from */ | |
61 struct _T_pnn_name* next; /* pointer to next pnn in linked list */ | |
62 } T_pnn_name; | |
63 | |
64 typedef struct T_COPN_VAR | |
65 { | |
66 SHORT Start_Count; | |
67 }T_COPN_VAR; | |
68 | |
69 typedef struct MMShrdParm | |
70 { | |
71 T_OWN owner; /* identifies the used set */ | |
72 T_plmn slctPLMN; /* selected PLMN */ | |
73 USHORT srchRslt; /* network search result */ | |
74 USHORT deregCs; /* deregistration cause from NW */ | |
75 UBYTE nrgCs; /* deregistration cause from ME */ | |
76 UBYTE regStat; /* registration status */ | |
77 T_ACI_COPS_MOD COPSmode; /* registration mode in COPS type */ | |
78 UBYTE regMode; /* registration mode */ | |
79 BOOL regModeAutoBack; /* TRUE if AT+COPS=4 and manual mode */ | |
80 T_plmn PLMNLst[MAX_PLMN_ID]; /* list of found PLMN */ | |
81 USHORT LACLst[MAX_PLMN_ID]; /* LAC list (for EONS)*/ | |
82 UBYTE FRBLst[MAX_PLMN_ID]; /* list of forbidden status */ | |
83 T_plmn usedPLMN; /* PLMN in use */ | |
84 T_plmn ActingHPLMN; /* Acting HPLMN*/ | |
85 U16 lac; /* current lac */ | |
86 U16 cid; /* current cell id */ | |
87 T_ACI_CREG_STAT creg_status; /* current registration status GSM */ | |
88 UBYTE tz; /* time zone */ | |
89 T_pnn_name PNNLst; /* PLMN Network Name Linked List (for EONS)*/ | |
90 BYTE pnn_nr[MAX_PLMN_ID]; /* PLMN list and PNN record number assocation */ | |
91 BYTE pnn_read_cnt; /* counter for PNN SIM reading */ | |
92 UBYTE regModeBeforeAbort; /* This variable is added to keep track of actual registration mode. | |
93 This is used to reset mode in case AT+COPS command is aborted*/ | |
94 T_ACI_COPS_MOD COPSmodeBeforeAbort; | |
95 T_COPN_VAR COPN_VAR[OWN_SRC_MAX]; /* holds start count for various sources */ | |
96 } T_MM_SHRD_PRM; | |
97 | |
98 /*==== PROTOTYPES =================================================*/ | |
99 | |
100 #if !defined (DTI)|| !defined(GPRS) | |
101 GLOBAL SHORT psaMM_Registrate ( void ); | |
102 GLOBAL SHORT psaMM_DeRegistrate( void ); | |
103 GLOBAL SHORT psaMM_NetSrch ( void ); | |
104 GLOBAL SHORT psaMM_NetSel ( void ); | |
105 GLOBAL SHORT psaMM_SetRegMode ( UBYTE mode ); | |
106 | |
107 #endif /* !DTI */ | |
108 | |
109 void psaMM_Init ( void ); | |
110 void psaMM_CpyPLMNLst ( T_plmn * pPLMNLst, UBYTE * pFRBLst, USHORT * pLACLst ); | |
111 void psaMM_ClrPLMNLst ( void ); | |
112 | |
113 #ifdef TRACING | |
114 void psaMM_shrPrmDump ( void ); | |
115 #endif /* TRACING */ | |
116 | |
117 /*==== EXPORT =====================================================*/ | |
118 | |
119 #ifdef PSA_MMF_C | |
120 | |
121 GLOBAL T_MM_SHRD_PRM mmShrdPrm; | |
122 | |
123 #else | |
124 | |
125 EXTERN T_MM_SHRD_PRM mmShrdPrm; | |
126 | |
127 #endif /* PSA_MMF_C */ | |
128 | |
129 | |
130 | |
131 #endif /* PSA_MM_H */ | |
132 | |
133 /*==== EOF =======================================================*/ |