On 18 Apr 2016, at 11:07, Max
<msuraev(a)sysmocom.de> wrote:
If I know range in advance than this step can be
skipped - are there
some side effects to range_enc_determine_range() function?
What's the meaning of f0?
> 2nd filter out ARFCNs, e.g. if ARFCN 0 is included in the set or not
GSM 04.08:
F0, frequency 0 indicator
0 ARFCN 0 is not a member of the set
1 ARFCN 0 is a member of the set
At first I thought F0 is like f[0] (the first/lowest frequency in the set) but it is not.
For range 1024 it is the question if ARFCN == 0 is part of it or not.
So, range_enc_filter_arfcns() changes both arfcns and
f0_included ?
3rd encode according to the range
So how do I supply input and where do I get output? The input is
previously processed arfcns parameter to range_enc_arfcn() and the
output is taken from which parameter of range_enc_range()?
Have you considered looking at the testcases Jacob were adding? The nice thing of a
testcase is, it is very few code, one can single step through it, etc. The nice thing
about Jacob's code here is that it tests decode(encode(list)) == list. So you should
be able to easily find where something is encoded to and from where the decoder is loading
the data. E.g. code like the one below:
if (!silent)
printf("chan_list = %s\n",
osmo_hexdump(chan_list, sizeof(chan_list)));
rc = gsm48_decode_freq_list(dec_freq, chan_list, sizeof(chan_list),
0xfe, 1);
On top of that using git log on the src/libbsc/arfcn_range_encode.c gives a good
explanation of the history:
* I added range512 because the customer needed it
* Jacob fixed it
* Jacob generalized it
* Jacob added the other ranges too
cheers
holger