blob: 415509dc2f7182e1be19ecab542ff05b2e2a021a [file] [log] [blame]
Harald Welte63d3e392010-03-06 11:34:27 +01001#ifndef _OSMOCORE_RXLEV_STATS_H
2#define _OSMOCORE_RXLEV_STATS_H
3
4#define NUM_RXLEVS 32
5#define NUM_ARFCNS 1024
6
7struct rxlev_stats {
8 /* the maximum number of ARFCN's is 1024, and there are 32 RxLevels,
9 * so in we keep one 1024bit-bitvec for each RxLev */
10 uint8_t rxlev_buckets[NUM_RXLEVS][NUM_ARFCNS/8];
11};
12
13void rxlev_stat_input(struct rxlev_stats *st, uint16_t arfcn, uint8_t rxlev);
14
15/* get the next ARFCN that has the specified Rxlev */
16int16_t rxlev_stat_get_next(const struct rxlev_stats *st, uint8_t rxlev, int16_t arfcn);
17
18void rxlev_stat_reset(struct rxlev_stats *st);
19
20void rxlev_stat_dump(const struct rxlev_stats *st);
21
22#endif /* _OSMOCORE_RXLEV_STATS_H */