comparison src/g23m-gprs/gmm/gmm_em.h @ 183:219afcfc6250

src/g23m-gprs: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 Oct 2016 04:24:13 +0000
parents
children
comparison
equal deleted inserted replaced
182:f02d0a0e1849 183:219afcfc6250
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 : Engineering Mode (EM) Declarations + Macros
18 |
19 +-----------------------------------------------------------------------------
20 */
21
22
23 #ifndef GMM_EM_H
24 #define GMM_EM_H
25
26
27 #ifdef FF_EM_MODE
28 /*also defined in rr_em.h*/
29
30 /*
31 * buffer size has been chosen to store ten state events for now.
32 */
33 #define EM_GMM_BUFFER_SIZE 5
34
35 /*
36 * EM_MAX_GMM_EVENTS defines maximum number of event traces for the engineering
37 * mode. The number is increased by one to ensure that the event numbers
38 * defined in the corresponding document are the same as in the sources.
39 */
40 #define EM_MAX_GMM_EVENTS 2
41
42 /*
43 * The offset is used to indicate the source entity the event trace is from.
44 * L1/ALR = 0x00, DL = 0x2D, GRLC = 0x33, RR = 0x37, MM = 0x64, CC = 0x78,
45 * GMM=0xAA, GRR=0xAC, SS = 0xAF, SMS = 0xBE, SIM = E1
46 */
47 #define GMM_OFFSET 0xAA
48
49 #define TRACE_EVENT_EM_P8(s,a1,a2,a3,a4,a5,a6,a7,a8) TRACE_USER_CLASS_P8(TC_USER8,s,a1,a2,a3,a4,a5,a6,a7,a8)
50 #define GMM_EM_NULL_STATE 0x0
51 #define GMM_EM_DEREG_STATE 0x1
52 #define GMM_EM_REG_INIT_STATE 0x2
53 #define GMM_EM_REG_STATE 0x3
54 #define GMM_EM_RAU_INIT_STATE 0x4
55 #define GMM_EM_DEREG_INIT_STATE 0x5
56
57 #define GMM_EM_NORMAL_SRVC_SUBSTATE 0x0
58 #define GMM_EM_NO_CELL_SUBSTATE 0x1
59 #define GMM_EM_SUSPENDED_SUBSTATE 0x2
60 #define GMM_EM_ATTEMPT_TO_ATT_SUBSTATE 0x3
61 #define GMM_EM_ATT_NEEDED_SUBSTATE 0x4
62 #define GMM_EM_STATUS_IND_SUBSTATE 0x5
63 #define GMM_EM_IMSI_DETACH_INIT_SUBSTATE 0x6
64 #define GMM_EM_ATTEMPT_TO_UPDATE_MM_SUBSTATE 0x7
65 #define GMM_EM_ATTEMPT_TO_UPDATE_SUBSTATE 0x8
66 #define GMM_EM_UPDATE_NEEDED_SUBSTATE 0x9
67 #define GMM_EM_POWER_OFF_SUBSTATE 0xA
68
69 #define GMM_V_1 (1+GMM_OFFSET)
70
71 #define TRACE_EVENT_EM_P2(s,a1,a2) TRACE_USER_CLASS_P2(TC_USER8,s,a1,a2)
72 #define GMM_V_1 (1+GMM_OFFSET)
73
74 EXTERN void em_gmm_pco_trace_req ( T_EM_PCO_TRACE_REQ *em_pco_trace_req);
75
76 EXTERN BOOL gmm_v[EM_MAX_GMM_EVENTS];
77
78 EXTERN UBYTE em_gmm_event_buffer[EM_GMM_BUFFER_SIZE];
79 EXTERN UBYTE em_gmm_buffer_write;
80
81 EXTERN void em_gmm_sc_gprs_info_req ( T_EM_SC_GPRS_INFO_REQ *em_sc_gprs_info_req);
82 EXTERN void em_gmm_sc_gprs_info_cnf ( T_EM_SC_GPRS_INFO_CNF *em_sc_gprs_info_cnf);
83 EXTERN void em_gmm_info_req ( T_EM_GMM_INFO_REQ *em_gmm_info_req);
84 EXTERN void em_gmm_grlc_info_cnf ( T_EM_GRLC_INFO_CNF *em_grlc_info_cnf);
85 EXTERN void em_gmm_grlc_info_req ( T_EM_GRLC_INFO_REQ *em_grlc_info_req);
86
87 #define EM_GMM_SET_STATE(s) \
88 {\
89 UBYTE gmm_main_state, gmm_sub_state;\
90 em_gmm_map_state(s,&gmm_main_state,&gmm_sub_state);\
91 if (gmm_v[1])\
92 {\
93 gmm_v[1] = em_write_buffer_4 (GMM_V_1,gmm_main_state,gmm_sub_state);\
94 } \
95 }
96 EXTERN void em_gmm_throughput_info_req ( T_EM_THROUGHPUT_INFO_REQ *em_throughput_info_req);
97 EXTERN void em_gmm_throughput_info_cnf ( T_EM_THROUGHPUT_INFO_CNF *em_throughput_info_cnf);
98 EXTERN void em_gmm_grr_event_req ( T_EM_GRR_EVENT_REQ *em_grr_event_req);
99 EXTERN void em_gmm_grlc_event_req( T_EM_GRLC_EVENT_REQ *em_grlc_event_req);
100 EXTERN void em_gmm_data_ind ( T_EM_DATA_IND *em_data_ind);
101
102
103 EXTERN void em_init_gmm_event_trace (void);
104
105 #ifdef OPTION_MULTITHREAD
106 #define em_write_buffer_4 _ENTITY_PREFIXED(em_write_buffer_4)
107 #define check_write_index _ENTITY_PREFIXED(check_write_index)
108 #endif /*OPTION_MULTITHREAD*/
109
110 EXTERN UBYTE em_write_buffer_4 (UBYTE event_no, UBYTE value1, UBYTE value2);
111
112 EXTERN void em_gmm_event_req (T_EM_GMM_EVENT_REQ *em_gmm_event_req);
113
114
115 #else
116 #define EM_GMM_SET_STATE /* Event 1*/
117
118 #endif /* FF_EM_MODE */
119
120 #endif /* GMM_EM_H */