FreeCalypso > hg > fc-magnetite
comparison src/g23m-gprs/grr/grr.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 | 390fec2ab72f |
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 entity GRR. | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 #ifndef GRR_H | |
21 #define GRR_H | |
22 | |
23 /* | |
24 * Start defintions from entity RR | |
25 */ | |
26 | |
27 /* | |
28 **************************************************************************** | |
29 * The following declarations shall be identical with the corresponding | |
30 * declarations located in RR. | |
31 **************************************************************************** | |
32 */ | |
33 | |
34 EXTERN UBYTE std; | |
35 EXTERN UBYTE rr_csf_get_radio_access_capability( T_ra_cap *ra_cap ); | |
36 EXTERN T_rf_cap* rr_csf_get_rf_capability ( void ); | |
37 #ifdef TI_PS_FF_QUAD_BAND_SUPPORT | |
38 #ifdef _SIMULATION_ | |
39 EXTERN void rr_csf_check_rfcap (UBYTE init); | |
40 #endif | |
41 #endif | |
42 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
43 EXTERN BOOL rr_get_support_for_emr ( void ); | |
44 #endif | |
45 | |
46 #define MAX_CLASSES 5 | |
47 | |
48 EXTERN const SHORT p_dcs [MAX_CLASSES]; | |
49 EXTERN const SHORT p_pcs [MAX_CLASSES]; | |
50 EXTERN const SHORT p_gsm [MAX_CLASSES]; | |
51 | |
52 #define MAX_PCL 32 | |
53 | |
54 EXTERN const UBYTE p_control_gsm [MAX_PCL]; | |
55 EXTERN const UBYTE p_control_dcs [MAX_PCL]; | |
56 EXTERN const UBYTE p_control_pcs [MAX_PCL]; | |
57 | |
58 typedef struct | |
59 { | |
60 USHORT l_f; | |
61 USHORT o_f; | |
62 UBYTE b_f[32]; | |
63 } T_f_range; | |
64 | |
65 typedef struct | |
66 { | |
67 UBYTE b_f[128]; | |
68 } T_LIST; | |
69 | |
70 EXTERN void for_create_channel_list ( T_f_range *f_range, | |
71 T_LIST *cha_list ); | |
72 | |
73 EXTERN void srv_merge_list ( T_LIST *target_list, | |
74 T_LIST *list ); | |
75 | |
76 EXTERN int srv_create_list ( T_LIST *list, | |
77 USHORT *channel_array, | |
78 USHORT size, | |
79 UBYTE start_with_zero, | |
80 USHORT start_index ); | |
81 | |
82 | |
83 #ifdef _TARGET_ | |
84 | |
85 EXTERN void srv_get_cell_alloc_list ( T_LIST *target_list ); | |
86 | |
87 #endif | |
88 | |
89 #define RX_QUAL_UNAVAILABLE 0xFF | |
90 | |
91 #ifdef FF_PS_RSSI | |
92 #define RX_ACCE_UNAVAILABLE 0xFF | |
93 EXTERN void RX_SetValue ( UBYTE new_value, UBYTE new_qual, UBYTE new_access); | |
94 #else | |
95 EXTERN void RX_SetValue ( UBYTE new_value ); | |
96 #endif | |
97 | |
98 /* | |
99 **************************************************************************** | |
100 * The above declarations shall be identical with the corresponding | |
101 * declarations located in RR. | |
102 **************************************************************************** | |
103 */ | |
104 | |
105 /* | |
106 * End defintions from entity RR | |
107 */ | |
108 | |
109 typedef struct /* T_MS_PWR_CAP */ | |
110 { | |
111 const SHORT *p; /* power class -> output power */ | |
112 const UBYTE *p_control; /* power control level -> output power */ | |
113 UBYTE ms_power; /* MS power class */ | |
114 SHORT pwr_offset; /* POWER_OFFSET */ | |
115 SHORT pwr_max; /* maximum nominal output power in the cell */ | |
116 SHORT pwr_min; /* minimum nominal output power in the cell */ | |
117 SHORT gamma_0; /* GAMMA 0 */ | |
118 UBYTE band_ind; /* indicates the used frequency band */ | |
119 } T_MS_PWR_CAP; | |
120 | |
121 /* | |
122 * defines the user of the vsi interface | |
123 */ | |
124 #define VSI_CALLER GRR_handle, | |
125 #define VSI_CALLER_SINGLE GRR_handle | |
126 | |
127 /* | |
128 * Macros | |
129 */ | |
130 #ifdef REL99 | |
131 #define MAX_PSI 9 /* Maximum number of PSIs: PSI1,2,3,3bis,3ter,4,5,8,13 */ | |
132 #else | |
133 #define MAX_PSI 7 /* Maximum number of PSIs: PSI1,2,3,3bis,4,5,13*/ | |
134 #endif | |
135 | |
136 #define ENCODE_OFFSET 0 | |
137 | |
138 /* | |
139 * Bit and byte length for encoding/decoding | |
140 */ | |
141 | |
142 #define BIT_UL_CTRL_BLOCK_MAC_HEADER 8 | |
143 #define BIT_UL_CTRL_BLOCK_CONTENTS 176 | |
144 #define BIT_UL_CTRL_BLOCK (BIT_UL_CTRL_BLOCK_MAC_HEADER+BIT_UL_CTRL_BLOCK_CONTENTS) | |
145 | |
146 #define BYTE_UL_CTRL_BLOCK (BIT_UL_CTRL_BLOCK/BITS_PER_BYTE) | |
147 | |
148 /* | |
149 * Constants | |
150 */ | |
151 | |
152 /* | |
153 * Disable Get State traces only for target enviroment | |
154 */ | |
155 #ifdef _TARGET_ | |
156 #undef GET_STATE | |
157 #define GET_STATE(P) (ENTITY_DATA->P state) | |
158 #endif | |
159 | |
160 #define MA_NUMBER_4_PSI13_OR_CELL_ALLOC 14 /* MA_NUMBER used to reference a Mobile Allocation | |
161 (MA) received in PSI13, which may referenced from | |
162 an assignment message or which referes to the cell | |
163 allocation defined for the cell in SI1 or PSI2*/ | |
164 | |
165 #define MA_NUMBER_4_ASSIGNMENT 15 /* MA_NUMBER used to reference a MA received in a previous assignent*/ | |
166 | |
167 #ifdef REL99 | |
168 #define GRR_FREQ_PARAM_RECEIVED_IN_ASSIGNMENT 0 | |
169 /* | |
170 * This refers to freq param that is received in non assignment | |
171 * messages like PSI 8 and PSI 14 | |
172 */ | |
173 #define GRR_FREQ_PARAM_RECEIVED_IN_NON_ASSIGNMENT 1 | |
174 #endif | |
175 | |
176 /* | |
177 * Define the size of the GRR queue in frame | |
178 */ | |
179 #define PEI_PRIM_QUEUE_SIZE 20 | |
180 | |
181 | |
182 | |
183 #define FN_MAX 0x297000 | |
184 #define GRR_INVALID_FN 0xFFFFFFFF | |
185 | |
186 | |
187 /* | |
188 * Macros for handling of individual bits within a value used as flags | |
189 */ | |
190 #define SET_FLAG(val,mask,flag,type) (val=(((val)&(~(type)(mask)))|(flag))) | |
191 #define IS_FLAGGED(val,mask,flag) ((val & mask ) EQ flag) | |
192 #define IS_NOT_FLAGGED(val,mask,flag) ((val & mask ) NEQ flag) | |
193 | |
194 /* | |
195 * Defines for the gprs_database | |
196 */ | |
197 | |
198 /* | |
199 * Service states | |
200 */ | |
201 #define GPRS_SERVICE_NONE 0 /* no service */ | |
202 #define GPRS_SERVICE_LIMITED 1 /* limited service */ | |
203 #define GPRS_SERVICE_FULL 2 /* full service */ | |
204 | |
205 typedef UBYTE T_GPRS_SERVICE; | |
206 | |
207 /* | |
208 * Access states | |
209 */ | |
210 #define GPRS_ACCESS_BARRED 0 /* access barred */ | |
211 #define GPRS_ACCESS_ALLOWED 1 /* access allowed */ | |
212 | |
213 typedef UBYTE T_ACCESS_STATUS; | |
214 | |
215 | |
216 /* | |
217 * Maximum number of IMSI digits | |
218 */ | |
219 #define MAX_IMSI_DIGITS 16 | |
220 | |
221 #define SEG_CTRL_BLOCK_SIZE 8 | |
222 | |
223 #ifdef REL99 | |
224 /* | |
225 * Network Release | |
226 */ | |
227 #define BSS_NW_REL_97 0 | |
228 #define BSS_NW_REL_99 1 | |
229 #define BSS_NW_REL_04 2 | |
230 | |
231 #endif | |
232 | |
233 | |
234 /* | |
235 start constants for CTRL | |
236 */ | |
237 /* final states */ | |
238 #define GLBL_PCKT_MODE_NULL 0 | |
239 #define GLBL_PCKT_MODE_SUSP 1 | |
240 #define GLBL_PCKT_MODE_SYNC 2 | |
241 #define GLBL_PCKT_MODE_IDLE 3 | |
242 #define GLBL_PCKT_MODE_ACCESS 4 | |
243 #define GLBL_PCKT_MODE_ASSIGNED 5 | |
244 #define GLBL_PCKT_MODE_TRANSFER 6 | |
245 #define GLBL_PCKT_MODE_RELEASED 7 | |
246 | |
247 /* transitions states from NULL mode to others */ | |
248 #define GLBL_PCKT_MODE_NULL_IDLE 8 | |
249 | |
250 /* transitions states from suspended mode to others */ | |
251 #define GLBL_PCKT_MODE_SUSP_IDLE 9 | |
252 | |
253 /* transitions states from suspended mode to others */ | |
254 #define GLBL_PCKT_MODE_SYNC_IDLE 10 | |
255 | |
256 /* transitions states from packet idle mode to others */ | |
257 #define GLBL_PCKT_MODE_IDLE_ACCESS 11 | |
258 #define GLBL_PCKT_MODE_IDLE_ASSIGNED 12 | |
259 #define GLBL_PCKT_MODE_IDLE_TRANSFER 13 | |
260 | |
261 /* transitions states from packet access mode to others */ | |
262 #define GLBL_PCKT_MODE_ACCESS_IDLE 14 | |
263 #define GLBL_PCKT_MODE_ACCESS_ASSIGNED 15 | |
264 #define GLBL_PCKT_MODE_ACCESS_TRANSFER 16 | |
265 #define GLBL_PCKT_MODE_ACCESS_TWO_PHASE 17 | |
266 | |
267 /* transitions states from packet assigned mode to others */ | |
268 #define GLBL_PCKT_MODE_ASSIGNED_IDLE 18 | |
269 #define GLBL_PCKT_MODE_ASSIGNED_TRANSFER 19 | |
270 | |
271 /* transitions states from packet transfer mode to others */ | |
272 #define GLBL_PCKT_MODE_TRANSFER_IDLE 20 | |
273 #define GLBL_PCKT_MODE_TRANSFER_RELEASED 21 | |
274 #define GLBL_PCKT_MODE_TRANSFER_ACCESS 22 | |
275 | |
276 /* transitions states from packet released mode to others */ | |
277 #define GLBL_PCKT_MODE_RELEASED_IDLE 23 | |
278 #define GLBL_PCKT_MODE_RELEASED_ACCESS 24 | |
279 | |
280 /* transitions states from measurement report mode to others */ | |
281 #define GLBL_PCKT_MODE_MEAS_REP_IDLE 25 | |
282 | |
283 | |
284 typedef UBYTE T_GLBL_PCKT_MODE; | |
285 | |
286 #define CTRL_TASK_NONE 0 | |
287 #define CTRL_TASK_PBCCH_LEAVE_NULL 1 | |
288 #define CTRL_TASK_PBCCH_LEAVE_SUSP 2 | |
289 #define CTRL_TASK_PBCCH_LEAVE_SYNC 3 | |
290 #define CTRL_TASK_PBCCH_LEAVE_IDLE 4 | |
291 #define CTRL_TASK_PBCCH_LEAVE_ACCESS 5 | |
292 #define CTRL_TASK_PBCCH_LEAVE_TRANSFER 6 | |
293 #define CTRL_TASK_BCCH 7 | |
294 | |
295 typedef UBYTE T_CTRL_TASK; | |
296 /* | |
297 end constants for CTRL | |
298 */ | |
299 | |
300 | |
301 /* | |
302 start constants for TC | |
303 */ | |
304 #define RADIO_PRIO_4 3 | |
305 | |
306 #define RFL_NUMBER_4_DIRECT_ENCODING_2 (RFL_NUMBER_4_DL_CTRL_MSG_MAX + 1) | |
307 /* | |
308 end constants for TC | |
309 */ | |
310 | |
311 /* MAC HEADER TYPE*/ | |
312 #define CTRL_BLK_NO_OPT 1 | |
313 #define CTRL_BLK_OPT 2 | |
314 | |
315 | |
316 /* | |
317 start constants for MEAS | |
318 */ | |
319 /* maybe for later use */ | |
320 /* | |
321 #define M_ROUND_UP(x,meas_acrcy) (((x)>=0)? \ | |
322 ((((x)%(meas_acrcy))< ((meas_acrcy)/ 2))? \ | |
323 ( (x)/(meas_acrcy) ):(((x)/(meas_acrcy))+1)): \ | |
324 ((((x)%(meas_acrcy))<=((meas_acrcy)/-2))? \ | |
325 (((x)/(meas_acrcy))-1):( (x)/(meas_acrcy) ))) | |
326 */ | |
327 | |
328 #define M_ROUND_UP(x,meas_acrcy) ((((x)%(meas_acrcy))< ((meas_acrcy)/ 2))? \ | |
329 ( (x)/(meas_acrcy) ):(((x)/(meas_acrcy))+1)) | |
330 #define NORM_POW_MIN (ULONG)1000 /* normalised math. power */ | |
331 /* function maximum value */ | |
332 #define NORM_TAVGW_FAC (ULONG)10 /* normalised Tavg_w factor */ | |
333 #define DRX_NORM_FACTOR (NORM_TAVGW_FAC*NORM_POW_MIN) | |
334 | |
335 #define MEAS_ACRCY 1000 /* accuracy */ | |
336 | |
337 #define MIN_PCL_DCS1800 28 /* minimum power control level DCS 1800 */ | |
338 #define MAX_PCL_DCS1800 29 /* maximum power control level DCS 1800 */ | |
339 #define MIN_PCL_GSM900 31 /* minimum power control level GSM 900 */ | |
340 #define MAX_PCL_GSM900 0 /* maximum power control level GSM 900 */ | |
341 #define MIN_PCL_PCS1900 21 /* minimum power control level PCS 1900 */ | |
342 #define MAX_PCL_PCS1900 22 /* maximum power control level PCS 1900 */ | |
343 | |
344 #define GAMMA_0_DCS1800 36 | |
345 #define GAMMA_0_GSM900 39 | |
346 #define GAMMA_0_PCS1900 36 | |
347 /* | |
348 end constants for MEAS | |
349 */ | |
350 | |
351 /* | |
352 start constants for CS | |
353 */ | |
354 #define CS_RLA_P_VALID 0x0 /* RLA_P value is available and valid */ | |
355 #define CS_RLA_P_NOT_VALID 0x1 /* RLA_P value is available but not valid. */ | |
356 #define CS_RLA_P_NOT_AVAIL 0x2 /* RLA_P value is not available and therefore not valid */ | |
357 | |
358 | |
359 #define CS_KEEP_MEAS_RSLT 0x0 /* Keep all measurement results. */ | |
360 #define CS_DELETE_MEAS_RSLT 0x1 /* Delete all measurement results. */ | |
361 #define CS_CRMM_BA_GPRS 0x0 /* Cell re-selection measurement on BA(GPRS), forward results to GRR. */ | |
362 #define CS_CRMM_BA_BCCH 0x1 /* Cell re-selection measurement on BA(BCCH), forward results to ALR. */ | |
363 | |
364 #define CS_MIN_RLA_P_SAMPLES 5 /* At least 5 received signal measurement */ | |
365 /* samples are required for a valid RLA_P */ | |
366 /* value. */ | |
367 | |
368 #define CS_MIN_RUN_AVG_PRD 1002 | |
369 /* RLA_P shall be a running average */ | |
370 /* determined using sample collected over */ | |
371 /* a period of 5 sec. to ... sec., */ | |
372 /* CS_MIN_RUN_AVG_PRD defines 5 sec. */ | |
373 /* minus 7.5 % in units of frames. 7.5 % */ | |
374 /* are substracted to be more tolerant */ | |
375 /* in time which allows to validate also */ | |
376 /* data which are colleted in less than */ | |
377 /* 5 sec. */ | |
378 | |
379 #define CS_RPT_PRD_PTM 104 | |
380 /* The MPHP_TCR_MEAS_IND primitive is */ | |
381 /* sent every 104 TDMA frames. */ | |
382 | |
383 #define CS_NCSYNC_RPT_PRD_PIM 2080 | |
384 /* CS_NCSYNC_RPT_PRD_PIM =2080 frame eqivalent to | |
385 10 second 104 TDMA frames. */ | |
386 | |
387 #define CS_MAX_MEAS_RSLT 10 | |
388 /* a maximum number of measurement */ | |
389 /* results are taken into account for */ | |
390 /* RLA_P calculation, exceeding samples */ | |
391 /* are ignored. */ | |
392 | |
393 #define CS_IDX_NOT_USED 0xFF | |
394 | |
395 /* band limitations for multiband reporting */ | |
396 #define CS_NO_BAND_LIMITATION 0 | |
397 #define CS_EXCLUDE_SC_BAND 1 | |
398 #define CS_ONLY_SC_BAND 2 | |
399 | |
400 /* maximum number of strongest carrier consider for cell re-selection */ | |
401 #if defined FF_EOTD | |
402 #define CS_MAX_STRONG_CARRIER 12 | |
403 #define CS_MAX_STRONG_CARRIER_CR 6 | |
404 | |
405 #if ( ! ( CS_MAX_STRONG_CARRIER_CR <= CS_MAX_STRONG_CARRIER ) ) | |
406 #error CS_MAX_STRONG_CARRIER_CR <= CS_MAX_STRONG_CARRIER required | |
407 #endif | |
408 | |
409 #else /* #if defined FF_EOTD */ | |
410 #define CS_MAX_STRONG_CARRIER 6 | |
411 #endif /* #if defined FF_EOTD */ | |
412 | |
413 #if ( ! ( CS_MAX_STRONG_CARRIER <= RRGRR_MAX_ARFCN_NCELL_SYNC_REQ ) ) | |
414 #error CS_MAX_STRONG_CARRIER <= RRGRR_MAX_ARFCN_NCELL_SYNC_REQ required | |
415 #endif | |
416 | |
417 #if defined (REL99) AND defined (TI_PS_FF_EMR) AND defined (TI_PS_FF_RTD) | |
418 #else | |
419 #if ( ! ( ( RRGRR_MEAS_REP_LIST_SIZE - 1 /* subtract serving cell */ ) <= CS_MAX_STRONG_CARRIER ) ) | |
420 #error RRGRR_MEAS_REP_LIST_SIZE <= CS_MAX_STRONG_CARRIER required | |
421 #endif | |
422 #endif | |
423 | |
424 /* extrem values for signed 16 bit values */ | |
425 #define CS_SMALLEST_SHORT_VALUE (-32768) | |
426 | |
427 #define BSIC_NCC_MASK 0x38 | |
428 | |
429 #define NC_GET_TYPE(info_src) ((info_src&0xF000)>>12) | |
430 | |
431 #define NC_SET_TYPE(info_src,type) (info_src=(USHORT)((info_src&0x0FFF)|((USHORT)type<<12))) | |
432 #define NC_SET_INSTANCE(info_src,inst) (info_src=(USHORT)((info_src&0xF0FF)|((USHORT)inst<< 8))) | |
433 #define NC_SET_NUMBER(info_src,num) (info_src= ((info_src&0xFF00)|((USHORT)num ))) | |
434 | |
435 #define CS_RESELECT_CAUSE_CTRL_NORMAL 0 | |
436 #define CS_RESELECT_CAUSE_CTRL_ABNORMAL 1 | |
437 #define CS_RESELECT_CAUSE_CTRL_SCELL 2 | |
438 #define CS_RESELECT_CAUSE_CS_NORMAL 3 | |
439 #define CS_RESELECT_CAUSE_CTRL_DL_SIG_FAIL 4 | |
440 | |
441 | |
442 typedef UBYTE T_CS_RESELECT_CAUSE; | |
443 typedef UBYTE T_CS_DC_STATUS; | |
444 | |
445 #define MAX_NR_OF_NC_MVAL ((2*MAX_NR_OF_NCELL)+1) | |
446 /* | |
447 end constants for CS | |
448 */ | |
449 | |
450 /* | |
451 start constants for PSI | |
452 */ | |
453 #define CLIP_T_AVG(x) ( (x) > 25 ? 25 : (x) ) | |
454 #define CLIP_ALPHA(x) ( (x) > 10 ? 10 : (x) ) | |
455 #define CLIP_BS_PAG_BLKS_RES(x) ( (x) > 12 ? 0 : (x) ) | |
456 #define CLIP_BS_PRACH_BLKS(x) ( (x) > 12 ? 0 : (x) ) | |
457 /* | |
458 end constants for PSI | |
459 */ | |
460 | |
461 /* | |
462 start constants for interference measurements | |
463 */ | |
464 | |
465 /* used in packet transfer mode */ | |
466 #define MAX_IM_TRANSFER_CHANNELS 0x07 | |
467 | |
468 /* used in packet idle mode */ | |
469 #define MAX_IM_CHAN_EMEAS 0x01 | |
470 #define MAX_IM_CHAN_PCCCH 0x01 | |
471 | |
472 #define MAX_IM_IDLE_CHANNELS (MAX_CHAN_IMEAS + MAX_IM_CHAN_PCCCH + MAX_IM_CHAN_EMEAS) | |
473 /* maximum number of channels measured in */ | |
474 /* packet idle mode */ | |
475 | |
476 #define CHN_ID_INVALID 0xFF /* invalid identifier index */ | |
477 | |
478 #define CHN_ID_EM_BASE 0x00 /* EXT_FREQUENCY_LIST identifier index base */ | |
479 #define CHN_ID_PCCCH_BASE ( CHN_ID_EM_BASE + MAX_IM_CHAN_EMEAS ) | |
480 /* monitored PCCCH identifier index base */ | |
481 #define CHN_ID_IM_BASE ( CHN_ID_PCCCH_BASE + MAX_IM_CHAN_PCCCH ) | |
482 /* INT_MEAS_CHANNEL_LIST identifier index base */ | |
483 | |
484 /* used in packet idle and packet transfer mode */ | |
485 #define IM_I_MASK_IDL 0x01 | |
486 #define IM_I_MASK_TRNS 0x02 | |
487 #define IM_I_NONE 0x00 | |
488 #define IM_I_IDL 0x01 | |
489 #define IM_I_TRNS 0x02 | |
490 | |
491 #define IM_U_MASK 0x01 | |
492 #define IM_U_USED 0x01 | |
493 #define IM_U_UNUSED 0x00 | |
494 | |
495 #define MAX_IM_HOP_ARFCN 548 | |
496 #define MAX_IM_HOP_ARFCN_BIT_FIELD_SIZE ( ( ( MAX_IM_HOP_ARFCN - 1 ) / 8 ) + 1 ) | |
497 | |
498 #define MAX_IM_CHANNELS ( MAX_IM_IDLE_CHANNELS + MAX_IM_TRANSFER_CHANNELS ) | |
499 /* maxmimum number of channels which are */ | |
500 /* taken into account for interference */ | |
501 /* measurement resumption */ | |
502 | |
503 /* | |
504 end constants for interference measurements | |
505 */ | |
506 | |
507 /* | |
508 start constants for extended measurements | |
509 */ | |
510 #define MAX_NR_OF_INSTANCES_OF_PMO 8 | |
511 #define EM_MAX_STRONG_CARRIER 6 | |
512 | |
513 #define EM_INVLD_BSIC 0xFF | |
514 | |
515 #define EM_VLDTY_ARFCN_MASK 0x8000 | |
516 #define EM_NON_VLD_ARFCN 0x8000 | |
517 #define EM_VLD_ARFCN 0x0000 | |
518 | |
519 #define PMO_NONE_VLD 0x00 | |
520 #define PMO_EXT_VLD 0x01 | |
521 #define PMO_NC_VLD 0x02 | |
522 /* | |
523 end constants for extended measurements | |
524 */ | |
525 | |
526 /* | |
527 start constants for NC measurements | |
528 */ | |
529 | |
530 /* | |
531 end constants for NC measurements | |
532 */ | |
533 | |
534 /* | |
535 start constants for packet measurement report sending | |
536 */ | |
537 #define PMR_MSG_TYPE_LEN 6 | |
538 #define PMR_TLLI_LEN 32 | |
539 #define PMR_FLAG_LEN 1 | |
540 #define PMR_PSI5_CHNGE_MRK_LEN 2 | |
541 | |
542 #ifdef REL99 | |
543 #define PMR_BA_IND_USED_LEN 1 | |
544 #define PMR_PSI3_CHNGE_MRK_LEN 2 | |
545 #define PMO_IND_USED_LEN 1 | |
546 #endif | |
547 | |
548 /* | |
549 end constants for packet measurement report sending | |
550 */ | |
551 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
552 /* | |
553 * start constants for ENH measurements | |
554 */ | |
555 #define SERVING_BAND_REPORTING_DEFAULT 3 | |
556 #define NCC_PERMITTED_DEFAULT 0xFF | |
557 #define NOT_APPLICABLE 0xFF | |
558 #define BSIC_VALID 0x1 | |
559 #define BSIC_INVALID 0x0 | |
560 #define NC_INVBSIC_PEMR 17 | |
561 #define MSG_SIZE_PEMR 184 | |
562 #define MAND_SIZE_PEMR 48 | |
563 #define MAX_NR_OF_GSM_NC 96 | |
564 #define REP_THRESHOLD_DEF 0xFF | |
565 /* | |
566 * end constants for ENH measurements | |
567 */ | |
568 #endif | |
569 | |
570 #if defined (TI_PS_FF_RTD) AND defined (REL99) | |
571 /* | |
572 * start constants for RTD | |
573 */ | |
574 #define RTD_DEFAULT_INDEX 0 | |
575 #define RTD_12BIT 0x8000 | |
576 #define RTD_NOT_AVAILABLE 0xFFFF | |
577 /* | |
578 * end constants for RTD | |
579 */ | |
580 #endif /* #if defined (TI_PS_FF_RTD) AND defined (REL99) */ | |
581 | |
582 | |
583 /* | |
584 * Number of instances of PSI | |
585 */ | |
586 #define MAX_NR_OF_INSTANCES_OF_PSI2 8 /* 1-8 */ | |
587 #define MAX_NR_OF_INSTANCES_OF_PSI3 1 /* 1 */ | |
588 #define MAX_NR_OF_INSTANCES_OF_PSI3BIS 16 /* 1-16 */ | |
589 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
590 #define MAX_NR_OF_INSTANCES_OF_PSI3TER 16 /* 0-16 */ | |
591 #endif | |
592 #define MAX_NR_OF_INSTANCES_OF_PSI4 8 /* 0-8 */ | |
593 #define MAX_NR_OF_INSTANCES_OF_PSI5 8 /* 0-8 */ | |
594 #ifdef REL99 | |
595 #define MAX_NR_OF_INSTANCES_OF_PSI8 8 /* 0-8 */ | |
596 #endif | |
597 #ifdef REL99 | |
598 #define PBCCH_NOT_PRESENT 0x0 /* PBCCH not present in the cell */ | |
599 #define PBCCH_PRESENT 0x1 /* PBCCH present in the cell */ | |
600 #endif | |
601 | |
602 | |
603 #define NOT_SET 255 | |
604 | |
605 /* | |
606 * Service definitions. Used to access service data with GET/SET_STATE. | |
607 */ | |
608 | |
609 | |
610 #define CTRL ctrl. | |
611 #define CTRL_GLBL ctrl_glbl. /* global data, managed by CTRL, used by */ | |
612 /* all GRR services */ | |
613 #define TC tc. | |
614 #define CPAP cpap. | |
615 #define PSI psi_assigned_data. | |
616 #define PG pg. | |
617 #define MEAS meas. | |
618 #define MEAS_IM meas_im. /* service interference measurement */ | |
619 #define MEAS_EM meas_em. /* service extended measurement */ | |
620 #define CS cs. | |
621 #define CS_MEAS cs_meas. /* service cell re-selection measurement */ | |
622 #define GFP gfp. | |
623 | |
624 #if defined (TI_PS_FF_RTD) AND defined (REL99) | |
625 typedef USHORT T_RTD_VALUE; | |
626 #endif /* #if defined (TI_PS_FF_RTD) AND defined (REL99) */ | |
627 | |
628 | |
629 /* | |
630 * Timer definitions (also used by GRR_PEI.C) | |
631 */ | |
632 | |
633 typedef enum | |
634 { | |
635 T3134 = 0, /* handled by service CTRL */ | |
636 T3158, /* handled by service CS */ | |
637 T3162, /* handled by service TC */ | |
638 T3168, /* handled by service TC */ | |
639 T3170, /* handled by service TC */ | |
640 T3172_1, /* handled by service TC */ | |
641 | |
642 /* T3172_2, */ /* handeld by service TC */ | |
643 /* T3172_3, */ /* handeld by service TC */ | |
644 /* T3172_4, */ /* handeld by service TC */ | |
645 /* T3172_5, */ /* handeld by service TC */ | |
646 /* T3172_6, */ /* handeld by service TC */ | |
647 /* T3172_7, */ /* handeld by service TC */ | |
648 | |
649 T3174, /* handled by service CTRL */ | |
650 T3176, /* handled by service CS */ | |
651 T3178, /* handled by service MEAS */ | |
652 T3186, /* handled by service TC */ | |
653 T_60_SEC, /* handled by service PSI */ | |
654 T_30_SEC, /* handled by service PSI */ | |
655 T_10_SEC, /* handled by service PSI */ | |
656 T_IM_SYNC, /* handled by service MEAS */ | |
657 T15_SEC_CC, /* handled by service CS */ | |
658 T_TRANS_NON_DRX, /* handled by service PG */ | |
659 T_NC2_NON_DRX, /* handled by service PG */ | |
660 T_COMP_PSI, /* handled by service PSI */ | |
661 T_RESELECT, /* handled by service CS */ | |
662 #ifdef REL99 | |
663 T_POLL_TIMER, /* handled by service CTRL */ | |
664 #endif | |
665 | |
666 TIMER_COUNT /* !!! always the last entry !!! */ | |
667 | |
668 } T_TIMER_INDEX; | |
669 | |
670 /* T3142_VALUE - assigned in message */ | |
671 /* T3158_VALUE - defined by parameter or random value */ | |
672 #define T3162_VALUE 5000 /* ms */ | |
673 /* T3168_VALUE - assigned in system info (in GPRS Cell Options) | |
674 range 500,1000,...4000ms */ | |
675 /* T3172_VALUE - assigned in message */ | |
676 #define T3174_VALUE 15000 /* ms */ | |
677 #define T3176_VALUE 15000 /* ms */ | |
678 /* T3178_VALUE - defined by parameter or random value */ | |
679 #define T3186_VALUE 5000 /* ms */ | |
680 #define T3134_VALUE 5000 /* ms Timer to detect the lacks of respond | |
681 from the network or for unvavailable target cell*/ | |
682 | |
683 /* T3200_VALUE - see T3198 */ | |
684 /* T_IM_SYNC_VALUE - defined by service MEAS */ | |
685 | |
686 #define T_10_SEC_VALUE 10000 | |
687 #define T_30_SEC_VALUE 30000 | |
688 #define T_60_SEC_VALUE 60000 | |
689 #define T_RESELECT_VALUE 10000 | |
690 | |
691 | |
692 | |
693 /* | |
694 * Service name definitions for trace purposes. The service abbrevation | |
695 * (e.g. CTRL) has to be the same as above for the service definitions. | |
696 */ | |
697 #ifndef NTRACE | |
698 | |
699 #define SERVICE_NAME_CTRL "CTRL" | |
700 #define SERVICE_NAME_CTRL_GLBL "CTRL_GLBL" | |
701 #define SERVICE_NAME_TC "TC" | |
702 #define SERVICE_NAME_CPAP "CPAP" | |
703 #define SERVICE_NAME_PG "PG" | |
704 #define SERVICE_NAME_MEAS "MEAS" | |
705 #define SERVICE_NAME_MEAS_IM "MEAS_IM" | |
706 #define SERVICE_NAME_MEAS_EM "MEAS_EM" | |
707 #define SERVICE_NAME_PSI "PSI" | |
708 #define SERVICE_NAME_CS "CS" | |
709 #define SERVICE_NAME_CS_MEAS "CS_MEAS" | |
710 #define SERVICE_NAME_GFP "GFP" | |
711 | |
712 | |
713 #endif /* !NTRACE */ | |
714 | |
715 | |
716 /* | |
717 * Service CTRL | |
718 */ | |
719 #define CTRL_CELL_RESEL_NONE 0x00 /* no initiated cell re-selection */ | |
720 #define CTRL_CELL_RESEL_RR 0x40 /* RR initiated cell re-selection */ | |
721 #define CTRL_CELL_RESEL_GRR 0x80 /* GRR initiated cell re-selection */ | |
722 #define CTRL_CELL_RESEL_NW 0xC0 /* network initiated cell re-selection */ | |
723 | |
724 #define CTRL_CELL_RESEL_MASK 0xC0 /* bit maks for cell re-selection indication */ | |
725 | |
726 #define CTRL_SUSPENSION_NO 0x00 /* no suspension */ | |
727 #define CTRL_SUSPENSION_YES 0x20 /* suspension */ | |
728 | |
729 #define CTRL_SUSPENSION_MASK 0x20 /* bit mask for suspension indication */ | |
730 | |
731 /* CTRL is in normal operation */ | |
732 #define CTRL_NULL 0x00 /* GPRS functionality is disabled */ | |
733 #define CTRL_READY 0x01 /* GPRS functionality is enabled, but service cannot be offered */ | |
734 #define CTRL_ACCESS_DISABLED 0x02 /* service can be offered but is disabled */ | |
735 #define CTRL_IN_PROGRESS 0x03 /* service is offered */ | |
736 | |
737 /* CTRL is waiting for several confirmations */ | |
738 #define CTRL_WAIT_CS_PAGE_RES 0x04 /* waiting for response to circuit-switched paging */ | |
739 #define CTRL_WAIT_FOR_CNF_OF_SUSPENSION 0x05 /* waiting for suspension of GRR sevices */ | |
740 #define CTRL_WAIT_RSP_4_RR_CR 0x06 /* waiting for stopping of GRR services triggered by a RR indicated cell re-selection request */ | |
741 | |
742 /* CTRL is processing several cell change procedures */ | |
743 #define CTRL_CR (0x07|CTRL_CELL_RESEL_GRR) | |
744 /* GRR has triggered a MS controlled cell re-selection */ | |
745 #define CTRL_FAILED_CR 0x08 /* GRR triggered MS controlled cell re-selection has failed */ | |
746 #define CTRL_RR_NC_CCO (0x09|CTRL_CELL_RESEL_NW) | |
747 /* RR has triggered a network controlled cell re-selection */ | |
748 #define CTRL_GRR_NC_CCO (0x0A|CTRL_CELL_RESEL_NW) | |
749 /* GRR has triggered a network controlled cell re-selection */ | |
750 #define CTRL_AUTO_RR_CR (0x0B|CTRL_CELL_RESEL_RR) | |
751 /* RR has indicated a request for a cell re-selection */ | |
752 | |
753 /* GRR is suspended */ | |
754 #define CTRL_SUSPENDED (0x0C|CTRL_SUSPENSION_YES) | |
755 /* GRR is suspended */ | |
756 #define CTRL_NO_CELL_SUSP (0x0D|CTRL_SUSPENSION_YES) | |
757 /* GRR is suspended and no cell is available */ | |
758 | |
759 #define CTRL_ACC_ENABLED_SUSP (0x0E|CTRL_SUSPENSION_YES) | |
760 /* GRR is suspended but after resume service is available */ | |
761 #define CTRL_RR_CR_IN_SUSP (0x0F|CTRL_CELL_RESEL_RR|CTRL_SUSPENSION_YES) | |
762 /* GRR is suspended and RR has indicated a request for a cell re-selection */ | |
763 #define CTRL_CR_IN_SUSP (0x10|CTRL_CELL_RESEL_GRR|CTRL_SUSPENSION_YES) | |
764 /* GRR is suspended and has triggered a cell re-selection */ | |
765 #define CTRL_FAILED_CR_IN_SUSP 0x11 /* GRR is suspended and has detected a failed cell re-selection */ | |
766 | |
767 #define CTRL_READY_TO_PROGRESS 0x12 /* service can be offered but a cell reselection is in progress */ | |
768 | |
769 /* | |
770 * Service TC | |
771 */ | |
772 #define TC_ACCESS_DISABLED 0 | |
773 #define TC_CPAP 1 | |
774 #define TC_PIM 2 | |
775 #define TC_WAIT_ASSIGN 3 | |
776 #define TC_POLLING 4 | |
777 #define TC_WAIT_2P_ASSIGN 5 | |
778 #define TC_CONTENTION_RESOLUTION 6 | |
779 #define TC_TBF_ACTIVE 7 | |
780 #define TC_SINGLE_BLOCK 8 | |
781 #define TC_WAIT_STOP_TASK_CNF 9 | |
782 | |
783 | |
784 | |
785 /* | |
786 * Service CPAP | |
787 */ | |
788 #define CPAP_IDLE 0 | |
789 #define CPAP_SB_STARTED 1 | |
790 #define CPAP_1P_STARTED 2 | |
791 #define CPAP_WAIT_PDCH_ASSIGN 3 | |
792 #define CPAP_WAIT_DEDI_SUSPEND 4 | |
793 #define CPAP_WAIT_STOP_TASK_CNF 5 | |
794 | |
795 | |
796 /* | |
797 * Service PSI | |
798 */ | |
799 #define PSI_NULL 0 | |
800 #define PSI_IDLE 1 | |
801 #define PSI_TRANSFER 2 | |
802 #define PSI_SUSPENDED 3 | |
803 #define PSI_BCCH_IDLE 4 | |
804 #define PSI_BCCH_TRANSFER 5 | |
805 | |
806 #define READ_COMPLETE 0x0 /* Read PSI in all PBCCH blocks */ | |
807 #define READ_PSI1_IN_PSI1_REPEAT_PERIODS 0x1 /* Read PSI1 in PSI1 repeat periods */ | |
808 #define PSI_IN_HR 0x2 /* PSI in high repetition rate */ | |
809 #define PSI_IN_LR 0x3 /* PSI in low repetition rate */ | |
810 #define PSI_IN_HR_AND_LR 0x4 /* PSI in high and low repetition rate */ | |
811 #define READ_PSI1_AND_IN_HR 0x5 /* PSI in high repetition rate and PSI1 */ | |
812 #define READ_PSI1_AND_IN_LR 0x6 /* PSI in low repetition rate and PSI1 */ | |
813 #define READ_PSI2 0x7 /* Read PSI2 */ | |
814 #define READ_PSI3_3BIS 0x8 /* Read PSI3 and PSI3bis */ | |
815 #define READ_PSI4 0x9 /* Read PSI4 */ | |
816 #define READ_PSI5 0xa /* Read PSI5 */ | |
817 #ifdef REL99 | |
818 #ifdef TI_PS_FF_EMR | |
819 #define READ_PSI3BIS 0xb /* Read PSI3bis */ | |
820 #define READ_PSI3TER 0xc /* Read PSI3ter */ | |
821 #define READ_PSI3_3BIS_3TER 0xd /* Read PSI3, PSI3bis and PSI3ter */ | |
822 #endif | |
823 #define READ_PSI8 0xe /* Read PSI8. this value is used while performing partial acquisition */ | |
824 #endif | |
825 | |
826 /* | |
827 * Service PG | |
828 */ | |
829 #define PG_NULL 0 | |
830 #define PG_IDLE 1 | |
831 #define PG_TRANSFER 2 | |
832 #define PG_ACCESS 3 | |
833 | |
834 | |
835 /* | |
836 * Service MEAS | |
837 */ | |
838 #define MEAS_NULL 0 | |
839 #define MEAS_IDLE 1 | |
840 #define MEAS_ACCESS 2 | |
841 #define MEAS_TRANSFER 3 | |
842 | |
843 | |
844 /* | |
845 * Service MEAS_IM | |
846 */ | |
847 #define MEAS_IM_NULL 0 | |
848 #define MEAS_IM_START 1 | |
849 #define MEAS_IM_STOP_REQ 2 | |
850 | |
851 | |
852 /* | |
853 * Service MEAS_EM | |
854 */ | |
855 #define MEAS_EM_NULL 0 /* no activity ongoing except that timer */ | |
856 /* T3178 is maybe running */ | |
857 | |
858 | |
859 #define MEAS_EM_REP_REQ 1 /* waiting for measurement report data */ | |
860 #define MEAS_EM_PMR_SENDING 2 /* measurement report is currently sent to */ | |
861 /* the network */ | |
862 #define MEAS_EM_PENDING 3 /* measurements are paused, e.g. TBF is */ | |
863 /* active */ | |
864 #define MEAS_EM_SUSPEND 4 /* measurements are suspended, e.g. RR */ | |
865 /* connection establishment in progress */ | |
866 | |
867 /* | |
868 * Service CS | |
869 */ | |
870 #define CS_NULL 0 /* no activity ongoing */ | |
871 #define CS_IDLE 1 /* service CS in idle mode, cell re-selection */ | |
872 /* and/or NC measurements are performed */ | |
873 #define CS_CR_MOBILE 2 /* MS controlled cell re-selection ongoing */ | |
874 #define CS_CR_NETWORK 3 /* network controlled cell re-selection */ | |
875 /* ongoing */ | |
876 /* | |
877 * Service CS_MEAS | |
878 */ | |
879 #define CS_MEAS_NULL 0 /* no activity ongoing */ | |
880 #define CS_MEAS_REP_REQ 1 /* waiting for measurement report data */ | |
881 #define CS_MEAS_PMR_SENDING 2 /* measurement report is currently sent to */ | |
882 /* the network */ | |
883 | |
884 /* | |
885 * Service CS_DC | |
886 */ | |
887 #define CS_DC_DEDICATED 0 /* CS is stopped due to dedicated connection */ | |
888 #define CS_DC_OTHER 1 /* CS is stopped due to other reasons */ | |
889 | |
890 | |
891 /* | |
892 * Service GFP | |
893 */ | |
894 | |
895 #define GFP_IDLE 0 | |
896 | |
897 #ifdef REL99 | |
898 #define GRR_PCCO_POLL 1 | |
899 #endif | |
900 | |
901 | |
902 /*==== TYPES ======================================================*/ | |
903 | |
904 /* | |
905 * GRR global typedefs | |
906 */ | |
907 | |
908 /* enums */ | |
909 typedef enum | |
910 { | |
911 REL_PERFORMED, | |
912 REL_RUNNING | |
913 }T_RELEASE_STATE; | |
914 | |
915 /* | |
916 * mapping of the TC disable cause | |
917 * | |
918 * 7 6 5 4 3 2 1 0 - bit position | |
919 * | | | | | | |
920 * | | | +-+-- 00 OTHER | |
921 * | | | +-+-- 01 SUSPEND | |
922 * | | | +-+-- 10 CR | |
923 * | | | | |
924 * +-+-+------ 000 OTHER | |
925 * +-+-+------ 001 NORMAL | |
926 * +-+-+------ 010 IMM_REL | |
927 * +-+-+------ 011 NETWORK | |
928 * +-+-+------ 100 ABNORMAL | |
929 */ | |
930 | |
931 | |
932 /* disable cause class */ | |
933 #define DCC_OTHER 0x00 | |
934 #define DCC_SUSPEND 0x01 | |
935 #define DCC_CR 0x02 | |
936 | |
937 typedef UBYTE T_TC_DC_CLASS; | |
938 | |
939 /* disable cause type */ | |
940 #define DCT_OTHER (0x00<<2) | |
941 #define DCT_NORMAL (0x01<<2) | |
942 #define DCT_IMM_REL (0x02<<2) | |
943 #define DCT_NETWORK (0x03<<2) | |
944 #define DCT_ABNORMAL (0x04<<2) | |
945 | |
946 typedef UBYTE T_TC_DC_TYPE; | |
947 | |
948 /* disable cause mask */ | |
949 #define DCM_CLASS 0x03 | |
950 #define DCM_TYPE (0x07<<2) | |
951 | |
952 #define TC_DC_OTHER (DCC_OTHER |DCT_OTHER ) | |
953 #define TC_DC_SUSPEND_NORMAL (DCC_SUSPEND|DCT_NORMAL ) | |
954 #define TC_DC_SUSPEND_IMM_REL (DCC_SUSPEND|DCT_IMM_REL ) | |
955 #define TC_DC_CR_NETWORK (DCC_CR |DCT_NETWORK ) | |
956 #define TC_DC_CR_NORMAL (DCC_CR |DCT_NORMAL ) /* RRGRR_CR_IND( CR_NORMAL ) */ | |
957 #define TC_DC_CR_IMM_REL (DCC_CR |DCT_IMM_REL ) /* RRGRR_CR_IND( CR_ABNORMAL ) */ | |
958 #define TC_DC_CR_ABNORMAL (DCC_CR |DCT_ABNORMAL) /* abnormal TBF release with cell reselection */ | |
959 | |
960 typedef UBYTE T_TC_DISABLE_CAUSE; | |
961 | |
962 typedef enum | |
963 { | |
964 PSI_DC_OTHER, | |
965 PSI_DC_READ_PSI, | |
966 PSI_DC_PBCCH_RELEASED, | |
967 PSI_DC_PBCCH_ESTABLISHED | |
968 } T_PSI_DISABLE_CAUSE; | |
969 | |
970 | |
971 | |
972 typedef enum | |
973 { | |
974 TRANSFER_NDRX, | |
975 GMM_NDRX, | |
976 NC2_NDRX | |
977 }T_NON_DRX_TYPE; | |
978 | |
979 typedef enum | |
980 { | |
981 PACKET_MODE_NULL, | |
982 PACKET_MODE_PIM, /* Packet Idle Mode */ | |
983 PACKET_MODE_PAM, /* Packet Access Mode */ | |
984 PACKET_MODE_PTM, /* Packet Transfer Mode */ | |
985 PACKET_MODE_2P_PTM /* Packet Transfer Mode in 2P Access*/ | |
986 } T_PACKET_MODE; | |
987 | |
988 typedef UBYTE T_TBF_TYPE; /* macros are defined in cgrlc SAP*/ | |
989 | |
990 | |
991 typedef enum | |
992 { | |
993 CTRL_PTRC_NONE, | |
994 CTRL_PTRC_PBCCH_ESTABLISHED, | |
995 CTRL_PTRC_COMPLETE_SI_READING, | |
996 CTRL_PTRC_COMPLETE_PSI_READING | |
997 } CTRL_PSI_TBF_REL_CAUSE; | |
998 | |
999 typedef enum /* CTRL_FOLLOWING_SUSPENSION*/ | |
1000 { | |
1001 ACTIVATE_RR, /* activate RR to monitor CCCH and BCCH*/ | |
1002 SEND_RR_EST_REQ, /* RR has to start RR establishment */ | |
1003 SEND_RR_EST_RSP /* RR can accept the RR connection request*/ | |
1004 }CTRL_FOLLOWING_SUSPENSION; | |
1005 | |
1006 typedef enum /*PG_STATES*/ | |
1007 { | |
1008 PG_NORMAL, | |
1009 PG_EXTENDED, | |
1010 PG_REORG | |
1011 }PG_STATES; | |
1012 | |
1013 typedef enum /*PG_CHANNEL for CS call*/ | |
1014 { | |
1015 PG_ON_CCCH, | |
1016 PG_ON_PCCCH | |
1017 }PG_CHANNEL; | |
1018 | |
1019 typedef enum /* ACQ_TYPE*/ | |
1020 { | |
1021 NONE, | |
1022 PARTIAL, | |
1023 COMPLETE, | |
1024 PERIODICAL_PSI1_READING, | |
1025 PERIODICAL_SI13_READING, | |
1026 FULL_PSI_IN_NEW_CELL | |
1027 }ACQ_TYPE; | |
1028 | |
1029 | |
1030 typedef enum /* T_FA_TYPE*/ | |
1031 { | |
1032 FA_NO_CURRENT, | |
1033 FA_NO_NEXT, | |
1034 FA_BITMAP, | |
1035 FA_REPEAT | |
1036 }T_FA_TYPE; | |
1037 | |
1038 | |
1039 /* start enum for TC */ | |
1040 | |
1041 /* | |
1042 * The following definitions are used for the management of single block | |
1043 * sending without TBF establishment. | |
1044 * | |
1045 * TC holds a queue of size MSG_OWNER_MAX_NUM to buffer the single blocks | |
1046 * requested by the services. Only services MEAS and CS can request single | |
1047 * blocks in parallel. In case service CTRL has requested a single block, | |
1048 * services MEAS and CS are not allowed to request any single blocks. | |
1049 * | |
1050 * Service CS uses the same buffer as the service CTRL. Only one single block | |
1051 * can be stored for both services. The service MEAS has an individual buffer. | |
1052 * At this time only one single block can be stored for this service but we are | |
1053 * free to increase the size just by increasing the value of MAX_CTRL_BLK_NUM. | |
1054 */ | |
1055 #define MAX_CTRL_BLK_NUM 5 /* number of single blocks that can be stored at */ | |
1056 /* the same time */ | |
1057 | |
1058 #define BLK_INDEX_CTRL 0 /* Packet Cell Change Failure */ | |
1059 | |
1060 #define BLK_INDEX_CS 0 /* Packet Measurement Report (NC Measurements) */ | |
1061 | |
1062 #define BLK_INDEX_TC 1 /* Packet Resource Request (Reallocation) */ | |
1063 | |
1064 #define BLK_INDEX_MEAS 2 /* Packet Measurement Report (EXT Measurements) */ | |
1065 | |
1066 | |
1067 #define BLK_STATE_NONE 0 /* no control message associated */ | |
1068 #define BLK_STATE_ALLOCATED 1 /* control message is allocated */ | |
1069 #define BLK_STATE_SENT_REQ 2 /* control message is sent, waiting for response */ | |
1070 | |
1071 typedef UBYTE T_BLK_STATE; | |
1072 typedef UBYTE T_BLK_OWNER; | |
1073 | |
1074 /* end um for TC */ | |
1075 | |
1076 /* start enum for CPAP */ | |
1077 | |
1078 /* | |
1079 * The following enum will be used for IA and IAEXT | |
1080 */ | |
1081 typedef enum | |
1082 { | |
1083 E_IA_NULL, /* unforeseen mesage content*/ | |
1084 E_IA_SB_WITHOUT_TBF, /* Single Block without TBF Establishment */ | |
1085 E_IA_SB_2PHASE_ACCESS, /* Allocation for 2 Phase of 2_Phase-Access */ | |
1086 E_IA_UL, /* Uplink tbf Allocation */ | |
1087 E_IA_DCCH, /* continue on DCCH */ | |
1088 E_IA_TMA, /* it is the 1st of a 2 message assignment */ | |
1089 E_IA_TMA_SECOND, /* it is the 2nd of a 2 message assignment */ | |
1090 E_IA_ERROR_RA | |
1091 } T_EVAL_IA; | |
1092 | |
1093 typedef enum | |
1094 { | |
1095 E_IA_DL_NOT_OURS, /* message is not adressed to MS */ | |
1096 E_IA_DL_IGNORE, /* no effect on current tbf */ | |
1097 E_IA_DL_TMA, /* it is the 1st of a 2 message dl assignment */ | |
1098 E_IA_DL_TMA_SECOND, /* it is the 2nd of a 2 message dl assignment */ | |
1099 E_IA_DL_DCCH, /* continue on DCCH */ | |
1100 E_IA_DL_SB, /* single block downlink */ | |
1101 E_IA_DL_ASSIGN /* valid message send mphp_assign_req */ | |
1102 } T_EVAL_IA_DL; | |
1103 | |
1104 #define IA_TYPE_UL 0 /* last immediate assignment was for uplink direction */ | |
1105 #define IA_TYPE_DL 1 /* last immediate assignment was for downlink direction */ | |
1106 | |
1107 typedef UBYTE T_IA_TYPE; | |
1108 | |
1109 | |
1110 | |
1111 /* start enum for CTRL */ | |
1112 | |
1113 typedef enum /* T_FAILURE_SIGNAL */ | |
1114 { | |
1115 FAIL_SIG_DSF_IND, | |
1116 FAIL_SIG_PSI1OR_PSI13_RECEIPTION_FAILURE, | |
1117 FAIL_SIG_CTRL_ACCESS_BARRED | |
1118 } T_FAILURE_SIGNAL; | |
1119 | |
1120 /* end enum for CTRL */ | |
1121 | |
1122 /* start enum for interference measurements */ | |
1123 | |
1124 #define IM_MODE_NONE 0 /* no interf. meas. at all */ | |
1125 #define IM_MODE_IDLE 1 /* interf. meas. only in Packet Idle Mode */ | |
1126 #define IM_MODE_TRANSFER 2 /* interf. meas. only in Packet Transfer Mode */ | |
1127 #define IM_MODE_IDLE_TRANSFER 3 /* interf. meas. in Packet Transfer and Packet */ | |
1128 /* Idle Mode */ | |
1129 typedef UBYTE T_MEAS_IM_MODE; | |
1130 | |
1131 #define IM_TRIG_SIGNAL_NULL 0 | |
1132 #define IM_TRIG_SIGNAL_PAM 2 | |
1133 #define IM_TRIG_SIGNAL_PAUSE 3 | |
1134 | |
1135 typedef UBYTE T_MEAS_IM_TRIG_SIGNAL; | |
1136 | |
1137 #define M_IM_TRACE_INPUT_VALUE 0x01 /* trace mask for the input values */ | |
1138 #define M_IM_TRACE_OUTPUT_VALUE 0x02 /* trace mask for the output values */ | |
1139 #define M_IM_TRACE_FREQUENCY 0x04 /* trace mask for the carrier frequencies */ | |
1140 | |
1141 /* end enum for interference measurements */ | |
1142 | |
1143 /* start enum for extended measurements */ | |
1144 | |
1145 typedef enum /* T_XMEAS_ORDER */ | |
1146 { | |
1147 EM_EM0, | |
1148 EM_EM1, | |
1149 EM_RESET, | |
1150 EM_EMPTY | |
1151 } T_XMEAS_ORDER; | |
1152 | |
1153 /* end enum for extended measurements */ | |
1154 | |
1155 /* start enum for NC measurements */ | |
1156 | |
1157 typedef enum | |
1158 { | |
1159 NC_NC0 = 0, | |
1160 NC_NC1, | |
1161 NC_NC2, | |
1162 NC_RESET, | |
1163 NC_EMPTY | |
1164 } T_NC_ORDER; | |
1165 | |
1166 /* !!! do not start with value 0, use 1 instead !!! */ | |
1167 #define INFO_TYPE_PSI3 1 /* Packet System Information Type 3 */ | |
1168 #define INFO_TYPE_PSI3BIS 2 /* Packet System Information Type 3bis */ | |
1169 /* !!! value of INFO_TYPE_PSI3 shall be less than value of INFO_TYPE_PSI3BIS !!! */ | |
1170 #define INFO_TYPE_PMO 3 /* Packet Measurement Order */ | |
1171 #define INFO_TYPE_PCCO 4 /* Packet Cell Change Order */ | |
1172 #define INFO_TYPE_BA_BCCH 5 /* BA(BCCH) passed by RR */ | |
1173 | |
1174 typedef UBYTE T_INFO_TYPE; | |
1175 | |
1176 /* end enum for NC measurements */ | |
1177 | |
1178 /* start enum for cell re-selection */ | |
1179 | |
1180 #define CS_MODE_IDLE 0 /* entry not touched in any way */ | |
1181 #define CS_MODE_SELECTION_PERFORMED 1 /* entry selected as next cell to be used */ | |
1182 /* for cell re-selection and we have */ | |
1183 /* performed reading of the new cell */ | |
1184 | |
1185 typedef UBYTE T_CS_MODE; | |
1186 | |
1187 #define STAT_SYNC_NONE 0 /* not synchronised */ | |
1188 #define STAT_SYNC_OK 1 /* synchronised */ | |
1189 #define STAT_SYNC_FAILED 2 /* synchronisation failed */ | |
1190 | |
1191 typedef UBYTE T_SYNC_STATUS; | |
1192 | |
1193 #define NC_MVAL_STAT_ASSIGNED 0 /* on current BA(GPRS) list, no member */ | |
1194 /* of the six strongest cells */ | |
1195 #define NC_MVAL_STAT_PENDING 1 /* not on current BA(GPRS) list, update */ | |
1196 /* from RR required */ | |
1197 #define NC_MVAL_STAT_NONE 2 /* not on current BA(GPRS) list, no */ | |
1198 /* update from RR required */ | |
1199 typedef UBYTE T_NC_MVAL_STATUS; | |
1200 | |
1201 /* end enum for cell re-selection */ | |
1202 | |
1203 /* | |
1204 * Structure | |
1205 */ | |
1206 typedef struct | |
1207 { | |
1208 UBYTE num; /* Current number -identification- of the rfl*/ | |
1209 | |
1210 UBYTE list[128]; /* Buffer containing received frequencies: | |
1211 * This is the same structure as the T_LIST in RR.h | |
1212 */ | |
1213 } T_RFL_LST; | |
1214 | |
1215 typedef struct /* T_CR_POW_PAR */ | |
1216 { | |
1217 UBYTE gprs_rxlev_access_min; /* GPRS_RXLEV_ACCESS_MIN */ | |
1218 UBYTE gprs_ms_txpwr_max_cch; /* GPRS_MS_TXPWR_MAX_CCH */ | |
1219 } T_CR_POW_PAR; | |
1220 | |
1221 typedef struct /* T_CR_PAR_1 */ | |
1222 { | |
1223 T_CR_POW_PAR cr_pow_par; /* GPRS power parameter */ | |
1224 UBYTE v_hcs_par; /* valid flag for HCS structure */ | |
1225 T_hcs_par hcs_par; /* HCS structure */ | |
1226 } T_CR_PAR_1; | |
1227 | |
1228 typedef struct /* T_SCELL_PAR */ | |
1229 { | |
1230 UBYTE cell_ba; | |
1231 UBYTE exc_acc; | |
1232 T_CR_PAR_1 cr_par_1; | |
1233 UBYTE multi_band_rep; | |
1234 } T_SCELL_PAR; | |
1235 | |
1236 typedef struct /* T_UL_TBF */ | |
1237 { | |
1238 UBYTE tfi; | |
1239 UBYTE st_tfi; /* tfi will be used after starting time elapsed */ | |
1240 UBYTE mac_mode; | |
1241 UBYTE polling_bit; | |
1242 UBYTE ts_mask; /* current timeslot mask */ | |
1243 UBYTE ts_usage; /* new assigned timeslot mask, becomes valid after starting time has elapsed */ | |
1244 UBYTE nts; /* number of timeslots allocated for tbf */ | |
1245 UBYTE cs_mode; | |
1246 UBYTE tlli_cs_mode; | |
1247 UBYTE ti; | |
1248 ULONG tbf_start_fn; | |
1249 USHORT rlc_db_granted; | |
1250 | |
1251 UBYTE access_type; | |
1252 UBYTE nr_blocks; | |
1253 UBYTE prio; | |
1254 UBYTE prim_type; | |
1255 USHORT peak; | |
1256 USHORT rlc_oct_cnt; | |
1257 } T_UL_TBF; | |
1258 | |
1259 | |
1260 typedef struct /* T_DL_TBF */ | |
1261 { | |
1262 ULONG tbf_start_fn; | |
1263 UBYTE tfi; | |
1264 UBYTE st_tfi; /* tfi will be used after starting time elapsed */ | |
1265 UBYTE rlc_mode; | |
1266 UBYTE mac_mode; | |
1267 UBYTE polling_bit; | |
1268 UBYTE ctrl_ack_bit; | |
1269 UBYTE ts_mask; /* current timeslot mask */ | |
1270 UBYTE ts_usage; /* new assigned timeslot mask, becomes valid after starting time has elapsed */ | |
1271 UBYTE nts; /* number of timeslots allocated for tbf */ | |
1272 BOOL t3192; /* if true t3192 is running, else timer is not running, triggerd by GRLC*/ | |
1273 UBYTE trans_id; /* transaction id */ | |
1274 | |
1275 } T_DL_TBF; | |
1276 typedef UBYTE T_RXLEV_AVG; | |
1277 | |
1278 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1279 /* Start Enhanced Measurement Data Structures */ | |
1280 | |
1281 typedef struct /* T_GPRS_REPT_PRIO_DESC */ | |
1282 { | |
1283 UBYTE num_cells; /* No. of cells for which report priority is available */ | |
1284 UBYTE rept_prio[MAX_NR_OF_GSM_NC]; /* Report priority for cells in BA */ | |
1285 } T_GPRS_REPT_PRIO_DESC; | |
1286 | |
1287 /* | |
1288 * Enhanced data for reporting | |
1289 */ | |
1290 typedef struct /* T_ENH_REP_DATA */ | |
1291 { | |
1292 UBYTE rep_threshold; /* Reporting threshold */ | |
1293 UBYTE rep_offset; /* Reporting offset */ | |
1294 } T_ENH_REP_DATA; | |
1295 | |
1296 typedef struct /* T_GRR_ENH_PARA */ | |
1297 { | |
1298 UBYTE idx; /* to get on which instance of message */ | |
1299 /* the parameters are received */ | |
1300 UBYTE rept_type; /* PMR or PEMR */ | |
1301 UBYTE rep_rate; /* Reporting rate */ | |
1302 UBYTE inv_bsic_enabled; /* Is Invalid BSIC reporting enabled? */ | |
1303 UBYTE ncc_permitted; /* NCC permitted bitmap */ | |
1304 UBYTE multiband_rep; /* Number of cells, in each non-serving cell band, to be reported */ | |
1305 UBYTE servingband_rep; /* Number of cells, in serving cell band, to be reported */ | |
1306 UBYTE scale_order; /* scale order */ | |
1307 T_ENH_REP_DATA enh_rep_data[MAX_NUM_BANDS]; /* Enhanced data for reporting */ | |
1308 T_GPRS_REPT_PRIO_DESC gprs_rept_prio_desc; /* Report priority */ | |
1309 } T_GRR_ENH_PARA; | |
1310 | |
1311 /* | |
1312 / * Used to store GSM NC list formed in RR, when PBCCH is absent * / | |
1313 typedef struct / * T_BA_BCCH_NCELL_INFO * / | |
1314 { | |
1315 UBYTE index; / * index used for measurement reporting * / | |
1316 USHORT arfcn; / * Radio frequency * / | |
1317 UBYTE bsic; / * BSIC * / | |
1318 } T_BA_BCCH_NCELL_INFO; | |
1319 */ | |
1320 | |
1321 typedef struct /* T_MEAS */ | |
1322 { | |
1323 USHORT arfcn; | |
1324 UBYTE rxlev; /* Actually, this is RLA_P */ | |
1325 } T_MEAS; | |
1326 | |
1327 /* To form a ARFCN-RXLEV pair for coming out with list in desc order of RXLEV */ | |
1328 typedef struct /* T_ENH_STRNG_ARFCN_LIST */ | |
1329 { | |
1330 T_MEAS meas[MAX_NR_OF_NCELL]; | |
1331 UBYTE num; | |
1332 } T_ENH_STRNG_ARFCN_LIST; | |
1333 | |
1334 typedef struct /* T_BSIC */ | |
1335 { | |
1336 UBYTE bsic; /* Decoded BSIC */ | |
1337 UBYTE status; /* Valid, if present in BA-GPRS, Else, Invalid. */ | |
1338 } T_BSIC ; | |
1339 | |
1340 typedef struct /* T_ENH_CELL_LIST */ | |
1341 { | |
1342 UBYTE index; /* BA-GPRS Index */ | |
1343 USHORT arfcn; | |
1344 T_BSIC bsic; | |
1345 UBYTE rla_p; /* Actually, this is used for ENH meas criteria */ | |
1346 T_RXLEV_AVG rxlev_avg; /* running avg of RXLEV which is reported */ | |
1347 UBYTE rept_prio; | |
1348 } T_ENH_CELL_LIST; | |
1349 | |
1350 /* | |
1351 typedef struct / * T_ENH_BIN * / | |
1352 { | |
1353 UBYTE num_valid; / * No. of cells that are eligible for ENH measurement | |
1354 reporting * / | |
1355 T_ENH_CELL_LIST *enh_cell_list[MAX_NR_OF_NCELL]; | |
1356 } T_ENH_BIN; | |
1357 */ | |
1358 | |
1359 typedef struct /* T_ENH_BIN */ | |
1360 { | |
1361 UBYTE num_valid; /* No. of cells that are eligible for ENH measurement | |
1362 reporting */ | |
1363 UBYTE enh_index[MAX_NR_OF_NCELL]; | |
1364 } T_ENH_BIN; | |
1365 | |
1366 typedef struct /* T_PEMR_PARAMS */ | |
1367 { | |
1368 UBYTE scale_used; /* Scale used for RXLEV before ENH reporting */ | |
1369 } T_PEMR_PARAMS; | |
1370 | |
1371 /* End Enhanced Measurement Data Structures */ | |
1372 #endif | |
1373 | |
1374 typedef struct /* T_IMSI */ | |
1375 { | |
1376 UBYTE number_of_digits; /* number of valid digits in the following digit array */ | |
1377 UBYTE digit[MAX_IMSI_DIGITS];/* here are the valid imsi digits stored: received from GMM */ | |
1378 }T_IMSI; | |
1379 | |
1380 typedef struct /* T_MS_IDENT */ | |
1381 { | |
1382 ULONG ul_tlli; /* uplink tlli used for packet resource request and contention resolution */ | |
1383 ULONG received_tlli; /* tlli with which the MS is addressed */ | |
1384 ULONG old_tlli; /* old tlli received from GMM*/ | |
1385 ULONG new_tlli; /* new tlli received from GMM*/ | |
1386 ULONG old_ptmsi; /* current ptmsi paging */ | |
1387 ULONG new_ptmsi; /* candidate ptmsi stored: for paging */ | |
1388 ULONG tmsi; /* here is the valid tmsi stored: for paging */ | |
1389 T_IMSI imsi; /* imsi structure is stored in this parameter*/ | |
1390 T_rai rai; /* routing area code received from GMM to be passed to RR */ | |
1391 } T_MS_IDENT; | |
1392 | |
1393 typedef struct /* T_MS_DATA */ | |
1394 { | |
1395 USHORT access_ctrl_class; /* */ | |
1396 UBYTE class_of_mode; /* A, BC, BG, CC, CG */ | |
1397 USHORT split_pg_cycle; /* SPLIT_PAGING_CYCLE */ | |
1398 UBYTE reverts_NMO_III; /* Class B mobile reverts into Class C mobile in NMO III or not */ | |
1399 UBYTE tbf_mon_ccch; /* monitoring of CCCH during TBF allowed (TRUE) or not (FALSE) */ | |
1400 } T_MS_DATA; | |
1401 | |
1402 typedef struct /* T_SCELL */ | |
1403 { | |
1404 USHORT arfcn; /* ARFCN of the serving cell */ | |
1405 UBYTE bsic; /* BSIC of the serving cell */ | |
1406 BOOL pbcch_present; /* this value will be set by the procedure */ | |
1407 /* which handles the SI13 message */ | |
1408 } T_SCELL; | |
1409 | |
1410 typedef struct /* T_PBCCH */ | |
1411 { | |
1412 T_SCELL bcch; /* frequency and BSIC of BCCH carrier */ | |
1413 T_pbcch_des pbcch_des; /* this value contains the PBCCH description */ | |
1414 } T_PBCCH; | |
1415 | |
1416 typedef struct /* T_SPGC_CCCH_SUPP */ | |
1417 { | |
1418 UBYTE ms_supp; /* mobile station support of split */ | |
1419 /* paging cycle on CCCH */ | |
1420 UBYTE nw_supp; /* network support of split paging */ | |
1421 /* cycle on CCCH */ | |
1422 }T_SPGC_CCCH_SUPP; | |
1423 | |
1424 typedef struct /* T_NETWORK_CONTROL */ | |
1425 { | |
1426 T_SPGC_CCCH_SUPP spgc_ccch_supp; /* SPLIT_PG_CYCLE_SUPPORT: whether it is supported or not */ | |
1427 UBYTE priority_access_thr; /* packet access to the network according to priority level */ | |
1428 UBYTE bs_pa_mfrms; /* number of 51 multiframes between */ | |
1429 /* transmission of paging messages */ | |
1430 } T_NETWORK_CONTROL; | |
1431 | |
1432 typedef enum /* T_CR_IND_RETURN */ | |
1433 { | |
1434 CR_IND_RETURN_NONE, | |
1435 CR_IND_RETURN_RESPONSE, | |
1436 CR_IND_RETURN_COMPLETE | |
1437 } T_CR_IND_RETURN; | |
1438 | |
1439 typedef struct /* T_RR_STATES */ | |
1440 { | |
1441 BOOL monitoring_stopped; /* whether the monitoring on CCCH is released or not */ | |
1442 T_CR_IND_RETURN cr_ind_return; /* cell reselection started or not */ | |
1443 }T_RR_STATES; | |
1444 | |
1445 typedef enum /* T_GMM_STATES */ | |
1446 { | |
1447 STANDBY_STATE, /* GMM is in stand by state */ | |
1448 READY_STATE /* GMM is in ready state */ | |
1449 }T_GMM_STATES; | |
1450 | |
1451 typedef struct /* T_PCCCH: hopping and non hopping*/ | |
1452 { | |
1453 BOOL is_static; /* indicates whether the static parameters are valid or not*/ | |
1454 UBYTE tsc; /* common*/ | |
1455 UBYTE tn; /* common*/ | |
1456 USHORT arfcn; | |
1457 UBYTE maio; | |
1458 UBYTE ma_num; /* Mobile Allocation number*/ | |
1459 }T_PCCCH; | |
1460 | |
1461 typedef struct /* T_PAGING_GROUP */ | |
1462 { | |
1463 UBYTE kc; /* number of PCCCHs [1...16]*/ | |
1464 T_PCCCH pccch[MAX_PCCCH_DES]; /* this structure contains ARFCN, TSC, TN, MAIO (non) hopping*/ | |
1465 }T_PAGING_GROUP; | |
1466 | |
1467 typedef struct /* T_EXT_FREQ_LIST */ | |
1468 { | |
1469 UBYTE number; | |
1470 USHORT freq[RRGRR_MAX_ARFCN_EXT_MEAS]; | |
1471 } T_EXT_FREQ_LIST; | |
1472 | |
1473 typedef struct /* T_XMEAS_EM1_PARAM */ | |
1474 { | |
1475 UBYTE reporting_type; | |
1476 UBYTE ncc_permitted; | |
1477 UBYTE int_frequency; /* is set to NOT_SET, if no data available*/ | |
1478 UBYTE reporting_period; | |
1479 } T_XMEAS_EM1_PARAM; | |
1480 | |
1481 typedef struct /* T_XMEAS_EM1 */ | |
1482 { | |
1483 T_XMEAS_EM1_PARAM param; | |
1484 T_EXT_FREQ_LIST list; | |
1485 } T_XMEAS_EM1; | |
1486 | |
1487 typedef struct /* T_XMEAS */ | |
1488 { | |
1489 UBYTE idx; /* to get on which instance of message */ | |
1490 /* the parameters are received */ | |
1491 T_XMEAS_ORDER em_order_type; | |
1492 T_XMEAS_EM1 em1; | |
1493 } T_XMEAS; | |
1494 | |
1495 typedef struct /*T_int_meas_chan_lst*/ | |
1496 { | |
1497 UBYTE v_arfcn; /* valid-flag for arfcn */ | |
1498 USHORT arfcn; /* ARFCN */ | |
1499 | |
1500 UBYTE v_ma_num_maio; /* valid-flag for ma and maio */ | |
1501 UBYTE ma_num; /* MA_NUMBER */ | |
1502 UBYTE maio; /* MAIO */ | |
1503 | |
1504 UBYTE ts_alloc; /* TIMESLOT_ALLOCATION */ | |
1505 } T_int_meas_chan_lst; | |
1506 | |
1507 typedef struct /* T_si13_pbcch_loc*/ | |
1508 { | |
1509 UBYTE v_si13_location; /* valid flag for si13 location. If set: si13_location is valid. | |
1510 * Otherwise pbcch_location and psi1_repeat_period are valid. | |
1511 */ | |
1512 UBYTE si13_location; | |
1513 | |
1514 UBYTE pbcch_location; | |
1515 UBYTE psi1_repeat_period; | |
1516 } T_si13_pbcch_loc; | |
1517 | |
1518 typedef struct | |
1519 { | |
1520 U8 stat; /* Status of RLA_P value */ | |
1521 U8 lev; /* Received signal level measurement. */ | |
1522 } T_rla_p; | |
1523 | |
1524 typedef struct /* T_CR_CRITERIONS */ | |
1525 { | |
1526 SHORT c1; /* path loss criterion */ | |
1527 SHORT c31; /* signal level threshold criterion */ | |
1528 SHORT c32; /* cell ranking criterion */ | |
1529 } T_CR_CRITERIONS; | |
1530 | |
1531 //typedef UBYTE T_RXLEV_AVG; | |
1532 | |
1533 typedef struct /* T_scell_info */ | |
1534 { | |
1535 T_rla_p rla_p; /* running average of receive signal level */ | |
1536 T_RXLEV_AVG rxlev_avg; /* running average of RXLEV value */ | |
1537 T_CR_CRITERIONS cr_crit; /* cell re-selection criterions */ | |
1538 UBYTE cell_barred; /* in case CS is requested to re-select */ | |
1539 /* a new serving cell, this flag avoid */ | |
1540 /* indentifying the current serving cell */ | |
1541 /* as the best one and suppress re- */ | |
1542 /* selection */ | |
1543 } T_scell_info; | |
1544 | |
1545 | |
1546 typedef struct /* T_SYNC */ | |
1547 { | |
1548 T_SYNC_STATUS status; /* synchronisation status */ | |
1549 UBYTE sync_failed_cnt; /* number of failed synchronisation attempts */ | |
1550 } T_SYNC; | |
1551 | |
1552 | |
1553 typedef struct /* T_SYNC_INFO */ | |
1554 { | |
1555 T_SYNC sync; /* synchronisation */ | |
1556 UBYTE bsic; /* BSIC */ | |
1557 } T_SYNC_INFO; | |
1558 | |
1559 typedef struct /* T_CR_OFFSET */ | |
1560 { | |
1561 UBYTE gprs_temp_offset; /* GPRS_TEMPORARY_OFFSET */ | |
1562 UBYTE gprs_penalty_time; /* GPRS_PENALTY_TIME */ | |
1563 } T_CR_OFFSET; | |
1564 | |
1565 typedef struct /* T_CR_PAR */ | |
1566 { | |
1567 UBYTE cell_ba; /* CELL_BAR_ACCESS_2 */ | |
1568 | |
1569 UBYTE exc_acc; /* EXC_ACC */ | |
1570 | |
1571 UBYTE same_ra_scell; /* SAME_RA_AS_SERVING_CELL */ | |
1572 | |
1573 T_CR_PAR_1 cr_par_1; /* basic cell re-selection parameter */ | |
1574 | |
1575 T_CR_OFFSET cr_offset; /* parameter for GPRS temporary offset */ | |
1576 | |
1577 UBYTE gprs_resel_off; /* GPRS_RESELECT_OFFSET */ | |
1578 | |
1579 UBYTE v_si13_pbcch; /* whether SI13 PBCCH location is present or not | |
1580 * If not included, SI3 and SI4 in the neighbour | |
1581 * cell indicates if the neighbour cell supports GPRS | |
1582 */ | |
1583 T_si13_pbcch_loc si13_pbcch; /* SI13_PBCCH_LOCATION structure */ | |
1584 | |
1585 } T_CR_PAR; | |
1586 | |
1587 typedef USHORT T_INFO_SRC; | |
1588 | |
1589 typedef struct /* T_NC_MVAL, measured values of one neighbour cell */ | |
1590 { | |
1591 T_rla_p rla_p; /* running average of receive signal level */ | |
1592 T_RXLEV_AVG rxlev_avg; /* running average of RXLEV value */ | |
1593 T_SYNC_INFO sync_info; /* information about synchronisation */ | |
1594 USHORT arfcn; /* radio frequency */ | |
1595 T_NC_MVAL_STATUS status; /* status of the entry */ | |
1596 } T_NC_MVAL; | |
1597 | |
1598 typedef struct /* T_NC_MVAL_LIST */ | |
1599 { | |
1600 T_NC_MVAL nc_mval[MAX_NR_OF_NC_MVAL]; | |
1601 } T_NC_MVAL_LIST; | |
1602 | |
1603 typedef struct /* T_ncell_info */ | |
1604 { | |
1605 UBYTE index; /* index used for measurement reporting */ | |
1606 T_INFO_SRC info_src; /* indicates which air interface message */ | |
1607 /* was used to carry neighbour cell information */ | |
1608 USHORT arfcn; /* Radio frequency */ | |
1609 UBYTE bsic; /* BSIC */ | |
1610 UBYTE v_cr_par; /* indicates whether cell re-selection parameter are valid */ | |
1611 T_CR_PAR cr_par; /* cell re-selection parameter */ | |
1612 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1613 UBYTE last_rxlev; /* RXLEV from the previous rep period */ | |
1614 UBYTE rep_count; /* this is used to get how many times a | |
1615 cell in enhanced neighbour cell list | |
1616 is reported. Will be of use when | |
1617 reporting low priority cells at | |
1618 reduced rate */ | |
1619 #endif | |
1620 } T_ncell_info; | |
1621 | |
1622 typedef struct /* T_NC_CHNG_MRK */ | |
1623 { | |
1624 UBYTE prev; /* old change mark value */ | |
1625 UBYTE curr; /* new change mark value */ | |
1626 } T_NC_CHNG_MRK; | |
1627 | |
1628 typedef struct /* T_NC_PARAM */ | |
1629 { | |
1630 T_NC_CHNG_MRK chng_mrk; /* change mark */ | |
1631 UBYTE idx; /* to get on which instance of message */ | |
1632 /* the parameters are received */ | |
1633 T_NC_ORDER ctrl_order; /* NETWORK_CONTROL_ORDER, NC0, NC1, NC2, RESET */ | |
1634 UBYTE non_drx_per; /* NC_NON_DRX_PERIOD */ | |
1635 UBYTE rep_per_i; /* NC_REPORTING_PERIOD_I */ | |
1636 UBYTE rep_per_t; /* NC_REPORTING_PERIOD_T */ | |
1637 } T_NC_PARAM; | |
1638 | |
1639 typedef struct /* T_NC_LIST */ | |
1640 { | |
1641 T_NC_CHNG_MRK chng_mrk; /* change mark */ | |
1642 UBYTE number; /* number of neighbour cells */ | |
1643 T_ncell_info info[MAX_NR_OF_NCELL]; /* neighbour cell info */ | |
1644 } T_NC_LIST; | |
1645 | |
1646 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1647 typedef struct /* T_BA_BCCH_NC_LIST */ | |
1648 { | |
1649 UBYTE number; /* number of neighbour cells */ | |
1650 T_ncell_info info[MAX_NR_OF_NCELL]; /* neighbour cell info */ | |
1651 } T_BA_BCCH_NC_LIST; | |
1652 #endif | |
1653 | |
1654 typedef struct /* T_NCMEAS */ | |
1655 { | |
1656 T_NC_PARAM param; | |
1657 T_NC_LIST list; | |
1658 } T_NCMEAS; | |
1659 | |
1660 typedef struct /* T_NC_RFREQ_LIST */ | |
1661 { | |
1662 UBYTE number; | |
1663 UBYTE idx[MAX_NR_OF_NCELL]; | |
1664 } T_NC_RFREQ_LIST; | |
1665 | |
1666 typedef struct /* T_NCMEAS_EXTENDED */ | |
1667 { | |
1668 T_NCMEAS ncmeas; | |
1669 T_NC_RFREQ_LIST rfreq; | |
1670 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1671 UBYTE psi3_cm; /* PSI3 CM received in PCCO */ | |
1672 UBYTE ba_ind; /* BA_IND received in PCCO */ | |
1673 UBYTE pmo_ind; /* PMO sequence number */ | |
1674 #endif | |
1675 } T_NCMEAS_EXTENDED; | |
1676 | |
1677 typedef struct /* T_CNT_NC_SIX_STRGST */ | |
1678 { | |
1679 UBYTE strgst; /* number of carriers which belongs to the */ | |
1680 /* strongest, valid RLA_P is required */ | |
1681 UBYTE candid; /* number of carriers which belongs to the */ | |
1682 /* strongest plus candidates which may */ | |
1683 /* become member of the strongest, available */ | |
1684 /* but not necessarily valid RLA_P is */ | |
1685 /* required */ | |
1686 } T_CNT_NC_SIX_STRGST; | |
1687 | |
1688 typedef struct /* T_NC_SIX_STRGST */ | |
1689 { | |
1690 UBYTE idx; | |
1691 T_CS_MODE mode; /* indicates the mode of an individual entry */ | |
1692 /* of the list of the six strongest cells */ | |
1693 ULONG avail_time; /* time when inserted in list */ | |
1694 T_CR_CRITERIONS cr_crit; /* cell re-selection criterions */ | |
1695 } T_NC_SIX_STRGST; | |
1696 | |
1697 typedef struct /* T_NC_REF_LIST */ | |
1698 { | |
1699 T_NC_PARAM *param; | |
1700 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1701 T_GRR_ENH_PARA *enh_param; | |
1702 #endif | |
1703 UBYTE number; | |
1704 T_ncell_info *info[MAX_NR_OF_NCELL+1]; | |
1705 /* there are MAX_NR_OF_NCELL carriers for */ | |
1706 /* MS controlled cell re-selection and one for */ | |
1707 /* NW controlled in case the selected cell is */ | |
1708 /* not in the neighbour cell list */ | |
1709 } T_NC_REF_LIST; | |
1710 | |
1711 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1712 typedef struct /* T_BA_BCCH_NC_REF_LIST */ | |
1713 { | |
1714 UBYTE number; | |
1715 T_ncell_info *info[2*MAX_NR_OF_NCELL]; | |
1716 } T_BA_BCCH_NC_REF_LIST; | |
1717 #endif | |
1718 | |
1719 | |
1720 /*start of structs for GFP */ | |
1721 | |
1722 | |
1723 | |
1724 typedef struct | |
1725 { | |
1726 U8 msg_type; | |
1727 U8 rrbp; | |
1728 U8 sp; | |
1729 U8 usf; | |
1730 U8 v_rbsn; | |
1731 U8 rbsn; | |
1732 U8 rti; | |
1733 U8 fs; | |
1734 U8 ac; | |
1735 U8 pr; | |
1736 U8 tfi; | |
1737 U8 d; | |
1738 } T_D_CTRL; | |
1739 | |
1740 | |
1741 typedef struct /* T_D_HEADER*/ | |
1742 { | |
1743 UBYTE payload; /* deceides if the downlink block is a data or control block*/ | |
1744 T_D_CTRL d_ctrl; /* saves the header of a dl rlc control block*/ | |
1745 UBYTE * ptr_block; | |
1746 UBYTE pctrl_ack; /* value sent with packet control acknowledgement */ | |
1747 } T_D_HEADER; | |
1748 | |
1749 | |
1750 | |
1751 typedef struct | |
1752 { | |
1753 USHORT l_buf; | |
1754 USHORT o_buf; | |
1755 UBYTE buf [BYTE_UL_CTRL_BLOCK]; | |
1756 } T_CS1BUF; | |
1757 | |
1758 | |
1759 typedef struct | |
1760 { | |
1761 USHORT l_buf; | |
1762 USHORT o_buf; | |
1763 UBYTE buf [2 * BYTE_UL_CTRL_BLOCK]; | |
1764 /* CAN's suggestion never more then 2 blocks */ | |
1765 /* or 8 blocks? ID's suggestion 'B_SIZE_D_PAGING_REQ\8+1' */ | |
1766 | |
1767 } T_CTRLBUF; | |
1768 | |
1769 | |
1770 | |
1771 typedef struct /* T_CTRL_BLK */ | |
1772 { | |
1773 UBYTE rbsn; | |
1774 UBYTE rti; | |
1775 ULONG T3200; | |
1776 T_CS1BUF ctrl_blk; | |
1777 }T_CTRL_BLK; | |
1778 | |
1779 | |
1780 | |
1781 typedef struct /* T_SEG_CTRL_BLK */ /*saves the first part of segmented control blocks*/ | |
1782 { | |
1783 UBYTE next; | |
1784 T_CTRL_BLK blk[SEG_CTRL_BLOCK_SIZE]; | |
1785 }T_SEG_CTRL_BLK; | |
1786 | |
1787 typedef struct /* parameterts of one fixed alloction*/ | |
1788 { | |
1789 T_p_fixed_alloc alloc; | |
1790 ULONG alloc_start_fn; | |
1791 ULONG alloc_end_fn; | |
1792 UBYTE final_alloc; | |
1793 } T_FIX_ALLOC; | |
1794 | |
1795 | |
1796 typedef struct /* fixed alloction control during uplink tbf*/ | |
1797 { | |
1798 T_FA_TYPE fa_type; | |
1799 T_FIX_ALLOC current_alloc; | |
1800 BOOL repeat_alloc; | |
1801 UBYTE ts_overr; | |
1802 UBYTE dl_ctrl_ts; /* downlink control timeslot */ | |
1803 } T_FA_CONTROL; | |
1804 | |
1805 typedef struct /* T_COMPLETE_ACQ */ | |
1806 { | |
1807 BOOL needed; /* complete acquisition needed???*/ | |
1808 BOOL psi1_ok; /* PSI1 complete read?*/ | |
1809 BOOL psi2_ok; /* PSI2 complete read?*/ | |
1810 BOOL made_at_least_one_attempt; /* made at least one attempt? */ | |
1811 }T_COMPLETE_ACQ; | |
1812 | |
1813 typedef struct /* T_PSI_STATE*/ | |
1814 { | |
1815 UBYTE state; /* NEEDED, RECEIPT_OK etc.*/ | |
1816 }T_PSI_STATE; | |
1817 | |
1818 typedef struct /* T_PSI1_PARAMS */ | |
1819 { | |
1820 UBYTE pbcch_change_mark; /**/ | |
1821 UBYTE psi_change_field; /**/ | |
1822 UBYTE psi_cnt_lr; /*low repetition rate*/ | |
1823 UBYTE psi_cnt_hr; /*high repetition rate*/ | |
1824 UBYTE psi1_repeat_period; /**/ | |
1825 BOOL psi_status_supported; /*Checks whether the network supports PSI STATUS message or not*/ | |
1826 BOOL first_psi1; /*whether the received PSI1 is the first one or not*/ | |
1827 }T_PSI1_PARAMS; | |
1828 | |
1829 typedef struct /* T_PSI2_PARAMS */ | |
1830 { | |
1831 UBYTE psi2_change_mark; /**/ | |
1832 UBYTE psi2_count; /**/ | |
1833 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PSI2 + 1]; /*used for checking the consistency of PSI2. instances[0]: number of instances*/ | |
1834 }T_PSI2_PARAMS; | |
1835 | |
1836 typedef struct /* T_PSI3_PARAMS */ | |
1837 { | |
1838 UBYTE psi3_change_mark; /**/ | |
1839 UBYTE psi3_bis_count; /**/ | |
1840 }T_PSI3_PARAMS; | |
1841 | |
1842 typedef struct /* T_PSI3bis_PARAMS */ | |
1843 { | |
1844 UBYTE psi3bis_change_mark; /**/ | |
1845 UBYTE psi3bis_count; /**/ | |
1846 UBYTE psi3bis_index; | |
1847 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PSI3BIS + 1]; /*used for checking the consistency of PSI3bis. instances[0]: number of instances*/ | |
1848 }T_PSI3BIS_PARAMS; | |
1849 | |
1850 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1851 typedef struct /* T_PSI3ter_PARAMS */ | |
1852 { | |
1853 UBYTE psi3ter_change_mark; /**/ | |
1854 UBYTE psi3ter_count; /**/ | |
1855 UBYTE prev_psi3ter_index; | |
1856 UBYTE psi3ter_index; | |
1857 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PSI3TER + 1]; /*used for checking the consistency of PSI3ter. instances[0]: number of instances*/ | |
1858 }T_PSI3TER_PARAMS; | |
1859 #endif | |
1860 | |
1861 typedef struct /* T_PSI4_PARAMS */ | |
1862 { | |
1863 UBYTE psi4_change_mark; /**/ | |
1864 UBYTE psi4_count; /**/ | |
1865 UBYTE psi4_index; | |
1866 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PSI4 + 1]; /*used for checking the consistency of PSI4. instances[0]: number of instances*/ | |
1867 }T_PSI4_PARAMS; | |
1868 | |
1869 typedef struct /* T_EXT_START_STOP */ | |
1870 { | |
1871 UBYTE start; | |
1872 UBYTE stop; | |
1873 } T_EXT_START_STOP; | |
1874 | |
1875 typedef struct /* T_PSI5_PARAMS */ | |
1876 { | |
1877 UBYTE psi5_change_mark; /**/ | |
1878 UBYTE psi5_count; /**/ | |
1879 UBYTE psi5_index; | |
1880 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PSI5 + 1]; /*used for checking the consistency of PSI5. instances[0]: number of instances*/ | |
1881 T_EXT_START_STOP idx[MAX_NR_OF_INSTANCES_OF_PSI5]; /* used for sorting the EXT frequency lists */ | |
1882 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
1883 BOOL v_enh_rep_param_struct; /* Will be set if ENH params | |
1884 are present */ | |
1885 #endif | |
1886 }T_PSI5_PARAMS; | |
1887 | |
1888 #ifdef REL99 | |
1889 typedef struct /* T_PSI8_PARAMS */ | |
1890 { | |
1891 UBYTE psi8_change_mark; /**/ | |
1892 UBYTE psi8_count; /**/ | |
1893 UBYTE psi8_index; | |
1894 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PSI8 + 1];/*used for checking the consistency of PSI8. instances[0]: number of instances*/ | |
1895 }T_PSI8_PARAMS; | |
1896 #endif | |
1897 | |
1898 typedef struct /* T_PSI13_PARAMS */ | |
1899 { | |
1900 UBYTE bcch_change_mark; /**/ | |
1901 UBYTE si13_change_mark; /**/ | |
1902 }T_PSI13_PARAMS; | |
1903 | |
1904 | |
1905 typedef struct | |
1906 { | |
1907 UBYTE Rx; | |
1908 UBYTE Tx; | |
1909 UBYTE Sum; | |
1910 UBYTE Ttb; | |
1911 UBYTE Tra; | |
1912 } T_MS_CLASS_CAP; | |
1913 | |
1914 typedef struct | |
1915 { | |
1916 UBYTE ta_valid; /* 1: valid ta value present */ | |
1917 UBYTE ta_value; /* store recent value */ | |
1918 UBYTE ul_ta_i; /* store uplink ta index */ | |
1919 UBYTE ul_ta_tn; /* store uplink ta timeslot */ | |
1920 UBYTE dl_ta_i; /* store downlink ta index */ | |
1921 UBYTE dl_ta_tn; /* store downlink ta timeslot */ | |
1922 UBYTE l1_ta_value; /* ta_value stored in l1 */ | |
1923 UBYTE l1_ta_i; /* ta_index stored in l1 */ | |
1924 UBYTE l1_ta_tn; /* ta_timeslot stored in l1 */ | |
1925 } T_TA_PARAMS; | |
1926 | |
1927 /* structure for service internal data */ | |
1928 | |
1929 /* | |
1930 start structs for CS | |
1931 */ | |
1932 | |
1933 typedef struct | |
1934 { | |
1935 UBYTE cnt; /* number of measurements */ | |
1936 SHORT acc; /* accumulated measurement results */ | |
1937 USHORT rpt_prd; /* reporting period */ | |
1938 } T_MEAS_RSLT; | |
1939 | |
1940 typedef struct | |
1941 { | |
1942 BOOL ovrflw; /* indicates whether more than */ | |
1943 /* CS_MAX_MEAS_RSLT measurement */ | |
1944 /* results are already collected */ | |
1945 UBYTE loi; /* last occupied index */ | |
1946 T_MEAS_RSLT meas[CS_MAX_MEAS_RSLT]; /* measurement results */ | |
1947 } T_RLA_P_DATA; | |
1948 | |
1949 typedef USHORT T_RXLEV_DATA_NBR; | |
1950 typedef ULONG T_RXLEV_DATA_ACC; | |
1951 | |
1952 typedef struct | |
1953 { | |
1954 T_RXLEV_DATA_NBR nbr; /* number of accumulated RXLEV values */ | |
1955 T_RXLEV_DATA_ACC acc; /* accumulated RXLEV values */ | |
1956 } T_RXLEV_DATA; | |
1957 | |
1958 typedef struct | |
1959 { | |
1960 USHORT arfcn; /* BCCH carrier of neighbour cell */ | |
1961 T_RLA_P_DATA rla_p_data; /* raw data for deriving the RLA_P */ | |
1962 T_RXLEV_DATA rxlev_data; /* raw data for deriving the RXLEV */ | |
1963 /* average for packet measurement */ | |
1964 /* reporting */ | |
1965 } T_CELL; | |
1966 | |
1967 typedef struct | |
1968 { | |
1969 UBYTE c_cell; /* number of neigbhour cells */ | |
1970 T_CELL cell[MPHP_NUMC_BA_GPRS_SC]; /* array of neighbour cells */ | |
1971 } T_NC_DATA; | |
1972 | |
1973 typedef struct /* T_CTRL_DATA */ | |
1974 { | |
1975 UBYTE state; | |
1976 UBYTE last_state; /* last state of CTRL: needed in case of handling circuit switched call*/ | |
1977 T_RR_STATES rr_state;/*the state of the RR part: we may remove this variable and substitude it with another one*/ | |
1978 PG_CHANNEL cs_page_channel; /* on which channel the MS was paged for CS call*/ | |
1979 CTRL_FOLLOWING_SUSPENSION after_suspension; /* SZML-GLBL/009 */ | |
1980 CTRL_PSI_TBF_REL_CAUSE psi_tbf_rel_cause; | |
1981 UBYTE imm_rel; | |
1982 USHORT pcc_arfcn; | |
1983 USHORT old_arfcn; | |
1984 UBYTE pcc_bsic; | |
1985 UBYTE old_bsic; | |
1986 UBYTE is_susp_needed; /* indicates whether suspension has been needed or not*/ | |
1987 UBYTE new_cell_responded; | |
1988 BOOL parked_rrgrr_cr_ind; | |
1989 #ifdef REL99 | |
1990 UBYTE poll_for_msg; /* Values 0-Invalid, 1-PCCO */ | |
1991 T_D_CELL_CHAN_ORDER pcco; | |
1992 #endif | |
1993 #ifndef NTRACE | |
1994 char *name; | |
1995 char *state_name; | |
1996 #endif | |
1997 } T_CTRL_DATA; | |
1998 | |
1999 | |
2000 typedef struct /* T_CTRL_GLBL_DATA */ | |
2001 { | |
2002 T_GLBL_PCKT_MODE state; | |
2003 T_CTRL_TASK ctrl_task; | |
2004 #ifndef NTRACE | |
2005 char *name; | |
2006 char *state_name; | |
2007 #endif | |
2008 } T_CTRL_GLBL_DATA; | |
2009 | |
2010 | |
2011 typedef struct /* T_UL_CTRL_BLOCK */ | |
2012 { | |
2013 UBYTE owner; | |
2014 T_BLK_STATE state; | |
2015 UBYTE data[BYTE_UL_CTRL_BLOCK]; | |
2016 } T_UL_CTRL_BLOCK; | |
2017 | |
2018 typedef UBYTE T_BLK_INDEX; | |
2019 | |
2020 typedef struct /* T_UL_CTRL_BLOCK_ARRAY */ | |
2021 { | |
2022 T_UL_CTRL_BLOCK blk[MAX_CTRL_BLK_NUM]; | |
2023 T_BLK_INDEX seq[MAX_CTRL_BLK_NUM]; | |
2024 } T_UL_CTRL_BLOCK_ARRAY; | |
2025 | |
2026 typedef struct /* T_EVAL_ASSIGN_PARAM */ | |
2027 { | |
2028 UBYTE ccch_read; | |
2029 T_TBF_TYPE tbf_type; | |
2030 UBYTE state; | |
2031 } T_EVAL_ASSIGN_PARAM; | |
2032 | |
2033 typedef void ( * T_TC_DISABLE_CALLBACK_FUNC )( void ); | |
2034 | |
2035 | |
2036 typedef struct /* T_FREQ_SET */ | |
2037 { | |
2038 T_p_frequency_par freq_par; /* frequency parameter */ | |
2039 UBYTE tsc; /* training sequence code */ | |
2040 } T_FREQ_SET; | |
2041 | |
2042 typedef struct /* T_TC_DATA */ | |
2043 { | |
2044 UBYTE state; | |
2045 T_TC_DISABLE_CALLBACK_FUNC | |
2046 disable_callback_func; | |
2047 UBYTE disable_class; | |
2048 UBYTE dcch_present; | |
2049 UBYTE ra_once_sent; | |
2050 UBYTE n_acc_req; /* number of sent packet access request in | |
2051 current access procedure */ | |
2052 BOOL sending_req; /* sending of packet access requests in process */ | |
2053 UBYTE v_sb_without_tbf; | |
2054 T_UL_CTRL_BLOCK_ARRAY ul_ctrl_blk; /* holds all relevant information for */ | |
2055 /* sending uplink control blocks */ | |
2056 T_FA_CONTROL fa_ctrl; /* handles the fixed allocation parameters during uplink tbf*/ | |
2057 UBYTE two_2p_w_4_tbf_con; /* if true TC waits for TBF_CON after 2 phase access:*/ | |
2058 /* needed to abort single block procedure:default is true */ | |
2059 UBYTE num_of_rels_running; /* number releas confirms that have to be received */ | |
2060 UBYTE last_rec_nb_id; /* assignment id of single block downlink assignment*/ | |
2061 ULONG last_rec_nb_fn; /* fn starting time(receive fn numer) of single block dl assignment*/ | |
2062 | |
2063 T_EVAL_ASSIGN_PARAM last_eval_assign; | |
2064 T_D_DL_ASSIGN *p_assign; /* pointer to dynamically allocated memory */ | |
2065 | |
2066 T_TBF_TYPE last_tbf_type; | |
2067 BOOL v_freq_set; /* frequency params from an assignment are stored */ | |
2068 T_FREQ_SET freq_set; | |
2069 #if defined REL99 AND defined TI_PS_FF_TBF_EST_PACCH | |
2070 BOOL tbf_est_pacch; | |
2071 #endif | |
2072 | |
2073 | |
2074 #ifdef _SIMULATION_ | |
2075 UBYTE res_random; | |
2076 #endif | |
2077 | |
2078 #ifndef NTRACE | |
2079 char *name; | |
2080 char *state_name; | |
2081 #endif | |
2082 } T_TC_DATA; | |
2083 | |
2084 typedef struct /* T_EVAL_IA_DL_PARAM */ | |
2085 { | |
2086 UBYTE state; | |
2087 T_EVAL_IA_DL eval_ia_dl; | |
2088 } T_EVAL_IA_DL_PARAM; | |
2089 | |
2090 typedef struct /* T_EVAL_IA_UL_PARAM */ | |
2091 { | |
2092 T_EVAL_IA eval_ia; | |
2093 } T_EVAL_IA_UL_PARAM; | |
2094 | |
2095 typedef union /* T_EVAL_IA_UNION */ | |
2096 { | |
2097 T_EVAL_IA_UL_PARAM param_ul; | |
2098 T_EVAL_IA_DL_PARAM param_dl; | |
2099 } T_EVAL_IA_UNION; | |
2100 | |
2101 typedef struct /* T_CPAP_DATA */ | |
2102 { | |
2103 UBYTE state; | |
2104 T_TBF_TYPE new_tbf_type; | |
2105 T_D_PDCH_ASS_CMD pdch_ass_cmd; | |
2106 UBYTE v_tma_ia; | |
2107 T_D_IMM_ASSIGN tma_ia; /* for 2 message assignments */ | |
2108 /* parameters from the first */ | |
2109 /* have to be stored until */ | |
2110 /* 2nd message has arrived */ | |
2111 | |
2112 T_IA_TYPE last_ia_type; | |
2113 T_EVAL_IA_UNION last_eval_ia; | |
2114 | |
2115 T_D_IMM_ASSIGN *p_d_imm_assign; /* pointer to dynamically allocated memory */ | |
2116 | |
2117 #ifndef NTRACE | |
2118 char *name; | |
2119 char *state_name; | |
2120 #endif | |
2121 } T_CPAP_DATA; | |
2122 | |
2123 /* | |
2124 * The service PSI holds its state in a variable assigned to one of | |
2125 * the serving cell databases (either sc_db_1 or sc_db_2). | |
2126 * This is used to simplify the procedure of returning to the old cell | |
2127 * in case it is not possible to access the cell choosen for cell | |
2128 * re-selection. | |
2129 */ | |
2130 typedef struct /* T_PSI_ASSIGNED_DATA */ | |
2131 { | |
2132 UBYTE state; | |
2133 | |
2134 #ifndef NTRACE | |
2135 char *name; | |
2136 char *state_name; | |
2137 #endif | |
2138 } T_PSI_ASSIGNED_DATA; | |
2139 | |
2140 /* | |
2141 * for more information see comment related to structure T_PSI_ASSIGNED_DATA | |
2142 */ | |
2143 typedef struct /* T_PSI_DATA */ | |
2144 { | |
2145 UBYTE last_psi_state; | |
2146 UBYTE is_start_of_10_sec_allowed; /* Indicates whether the starting of 10 second timer is allowed or not*/ | |
2147 BOOL is_pbcch_req_needed; /*PBCCH req. waiting for perform*/ | |
2148 BOOL is_pbcch_req_allowed; /*PBCCH req. allowed due to transition rules or not*/ | |
2149 UBYTE reading_type; | |
2150 BOOL v_nc_param; | |
2151 UBYTE psi2_pos[MAX_NR_OF_INSTANCES_OF_PSI2]; | |
2152 | |
2153 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
2154 UBYTE psi3_set_pos[MAX_NR_OF_INSTANCES_OF_PSI3TER+ | |
2155 MAX_NR_OF_INSTANCES_OF_PSI3BIS+ | |
2156 MAX_NR_OF_INSTANCES_OF_PSI3]; | |
2157 /* contains PSI3, 3bis and 3ter */ | |
2158 #else | |
2159 UBYTE psi3bis_pos[MAX_NR_OF_INSTANCES_OF_PSI3BIS+ | |
2160 MAX_NR_OF_INSTANCES_OF_PSI3]; | |
2161 /*contains PSI3 and 3bis*/ | |
2162 #endif | |
2163 | |
2164 UBYTE psi4_pos[MAX_NR_OF_INSTANCES_OF_PSI4]; | |
2165 UBYTE psi5_pos[MAX_NR_OF_INSTANCES_OF_PSI5]; | |
2166 #ifdef REL99 | |
2167 UBYTE psi8_pos[MAX_NR_OF_INSTANCES_OF_PSI8]; | |
2168 #endif | |
2169 T_NC_PARAM nc_param; | |
2170 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
2171 T_GRR_ENH_PARA enh_param; /* Temporary storage for enhanced | |
2172 measurement parameters received | |
2173 from PSIs */ | |
2174 #endif | |
2175 | |
2176 #if defined (TI_PS_FF_RTD) AND defined (REL99) | |
2177 T_RTD_VALUE rtd[MAX_NR_OF_NCELL];/* RTD values for the neighbour cell synchronisation */ | |
2178 #endif /* #if defined (TI_PS_FF_RTD) AND defined (REL99) */ | |
2179 | |
2180 } T_PSI_DATA; | |
2181 | |
2182 typedef struct /* T_PG_DATA */ | |
2183 { | |
2184 UBYTE state; | |
2185 | |
2186 /* some parameters needed for RR establishment request*/ | |
2187 UBYTE ch_needed; /* channel needed field*/ | |
2188 UBYTE v_emlpp_prio; /* valid flag for emlpp_priority*/ | |
2189 UBYTE emlpp_prio; /* value of eMLPP_PRIORITY*/ | |
2190 UBYTE type; /* type of paging for rr est: IMSI, TMSI*/ | |
2191 USHORT initial_dsc; | |
2192 USHORT dsc; | |
2193 UBYTE is_l1_ref_tn_changed; | |
2194 UBYTE nmo; /* network mode of operation for paging */ | |
2195 T_PACKET_MODE packet_mode; | |
2196 #ifndef NTRACE | |
2197 char *name; | |
2198 char *state_name; | |
2199 #endif | |
2200 } T_PG_DATA; | |
2201 | |
2202 typedef USHORT T_C_INDEX; | |
2203 typedef USHORT T_C_VALUE; | |
2204 | |
2205 typedef struct /* T_C_FILTER */ | |
2206 { | |
2207 T_C_VALUE value; /* current C value */ | |
2208 T_C_INDEX index; /* iteration index */ | |
2209 } T_C_FILTER; | |
2210 | |
2211 typedef struct /* T_MEAS_DATA */ | |
2212 { | |
2213 UBYTE state; | |
2214 | |
2215 UBYTE pwr_offset; /* POWER OFFSET parameter used */ | |
2216 /* by a DCS 1800 Class 3 MS */ | |
2217 T_C_FILTER c_filter; /* filtered C value */ | |
2218 | |
2219 #ifndef NTRACE | |
2220 char *name; | |
2221 char *state_name; | |
2222 #endif | |
2223 } T_MEAS_DATA; | |
2224 | |
2225 typedef USHORT T_IM_GAMMA; | |
2226 | |
2227 typedef struct /* T_MEAS_IM_GAMMA */ | |
2228 { | |
2229 UBYTE index; /* iteration index */ | |
2230 UBYTE m_gamma; /* multi-flag */ | |
2231 T_IM_GAMMA gamma; /* filtered interference level values */ | |
2232 LONG remain_time; /* remaining time to run until */ | |
2233 /* timer T_IM_SYNC expires */ | |
2234 } T_MEAS_IM_GAMMA; | |
2235 | |
2236 typedef UBYTE T_MEAS_IM_HOP_ARFCN_BIT_FIELD[MAX_IM_HOP_ARFCN_BIT_FIELD_SIZE]; | |
2237 | |
2238 typedef struct /* T_MEAS_IM_HOP_PARAM */ | |
2239 { | |
2240 UBYTE hsn; | |
2241 UBYTE maio; | |
2242 T_MEAS_IM_HOP_ARFCN_BIT_FIELD arfcn_bit_field; | |
2243 } T_MEAS_IM_HOP_PARAM; | |
2244 | |
2245 typedef union /* T_MEAS_IM_ALLOC */ | |
2246 { | |
2247 USHORT arfcn; | |
2248 T_MEAS_IM_HOP_PARAM hop_param; | |
2249 } T_MEAS_IM_ALLOC; | |
2250 | |
2251 typedef struct /* T_MEAS_IM_CARRIER */ | |
2252 { | |
2253 BOOL hopping; | |
2254 T_MEAS_IM_ALLOC alloc; | |
2255 } T_MEAS_IM_CARRIER; | |
2256 | |
2257 typedef struct /* T_MEAS_IM_FILTER */ | |
2258 { | |
2259 UBYTE used; /* indicates whether the filter is used */ | |
2260 T_MEAS_IM_GAMMA i_level [CGRLC_MAX_TIMESLOTS]; | |
2261 /* interference level for each timeslot */ | |
2262 T_MEAS_IM_CARRIER carrier; /* carrier used for measurement */ | |
2263 } T_MEAS_IM_FILTER; | |
2264 | |
2265 typedef struct /* T_MEAS_IM_CHANNEL */ | |
2266 { | |
2267 UBYTE index; /* actual channel that is measured */ | |
2268 UBYTE ident[MAX_IM_IDLE_CHANNELS]; | |
2269 /* identifies the channel to be measured */ | |
2270 } T_MEAS_IM_IDLE_CHN; | |
2271 | |
2272 typedef struct /* T_MEAS_IM_DATA */ | |
2273 { | |
2274 UBYTE state; /* sub-state of the interference */ | |
2275 /* measurement service */ | |
2276 T_MEAS_IM_MODE mode; /* mode of operation */ | |
2277 T_MEAS_IM_IDLE_CHN idle_chan; /* channels measured in packet */ | |
2278 /* idle mode */ | |
2279 T_MEAS_IM_FILTER filter [MAX_IM_CHANNELS]; | |
2280 /* running average filter */ | |
2281 USHORT carrier_id; /* carrier identifier */ | |
2282 T_MEAS_IM_CARRIER carrier; /* carrier currently measured */ | |
2283 T_MEAS_IM_TRIG_SIGNAL trig_signal; /* trigger signal */ | |
2284 BOOL v_cs_meas_active; | |
2285 /* indicates whether cell re- */ | |
2286 /* selection measurements are */ | |
2287 /* active */ | |
2288 BOOL v_ilev_abs; /* indicates whether at least one */ | |
2289 /* CGRLC_INT_LEVEL_REQ primitive */ | |
2290 /* was sent since last reset */ | |
2291 T_ilev_abs ilev_abs; /* stores the content of last */ | |
2292 /* sent CGRLC_INT_LEVEL_REQ */ | |
2293 /* primitive */ | |
2294 | |
2295 #if !defined (NTRACE) | |
2296 | |
2297 UBYTE n_im_trace; | |
2298 | |
2299 #endif /* #if !defined (NTRACE) */ | |
2300 | |
2301 #ifndef NTRACE | |
2302 char *name; | |
2303 char *state_name; | |
2304 #endif | |
2305 } T_MEAS_IM_DATA; | |
2306 | |
2307 typedef struct /* T_MEAS_EM_RSLT */ | |
2308 { | |
2309 UBYTE refidx; | |
2310 UBYTE rxlev; | |
2311 UBYTE bsic; | |
2312 } T_MEAS_EM_RSLT; | |
2313 | |
2314 | |
2315 typedef struct /* T_MEAS_EM_RSLT_LIST */ | |
2316 { | |
2317 UBYTE number; | |
2318 T_MEAS_EM_RSLT elem[RRGRR_MAX_ARFCN_EXT_MEAS]; | |
2319 } T_MEAS_EM_RSLT_LIST; | |
2320 | |
2321 | |
2322 typedef struct /* T_MEAS_EM_STRG_LIST */ | |
2323 { | |
2324 UBYTE number; | |
2325 UBYTE refidx[RRGRR_MAX_ARFCN_EXT_MEAS]; | |
2326 } T_MEAS_EM_STRG_LIST; | |
2327 | |
2328 typedef struct /* T_MEAS_PAR_PMO */ | |
2329 { | |
2330 UBYTE count; | |
2331 UBYTE instances[MAX_NR_OF_INSTANCES_OF_PMO]; | |
2332 T_EXT_START_STOP idx[MAX_NR_OF_INSTANCES_OF_PMO]; | |
2333 } T_MEAS_PAR_PMO; | |
2334 | |
2335 typedef struct /* T_MEAS_MSG_PMO */ | |
2336 { | |
2337 T_NCMEAS_EXTENDED nc; | |
2338 T_XMEAS extd; | |
2339 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
2340 BOOL v_enh_meas_param_pmo; /* Set if ENH params are present */ | |
2341 T_GRR_ENH_PARA enh; /* Temporary storage for enhanced measurement | |
2342 parameters received from PMO*/ | |
2343 #endif | |
2344 T_MEAS_PAR_PMO prm; | |
2345 } T_MEAS_MSG_PMO; | |
2346 | |
2347 typedef struct /* T_XMEAS_SET */ | |
2348 { | |
2349 UBYTE ident; /* identifier of valid EXT measurement parameter set */ | |
2350 T_XMEAS *param; /* pointer to valid EXT measurement parameter set */ | |
2351 } T_XMEAS_SET; | |
2352 | |
2353 typedef struct /* T_MEAS_EM_DATA */ | |
2354 { | |
2355 UBYTE state; | |
2356 T_XMEAS_SET xmeas_set; | |
2357 BOOL v_pmo_nc_ncmeas_param; | |
2358 BOOL v_pmo_nc_ncmeas_list_rfreq; | |
2359 T_MEAS_MSG_PMO pmo; /* used to store message packet measurement */ | |
2360 /* order temporarily */ | |
2361 T_MEAS_EM_RSLT_LIST rslt; /* EXT measurement results for all carriers */ | |
2362 T_MEAS_EM_STRG_LIST strg; /* EXT measurement results for 6 strongest */ | |
2363 /* carriers ( with/without BSIC decoding ) */ | |
2364 UBYTE pmr_snd_ref; | |
2365 /* reference to the next EXT measurement */ | |
2366 /* result which chould be sent to the */ | |
2367 /* network */ | |
2368 #ifndef NTRACE | |
2369 char *name; | |
2370 char *state_name; | |
2371 #endif | |
2372 } T_MEAS_EM_DATA; | |
2373 | |
2374 typedef struct /* T_GRR_CS_DATA */ | |
2375 { | |
2376 UBYTE state; | |
2377 T_GMM_STATES gmm_state; | |
2378 T_TIME last_cr; | |
2379 T_CS_RESELECT_CAUSE reselect_cause; | |
2380 UBYTE is_upd_ncell_stat_needed; | |
2381 UBYTE is_mval_initialized; | |
2382 UBYTE list_id; | |
2383 UBYTE stop_req; | |
2384 UBYTE cr_meas_mode; /* cell re-selection measurement mode */ | |
2385 BOOL cr_meas_update; | |
2386 UBYTE last_assignment_id; | |
2387 USHORT nc_sync_rep_pd; | |
2388 | |
2389 #if !defined (NTRACE) | |
2390 | |
2391 UBYTE v_crp_trace; | |
2392 | |
2393 #endif /* #if !defined (NTRACE) */ | |
2394 | |
2395 #ifndef NTRACE | |
2396 char *name; | |
2397 char *state_name; | |
2398 #endif | |
2399 } T_GRR_CS_DATA; | |
2400 | |
2401 typedef struct /* T_CS_MEAS_DATA */ | |
2402 { | |
2403 UBYTE state; | |
2404 UBYTE pmr_snd_ref; /* reference to the next NC measurement result */ | |
2405 /* which chould be sent to the network */ | |
2406 UBYTE nc_meas_cause;/*Indicates NC meas status in ALR when NC=1 or NC=2 */ | |
2407 T_PACKET_MODE packet_mode; | |
2408 #ifndef NTRACE | |
2409 char *name; | |
2410 char *state_name; | |
2411 #endif | |
2412 } T_CS_MEAS_DATA; | |
2413 | |
2414 | |
2415 | |
2416 typedef struct | |
2417 { | |
2418 U8 nc2_on; /* | |
2419 * Indicates whether it is allowed to use NC1 and NC2: | |
2420 * | |
2421 * TRUE = Use of NC1 and NC2 is allowed. | |
2422 * FALSE = Use of NC1 and NC2 is prohibited. | |
2423 */ | |
2424 } T_GRR_FFS; | |
2425 | |
2426 | |
2427 | |
2428 | |
2429 typedef struct /* T_GFP_DATA */ | |
2430 { | |
2431 UBYTE state; | |
2432 BOOL tfi_check_needed; /* if the tfi in optional header is correct, | |
2433 the ms shall ignore the tfi within the air message. | |
2434 This parameter indicates if a check for the tfi is needed(TRUE) | |
2435 or not(FALSE)*/ | |
2436 | |
2437 #ifndef NTRACE | |
2438 char *name; | |
2439 char *state_name; | |
2440 #endif | |
2441 } T_GFP_DATA; | |
2442 | |
2443 typedef struct | |
2444 { | |
2445 BOOL v_gamma; | |
2446 UBYTE gamma; | |
2447 } T_GAMMA_TN; | |
2448 | |
2449 typedef struct | |
2450 { | |
2451 BOOL v_alpha; | |
2452 UBYTE alpha; | |
2453 T_GAMMA_TN gamma_tn[CGRLC_MAX_TIMESLOTS]; | |
2454 } T_PWR_PAR; | |
2455 | |
2456 typedef struct /* T_CELL_INFO_FOR_GMM */ | |
2457 { | |
2458 T_cell_info cell_info; /* Cell information */ | |
2459 T_GPRS_SERVICE gprs_service; /* GPRS service */ | |
2460 T_ACCESS_STATUS access_status; /* Access status */ | |
2461 } T_CELL_INFO_FOR_GMM; | |
2462 | |
2463 typedef struct /* T_SC_DATABASE */ | |
2464 { | |
2465 T_PSI_ASSIGNED_DATA psi_assigned_data; | |
2466 T_PSI1_PARAMS psi1_params; /**/ | |
2467 T_PSI2_PARAMS psi2_params; /**/ | |
2468 T_PSI3_PARAMS psi3_params; /**/ | |
2469 T_PSI3BIS_PARAMS psi3bis_params; /**/ | |
2470 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
2471 T_PSI3TER_PARAMS psi3ter_params; /**/ | |
2472 #endif | |
2473 T_PSI4_PARAMS psi4_params; /**/ | |
2474 T_PSI5_PARAMS psi5_params; /**/ | |
2475 #ifdef REL99 | |
2476 T_PSI8_PARAMS psi8_params; /**/ | |
2477 #endif | |
2478 T_PSI13_PARAMS psi13_params; /**/ | |
2479 UBYTE is_access_enabled; /* This common parameter is used by services CTRL and PSI*/ | |
2480 T_COMPLETE_ACQ complete_acq; /**/ | |
2481 ACQ_TYPE acq_type; /*indicates whether the receiving of consistent set of PSI is in progress*/ | |
2482 | |
2483 BOOL measurement_order; /*FALSE: NC0, EM0 no PSI5; TRUE: PSI5 on PBCCH measurement needed*/ | |
2484 BOOL send_psi_status; /*Checks whether the PSI service should send PSI STATUS message or not*/ | |
2485 | |
2486 T_PSI_STATE state_of_PSI[MAX_PSI]; /* */ | |
2487 | |
2488 UBYTE si_to_acquire; /* UNSPECIFIED_SI, UPDATE_SI1, UPDATE_SI2_SI2BIS_OR_SI2TER, | |
2489 UPDATE_SI3_SI4_SI7_OR_SI8, UPDATE_SI9, UPDATE_SI13*/ | |
2490 T_MPHP_SCELL_PBCCH_REQ scell_pbcch; /* stores the primitive, and pass it after | |
2491 transition rules to layer1 */ | |
2492 | |
2493 T_PBCCH pbcch; /* PBCCH description */ | |
2494 | |
2495 T_NETWORK_CONTROL net_ctrl; /* Network control parameters*/ | |
2496 | |
2497 BOOL v_gprs_cell_opt; /* valid flag for GPRS Cell Options*/ | |
2498 T_gprs_cell_opt gprs_cell_opt; /* GPRS Cell Options */ | |
2499 | |
2500 BOOL v_prach; /* valid flag for PRACH Control Parameters*/ | |
2501 T_prach_ctrl_par prach; /* PRACH Control Parameters */ | |
2502 | |
2503 BOOL v_g_pwr_par; /* valid flag for Global Power Control Parameters*/ | |
2504 T_g_pwr_par g_pwr_par; /* Global Power Control Parameters */ | |
2505 | |
2506 BOOL v_pwr_par; /* valid flag for Power Control Parameters*/ | |
2507 T_PWR_PAR pwr_par; /* Power Control Parameters */ | |
2508 | |
2509 T_pccch_org_par pccch; /* PCCCH Organization Parameters */ | |
2510 | |
2511 T_PAGING_GROUP paging_group; /* This structure contains parameters to initialize paging (static)*/ | |
2512 | |
2513 UBYTE last_pg_mode; /* last page mode*/ | |
2514 UBYTE network_pg_mode; | |
2515 BOOL gprs_attach_is_running; /* indicates if the gprs procedure is running or not*/ | |
2516 UBYTE non_drx_timer; /* This value contains the values in seconds*/ | |
2517 BOOL non_drx_timer_running; | |
2518 BOOL nc2_non_drx_period_running; | |
2519 | |
2520 T_RFL_LST rfl[MAX_RFL+1]; /* Reference Frequency Lists */ | |
2521 | |
2522 BOOL v_cell_alloc; /* valid flag for Cell Allocation */ | |
2523 T_cell_alloc cell_alloc[MAX_CELL_ALLOC]; /* Cell Allocation */ | |
2524 | |
2525 T_gprs_ms_alloc gprs_ms_alloc_in_assignment; /* GPRS Mobile Allocations received in an assignment message*/ | |
2526 | |
2527 T_gprs_ms_alloc gprs_ms_alloc_in_psi2_psi13[MAX_GPRS_MS_ALLOC]; /* GPRS Mobile Allocations received in PSI2 and/or PSI13*/ | |
2528 | |
2529 #ifdef REL99 | |
2530 BOOL v_add_psi;/* valid-flag */ | |
2531 T_add_psi add_psi; /* additional PSI Messages broad cast information*/ | |
2532 #endif | |
2533 | |
2534 BOOL v_non_gprs_opt; /* valid flag for Non GPRS Cell Options */ | |
2535 T_non_gprs_opt non_gprs_opt; /* Non GPRS Cell Options */ | |
2536 | |
2537 T_SCELL_PAR scell_par; /* Serving Cell parameters from PSI 3 and PSI3 BIS */ | |
2538 | |
2539 T_gen_cell_par gen_cell_par; /* General Cell Selection parameter */ | |
2540 | |
2541 UBYTE number_of_valid_int_meas_channels; | |
2542 T_int_meas_chan_lst int_meas_chan_list[MAX_CHAN_IMEAS]; /* Channel List for Interference measurements (PSI 4) */ | |
2543 | |
2544 BOOL is_ext_psi5_valid; /* Is the extended structure in PSI5 is valid*/ | |
2545 T_XMEAS ext_psi5; /* EXT measurement parameters derived from PSI5 */ | |
2546 | |
2547 T_XMEAS ext_pmo; /* EXT measurement parameters derived from packet measurement order */ | |
2548 | |
2549 T_NCMEAS nc_cw; /* NC measurement parameters cell wide */ | |
2550 | |
2551 T_NCMEAS_EXTENDED nc_ms; /* NC measurement parameters MS specific */ | |
2552 | |
2553 T_CELL_INFO_FOR_GMM cell_info_for_gmm; /* Cell information composed for GMM */ | |
2554 #ifdef REL99 | |
2555 #ifdef TI_PS_FF_QUAD_BAND_SUPPORT | |
2556 UBYTE band_indicator; /* Band indicator received in PSI 1 */ | |
2557 #endif | |
2558 UBYTE sgsn_rel; /* SGSN release of the serving cell */ | |
2559 UBYTE network_rel; /*Network release*/ | |
2560 BOOL v_cbch_chan_desc; /* valid fla for CBCH channel description. */ | |
2561 T_cbch_chan_desc cbch_chan_desc; /* Stores CBCH channel description as received in PSI8 */ | |
2562 BOOL send_cbch_info_ind;/* This flag indicates if a CBCH info update has to be sent to RR */ | |
2563 #ifdef TI_PS_FF_EMR | |
2564 UBYTE ba_ind; /* BA-BCCH sequence number */ | |
2565 T_BA_BCCH_NC_LIST nc_ba_bcch_cw; /* GSM NC list formed in RR from BA-BCCH and BSIC */ | |
2566 T_GRR_ENH_PARA enh_cw; /* ENH measurement parameters cell wide */ | |
2567 T_GRR_ENH_PARA enh_ms; /* ENH measurement param */ | |
2568 BOOL si_status_ind; /* The network supports/does not support | |
2569 the PACKET SI STATUS message */ | |
2570 #endif | |
2571 #endif | |
2572 | |
2573 #if defined (TI_PS_FF_RTD) AND defined (REL99) | |
2574 T_RTD_VALUE rtd[MAX_NR_OF_NCELL];/* RTD values for the neighbour cell synchronisation */ | |
2575 #endif /* #if defined (TI_PS_FF_RTD) AND defined (REL99) */ | |
2576 | |
2577 | |
2578 } T_SC_DATABASE; | |
2579 | |
2580 typedef struct /* T_NC_NW_SELECTED */ | |
2581 { | |
2582 T_NC_SIX_STRGST strgst; /* this cell is used for network controlled */ | |
2583 /* cell re-selection but does not belong to */ | |
2584 /* the six strongest cells */ | |
2585 | |
2586 } T_NC_NW_SELECTED; | |
2587 | |
2588 typedef struct /* T_GPRS_DATABASE */ | |
2589 { | |
2590 T_MS_IDENT ms_id; /* some parameters to identify the MS: IMSI, PTMSI, TMSI */ | |
2591 | |
2592 T_scell_info scell_info; /* contains measurement values for serving cell */ | |
2593 | |
2594 T_SCELL old_scell; /* previous serving cell */ | |
2595 | |
2596 T_NC_REF_LIST nc_ref_lst; /* list of pointers to the neighbour cell lists */ | |
2597 | |
2598 T_NC_MVAL_LIST nc_mval_list; /* measured values of the neighbour cells */ | |
2599 | |
2600 | |
2601 T_NC_SIX_STRGST *cr_cell; | |
2602 | |
2603 T_CNT_NC_SIX_STRGST cnt_nc_six; | |
2604 T_NC_SIX_STRGST nc_six_strgst[CS_MAX_STRONG_CARRIER]; | |
2605 | |
2606 T_NC_NW_SELECTED nc_nw_slctd; | |
2607 | |
2608 #if defined (REL99) AND defined (TI_PS_FF_EMR) | |
2609 UBYTE cnt_enh_cell_list; /* Number of Cells in the ENH cell | |
2610 list */ | |
2611 | |
2612 T_ENH_CELL_LIST enh_cell_list[MAX_NR_OF_NCELL];/* Enhanced Measurement | |
2613 Cell list */ | |
2614 | |
2615 T_ENH_BIN sorted_enh_cell_list; /* ENH cell list sorted in | |
2616 descending order of rxlev */ | |
2617 T_PEMR_PARAMS pemr_params; /* PEMR parameters used during | |
2618 reporting */ | |
2619 T_BA_BCCH_NC_REF_LIST ba_bcch_nc_ref_lst; /* list of pointers to the neighbour cell lists */ | |
2620 #endif | |
2621 | |
2622 } T_GPRS_DATABASE; | |
2623 | |
2624 typedef struct /* T_PWR_CTRL_VALID_FLAGS */ | |
2625 { | |
2626 BOOL v_pwr_ctrl_param; | |
2627 BOOL v_glbl_pwr_ctrl_param; | |
2628 BOOL v_freq_param; | |
2629 BOOL v_c_value; | |
2630 } T_PWR_CTRL_VALID_FLAGS; | |
2631 | |
2632 typedef struct /* T_GRR_DATA */ | |
2633 { | |
2634 UBYTE sc_db_mode; | |
2635 | |
2636 T_SC_DATABASE sc_db_1; /* database 1 for serving cell: it contains all cell relevant | |
2637 * information, needed for to camp on a network, access to | |
2638 * the network, etc. | |
2639 */ | |
2640 | |
2641 T_SC_DATABASE sc_db_2; /* database 2 for serving cell: it contains all cell relevant | |
2642 * information, needed for to camp on a network, access to | |
2643 * the network, etc. | |
2644 */ | |
2645 | |
2646 T_GPRS_DATABASE db; /* db is the shortname for gprs_database */ | |
2647 | |
2648 T_MS_DATA ms; /* ms specific data */ | |
2649 | |
2650 T_UL_TBF uplink_tbf; /* This structure is used by TC,CPAP | |
2651 during uplink-tbf */ | |
2652 T_DL_TBF downlink_tbf; /* This structure is used by TC,CPAP | |
2653 during downlink-tbf */ | |
2654 T_TBF_TYPE tbf_type; | |
2655 | |
2656 ULONG ul_fn; | |
2657 ULONG dl_fn; | |
2658 | |
2659 ULONG l1_del_tbf_start_fn; /* When there is poll requested in a re-assignment message | |
2660 * sending of poll response successfully requires this | |
2661 * value to be sent to poll_fn+8. This is important when | |
2662 * the timeslot configuration changes between re-assignment. | |
2663 */ | |
2664 | |
2665 T_TA_PARAMS ta_params; | |
2666 UBYTE pdch_rel_ts_mask; | |
2667 USHORT tqi; | |
2668 T_req_ref_p req_ref[3]; /* to save the last 3 packet request_references */ | |
2669 UBYTE r_bit; /* current r-bit value - set by TC - read by RU/RD*/ | |
2670 T_SEG_CTRL_BLK seg_ctrl_blk; | |
2671 T_CTRLBUF ctrl_msg; | |
2672 T_MS_CLASS_CAP ms_cap[12]; | |
2673 /* | |
2674 * Some global parameters to control the whole functionality | |
2675 */ | |
2676 BOOL is_pg_started; /* Checks whether paging procedure has been started or not*/ | |
2677 BOOL cc_running; /* Assert if Cell change Order is running or not? */ | |
2678 UBYTE pcco_failure_cause; | |
2679 UBYTE test_mode; /* indicates the testmode status */ | |
2680 BOOL cell_res_status; /* indicates the status of GMMRR_CELL_RES primitive */ | |
2681 | |
2682 T_NC_DATA nc_data; | |
2683 | |
2684 T_PWR_CTRL_VALID_FLAGS pwr_ctrl_valid_flags; | |
2685 | |
2686 /* | |
2687 * Service data | |
2688 */ | |
2689 T_GFP_DATA gfp; | |
2690 T_CTRL_DATA ctrl; | |
2691 T_CTRL_GLBL_DATA ctrl_glbl; | |
2692 T_TC_DATA tc; | |
2693 T_CPAP_DATA cpap; | |
2694 T_PSI_DATA psi; | |
2695 T_PG_DATA pg; | |
2696 T_MEAS_DATA meas; | |
2697 T_MEAS_IM_DATA meas_im; | |
2698 T_MEAS_EM_DATA meas_em; | |
2699 T_GRR_CS_DATA cs; | |
2700 T_CS_MEAS_DATA cs_meas; | |
2701 UBYTE nc2_on; | |
2702 | |
2703 | |
2704 }T_GRR_DATA; | |
2705 | |
2706 | |
2707 | |
2708 | |
2709 | |
2710 | |
2711 | |
2712 | |
2713 /*==== EXPORT =====================================================*/ | |
2714 | |
2715 /* | |
2716 * data base | |
2717 */ | |
2718 #ifdef GRR_PEI_C | |
2719 T_GRR_DATA grr_data_base, *grr_data; | |
2720 #else | |
2721 EXTERN T_GRR_DATA grr_data_base, *grr_data; | |
2722 #endif | |
2723 | |
2724 /* | |
2725 * for more information see comment related to structure T_PSI_ASSIGNED_DATA | |
2726 */ | |
2727 #if defined GRR_PSIF_C OR defined GRR_PSIP_C OR defined GRR_PSIS_C | |
2728 #define ENTITY_DATA psc_db | |
2729 #else | |
2730 #define ENTITY_DATA grr_data | |
2731 #endif | |
2732 | |
2733 | |
2734 /* | |
2735 * Communication handles (see also GRR_PEI.C) | |
2736 */ | |
2737 #define hCommL1 ppc_hCommMAC | |
2738 #define hCommGMM grr_hCommGMM | |
2739 #define hCommGRR grr_hCommGRR | |
2740 #define hCommGRLC grr_hCommGRLC | |
2741 #define hCommRR grr_hCommRR | |
2742 #define hCommPL grr_hCommPL | |
2743 #ifdef FF_WAP /*FMM*/ | |
2744 #define hCommWAP grr_hCommWap /*In future an own FMM Entity is planned*/ | |
2745 #endif | |
2746 | |
2747 | |
2748 #define _decodedMsg grr__decodedMsg | |
2749 | |
2750 | |
2751 #ifdef GRR_PEI_C | |
2752 T_HANDLE hCommL1 = VSI_ERROR; | |
2753 T_HANDLE hCommGRLC = VSI_ERROR; | |
2754 T_HANDLE hCommGMM = VSI_ERROR; | |
2755 T_HANDLE hCommGRR = VSI_ERROR; | |
2756 T_HANDLE hCommRR = VSI_ERROR; | |
2757 T_HANDLE hCommPL = VSI_ERROR; | |
2758 #ifdef FF_WAP | |
2759 T_HANDLE hCommWAP = VSI_ERROR; | |
2760 #endif | |
2761 T_HANDLE GRR_handle; | |
2762 | |
2763 | |
2764 | |
2765 GLOBAL UBYTE _decodedMsg [MAX_MSTRUCT_LEN_GRR]; | |
2766 | |
2767 /* | |
2768 * make the pei_create function unique | |
2769 */ | |
2770 #define pei_create grr_pei_create | |
2771 | |
2772 /* | |
2773 * make the pei_func_primitive function unique | |
2774 */ | |
2775 #define pei_func_primitive grr_pei_func_primitive | |
2776 | |
2777 #else /* !GRR_PEI_C */ | |
2778 EXTERN T_HANDLE hCommL1; | |
2779 EXTERN T_HANDLE hCommGRLC; | |
2780 EXTERN T_HANDLE hCommGMM; | |
2781 EXTERN T_HANDLE hCommGRR; | |
2782 EXTERN T_HANDLE hCommLLC; | |
2783 EXTERN T_HANDLE hCommRR; | |
2784 EXTERN T_HANDLE hCommPL; | |
2785 #ifdef FF_WAP | |
2786 EXTERN T_HANDLE hCommWAP; | |
2787 #endif | |
2788 EXTERN T_HANDLE GRR_handle; | |
2789 | |
2790 #endif /* GRR_PEI_C */ | |
2791 | |
2792 | |
2793 EXTERN UBYTE _decodedMsg [MAX_MSTRUCT_LEN_GRR]; | |
2794 | |
2795 #ifdef GRR_PEI_C | |
2796 T_SC_DATABASE* psc_db; /* points to the current serving cell database */ | |
2797 T_SC_DATABASE* posc_db; /* points to the old serving cell database */ | |
2798 T_SC_DATABASE* prsc_db; /* points to the rejected serving cell database */ | |
2799 T_SC_DATABASE* pcr_db; /* points to the cell re-selection database */ | |
2800 #else | |
2801 EXTERN T_SC_DATABASE* psc_db; | |
2802 EXTERN T_SC_DATABASE* posc_db; | |
2803 EXTERN T_SC_DATABASE* prsc_db; | |
2804 EXTERN T_SC_DATABASE* pcr_db; | |
2805 #endif /* GRR_PEI_C */ | |
2806 | |
2807 | |
2808 #ifdef _TARGET_ | |
2809 | |
2810 #undef TRACE_FUNCTION | |
2811 #define TRACE_FUNCTION(a) | |
2812 #undef TRACE_ISIG | |
2813 #define TRACE_ISIG(a) | |
2814 | |
2815 #endif /* _TARGET_ */ | |
2816 | |
2817 #endif /* GRR_H */ |