[layer23] Rework of channel request process and control of TA and TX-power
[osmocom-bb.git] / src / host / layer23 / include / osmocom / 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 #include <osmocom/support.h>
11 #include <osmocom/settings.h>
12 #include <osmocom/subscriber.h>
13 #include <osmocom/lapdm.h>
14 #include <osmocom/gsm48_rr.h>
15 #include <osmocom/sysinfo.h>
16 #include <osmocom/gsm322.h>
17 #include <osmocom/gsm48_mm.h>
18 #include <osmocom/gsm48_cc.h>
19
20 /* A layer2 entity */
21 struct osmol2_entity {
22         struct lapdm_entity lapdm_dcch;
23         struct lapdm_entity lapdm_acch;
24         osmol2_cb_t msg_handler;
25 };
26
27 /* One Mobilestation for osmocom */
28 struct osmocom_ms {
29         struct llist_head entity;
30         char name[32];
31         struct write_queue wq;
32         uint16_t test_arfcn;
33
34         struct gsm_support support;
35
36         struct gsm_settings settings;
37
38         struct gsm_subscriber subscr;
39
40         struct osmol2_entity l2_entity;
41
42         struct gsm48_rrlayer rrlayer;
43         struct gsm322_plmn plmn;
44         struct gsm322_cellsel cellsel;
45         struct gsm48_mmlayer mmlayer;
46         struct gsm48_cclayer cclayer;
47         struct llist_head trans_list;
48 };
49
50 enum osmobb_sig_subsys {
51         SS_L1CTL,
52 };
53
54 enum osmobb_meas_sig {
55         S_L1CTL_FBSB_ERR,
56         S_L1CTL_FBSB_RESP,
57         S_L1CTL_RESET,
58         S_L1CTL_PM_RES,
59         S_L1CTL_PM_DONE,
60         S_L1CTL_CCCH_MODE_CONF,
61 };
62
63 struct osmobb_meas_res {
64         struct osmocom_ms *ms;
65         uint16_t band_arfcn;
66         uint8_t rx_lev;
67 };
68
69 struct osmobb_ccch_mode_conf {
70         struct osmocom_ms *ms;
71         uint8_t ccch_mode;
72 };
73
74 #endif