Merge commit '7459d6cfd1765f8431b3d9a262eff332f9af807c' into sylvain/pending
[osmocom-bb.git] / src / host / layer23 / include / osmocom / bb / common / osmocom_data.h
1 #ifndef osmocom_data_h
2 #define osmocom_data_h
3
4 #include <osmocore/select.h>
5 #include <osmocore/gsm_utils.h>
6 #include <osmocore/write_queue.h>
7
8 struct osmocom_ms;
9
10         /* FIXME no 'mobile' specific stuff should be here */
11 #include <osmocom/bb/mobile/support.h>
12 #include <osmocom/bb/mobile/settings.h>
13 #include <osmocom/bb/mobile/subscriber.h>
14 #include <osmocom/bb/common/lapdm.h>
15 #include <osmocom/bb/mobile/gsm48_rr.h>
16 #include <osmocom/bb/mobile/sysinfo.h>
17 #include <osmocom/bb/mobile/gsm322.h>
18 #include <osmocom/bb/mobile/gsm48_mm.h>
19 #include <osmocom/bb/mobile/gsm48_cc.h>
20
21 /* A layer2 entity */
22 struct osmol2_entity {
23         struct lapdm_entity lapdm_dcch;
24         struct lapdm_entity lapdm_acch;
25         osmol2_cb_t msg_handler;
26 };
27
28 /* RX measurement statistics */
29 struct rx_meas_stat {
30         uint32_t frames;
31         uint32_t berr;
32         uint32_t rxlev;
33 };
34
35 /* One Mobilestation for osmocom */
36 struct osmocom_ms {
37         struct llist_head entity;
38         char name[32];
39         struct write_queue wq;
40         uint16_t test_arfcn;
41
42         struct gsm_support support;
43
44         struct gsm_settings settings;
45
46         struct gsm_subscriber subscr;
47
48         struct osmol2_entity l2_entity;
49
50         struct rx_meas_stat meas;
51
52         struct gsm48_rrlayer rrlayer;
53         struct gsm322_plmn plmn;
54         struct gsm322_cellsel cellsel;
55         struct gsm48_mmlayer mmlayer;
56         struct gsm48_cclayer cclayer;
57         struct llist_head trans_list;
58 };
59
60 enum osmobb_sig_subsys {
61         SS_L1CTL,
62 };
63
64 enum osmobb_meas_sig {
65         S_L1CTL_FBSB_ERR,
66         S_L1CTL_FBSB_RESP,
67         S_L1CTL_RESET,
68         S_L1CTL_PM_RES,
69         S_L1CTL_PM_DONE,
70         S_L1CTL_CCCH_MODE_CONF,
71 };
72
73 struct osmobb_meas_res {
74         struct osmocom_ms *ms;
75         uint16_t band_arfcn;
76         uint8_t rx_lev;
77 };
78
79 struct osmobb_ccch_mode_conf {
80         struct osmocom_ms *ms;
81         uint8_t ccch_mode;
82 };
83
84 #endif