blob: 07a3981c157f37eea6796f1d4fa7e1411e5fcee1 [file] [log] [blame]
Pau Espin Pedrolefac20b2018-02-21 14:59:19 +01001#pragma once
2
3/*
4 * This file contains structures used by both VTY (C, dir CommonLibs) and
5 * osmo-trx (CXX, dir Transceiver52)
6 */
7
Pau Espin Pedrol93fee1f2020-10-13 17:27:08 +02008#include <stdbool.h>
9
Pau Espin Pedrolefac20b2018-02-21 14:59:19 +010010enum FillerType {
11 FILLER_DUMMY,
12 FILLER_ZERO,
13 FILLER_NORM_RAND,
14 FILLER_EDGE_RAND,
15 FILLER_ACCESS_RAND,
16};
17
18enum ReferenceType {
19 REF_INTERNAL,
20 REF_EXTERNAL,
21 REF_GPS,
22};
Pau Espin Pedrol93fee1f2020-10-13 17:27:08 +020023
24/* Maximum number of physical RF channels */
25#define TRX_CHAN_MAX 8
26
27struct trx_ctx;
28
29struct trx_chan {
30 struct trx_ctx *trx; /* backpointer */
31 unsigned int idx; /* channel index */
32 char *rx_path;
33 char *tx_path;
34};
35
36struct trx_cfg {
37 char *bind_addr;
38 char *remote_addr;
39 char *dev_args;
40 unsigned int base_port;
41 unsigned int tx_sps;
42 unsigned int rx_sps;
43 unsigned int rtsc;
44 unsigned int rach_delay;
45 enum ReferenceType clock_ref;
46 enum FillerType filler;
47 bool multi_arfcn;
48 double offset;
Vadim Yanitskiy3b8f7c42018-08-23 13:41:06 +070049 double freq_offset_khz;
Pau Espin Pedrol93fee1f2020-10-13 17:27:08 +020050 double rssi_offset;
Ericc27fe602021-05-05 17:33:18 +020051 int ul_fn_offset;
Pau Espin Pedrole91544d2020-10-13 17:03:37 +020052 bool force_rssi_offset; /* Force value set in VTY? */
Pau Espin Pedrol93fee1f2020-10-13 17:27:08 +020053 bool swap_channels;
54 bool ext_rach;
55 bool egprs;
56 unsigned int sched_rr;
57 unsigned int stack_size;
58 unsigned int num_chans;
59 struct trx_chan chans[TRX_CHAN_MAX];
Eric Wildf8c7a522023-05-17 17:44:08 +020060 struct {
61 bool ul_freq_override;
62 bool dl_freq_override;
63 bool ul_gain_override;
64 bool dl_gain_override;
65 double ul_freq;
66 double dl_freq;
67 double ul_gain;
68 double dl_gain;
69 } overrides;
Ericcca5d932023-07-25 18:44:03 +020070 bool use_va;
Pau Espin Pedrol93fee1f2020-10-13 17:27:08 +020071};