FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-aci/aci/psa_gmm.h @ 775:eedbf248bac0
gsm-fw/g23m-aci subtree: initial import from LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 12 Oct 2014 01:45:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
774:40a721fd9854 | 775:eedbf248bac0 |
---|---|
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 : Definitions for the protocol stack adapter | |
18 | GPRS Mobility Management ( GMM ). | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifdef GPRS | |
23 | |
24 #ifndef PSA_GMM_H | |
25 #define PSA_GMM_H | |
26 | |
27 | |
28 /************************************************************************ | |
29 ** GMM PRIMITIVE TRACE ** | |
30 ************************************************************************/ | |
31 | |
32 #define GMM_PRIMITIVE_TRACES GMM_PRIMITIVE_TRACES | |
33 //#define GMM_PRIMITIVE_TRACES_ADVANCED GMM_PRIMITIVE_TRACES_ADVANCED | |
34 | |
35 /************************************************************************ | |
36 ** switching on of and mode over above mentioned defines ** | |
37 ** ----------------------------------------------------- ** | |
38 ** advanced means: a short string output of the parameter ** | |
39 ** ** | |
40 ** without advanced: only numbers ** | |
41 ************************************************************************/ | |
42 | |
43 #ifdef GMM_PRIMITIVE_TRACES_ADVANCED | |
44 | |
45 #define PARAMETER_STRING_1 "%s: %s" | |
46 #define PARAMETER_STRING_2 "%s: %s %s" | |
47 | |
48 extern char* dbg_attachType(UBYTE attach_type); | |
49 extern char* dbg_detachType(UBYTE detach_type); | |
50 extern char* dbg_mobileClass(UBYTE mobile_class); | |
51 extern char* dbg_searchRunning(UBYTE search_running) | |
52 extern char* dbg_cellState(UBYTE cell_state) | |
53 | |
54 #else | |
55 | |
56 # define PARAMETER_STRING_1 "%d" | |
57 # define PARAMETER_STRING_2 "%d %d" | |
58 | |
59 # define dbg_attachType | |
60 # define dbg_detachType | |
61 # define dbg_mobileClass | |
62 # define dbg_searchRunning | |
63 # define dbg_cellState | |
64 | |
65 #endif /* GMM_PRIMITIVE_TRACES_ADVANCED */ | |
66 | |
67 #if defined GMM_PRIMITIVE_TRACES | |
68 # define GMM_PRIM_TRACE_1(a,b) TRACE_EVENT_P1(PARAMETER_STRING_1, b) | |
69 # define GMM_PRIM_TRACE_2(a,b,c) TRACE_EVENT_P2(PARAMETER_STRING_2, b, c) | |
70 | |
71 #elif defined GMM_PRIMITIVE_TRACES_ADVANCED | |
72 # define GMM_PRIM_TRACE_1(a,b) TRACE_EVENT_P2(PARAMETER_STRING_1, a, b) | |
73 # define GMM_PRIM_TRACE_2(a,b,c) TRACE_EVENT_P3(PARAMETER_STRING_2, a, b, c) | |
74 | |
75 #else | |
76 # define GMM_PRIM_TRACE_1(a,b) | |
77 # define GMM_PRIM_TRACE_2(a,b,c) | |
78 #endif /* GMM_PRIMITIVE_TRACES || GMM_PRIMITIVE_TRACES_ADVANCED */ | |
79 | |
80 /************************************************************************ | |
81 ** GMM PRIMITIVE TRACE ** | |
82 ************************************************************************/ | |
83 | |
84 | |
85 /*==== CONSTANTS ==================================================*/ | |
86 #define INVLD_PLMN (0xFF) /* marks an invalid PLMN */ | |
87 #define ATTACH_TYPE_DETACHED 0 | |
88 | |
89 typedef enum /* PSA notification events */ | |
90 { | |
91 GMM_NTF_ATT_CNF = 0, /* the attach was successful */ | |
92 GMM_NTF_ATT_REJ, /* the attach has failed */ | |
93 GMM_NTF_DET_CNF, /* the network confirmed the detach */ | |
94 GMM_NTF_DET_IND, /* A network initiated detach */ | |
95 GMM_NTF_PLMN_IND, /* indicate a PLMN list */ | |
96 GMM_NTF_SUSP_IND, /* */ | |
97 GMM_NTF_RES_IND, /* */ | |
98 GMM_NTF_INFO_IND, /* transmit information */ | |
99 GMM_NTF_MAX /* maximum MM notification event */ | |
100 | |
101 } T_GMM_NTF; /* finished */ | |
102 | |
103 typedef enum /* test parameter identifier */ | |
104 { | |
105 GMM_OFF = 0, /* the */ | |
106 GMM_DETACHED, /* detached */ | |
107 GMM_ATTACHED, /* attached */ | |
108 GMM_ATTACHING, /* will be attached */ | |
109 GMM_DETACHING, /* will be detached */ | |
110 GMM_SUSPENTED /* suspented */ | |
111 | |
112 } T_GMM_ATTACH_STATE; | |
113 | |
114 /*==== TYPES ======================================================*/ | |
115 | |
116 typedef struct GMMShrdParm | |
117 { | |
118 /* state parameter */ | |
119 UBYTE mobile_class; /* 0: A 1: B 2: C 3: CG 4: CC */ | |
120 UBYTE service_mode; | |
121 | |
122 /* set parameter */ | |
123 UBYTE requested_mobile_class; /* 0: A 1: B 2: C 3: CG 4: CC */ | |
124 | |
125 /* answer parameter */ | |
126 UBYTE gprs_status[MAX_PLMN_ID]; /* 0 - 2: which the PLMN supports */ | |
127 UBYTE last_attach_type; | |
128 UBYTE current_attach_type; | |
129 UBYTE requested_attach_type; | |
130 | |
131 /* GPRS registration status parameters */ | |
132 T_CGREG_STAT cgreg_stat; /* +CGREG status */ | |
133 T_P_CGREG_STAT p_cgreg_stat; /* %CGREG status */ | |
134 USHORT lac; /* current cell coordinates */ | |
135 USHORT cid; | |
136 T_ACI_P_CREG_GPRS_IND gprs_indicator; /* %CREG gprs indicator */ | |
137 UBYTE gprs_call_killer; /* This paramter indicates whether the detach is initiated | |
138 by user / not. */ | |
139 UBYTE rt; | |
140 } T_GMM_SHRD_PRM; | |
141 | |
142 /*==== PROTOTYPES =================================================*/ | |
143 | |
144 EXTERN void psaGMM_Init (UBYTE auto_attach, UBYTE auto_detach, UBYTE mobile_class ); | |
145 EXTERN void psaGMM_NetworkRegistrationStatus ( ULONG prim, void* para); | |
146 | |
147 EXTERN void psaGMM_Attach ( UBYTE mobile_class, UBYTE attach_type, UBYTE service_mode ); | |
148 EXTERN void psaGMM_Detach ( UBYTE detach_type ); | |
149 EXTERN void psaGMM_Net_Req ( void ); | |
150 EXTERN void psaGMM_Plmn_res ( UBYTE mobile_class, UBYTE attach_type, T_plmn *plmn ); | |
151 EXTERN void psaGMM_Plmn_mode_req ( UBYTE net_selection_mode ); | |
152 EXTERN void psaGMM_Config_req( UBYTE cipher_on, UBYTE tlli_handling ); | |
153 | |
154 /*==== EXPORT =====================================================*/ | |
155 | |
156 #ifdef PSA_GMMF_C | |
157 | |
158 GLOBAL T_GMM_SHRD_PRM gmmShrdPrm; | |
159 | |
160 GLOBAL UBYTE default_mobile_class = GMMREG_CLASS_BG; | |
161 GLOBAL T_CGAATT_ATTACH_MODE automatic_attach_mode; | |
162 GLOBAL T_CGAATT_DETACH_MODE automatic_detach_mode; | |
163 | |
164 #else | |
165 | |
166 EXTERN T_GMM_SHRD_PRM gmmShrdPrm; | |
167 | |
168 EXTERN UBYTE default_mobile_class; | |
169 EXTERN T_CGAATT_ATTACH_MODE automatic_attach_mode; | |
170 EXTERN T_CGAATT_DETACH_MODE automatic_detach_mode; | |
171 | |
172 #endif /* PSA_GMMF_C */ | |
173 | |
174 #endif /* PSA_GMM_H */ | |
175 | |
176 #endif /* GPRS */ | |
177 /*==== EOF =======================================================*/ |