FreeCalypso > hg > leo2moko-debug
comparison gpf/CCD/util/freq_list_codec/dich.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
| author | Space Falcon <falcon@ivan.Harhan.ORG> |
|---|---|
| date | Mon, 01 Jun 2015 03:24:05 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:509db1a7b7b8 |
|---|---|
| 1 /* | |
| 2 +----------------------------------------------------------------------------- | |
| 3 | Project : G23NET | |
| 4 | Modul : dich.h | |
| 5 +----------------------------------------------------------------------------- | |
| 6 | Copyright 2000-2001 Condat AG | |
| 7 | All rights reserved. | |
| 8 | | |
| 9 | This file is confidential and a trade secret of Condat AG | |
| 10 | The receipt of or possession of this file does not convey | |
| 11 | any rights to reproduce or disclose its contents or to | |
| 12 | manufacture, use, or sell anything it may describe, in | |
| 13 | whole, or in part, without the specific written consent of | |
| 14 | Condat AG. | |
| 15 +----------------------------------------------------------------------------- | |
| 16 | Purpose : Test of Dichotomy algorithms | |
| 17 +----------------------------------------------------------------------------- | |
| 18 */ | |
| 19 | |
| 20 #define SHORT short int | |
| 21 | |
| 22 #define DICH_RANGE_1024 1024 | |
| 23 #define DICH_RANGE_512 512 | |
| 24 #define DICH_RANGE_256 256 | |
| 25 #define DICH_RANGE_128 128 | |
| 26 | |
| 27 extern int op_mod ( int x, int y ); | |
| 28 | |
| 29 /* | |
| 30 +------------------------------------------------------------------------------ | |
| 31 | Function : rr_dichotomy_encode | |
| 32 +------------------------------------------------------------------------------ | |
| 33 | Description : The encoding part of the dichotomy algorithm. | |
| 34 | On return w[0] contains 'ORIG-ARFCN' (format 128, 256, 512) | |
| 35 | or the 'frequency F0 indicator' (format 1024). | |
| 36 | The 'frequency F0 indicator' is either | |
| 37 | 0 if F0 is not part of the frequency set or | |
| 38 | -1 if F0 is part of the frequency set. | |
| 39 | The other w's contain the W(i) (refer description of | |
| 40 | rr_dichotomy_encode_rec) | |
| 41 | | |
| 42 | The array 'w' should have a size of at least nf+1 elements. | |
| 43 | The array 'f' should have a size of at least 2*nf+1 elements. | |
| 44 | | |
| 45 | Parameters : f - the frequencies (refer 'Description:') | |
| 46 | c_f - number of frequencies, maximum is NF_MAX. | |
| 47 | w - the W(i)s | |
| 48 | c_w - pointer the number of 'w's is written to | |
| 49 | fmt - the used encoding format | |
| 50 | | |
| 51 | Return : number of elements in w | |
| 52 | | |
| 53 +------------------------------------------------------------------------------ | |
| 54 */ | |
| 55 | |
| 56 extern USHORT rr_dichotomy_encode ( USHORT *f, USHORT c_f, USHORT *w, USHORT *c_w, USHORT fmt ); | |
| 57 | |
| 58 /* | |
| 59 +------------------------------------------------------------------------------ | |
| 60 | Function : rr_dichotomy_decode | |
| 61 +------------------------------------------------------------------------------ | |
| 62 | Description : The decoding part of the dichotomy algorithm. | |
| 63 | The algorithm is described in GSM 04.08 Annex J and | |
| 64 | e. g. in section 10.5.1.13 | |
| 65 | | |
| 66 | Parameters : f - the frequencies | |
| 67 | c_f - pointer the number of frequencies is written to | |
| 68 | w - the encoded W(i)s | |
| 69 | c_w - number of elements in 'w' | |
| 70 | fmt - the used decoding format | |
| 71 | | |
| 72 | Return : number of elements in f | |
| 73 | | |
| 74 +------------------------------------------------------------------------------ | |
| 75 */ | |
| 76 | |
| 77 extern USHORT rr_dichotomy_decode ( USHORT *f, USHORT *c_f, USHORT *w, USHORT c_w, USHORT fmt ); | |
| 78 | |
| 79 /* | |
| 80 +------------------------------------------------------------------------------ | |
| 81 | Function : rr_dich_range_to_ncell_fmt | |
| 82 +------------------------------------------------------------------------------ | |
| 83 | Description : conversion | |
| 84 | | |
| 85 | Parameters : a DICH_RANGE_* constant | |
| 86 | | |
| 87 | Return : a NCELL_FMT_* constant | |
| 88 | | |
| 89 +------------------------------------------------------------------------------ | |
| 90 */ | |
| 91 | |
| 92 extern USHORT rr_dich_range_to_ncell_fmt ( USHORT range ); |
