2018-02-20 15:48:15 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <osmocom/vty/command.h>
|
|
|
|
|
2018-02-21 14:41:03 +00:00
|
|
|
#include "config_defs.h"
|
|
|
|
|
2018-02-20 15:48:15 +00:00
|
|
|
extern struct vty_app_info g_vty_info;
|
lms: Store device type specific parameters in one place
Add an enum containing each supported device type (LimeSDR-USB,
LimeSDR-Mini and LimeNet-Micro) plus "unknown", to leave some room for
yet-to-come devices to run with some generic parameters without
rebuilding osmo-trx.
Each device type is assigned a dev_desc structure, and all of them are
put in HashMap, similar to what's already done in UHDDevice.cpp.
Device type is infered from string provided by LMS_GetDeviceInfo(), as
it was already done before in several places. From now on, we only need
to parse the string once since we store the device type after first
during open time.
Later on, more fields will be moved to device-type specific structure,
such as Tx timing offset, clock rate, etc.
Change-Id: I7658615787c5bc41c365bab9c11733b701ac2ae5
2020-01-14 16:52:15 +00:00
|
|
|
extern const struct value_string clock_ref_names[];
|
2019-10-14 21:33:07 +00:00
|
|
|
extern const struct value_string filler_names[];
|
2018-02-20 15:48:15 +00:00
|
|
|
|
2019-04-01 00:55:48 +00:00
|
|
|
/* Maximum number of carriers in multi-ARFCN mode */
|
|
|
|
#define TRX_MCHAN_MAX 3
|
2018-02-21 14:41:03 +00:00
|
|
|
|
|
|
|
/* Samples-per-symbol for downlink path
|
|
|
|
* 4 - Uses precision modulator (more computation, less distortion)
|
|
|
|
* 1 - Uses minimized modulator (less computation, more distortion)
|
|
|
|
*
|
|
|
|
* Other values are invalid. Receive path (uplink) is always
|
|
|
|
* downsampled to 1 sps. Default to 4 sps for all cases.
|
|
|
|
*/
|
|
|
|
#define DEFAULT_TX_SPS 4
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Samples-per-symbol for uplink (receiver) path
|
|
|
|
* Do not modify this value. EDGE configures 4 sps automatically on
|
|
|
|
* B200/B210 devices only. Use of 4 sps on the receive path for other
|
|
|
|
* configurations is not supported.
|
|
|
|
*/
|
|
|
|
#define DEFAULT_RX_SPS 1
|
|
|
|
|
|
|
|
/* Default configuration parameters */
|
|
|
|
#define DEFAULT_TRX_PORT 5700
|
|
|
|
#define DEFAULT_TRX_IP "127.0.0.1"
|
|
|
|
#define DEFAULT_CHANS 1
|
|
|
|
|
2018-02-20 15:48:15 +00:00
|
|
|
struct trx_ctx {
|
2020-10-13 15:27:08 +00:00
|
|
|
struct trx_cfg cfg;
|
2018-02-20 15:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int trx_vty_init(struct trx_ctx* trx);
|
2018-02-21 14:41:03 +00:00
|
|
|
struct trx_ctx *vty_trx_ctx_alloc(void *talloc_ctx);
|