FreeCalypso > hg > fc-magnetite
comparison src/g23m-gprs/grr/grr_tcf.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 : GPRS (8441) | |
4 | Modul : GRR | |
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 service TC. | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef GRR_TCF_H | |
22 #define GRR_TCF_H | |
23 | |
24 /* | |
25 * used in tc_gen_rand | |
26 */ | |
27 #define S_VALUE_RESERVED 0xff | |
28 | |
29 typedef enum | |
30 { | |
31 R_BUILD_2PHASE_ACCESS | |
32 } T_REASON_BUILD; | |
33 | |
34 typedef enum | |
35 { | |
36 SRC_TBF_INFO_RE_ASSIGN, /* channel reassignment */ | |
37 SRC_TBF_INFO_IMM_ASSIGN, /* immediate assignment */ | |
38 SRC_TBF_INFO_UL_ASSIGN /* uplink assignment */ | |
39 } T_SRC_TBF_INFO; | |
40 | |
41 typedef enum | |
42 { | |
43 E_ACCESS_REJ_NULL, /* unforeseen mesage content*/ | |
44 E_ACCESS_REJ_IGNORE, /* wrong address, faulty message */ | |
45 E_ACCESS_REJ_WAIT, /* valid reject with wait indication */ | |
46 E_ACCESS_REJ_NO_WAIT, /* valid reject without wait indication */ | |
47 E_ACCESS_REJ_ERROR_DUMMY | |
48 } T_EVAL_ACCESS_REJ; | |
49 | |
50 typedef enum | |
51 { | |
52 E_UL_ASSIGN_NULL, /* unforeseen mesage content */ | |
53 E_UL_ASSIGN_SB_WITHOUT_TBF, /* Single Block without TBF Establishment */ | |
54 E_UL_ASSIGN_SB_2PHASE_ACCESS, /* Allocation for 2 Phase of 2_Phase-Access */ | |
55 E_UL_ASSIGN_DYNAMIC, /* Dynamic Allocation */ | |
56 E_UL_ASSIGN_FIXED, /* Fixed Allocation */ | |
57 E_UL_ASSIGN_RE_ASSIGN, | |
58 E_UL_ASSIGN_ERROR_RA, /* because of to many PDCH assigned */ | |
59 E_UL_ASSIGN_IGNORE /*Ignore UL Assignment*/ | |
60 } T_EVAL_UL_ASSIGN; | |
61 | |
62 typedef enum | |
63 { | |
64 H_RA_CON_STOP_REQ, /* stop sending of packet access request */ | |
65 H_RA_CON_CONTINUE /* continue sending of packet access request */ | |
66 } T_HANDLE_RA_CON; | |
67 | |
68 typedef enum | |
69 { | |
70 E_DL_ASSIGN_IGNORE, /* no effect on current tbf */ | |
71 E_DL_ASSIGN_ERROR_RA, /* release and start random access procedure*/ | |
72 E_DL_ASSIGN, /* valid message */ | |
73 E_DL_ASSIGN_ABORT_DL | |
74 } T_EVAL_DL_ASSIGN; | |
75 | |
76 typedef enum | |
77 { | |
78 E_TS_IGNORE, /* no effect on current tbf(s) */ | |
79 E_TS_UL_REASSIG_NEW_DL, /* reassignment of uplink allocation and new downlink allocation*/ | |
80 E_TS_UL_REASSIG_DL_REASSIG, /* reassignment of uplink allocation and reassignment downlink allocation*/ | |
81 E_TS_NEW_UL_DL_REASSIG, /* new assignment of uplink allocation and reassignment downlink allocation*/ | |
82 E_TS_RECONFIG_ERROR_RA /* error in packet timeslot reconfigure */ | |
83 } T_EVAL_TS_RECONFIG; | |
84 | |
85 typedef enum | |
86 { | |
87 E_PDCH_REL_NULL, /* unforeseen mesage content, corrupt message */ | |
88 E_PDCH_REL_IGNORE, /* no effect to current tbf */ | |
89 E_PDCH_REL_RELEASE_DL, /* all timeslots for this tbf removed */ | |
90 E_PDCH_REL_RELEASE_UL, /* all timeslots for this tbf removed */ | |
91 E_PDCH_REL_RELEASE_BOTH,/* all timeslots for this tbf removed */ | |
92 E_PDCH_REL_RECONF, /* valid message */ | |
93 E_PDCH_REL_RELEASE_DL_RECONF_UL, /* all timeslots for DL tbf removed, UL reconfigured */ | |
94 E_PDCH_REL_RELEASE_UL_RECONF_DL, /* all timeslots for UL tbf removed DL reconfigured*/ | |
95 E_PDCH_REL_ERROR_DUMMY | |
96 } T_EVAL_PDCH_REL; | |
97 | |
98 | |
99 | |
100 | |
101 typedef enum | |
102 { | |
103 C_P_LEVEL_NULL, | |
104 C_P_LEVEL_SEND, | |
105 C_P_LEVEL_DO_NOT_SEND | |
106 } T_CHECK_P_LEVEL; | |
107 | |
108 | |
109 | |
110 typedef enum | |
111 { | |
112 CAC_OTHER, | |
113 CAC_T3170_EXPIRED | |
114 } T_CHECK_ACCESS_CAUSE; | |
115 | |
116 | |
117 #define SET_STATE_TC_PIM_AFTER_ACCESS_DISABLED( cell_has_changed, \ | |
118 enable_cause ) \ | |
119 { \ | |
120 tc_handle_new_cell( cell_has_changed, enable_cause ); \ | |
121 \ | |
122 SET_STATE( TC, TC_PIM ); \ | |
123 grr_data->tc.disable_class = CGRLC_DISABLE_CLASS_NULL; \ | |
124 } | |
125 | |
126 | |
127 EXTERN void tc_cgrlc_ul_tbf_res ( UBYTE tbf_mode, UBYTE prim_status ); | |
128 EXTERN void tc_cgrlc_dl_tbf_req ( void ); | |
129 EXTERN void tc_cgrlc_tbf_rel_req(UBYTE tbf_type,UBYTE rel_cause,ULONG rel_fn); | |
130 EXTERN void tc_cgrlc_access_status_req ( void ); | |
131 EXTERN void tc_send_control_msg_to_grlc ( void ); | |
132 EXTERN void tc_cgrlc_disable_req ( UBYTE prim_st ); | |
133 EXTERN void tc_cgrlc_tbf_rel_res ( UBYTE tbf_type ); | |
134 | |
135 EXTERN void tc_cgrlc_enable_req ( UBYTE queue_mode, | |
136 UBYTE cu_cause, | |
137 BOOL cell_has_changed, | |
138 UBYTE enable_cause ); | |
139 | |
140 | |
141 EXTERN void tc_check_access_is_needed ( T_CHECK_ACCESS_CAUSE cause ); | |
142 EXTERN void tc_send_tbf_rel ( T_TBF_TYPE ); | |
143 EXTERN void tc_send_tbf_release_req ( T_TBF_TYPE tbf_type, BOOL is_synchron ); | |
144 EXTERN void tc_deactivate_tbf ( T_TBF_TYPE ); | |
145 EXTERN void tc_send_polling_res (UBYTE poll_type_i,ULONG fn_i, UBYTE rrbp_i,UBYTE ctrl_ack_i ); | |
146 | |
147 | |
148 /*************************************************************+*/ | |
149 | |
150 | |
151 | |
152 | |
153 | |
154 EXTERN USHORT tc_gen_rand ( void ); | |
155 EXTERN USHORT tc_calc_req ( void ); | |
156 EXTERN T_CHECK_P_LEVEL tc_check_p_level ( void ); | |
157 EXTERN void tc_send_assign_req ( T_TBF_TYPE tbf_type_i ); | |
158 EXTERN void tc_send_pdch_rel ( UBYTE ts_available ); | |
159 EXTERN void tc_abort_tbf ( T_TBF_TYPE tbf_i ); | |
160 | |
161 | |
162 EXTERN void tc_build_res_req (T_U_RESOURCE_REQ *ptr2res_req, | |
163 T_REASON_BUILD reason_i, | |
164 T_SRC_TBF_INFO src_info_i ); | |
165 EXTERN T_EVAL_PDCH_REL tc_eval_pdch_rel ( UBYTE ); | |
166 EXTERN T_EVAL_UL_ASSIGN tc_eval_ul_assign ( void ); | |
167 EXTERN T_EVAL_DL_ASSIGN tc_eval_dl_assign ( void ); | |
168 EXTERN T_EVAL_ACCESS_REJ tc_eval_access_rej ( ULONG * t3172_value_i); | |
169 EXTERN void tc_send_ra_req ( void ); | |
170 EXTERN void tc_send_ra_stop_req ( void ); | |
171 EXTERN void tc_send_single_block ( void ); | |
172 EXTERN void tc_send_resource_request_p ( void ); | |
173 EXTERN T_HANDLE_RA_CON tc_handle_ra_con ( void ); | |
174 EXTERN void tc_init ( void ); | |
175 EXTERN void tc_handle_error_pim ( void ); | |
176 EXTERN void tc_handle_error_ra ( void ); | |
177 EXTERN void tc_activate_tbf ( T_TBF_TYPE ); | |
178 EXTERN void tc_start_timer_t3172 ( ULONG t3172_value_i ); | |
179 EXTERN void tc_handle_tbf_start( T_TBF_TYPE tbf_type ); | |
180 EXTERN void tc_prepare_handle_tbf_start( T_TBF_TYPE tbf_type, | |
181 UBYTE new_state, | |
182 UBYTE old_state ); | |
183 EXTERN void tc_calc_fa_bitmap (ULONG tbf_start, | |
184 UBYTE blks_or_blkps, | |
185 USHORT len, | |
186 UBYTE * ptr2_alloc_map, | |
187 T_p_fixed_alloc * ptr2_fix_alloc); | |
188 | |
189 //EXTERN void tc_handle_final_alloc (UBYTE final_allocation); | |
190 | |
191 EXTERN void tc_send_ul_repeat_alloc_req( void); | |
192 EXTERN USHORT tc_set_fa_bitmap( UBYTE ts_mask, T_FIX_ALLOC * ptr_alloc); | |
193 EXTERN T_EVAL_TS_RECONFIG tc_eval_ts_reconf ( void ); | |
194 EXTERN BOOL tc_set_hopping_par(T_freq_par *freq_par ); | |
195 EXTERN void tc_stop_timer_t3172 ( void ); | |
196 | |
197 EXTERN BOOL tc_store_ctrl_blk ( T_BLK_OWNER blk_owner, void *blk_struct ); | |
198 EXTERN BOOL tc_cancel_ctrl_blk ( T_BLK_OWNER blk_owner ); | |
199 EXTERN UBYTE* tc_set_start_ctrl_blk ( UBYTE *index ); | |
200 EXTERN T_BLK_INDEX tc_set_stop_ctrl_blk ( BOOL is_tx_success, | |
201 T_BLK_OWNER srch_owner, | |
202 T_BLK_INDEX start_idx ); | |
203 EXTERN void tc_set_stop_tc_ctrl_blk ( void ); | |
204 EXTERN void tc_set_stop_all_ctrl_blk ( void ); | |
205 | |
206 EXTERN void tc_stop_normal_burst_req ( void ); | |
207 | |
208 | |
209 EXTERN void tc_malloc_assign ( void ); | |
210 EXTERN void tc_mfree_assign ( BOOL restore_data ); | |
211 | |
212 EXTERN T_TIME tc_get_t3170_value(void); | |
213 | |
214 EXTERN T_MPHP_ASSIGNMENT_REQ * tc_set_freq (void); | |
215 | |
216 EXTERN void tc_call_disable_callback_func ( void ); | |
217 | |
218 | |
219 #endif /* !GRR_TCF_H */ |