libosmogsm 1.11.0.26-c59d.202505152026
Osmocom GSM library
|
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/gsm48_arfcn_range_encode.h>
#include <osmocom/core/utils.h>
#include <errno.h>
|
static |
References greatest_power_of_2_lesser_or_equal_to(), len, mod(), osmo_gsm48_range_enc_arfcns(), and osmo_gsm48_range_enc_find_index().
Referenced by osmo_gsm48_range_enc_arfcns().
References len.
Referenced by _range_enc_arfcns().
References data, len, and res.
Referenced by _range_enc_arfcns(), osmo_gsm48_range_enc_filter_arfcns(), and osmo_gsm48_range_enc_find_index().
References len, and write_all_wn().
Referenced by range_encode().
References len, write_all_wn(), and write_orig_arfcn().
Referenced by range_encode().
References len, write_all_wn(), and write_orig_arfcn().
Referenced by range_encode().
References len, write_all_wn(), and write_orig_arfcn().
Referenced by range_encode().
int osmo_gsm48_range_enc_arfcns | ( | enum osmo_gsm48_range | range, |
const int * | arfcns, | ||
int | size, | ||
int * | out, | ||
const int | index | ||
) |
Range encode the ARFCN list.
range | The range to use. |
arfcns | The list of ARFCNs |
size | The size of the list of ARFCNs |
out | Place to store the W(i) output. |
References _range_enc_arfcns(), and len.
Referenced by _range_enc_arfcns(), and range_encode().
This implements the range determination as described in GSM 04.08 J4.
The result will be a base frequency f0 and the range to use. Note that for range 1024 encoding f0 always refers to ARFCN 0 even if it is not an element of the arfcns list.
[in] | arfcns | The input frequencies, they must be sorted, lowest number first |
[in] | size | The length of the array |
[out] | f0 | The selected F0 base frequency. It might not be inside the list |
References len, OSMO_GSM48_ARFCN_RANGE_1024, OSMO_GSM48_ARFCN_RANGE_128, OSMO_GSM48_ARFCN_RANGE_256, OSMO_GSM48_ARFCN_RANGE_512, and OSMO_GSM48_ARFCN_RANGE_INVALID.
int osmo_gsm48_range_enc_filter_arfcns | ( | int * | arfcns, |
const int | size, | ||
const int | f0, | ||
int * | f0_included | ||
) |
Referenced by range_encode().
int osmo_gsm48_range_enc_find_index | ( | enum osmo_gsm48_range | range, |
const int * | freqs, | ||
const int | size | ||
) |
Determine at which index to split the ARFCNs to create an equally size partition for the given range.
Return -1 if no such partition exists.
Referenced by _range_enc_arfcns().
|
static |
References len.
Referenced by osmo_gsm48_range_enc_128(), osmo_gsm48_range_enc_256(), and osmo_gsm48_range_enc_512().