diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-09-04 15:04:35 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-09-06 16:41:25 +0200 |
commit | 90843964679f35ef4d11c2788debcba976f500bc (patch) | |
tree | 672a77bcb8fbdbc0ef95018769196a697480b1da /include/osmocom/msc/arfcn_range_encode.h | |
parent | 47cd0d2687e9711644008f3d6d1b829d763c520e (diff) |
rename include/openbsc to include/osmocom/msc
Change-Id: I1f96a1285bbd1b4607614856bca935d5c26e2da9
Diffstat (limited to 'include/osmocom/msc/arfcn_range_encode.h')
-rw-r--r-- | include/osmocom/msc/arfcn_range_encode.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/osmocom/msc/arfcn_range_encode.h b/include/osmocom/msc/arfcn_range_encode.h new file mode 100644 index 000000000..7ec710c33 --- /dev/null +++ b/include/osmocom/msc/arfcn_range_encode.h @@ -0,0 +1,26 @@ +#ifndef ARFCN_RANGE_ENCODE_H +#define ARFCN_RANGE_ENCODE_H + +#include <stdint.h> + +enum gsm48_range { + ARFCN_RANGE_INVALID = -1, + ARFCN_RANGE_128 = 127, + ARFCN_RANGE_256 = 255, + ARFCN_RANGE_512 = 511, + ARFCN_RANGE_1024 = 1023, +}; + +#define RANGE_ENC_MAX_ARFCNS 29 + +int range_enc_determine_range(const int *arfcns, int size, int *f0_out); +int range_enc_arfcns(enum gsm48_range rng, const int *arfcns, int sze, int *out, int idx); +int range_enc_find_index(enum gsm48_range rng, const int *arfcns, int size); +int range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included); + +int range_enc_range128(uint8_t *chan_list, int f0, int *w); +int range_enc_range256(uint8_t *chan_list, int f0, int *w); +int range_enc_range512(uint8_t *chan_list, int f0, int *w); +int range_enc_range1024(uint8_t *chan_list, int f0, int f0_incl, int *w); + +#endif |