libosmogsm  0.9.6.311-c977
Osmocom GSM library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sysinfo.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <stdbool.h>
6 
7 #include <osmocom/core/defs.h>
8 #include <osmocom/core/utils.h>
9 #include <osmocom/gsm/protocol/gsm_04_08.h>
10 
11 #define OSMO_EARFCN_INVALID 666
12 #define OSMO_EARFCN_MEAS_INVALID 0xff
13 
39  /* FIXME all the various bis and ter */
41 };
42 
44  /* EARFCN (16 bits) array */
45  uint16_t *arfcn;
46  /* Measurement Bandwidth (3 bits), might be absent
47  (OSMO_EARFCN_MEAS_INVALID is stored in this case) */
48  uint8_t *meas_bw;
49  /* length of arfcn and meas_bw arrays (got to be the same) */
50  size_t length;
51  /* THRESH_E-UTRAN_high (5 bits) */
52  uint8_t thresh_hi;
53  /* THRESH_E-UTRAN_low (5 bits) */
54  uint8_t thresh_lo;
55  /* E-UTRAN_PRIORITY (3 bits) */
56  uint8_t prio;
57  /* E-UTRAN_QRXLEVMIN */
58  uint8_t qrxlm;
59  /* indicates whether thresh_lo value is valid
60  thresh_hi is mandatory and hence always considered valid */
62  /* indicates whether prio value is valid */
63  bool prio_valid;
64  /* indicates whether qrxlm value is valid */
66 };
67 
68 typedef uint8_t sysinfo_buf_t[GSM_MACBLOCK_LEN];
69 
70 extern const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE];
71 int osmo_earfcn_add(struct osmo_earfcn_si2q *e, uint16_t arfcn, uint8_t meas_bw);
72 int osmo_earfcn_del(struct osmo_earfcn_si2q *e, uint16_t arfcn);
73 size_t osmo_earfcn_bit_size(const struct osmo_earfcn_si2q *e) OSMO_DEPRECATED("Use osmo_earfcn_bit_size_ext()instead.");
74 size_t osmo_earfcn_bit_size_ext(const struct osmo_earfcn_si2q *e, size_t offset);
75 void osmo_earfcn_init(struct osmo_earfcn_si2q *e);
76 uint8_t osmo_sitype2rsl(enum osmo_sysinfo_type si_type);
77 enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si);
Definition: sysinfo.h:35
bool thresh_lo_valid
Definition: sysinfo.h:61
void osmo_earfcn_init(struct osmo_earfcn_si2q *e)
Initialize earfcn struct.
Definition: sysinfo.c:209
Definition: sysinfo.h:34
const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE]
Definition: sysinfo.c:102
size_t osmo_earfcn_bit_size_ext(const struct osmo_earfcn_si2q *e, size_t offset)
Return number of bits necessary to represent earfcn struct as Repeated E-UTRAN Neighbour Cells IE fro...
Definition: sysinfo.c:164
int osmo_earfcn_add(struct osmo_earfcn_si2q *e, uint16_t arfcn, uint8_t meas_bw)
Add pair of arfcn and measurement bandwith value to earfcn struct.
Definition: sysinfo.c:135
Definition: sysinfo.h:29
Definition: sysinfo.h:20
uint8_t * meas_bw
Definition: sysinfo.h:48
uint8_t prio
Definition: sysinfo.h:56
Definition: sysinfo.h:31
osmo_sysinfo_type
Definition: sysinfo.h:14
Definition: sysinfo.h:21
uint8_t qrxlm
Definition: sysinfo.h:58
Definition: sysinfo.h:30
size_t length
Definition: sysinfo.h:50
uint8_t thresh_lo
Definition: sysinfo.h:54
Definition: sysinfo.h:36
Definition: sysinfo.h:16
Definition: sysinfo.h:17
Definition: sysinfo.h:40
Definition: sysinfo.h:38
Definition: sysinfo.h:26
Definition: sysinfo.h:15
enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si)
Definition: sysinfo.c:223
size_t osmo_earfcn_bit_size(const struct osmo_earfcn_si2q *e) OSMO_DEPRECATED("Use osmo_earfcn_bit_size_ext()instead.")
Return number of bits necessary to represent earfcn struct as Repeated E-UTRAN Neighbour Cells IE fro...
Definition: sysinfo.c:153
bool prio_valid
Definition: sysinfo.h:63
Definition: sysinfo.h:23
bool qrxlm_valid
Definition: sysinfo.h:65
Definition: sysinfo.h:22
uint8_t sysinfo_buf_t[GSM_MACBLOCK_LEN]
Definition: sysinfo.h:68
Definition: sysinfo.h:28
Definition: sysinfo.h:37
Definition: sysinfo.h:24
uint8_t osmo_sitype2rsl(enum osmo_sysinfo_type si_type)
Definition: sysinfo.c:218
Definition: sysinfo.h:19
Definition: sysinfo.h:27
int osmo_earfcn_del(struct osmo_earfcn_si2q *e, uint16_t arfcn)
Delete arfcn (and corresponding measurement bandwith) from earfcn struct.
Definition: sysinfo.c:193
uint16_t * arfcn
Definition: sysinfo.h:45
Definition: sysinfo.h:43
Definition: sysinfo.h:18
Definition: sysinfo.h:33
uint8_t thresh_hi
Definition: sysinfo.h:52
Definition: sysinfo.h:32
Definition: sysinfo.h:25