FreeCalypso > hg > tcs211-c139
comparison gpf/CCD/util/freq_list_codec/freq_fun.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 : freq_fun.h | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 1999-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 : This file provides functions for coding and decoding frequency lists | |
17 | | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 typedef unsigned char UBYTE; | |
21 | |
22 extern int explain; /* activate tracing */ | |
23 | |
24 /* | |
25 * prototypes | |
26 */ | |
27 | |
28 /* | |
29 * rr_freq_decode decodes a information element with a frequency list | |
30 * ignoring bits with different meaning for different IEs and delivers | |
31 * a list ARFCNs | |
32 * | |
33 * ie in: address of FORMAT-ID (octet 3) of IE to decode; there were always | |
34 * decoded 16 Bytes | |
35 * freq out: address of decoded frequency list | |
36 * *c_f out: address of number of decoded frequencies | |
37 * | |
38 * return value TRUE if FORMAT_ID decoded as bit map0, variable bit map or | |
39 * one of the ranges 1024, 512, 256, 128 | |
40 * FALSE otherwise | |
41 */ | |
42 USHORT rr_freq_decode(USHORT *freq, USHORT *c_f, UBYTE *ie); | |
43 | |
44 /* | |
45 * rr_freq_encode encodes one, two or three information elements with frequency lists | |
46 * bits with different meanings for different IEs are handled as spares | |
47 * | |
48 * freq_l in: address of a sorted list of ARFCNs without copies | |
49 * c_f in: number of frequencies | |
50 * ie1 in: address of (first) information element to code into | |
51 * ie2 in: address of second information element to code into or NULL | |
52 * ie3 in: address of third information element to code into or NULL | |
53 * | |
54 * return value 0 coding isn't possible | |
55 * 1 the list of frequencies is coded in ie1 | |
56 * 2 the list of frequencies is coded in ie1 and ie2 together | |
57 * 3 the list of frequencies is coded in ie1, ie2 and ie3 together | |
58 */ | |
59 USHORT rr_freq_encode(USHORT *freq_l, USHORT c_f, UBYTE *ie1, UBYTE *ie2, UBYTE *ie3); | |
60 | |
61 /* | |
62 * function to produce tracing information | |
63 * tracing may switched on or off by setting the variable explain to TRUE or FALSE | |
64 */ | |
65 void print_txt(char *fmt, ...); |