FreeCalypso > hg > fc-selenite
comparison src/g23m-gsm/alr2/alr_test/alr_cbch_constraints.cpp @ 3:b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 04:43:28 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:e636eadcad21 | 3:b4c81ea2d291 |
---|---|
1 /* | |
2 +------------------------------------------------------------------------------ | |
3 | File: alr_cbch_constraints.cpp | |
4 +------------------------------------------------------------------------------ | |
5 | Copyright 2003 Texas Instruments | |
6 | All rights reserved. | |
7 | | |
8 | This file is confidential and a trade secret of Texas Instruments. | |
9 | The receipt of or possession of this file does not convey | |
10 | any rights to reproduce or disclose its contents or to | |
11 | manufacture, use, or sell anything it may describe, in | |
12 | whole, or in part, without the specific written consent of | |
13 | Texas Instruments. | |
14 +------------------------------------------------------------------------------ | |
15 | Purpose: Contains test constraints for alr | |
16 | | |
17 +------------------------------------------------------------------------------ | |
18 */ | |
19 #include "alr_constraints.h" | |
20 const U8 MSG_ID_3_7_11_TO_13[40] = { | |
21 3, 0, 3, 0, | |
22 7, 0, 7, 0, | |
23 11, 0, 13, 0, | |
24 0xFF, 0xFF, 0xFF, 0xFF, | |
25 0xFF, 0xFF, 0xFF, 0xFF, | |
26 0xFF, 0xFF, 0xFF, 0xFF, | |
27 0xFF, 0xFF, 0xFF, 0xFF, | |
28 0xFF, 0xFF, 0xFF, 0xFF, | |
29 0xFF, 0xFF, 0xFF, 0xFF, | |
30 0xFF, 0xFF, 0xFF, 0xFF | |
31 }; | |
32 const U8 DCS_ID_EMPTY[40] = { | |
33 0xFF, 0xFF, 0xFF, 0xFF, | |
34 0xFF, 0xFF, 0xFF, 0xFF, | |
35 0xFF, 0xFF, 0xFF, 0xFF, | |
36 0xFF, 0xFF, 0xFF, 0xFF, | |
37 0xFF, 0xFF, 0xFF, 0xFF, | |
38 0xFF, 0xFF, 0xFF, 0xFF, | |
39 0xFF, 0xFF, 0xFF, 0xFF, | |
40 0xFF, 0xFF, 0xFF, 0xFF, | |
41 0xFF, 0xFF, 0xFF, 0xFF, | |
42 0xFF, 0xFF, 0xFF, 0xFF | |
43 }; | |
44 | |
45 T_cbch cbch_description_8() | |
46 { | |
47 const U16 CBCH_DESCRIPTION_8_MA_elements[5] = { | |
48 0x0E, | |
49 0x17, | |
50 0x45, | |
51 0x73, | |
52 NOT_PRESENT_16BIT | |
53 }; | |
54 T_ARRAY<U16> CBCH_DESCRIPTION_8_MA(CBCH_DESCRIPTION_8_MA_elements, SKIP_TO_END); | |
55 | |
56 T_cbch pstruct; | |
57 pstruct->stat = STAT_ACT; | |
58 pstruct->ch = CH_SDCCH_8_0; | |
59 pstruct->tn = 3; | |
60 pstruct->tsc = 3; | |
61 pstruct->h = H_FREQ; | |
62 pstruct->arfcn = 0; | |
63 pstruct->maio = 1; | |
64 pstruct->hsn = 0; | |
65 pstruct->ma = CBCH_DESCRIPTION_8_MA; | |
66 return pstruct; | |
67 } | |
68 T_cbch cbch_description_4() | |
69 { | |
70 const U16 CBCH_DESCRIPTION_4_MA_elements[5] = { | |
71 0x0E, 0x17, 0x45, 0x73, NOT_PRESENT_16BIT | |
72 }; | |
73 T_ARRAY<U16> CBCH_DESCRIPTION_4_MA(CBCH_DESCRIPTION_4_MA_elements, SKIP_TO_END); | |
74 | |
75 T_cbch pstruct; | |
76 pstruct->stat = STAT_ACT; | |
77 pstruct->ch = CH_SDCCH_4_0; | |
78 pstruct->tn = 0; | |
79 pstruct->tsc = 3; | |
80 pstruct->h = H_FREQ; | |
81 pstruct->arfcn = 0; | |
82 pstruct->maio = 1; | |
83 pstruct->hsn = 0; | |
84 pstruct->ma = CBCH_DESCRIPTION_4_MA; | |
85 return pstruct; | |
86 } | |
87 T_cbch_desc channel_desc_cbch_8() | |
88 { | |
89 T_cbch_desc pstruct; | |
90 pstruct->chan_sel.h = 1; | |
91 pstruct->chan_sel.rf_channel.maio = 1; | |
92 pstruct->chan_sel.rf_channel.hsn = 0; | |
93 pstruct->channel_type = 0x04; | |
94 pstruct->sub_channel = 0; | |
95 pstruct->timeslot_no = 3; | |
96 pstruct->tsc = 3; | |
97 return pstruct; | |
98 } | |
99 T_cbch_desc channel_desc_cbch_4() | |
100 { | |
101 T_cbch_desc pstruct; | |
102 pstruct->chan_sel.h = 1; | |
103 pstruct->chan_sel.rf_channel.maio = 1; | |
104 pstruct->chan_sel.rf_channel.hsn = 0; | |
105 pstruct->channel_type = 0x03; | |
106 pstruct->sub_channel = 0; | |
107 pstruct->timeslot_no = 0; | |
108 pstruct->tsc = 3; | |
109 return pstruct; | |
110 } | |
111 | |
112 T_PRIMITIVE_UNION mphc_data_ind_53() | |
113 { | |
114 const U8 NULL_MESSAGE_CONTENT_elements[23] = { | |
115 0x0F, | |
116 0x2B, 0x2B, 0x2B, 0x2B, | |
117 0x2B, 0x2B, 0x2B, 0x2B, | |
118 0x2B, 0x2B, 0x2B, 0x2B, | |
119 0x2B, 0x2B, 0x2B, 0x2B, | |
120 0x2B, 0x2B, 0x2B, 0x2B, | |
121 0x2B, 0x2B | |
122 }; | |
123 T_ARRAY<U8> NULL_MESSAGE_CONTENT(NULL_MESSAGE_CONTENT_elements, SKIP_TO_END); | |
124 | |
125 T_MPHC_DATA_IND prim; | |
126 prim->radio_freq = ARFCN_23; | |
127 prim->l2_channel = L2_CHANNEL_CBCH; | |
128 prim->error_flag = VALID_BLOCK; | |
129 prim->l2_frame.content = NULL_MESSAGE_CONTENT; | |
130 prim->tc = TC_0; | |
131 prim->ccch_lev._skip; | |
132 prim->fn = FN_OFFSET_0; | |
133 return prim; | |
134 } | |
135 T_PRIMITIVE_UNION mphc_data_ind_54(CHAR variant) | |
136 { | |
137 T_MPHC_DATA_IND prim; | |
138 prim->radio_freq = ARFCN_23; | |
139 prim->l2_channel = L2_CHANNEL_CBCH; | |
140 prim->error_flag = VALID_BLOCK; | |
141 if (variant == 'A') { | |
142 const U8 CBCH_1_7_CONTENT_elements[23] = { | |
143 0x00, | |
144 0x00, 0x00, | |
145 0x00, 0x07, | |
146 0x00, | |
147 0x01, | |
148 0xAA, 0xAB, 0xAC, 0xAD, | |
149 0xAE, 0xAF, 0xB0, 0xB1, | |
150 0xB2, 0xB3, 0xB4, 0xB5, | |
151 0xB6, 0xB7, 0xB8, 0xB9 | |
152 }; | |
153 T_ARRAY<U8> CBCH_1_7_CONTENT(CBCH_1_7_CONTENT_elements, SKIP_TO_END); | |
154 | |
155 prim->l2_frame.content = CBCH_1_7_CONTENT; | |
156 } | |
157 if (variant == 'B') { | |
158 const U8 CBCH_1_11_CONTENT_elements[23] = { | |
159 0x00, | |
160 0x00, 0x00, | |
161 0x00, 0x0B, | |
162 0x00, | |
163 0x01, | |
164 0xAA, 0xAB, 0xAC, 0xAD, | |
165 0xAE, 0xAF, 0xB0, 0xB1, | |
166 0xB2, 0xB3, 0xB4, 0xB5, | |
167 0xB6, 0xB7, 0xB8, 0xB9 | |
168 }; | |
169 T_ARRAY<U8> CBCH_1_11_CONTENT(CBCH_1_11_CONTENT_elements, SKIP_TO_END); | |
170 | |
171 prim->l2_frame.content = CBCH_1_11_CONTENT; | |
172 } | |
173 if (variant == 'C') { | |
174 const U8 CBCH_1_12_CONTENT_elements[23] = { | |
175 0x00, | |
176 0x00, 0x00, | |
177 0x00, 0x0C, | |
178 0x00, | |
179 0x01, | |
180 0xAA, 0xAB, 0xAC, 0xAD, | |
181 0xAE, 0xAF, 0xB0, 0xB1, | |
182 0xB2, 0xB3, 0xB4, 0xB5, | |
183 0xB6, 0xB7, 0xB8, 0xB9 | |
184 }; | |
185 T_ARRAY<U8> CBCH_1_12_CONTENT(CBCH_1_12_CONTENT_elements, SKIP_TO_END); | |
186 | |
187 prim->l2_frame.content = CBCH_1_12_CONTENT; | |
188 } | |
189 if (variant == 'D') { | |
190 const U8 CBCH_1_13_CONTENT_elements[23] = { | |
191 0x00, | |
192 0x00, 0x00, | |
193 0x00, 0x0D, | |
194 0x00, | |
195 0x01, | |
196 0xAA, 0xAB, 0xAC, 0xAD, | |
197 0xAE, 0xAF, 0xB0, 0xB1, | |
198 0xB2, 0xB3, 0xB4, 0xB5, | |
199 0xB6, 0xB7, 0xB8, 0xB9 | |
200 }; | |
201 T_ARRAY<U8> CBCH_1_13_CONTENT(CBCH_1_13_CONTENT_elements, SKIP_TO_END); | |
202 | |
203 prim->l2_frame.content = CBCH_1_13_CONTENT; | |
204 } | |
205 if (variant == 'E') { | |
206 const U8 CBCH_1_7_2_CONTENT_elements[23] = { | |
207 0x00, | |
208 0x00, 0x02, | |
209 0x00, 0x07, | |
210 0x00, | |
211 0x01, | |
212 0xAA, 0xAB, 0xAC, 0xAD, | |
213 0xAE, 0xAF, 0xB0, 0xB1, | |
214 0xB2, 0xB3, 0xB4, 0xB5, | |
215 0xB6, 0xB7, 0xB8, 0xB9 | |
216 }; | |
217 T_ARRAY<U8> CBCH_1_7_2_CONTENT(CBCH_1_7_2_CONTENT_elements, SKIP_TO_END); | |
218 | |
219 prim->l2_frame.content = CBCH_1_7_2_CONTENT; | |
220 } | |
221 if (variant == 'F') { | |
222 const U8 CBCH_1_7_B_CONTENT_elements[23] = { | |
223 0x00, | |
224 0x00, 0x0B, | |
225 0x00, 0x07, | |
226 0x00, | |
227 0x01, | |
228 0xAA, 0xAB, 0xAC, 0xAD, | |
229 0xAE, 0xAF, 0xB0, 0xB1, | |
230 0xB2, 0xB3, 0xB4, 0xB5, | |
231 0xB6, 0xB7, 0xB8, 0xB9 | |
232 }; | |
233 T_ARRAY<U8> CBCH_1_7_B_CONTENT(CBCH_1_7_B_CONTENT_elements, SKIP_TO_END); | |
234 | |
235 prim->l2_frame.content = CBCH_1_7_B_CONTENT; | |
236 } | |
237 if (variant == 'G') { | |
238 const U8 CBCH_1_7_scope_la_CONTENT_elements[23] = { | |
239 0x00, | |
240 0x80, 0x00, | |
241 0x00, 0x07, | |
242 0x00, | |
243 0x01, | |
244 0xAA, 0xAB, 0xAC, 0xAD, | |
245 0xAE, 0xAF, 0xB0, 0xB1, | |
246 0xB2, 0xB3, 0xB4, 0xB5, | |
247 0xB6, 0xB7, 0xB8, 0xB9 | |
248 }; | |
249 T_ARRAY<U8> CBCH_1_7_scope_la_CONTENT(CBCH_1_7_scope_la_CONTENT_elements, SKIP_TO_END); | |
250 | |
251 prim->l2_frame.content = CBCH_1_7_scope_la_CONTENT; | |
252 } | |
253 prim->tc = TC_0; | |
254 prim->ccch_lev._skip; | |
255 prim->fn = FN_OFFSET_0; | |
256 return prim; | |
257 } | |
258 T_PRIMITIVE_UNION mphc_data_ind_55() | |
259 { | |
260 const U8 CBCH_2_CONTENT_elements[23] = { | |
261 0x01, | |
262 0xBA, 0xBB, 0xBC, 0xBD, | |
263 0xBE, 0xBF, 0xC0, 0xC1, | |
264 0xC2, 0xC3, 0xC4, 0xC5, | |
265 0xC6, 0xC7, 0xC8, 0xC9, | |
266 0xCA, 0xCB, 0xCC, 0xCD, | |
267 0xCE, 0xCF | |
268 }; | |
269 T_ARRAY<U8> CBCH_2_CONTENT(CBCH_2_CONTENT_elements, SKIP_TO_END); | |
270 | |
271 T_MPHC_DATA_IND prim; | |
272 prim->radio_freq = ARFCN_23; | |
273 prim->l2_channel = L2_CHANNEL_CBCH; | |
274 prim->error_flag = VALID_BLOCK; | |
275 prim->l2_frame.content = CBCH_2_CONTENT; | |
276 prim->tc = TC_0; | |
277 prim->ccch_lev._skip; | |
278 prim->fn = FN_OFFSET_0; | |
279 return prim; | |
280 } | |
281 T_PRIMITIVE_UNION mphc_data_ind_56() | |
282 { | |
283 const U8 CBCH_3_CONTENT_elements[23] = { | |
284 0x02, | |
285 0xD0, 0xD1, 0xD2, 0xD3, | |
286 0xD4, 0xD5, 0xD6, 0xD7, | |
287 0xD8, 0xD9, 0xDA, 0xDB, | |
288 0xDC, 0xDD, 0xDE, 0xDF, | |
289 0xE0, 0xE1, 0xE2, 0xE3, | |
290 0xE4, 0xE5 | |
291 }; | |
292 T_ARRAY<U8> CBCH_3_CONTENT(CBCH_3_CONTENT_elements, SKIP_TO_END); | |
293 | |
294 | |
295 T_MPHC_DATA_IND prim; | |
296 prim->radio_freq = ARFCN_23; | |
297 prim->l2_channel = L2_CHANNEL_CBCH; | |
298 prim->error_flag = VALID_BLOCK; | |
299 prim->l2_frame.content = CBCH_3_CONTENT; | |
300 prim->tc = TC_0; | |
301 prim->ccch_lev._skip; | |
302 prim->fn = FN_OFFSET_0; | |
303 return prim; | |
304 } | |
305 T_PRIMITIVE_UNION mphc_data_ind_57() | |
306 { | |
307 const U8 CBCH_4_CONTENT_elements[23] = { | |
308 0x03, | |
309 0xE6, 0xE7, 0xE8, 0xE9, | |
310 0xEA, 0xEB, 0xEC, 0xED, | |
311 0xEE, 0xEF, 0xF0, 0xF1, | |
312 0xF2, 0xF3, 0xF4, 0xF5, | |
313 0xF6, 0xF7, 0xF8, 0xF9, | |
314 0xFA, 0xFB | |
315 }; | |
316 T_ARRAY<U8> CBCH_4_CONTENT(CBCH_4_CONTENT_elements, SKIP_TO_END); | |
317 | |
318 T_MPHC_DATA_IND prim; | |
319 prim->radio_freq = ARFCN_23; | |
320 prim->l2_channel = L2_CHANNEL_CBCH; | |
321 prim->error_flag = VALID_BLOCK; | |
322 prim->l2_frame.content = CBCH_4_CONTENT; | |
323 prim->tc = TC_0; | |
324 prim->ccch_lev._skip; | |
325 prim->fn = FN_OFFSET_0; | |
326 return prim; | |
327 } | |
328 T_PRIMITIVE_UNION mphc_data_ind_58() | |
329 { | |
330 const U8 CBCH_1_8_CONTENT_elements[23] = { | |
331 0x00, | |
332 0x00, 0x00, | |
333 0x00, 0x08, | |
334 0x00, | |
335 0x01, | |
336 0xAA, 0xAB, 0xAC, 0xAD, | |
337 0xAE, 0xAF, 0xB0, 0xB1, | |
338 0xB2, 0xB3, 0xB4, 0xB5, | |
339 0xB6, 0xB7, 0xB8, 0xB9 | |
340 }; | |
341 T_ARRAY<U8> CBCH_1_8_CONTENT(CBCH_1_8_CONTENT_elements, SKIP_TO_END); | |
342 | |
343 T_MPHC_DATA_IND prim; | |
344 prim->radio_freq = ARFCN_23; | |
345 prim->l2_channel = L2_CHANNEL_CBCH; | |
346 prim->error_flag = VALID_BLOCK; | |
347 prim->l2_frame.content = CBCH_1_8_CONTENT; | |
348 prim->tc = TC_0; | |
349 prim->ccch_lev._skip; | |
350 prim->fn = FN_OFFSET_0; | |
351 return prim; | |
352 } | |
353 | |
354 T_PRIMITIVE_UNION mphc_data_ind_59() | |
355 { | |
356 const U8 SCHEDULE_1_B_CONTENT_elements[23] = { | |
357 0x08, | |
358 0x0B, 0x12, | |
359 0x12, 0x04, 0x80, | |
360 0x00, 0x00, 0x00, | |
361 0x80, 0x05, | |
362 0x41, | |
363 0x80, 0x07, | |
364 0x41, | |
365 0x40, | |
366 0x80, 0x03, | |
367 0x40, 0x40, 0x40, 0x40, 0x40 | |
368 }; | |
369 T_ARRAY<U8> SCHEDULE_1_B_CONTENT(SCHEDULE_1_B_CONTENT_elements, SKIP_TO_END); | |
370 | |
371 T_MPHC_DATA_IND prim; | |
372 prim->radio_freq = ARFCN_23; | |
373 prim->l2_channel = L2_CHANNEL_CBCH; | |
374 prim->error_flag = VALID_BLOCK; | |
375 prim->l2_frame.content = SCHEDULE_1_B_CONTENT; | |
376 prim->tc = TC_0; | |
377 prim->ccch_lev._skip; | |
378 prim->fn = FN_OFFSET_0; | |
379 return prim; | |
380 } | |
381 | |
382 T_PRIMITIVE_UNION mphc_data_ind_60() | |
383 { | |
384 const U8 SCHEDULE_2_CONTENT_elements[23] = { | |
385 0x01, | |
386 0x40, 0x40, 0x40, 0x40, 0x40, | |
387 0x80, 0x08, | |
388 0x02, | |
389 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
390 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
391 0x2B, 0x2B, 0x2B, 0x2B | |
392 }; | |
393 T_ARRAY<U8> SCHEDULE_2_CONTENT(SCHEDULE_2_CONTENT_elements, SKIP_TO_END); | |
394 | |
395 T_MPHC_DATA_IND prim; | |
396 prim->radio_freq = ARFCN_23; | |
397 prim->l2_channel = L2_CHANNEL_CBCH; | |
398 prim->error_flag = VALID_BLOCK; | |
399 prim->l2_frame.content = SCHEDULE_2_CONTENT; | |
400 prim->tc = TC_0; | |
401 prim->ccch_lev._skip; | |
402 prim->fn = FN_OFFSET_0; | |
403 return prim; | |
404 } | |
405 | |
406 T_PRIMITIVE_UNION mphc_data_ind_61() | |
407 { | |
408 const U8 SCHEDULE_3_CONTENT_elements[23] = { | |
409 0x02, | |
410 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
411 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
412 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
413 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
414 0x2B, 0x2B | |
415 }; | |
416 T_ARRAY<U8> SCHEDULE_3_CONTENT(SCHEDULE_3_CONTENT_elements, SKIP_TO_END); | |
417 | |
418 T_MPHC_DATA_IND prim; | |
419 prim->radio_freq = ARFCN_23; | |
420 prim->l2_channel = L2_CHANNEL_CBCH; | |
421 prim->error_flag = VALID_BLOCK; | |
422 prim->l2_frame.content = SCHEDULE_3_CONTENT; | |
423 prim->tc = TC_0; | |
424 prim->ccch_lev._skip; | |
425 prim->fn = FN_OFFSET_0; | |
426 return prim; | |
427 } | |
428 | |
429 T_PRIMITIVE_UNION mphc_data_ind_62() | |
430 { | |
431 const U8 SCHEDULE_4_CONTENT_elements[23] = { | |
432 0x13, | |
433 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
434 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
435 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
436 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, | |
437 0x2B, 0x2B | |
438 }; | |
439 T_ARRAY<U8> SCHEDULE_4_CONTENT(SCHEDULE_4_CONTENT_elements, SKIP_TO_END); | |
440 | |
441 T_MPHC_DATA_IND prim; | |
442 prim->radio_freq = ARFCN_23; | |
443 prim->l2_channel = L2_CHANNEL_CBCH; | |
444 prim->error_flag = VALID_BLOCK; | |
445 prim->l2_frame.content = SCHEDULE_4_CONTENT; | |
446 prim->tc = TC_0; | |
447 prim->ccch_lev._skip; | |
448 prim->fn = FN_OFFSET_0; | |
449 return prim; | |
450 } | |
451 | |
452 T_PRIMITIVE_UNION mphc_data_ind_66() | |
453 { | |
454 const U8 CBCH_2_CONTENT_elements[23] = { | |
455 0x0B, | |
456 0xBA, 0xBB, 0xBC, 0xBD, | |
457 0xBE, 0xBF, 0xC0, 0xC1, | |
458 0xC2, 0xC3, 0xC4, 0xC5, | |
459 0xC6, 0xC7, 0xC8, 0xC9, | |
460 0xCA, 0xCB, 0xCC, 0xCD, | |
461 0xCE, 0xCF | |
462 }; | |
463 T_ARRAY<U8> CBCH_2_CONTENT(CBCH_2_CONTENT_elements, SKIP_TO_END); | |
464 | |
465 T_MPHC_DATA_IND prim; | |
466 prim->radio_freq = ARFCN_23; | |
467 prim->l2_channel = L2_CHANNEL_CBCH; | |
468 prim->error_flag = VALID_BLOCK; | |
469 prim->l2_frame.content = CBCH_2_CONTENT; | |
470 prim->tc = TC_0; | |
471 prim->ccch_lev._skip; | |
472 prim->fn = FN_OFFSET_0; | |
473 return prim; | |
474 } | |
475 T_PRIMITIVE_UNION mphc_data_ind_67() | |
476 { | |
477 const U8 SCHEDULE_1_B_CONTENT_elements[23] = { | |
478 0x08, | |
479 0x01, 0x30, | |
480 0x12, 0x04, 0x80, | |
481 0x00, 0x00, 0x00, | |
482 0x80, 0x05, | |
483 0x41, | |
484 0x80, 0x07, | |
485 0x41, | |
486 0x40, | |
487 0x80, 0x03, | |
488 0x40, 0x40, 0x40, 0x40, 0x40 | |
489 }; | |
490 T_ARRAY<U8> SCHEDULE_1_B_CONTENT(SCHEDULE_1_B_CONTENT_elements, SKIP_TO_END); | |
491 | |
492 T_MPHC_DATA_IND prim; | |
493 prim->radio_freq = ARFCN_23; | |
494 prim->l2_channel = L2_CHANNEL_CBCH; | |
495 prim->error_flag = VALID_BLOCK; | |
496 prim->l2_frame.content = SCHEDULE_1_B_CONTENT; | |
497 prim->tc = TC_0; | |
498 prim->ccch_lev._skip; | |
499 prim->fn = FN_OFFSET_0; | |
500 return prim; | |
501 } | |
502 | |
503 T_PRIMITIVE_UNION mphc_data_ind_68(CHAR variant) | |
504 { | |
505 const U8 CBCH_2_CONTENT_elements[23] = { | |
506 0x0B, | |
507 0xBA, 0xBB, 0xBC, 0xBD, | |
508 0xBE, 0xBF, 0xC0, 0xC1, | |
509 0xC2, 0xC3, 0xC4, 0xC5, | |
510 0xC6, 0xC7, 0xC8, 0xC9, | |
511 0xCA, 0xCB, 0xCC, 0xCD, | |
512 0xCE, 0xCF | |
513 }; | |
514 T_ARRAY<U8> CBCH_2_CONTENT(CBCH_2_CONTENT_elements, SKIP_TO_END); | |
515 | |
516 T_MPHC_DATA_IND prim; | |
517 prim->radio_freq = ARFCN_23; | |
518 prim->l2_channel = L2_CHANNEL_CBCH; | |
519 prim->error_flag = INVALID_BLOCK; | |
520 prim->l2_frame.content = CBCH_2_CONTENT; | |
521 if( variant == 'A') prim->tc = TC_0; | |
522 if( variant == 'B') prim->tc = TC_4; | |
523 prim->ccch_lev._skip; | |
524 prim->fn = FN_OFFSET_0; | |
525 return prim; | |
526 } | |
527 | |
528 T_PRIMITIVE_UNION mphc_data_ind_69() | |
529 { | |
530 T_MPHC_DATA_IND prim; | |
531 prim->radio_freq = ARFCN_23; | |
532 prim->l2_channel = L2_CHANNEL_CBCH; | |
533 prim->error_flag = VALID_BLOCK; | |
534 { | |
535 const U8 CBCH_1_7_CONTENT_elements[23] = { | |
536 0x00, | |
537 0x00, 0x00, | |
538 0x00, 0x0B, | |
539 0x00, | |
540 0x01, | |
541 0xAA, 0xAB, 0xAC, 0xAD, | |
542 0xAE, 0xAF, 0xB0, 0xB1, | |
543 0xB2, 0xB3, 0xB4, 0xB5, | |
544 0xB6, 0xB7, 0xB8, 0xB9 | |
545 }; | |
546 T_ARRAY<U8> CBCH_1_7_CONTENT(CBCH_1_7_CONTENT_elements, SKIP_TO_END); | |
547 | |
548 prim->l2_frame.content = CBCH_1_7_CONTENT; | |
549 } | |
550 prim->tc = TC_4; | |
551 prim->ccch_lev._skip; | |
552 prim->fn = FN_OFFSET_0; | |
553 return prim; | |
554 } | |
555 | |
556 T_PRIMITIVE_UNION mphc_data_ind_70() | |
557 { | |
558 const U8 CBCH_2_CONTENT_elements[23] = { | |
559 0x01, | |
560 0xBA, 0xBB, 0xBC, 0xBD, | |
561 0xBE, 0xBF, 0xC0, 0xC1, | |
562 0xC2, 0xC3, 0xC4, 0xC5, | |
563 0xC6, 0xC7, 0xC8, 0xC9, | |
564 0xCA, 0xCB, 0xCC, 0xCD, | |
565 0xCE, 0xCF | |
566 }; | |
567 T_ARRAY<U8> CBCH_2_CONTENT(CBCH_2_CONTENT_elements, SKIP_TO_END); | |
568 | |
569 T_MPHC_DATA_IND prim; | |
570 prim->radio_freq = ARFCN_23; | |
571 prim->l2_channel = L2_CHANNEL_CBCH; | |
572 prim->error_flag = VALID_BLOCK; | |
573 prim->l2_frame.content = CBCH_2_CONTENT; | |
574 prim->tc = TC_5; | |
575 prim->ccch_lev._skip; | |
576 prim->fn = FN_OFFSET_0; | |
577 return prim; | |
578 } | |
579 | |
580 T_PRIMITIVE_UNION mphc_data_ind_71() | |
581 { | |
582 const U8 CBCH_3_CONTENT_elements[23] = { | |
583 0x02, | |
584 0xD0, 0xD1, 0xD2, 0xD3, | |
585 0xD4, 0xD5, 0xD6, 0xD7, | |
586 0xD8, 0xD9, 0xDA, 0xDB, | |
587 0xDC, 0xDD, 0xDE, 0xDF, | |
588 0xE0, 0xE1, 0xE2, 0xE3, | |
589 0xE4, 0xE5 | |
590 }; | |
591 T_ARRAY<U8> CBCH_3_CONTENT(CBCH_3_CONTENT_elements, SKIP_TO_END); | |
592 | |
593 T_MPHC_DATA_IND prim; | |
594 prim->radio_freq = ARFCN_23; | |
595 prim->l2_channel = L2_CHANNEL_CBCH; | |
596 prim->error_flag = VALID_BLOCK; | |
597 prim->l2_frame.content = CBCH_3_CONTENT; | |
598 prim->tc = TC_6; | |
599 prim->ccch_lev._skip; | |
600 prim->fn = FN_OFFSET_0; | |
601 return prim; | |
602 } | |
603 | |
604 T_PRIMITIVE_UNION mphc_data_ind_72() | |
605 { | |
606 const U8 CBCH_4_CONTENT_elements[23] = { | |
607 0x03, | |
608 0xE6, 0xE7, 0xE8, 0xE9, | |
609 0xEA, 0xEB, 0xEC, 0xED, | |
610 0xEE, 0xEF, 0xF0, 0xF1, | |
611 0xF2, 0xF3, 0xF4, 0xF5, | |
612 0xF6, 0xF7, 0xF8, 0xF9, | |
613 0xFA, 0xFB | |
614 }; | |
615 T_ARRAY<U8> CBCH_4_CONTENT(CBCH_4_CONTENT_elements, SKIP_TO_END); | |
616 | |
617 T_MPHC_DATA_IND prim; | |
618 prim->radio_freq = ARFCN_23; | |
619 prim->l2_channel = L2_CHANNEL_CBCH; | |
620 prim->error_flag = VALID_BLOCK; | |
621 prim->l2_frame.content = CBCH_4_CONTENT; | |
622 prim->tc = TC_7; | |
623 prim->ccch_lev._skip; | |
624 prim->fn = FN_OFFSET_0; | |
625 return prim; | |
626 } | |
627 | |
628 T_PRIMITIVE_UNION mphc_data_ind_73() | |
629 { | |
630 T_MPHC_DATA_IND prim; | |
631 prim->radio_freq = ARFCN_23; | |
632 prim->l2_channel = L2_CHANNEL_NBCCH; | |
633 prim->error_flag = VALID_BLOCK; | |
634 prim->l2_frame = l2_sys_info_3_new(); | |
635 prim->tc = TC_1; | |
636 prim->ccch_lev._skip; | |
637 prim->fn = FN_OFFSET_0; //FN_OFFSET_14; | |
638 return prim; | |
639 } | |
640 | |
641 T_PRIMITIVE_UNION mph_cbch_req_1() | |
642 { | |
643 T_MPH_CBCH_REQ prim; | |
644 prim->cbch.stat._skip; | |
645 prim->cbch.ch._skip; | |
646 prim->cbch.tn._skip; | |
647 prim->cbch.tsc._skip; | |
648 prim->cbch.h._skip; | |
649 prim->cbch.arfcn._skip; | |
650 prim->cbch.maio._skip; | |
651 prim->cbch.hsn._skip; | |
652 | |
653 return prim; | |
654 } | |
655 T_PRIMITIVE_UNION mph_cbch_req_2(CHAR variant) | |
656 { | |
657 T_MPH_CBCH_REQ prim; | |
658 if (variant == 'A') prim->cbch = cbch_description_4(); | |
659 if (variant == 'B') prim->cbch = cbch_description_8(); | |
660 return prim; | |
661 } | |
662 T_PRIMITIVE_UNION mph_cbch_req_3(CHAR variant) | |
663 { | |
664 T_MPH_CBCH_REQ prim; | |
665 if (variant == 'A') prim->cbch = cbch_description_4(); | |
666 if (variant == 'B') prim->cbch = cbch_description_8(); | |
667 if (variant == 'C') prim->cbch = cbch_description_4(); | |
668 return prim; | |
669 } | |
670 T_PRIMITIVE_UNION mmi_cbch_req_1() | |
671 { | |
672 T_MMI_CBCH_REQ prim; | |
673 prim->msg_id = MSG_ID_3_7_11_TO_13; | |
674 prim->dcs_id = DCS_ID_EMPTY; | |
675 prim->modus = CBCH_ACCEPT; | |
676 return prim; | |
677 } | |
678 T_PRIMITIVE_UNION mmi_cbch_req_2(CHAR variant) | |
679 { | |
680 T_MMI_CBCH_REQ prim; | |
681 if (variant == 'A') prim->msg_id = MSG_ID_3_7_11_TO_13; | |
682 if (variant == 'B') prim->msg_id = MSG_ID_3_7_11_TO_13; | |
683 if (variant == 'C') { | |
684 const U8 MSG_ID_1_TO_20[40] = { | |
685 1, 0, 20, 0, | |
686 0xFF, 0xFF, 0xFF, 0xFF, | |
687 0xFF, 0xFF, 0xFF, 0xFF, | |
688 0xFF, 0xFF, 0xFF, 0xFF, | |
689 0xFF, 0xFF, 0xFF, 0xFF, | |
690 0xFF, 0xFF, 0xFF, 0xFF, | |
691 0xFF, 0xFF, 0xFF, 0xFF, | |
692 0xFF, 0xFF, 0xFF, 0xFF, | |
693 0xFF, 0xFF, 0xFF, 0xFF, | |
694 0xFF, 0xFF, 0xFF, 0xFF | |
695 }; | |
696 | |
697 prim->msg_id = MSG_ID_1_TO_20; | |
698 } | |
699 prim->dcs_id = DCS_ID_EMPTY; | |
700 prim->modus = CBCH_ACCEPT; | |
701 return prim; | |
702 } | |
703 | |
704 T_PRIMITIVE_UNION mphc_config_cbch_req_1(CHAR variant) | |
705 { | |
706 T_MPHC_CONFIG_CBCH_REQ prim; | |
707 if (variant == 'A') prim->cbch_desc = channel_desc_cbch_4(); | |
708 if (variant == 'B') prim->cbch_desc = channel_desc_cbch_8(); | |
709 prim->cbch_freq_list = freq_list(); | |
710 return prim; | |
711 } | |
712 T_PRIMITIVE_UNION mphc_config_cbch_req_2(CHAR variant) | |
713 { | |
714 T_MPHC_CONFIG_CBCH_REQ prim; | |
715 if (variant == 'A') prim->cbch_desc = channel_desc_cbch_4(); | |
716 if (variant == 'B') prim->cbch_desc = channel_desc_cbch_8(); | |
717 if (variant == 'C') prim->cbch_desc = channel_desc_cbch_4(); | |
718 prim->cbch_freq_list = freq_list(); | |
719 return prim; | |
720 } | |
721 | |
722 T_PRIMITIVE_UNION mphc_cbch_schedule_req_1() | |
723 { | |
724 T_MPHC_CBCH_SCHEDULE_REQ prim; | |
725 prim->cbch_select = CBCH_READ_NORM; | |
726 prim->schedule_length = SCHED_LEN_0; | |
727 prim->first_blocks_0._skip; | |
728 prim->first_blocks_1._skip; | |
729 return prim; | |
730 } | |
731 | |
732 T_PRIMITIVE_UNION mphc_cbch_schedule_req_2() | |
733 { | |
734 T_MPHC_CBCH_SCHEDULE_REQ prim; | |
735 prim->cbch_select = CBCH_READ_EXT; | |
736 prim->schedule_length = SCHED_LEN_0; | |
737 prim->first_blocks_0._skip; | |
738 prim->first_blocks_1._skip; | |
739 return prim; | |
740 } | |
741 T_PRIMITIVE_UNION mphc_cbch_schedule_req_3() | |
742 { | |
743 T_MPHC_CBCH_SCHEDULE_REQ prim; | |
744 prim->cbch_select = CBCH_READ_NORM; | |
745 prim->schedule_length = SCHED_LEN_8; | |
746 prim->first_blocks_0 = FIRST_BLOCKS_0_UNSCH; | |
747 prim->first_blocks_1 = FIRST_BLOCKS_1_B; | |
748 return prim; | |
749 } | |
750 T_PRIMITIVE_UNION mphc_cbch_schedule_req_4(CHAR variant) | |
751 { | |
752 T_MPHC_CBCH_SCHEDULE_REQ prim; | |
753 prim->cbch_select._skip; | |
754 prim->schedule_length = SCHED_LEN_30 ; | |
755 if( variant == 'A') prim->first_blocks_0 = FIRST_BLOCKS_0_B; | |
756 if( variant == 'B') prim->first_blocks_0 = FIRST_BLOCKS_0_DRX; | |
757 if( variant == 'A') prim->first_blocks_1 = FIRST_BLOCKS_1_B; | |
758 if( variant == 'B') prim->first_blocks_1 = FIRST_BLOCKS_1_B; | |
759 return prim; | |
760 } | |
761 | |
762 T_PRIMITIVE_UNION mphc_cbch_info_req_1() | |
763 { | |
764 T_MPHC_CBCH_INFO_REQ prim; | |
765 prim->tb_bitmap = CBCH_NORM_BLOCK234; | |
766 return prim; | |
767 } | |
768 | |
769 T_PRIMITIVE_UNION mphc_cbch_info_req_2() | |
770 { | |
771 T_MPHC_CBCH_INFO_REQ prim; | |
772 prim->tb_bitmap = 0; | |
773 return prim; | |
774 } | |
775 | |
776 T_PRIMITIVE_UNION mphc_cbch_info_req_3() | |
777 { | |
778 T_MPHC_CBCH_INFO_REQ prim; | |
779 prim->tb_bitmap = CBCH_EXT_BLOCK234; | |
780 return prim; | |
781 } | |
782 | |
783 T_PRIMITIVE_UNION mmi_cbch_ind_1(CHAR variant) | |
784 { | |
785 T_MMI_CBCH_IND prim; | |
786 const U8 CBCH_MSG_7[88] = { | |
787 0x00, 0x00, | |
788 0x00, 0x07, | |
789 0x00, | |
790 0x01, | |
791 0xAA, 0xAB, 0xAC, 0xAD, | |
792 0xAE, 0xAF, 0xB0, 0xB1, | |
793 0xB2, 0xB3, 0xB4, 0xB5, | |
794 0xB6, 0xB7, 0xB8, 0xB9, | |
795 0xBA, 0xBB, 0xBC, 0xBD, | |
796 0xBE, 0xBF, 0xC0, 0xC1, | |
797 0xC2, 0xC3, 0xC4, 0xC5, | |
798 0xC6, 0xC7, 0xC8, 0xC9, | |
799 0xCA, 0xCB, 0xCC, 0xCD, | |
800 0xCE, 0xCF, | |
801 0xD0, 0xD1, 0xD2, 0xD3, | |
802 0xD4, 0xD5, 0xD6, 0xD7, | |
803 0xD8, 0xD9, 0xDA, 0xDB, | |
804 0xDC, 0xDD, 0xDE, 0xDF, | |
805 0xE0, 0xE1, 0xE2, 0xE3, | |
806 0xE4, 0xE5, | |
807 0xE6, 0xE7, 0xE8, 0xE9, | |
808 0xEA, 0xEB, 0xEC, 0xED, | |
809 0xEE, 0xEF, 0xF0, 0xF1, | |
810 0xF2, 0xF3, 0xF4, 0xF5, | |
811 0xF6, 0xF7, 0xF8, 0xF9, | |
812 0xFA, 0xFB | |
813 }; | |
814 const U8 CBCH_MSG_7_updt_2[88] = { | |
815 0x00, 0x02, | |
816 0x00, 0x07, | |
817 0x00, | |
818 0x01, | |
819 0xAA, 0xAB, 0xAC, 0xAD, | |
820 0xAE, 0xAF, 0xB0, 0xB1, | |
821 0xB2, 0xB3, 0xB4, 0xB5, | |
822 0xB6, 0xB7, 0xB8, 0xB9, | |
823 0xBA, 0xBB, 0xBC, 0xBD, | |
824 0xBE, 0xBF, 0xC0, 0xC1, | |
825 0xC2, 0xC3, 0xC4, 0xC5, | |
826 0xC6, 0xC7, 0xC8, 0xC9, | |
827 0xCA, 0xCB, 0xCC, 0xCD, | |
828 0xCE, 0xCF, | |
829 0xD0, 0xD1, 0xD2, 0xD3, | |
830 0xD4, 0xD5, 0xD6, 0xD7, | |
831 0xD8, 0xD9, 0xDA, 0xDB, | |
832 0xDC, 0xDD, 0xDE, 0xDF, | |
833 0xE0, 0xE1, 0xE2, 0xE3, | |
834 0xE4, 0xE5, | |
835 0xE6, 0xE7, 0xE8, 0xE9, | |
836 0xEA, 0xEB, 0xEC, 0xED, | |
837 0xEE, 0xEF, 0xF0, 0xF1, | |
838 0xF2, 0xF3, 0xF4, 0xF5, | |
839 0xF6, 0xF7, 0xF8, 0xF9, | |
840 0xFA, 0xFB | |
841 }; | |
842 const U8 CBCH_MSG_7_scope_la[88] = { | |
843 0x80, 0x00, | |
844 0x00, 0x07, | |
845 0x00, | |
846 0x01, | |
847 0xAA, 0xAB, 0xAC, 0xAD, | |
848 0xAE, 0xAF, 0xB0, 0xB1, | |
849 0xB2, 0xB3, 0xB4, 0xB5, | |
850 0xB6, 0xB7, 0xB8, 0xB9, | |
851 0xBA, 0xBB, 0xBC, 0xBD, | |
852 0xBE, 0xBF, 0xC0, 0xC1, | |
853 0xC2, 0xC3, 0xC4, 0xC5, | |
854 0xC6, 0xC7, 0xC8, 0xC9, | |
855 0xCA, 0xCB, 0xCC, 0xCD, | |
856 0xCE, 0xCF, | |
857 0xD0, 0xD1, 0xD2, 0xD3, | |
858 0xD4, 0xD5, 0xD6, 0xD7, | |
859 0xD8, 0xD9, 0xDA, 0xDB, | |
860 0xDC, 0xDD, 0xDE, 0xDF, | |
861 0xE0, 0xE1, 0xE2, 0xE3, | |
862 0xE4, 0xE5, | |
863 0xE6, 0xE7, 0xE8, 0xE9, | |
864 0xEA, 0xEB, 0xEC, 0xED, | |
865 0xEE, 0xEF, 0xF0, 0xF1, | |
866 0xF2, 0xF3, 0xF4, 0xF5, | |
867 0xF6, 0xF7, 0xF8, 0xF9, | |
868 0xFA, 0xFB | |
869 }; | |
870 const U8 CBCH_MSG_11[88] = { | |
871 0x00, 0x00, | |
872 0x00, 0x0B, | |
873 0x00, | |
874 0x01, | |
875 0xAA, 0xAB, 0xAC, 0xAD, | |
876 0xAE, 0xAF, 0xB0, 0xB1, | |
877 0xB2, 0xB3, 0xB4, 0xB5, | |
878 0xB6, 0xB7, 0xB8, 0xB9, | |
879 0xBA, 0xBB, 0xBC, 0xBD, | |
880 0xBE, 0xBF, 0xC0, 0xC1, | |
881 0xC2, 0xC3, 0xC4, 0xC5, | |
882 0xC6, 0xC7, 0xC8, 0xC9, | |
883 0xCA, 0xCB, 0xCC, 0xCD, | |
884 0xCE, 0xCF, | |
885 0xD0, 0xD1, 0xD2, 0xD3, | |
886 0xD4, 0xD5, 0xD6, 0xD7, | |
887 0xD8, 0xD9, 0xDA, 0xDB, | |
888 0xDC, 0xDD, 0xDE, 0xDF, | |
889 0xE0, 0xE1, 0xE2, 0xE3, | |
890 0xE4, 0xE5, | |
891 0xE6, 0xE7, 0xE8, 0xE9, | |
892 0xEA, 0xEB, 0xEC, 0xED, | |
893 0xEE, 0xEF, 0xF0, 0xF1, | |
894 0xF2, 0xF3, 0xF4, 0xF5, | |
895 0xF6, 0xF7, 0xF8, 0xF9, | |
896 0xFA, 0xFB | |
897 }; | |
898 const U8 CBCH_MSG_12[88] = { | |
899 0x00, 0x00, | |
900 0x00, 0x0C, | |
901 0x00, | |
902 0x01, | |
903 0xAA, 0xAB, 0xAC, 0xAD, | |
904 0xAE, 0xAF, 0xB0, 0xB1, | |
905 0xB2, 0xB3, 0xB4, 0xB5, | |
906 0xB6, 0xB7, 0xB8, 0xB9, | |
907 0xBA, 0xBB, 0xBC, 0xBD, | |
908 0xBE, 0xBF, 0xC0, 0xC1, | |
909 0xC2, 0xC3, 0xC4, 0xC5, | |
910 0xC6, 0xC7, 0xC8, 0xC9, | |
911 0xCA, 0xCB, 0xCC, 0xCD, | |
912 0xCE, 0xCF, | |
913 0xD0, 0xD1, 0xD2, 0xD3, | |
914 0xD4, 0xD5, 0xD6, 0xD7, | |
915 0xD8, 0xD9, 0xDA, 0xDB, | |
916 0xDC, 0xDD, 0xDE, 0xDF, | |
917 0xE0, 0xE1, 0xE2, 0xE3, | |
918 0xE4, 0xE5, | |
919 0xE6, 0xE7, 0xE8, 0xE9, | |
920 0xEA, 0xEB, 0xEC, 0xED, | |
921 0xEE, 0xEF, 0xF0, 0xF1, | |
922 0xF2, 0xF3, 0xF4, 0xF5, | |
923 0xF6, 0xF7, 0xF8, 0xF9, | |
924 0xFA, 0xFB | |
925 }; | |
926 const U8 CBCH_MSG_13[88] = { | |
927 0x00, 0x00, | |
928 0x00, 0x0D, | |
929 0x00, | |
930 0x01, | |
931 0xAA, 0xAB, 0xAC, 0xAD, | |
932 0xAE, 0xAF, 0xB0, 0xB1, | |
933 0xB2, 0xB3, 0xB4, 0xB5, | |
934 0xB6, 0xB7, 0xB8, 0xB9, | |
935 0xBA, 0xBB, 0xBC, 0xBD, | |
936 0xBE, 0xBF, 0xC0, 0xC1, | |
937 0xC2, 0xC3, 0xC4, 0xC5, | |
938 0xC6, 0xC7, 0xC8, 0xC9, | |
939 0xCA, 0xCB, 0xCC, 0xCD, | |
940 0xCE, 0xCF, | |
941 0xD0, 0xD1, 0xD2, 0xD3, | |
942 0xD4, 0xD5, 0xD6, 0xD7, | |
943 0xD8, 0xD9, 0xDA, 0xDB, | |
944 0xDC, 0xDD, 0xDE, 0xDF, | |
945 0xE0, 0xE1, 0xE2, 0xE3, | |
946 0xE4, 0xE5, | |
947 0xE6, 0xE7, 0xE8, 0xE9, | |
948 0xEA, 0xEB, 0xEC, 0xED, | |
949 0xEE, 0xEF, 0xF0, 0xF1, | |
950 0xF2, 0xF3, 0xF4, 0xF5, | |
951 0xF6, 0xF7, 0xF8, 0xF9, | |
952 0xFA, 0xFB | |
953 }; | |
954 | |
955 if (variant == 'A') prim->cbch_msg = CBCH_MSG_7; | |
956 if (variant == 'B') prim->cbch_msg = CBCH_MSG_11; | |
957 if (variant == 'C') prim->cbch_msg = CBCH_MSG_12; | |
958 if (variant == 'D') prim->cbch_msg = CBCH_MSG_13; | |
959 if (variant == 'E') prim->cbch_msg = CBCH_MSG_7_updt_2; | |
960 if (variant == 'F') prim->cbch_msg = CBCH_MSG_7_scope_la; | |
961 prim->cbch_len = CBCH_LEN_88; | |
962 return prim; | |
963 } | |
964 T_PRIMITIVE_UNION mphc_stop_cbch_req() | |
965 { | |
966 T_MPHC_STOP_CBCH_REQ prim; | |
967 prim->normal_cbch._skip; | |
968 prim->extended_cbch._skip; | |
969 return prim; | |
970 } |