Enum fixes so clang 12 can build the repo

This commit is contained in:
Alejandro Leal Conejos 2021-10-08 12:10:01 +02:00 committed by Andre Puschmann
parent 964dce575b
commit 1a64c6adad
5 changed files with 16 additions and 17 deletions

View File

@ -20,20 +20,20 @@
namespace srsran { namespace srsran {
typedef struct { struct phy_log_args_t {
std::string phy_level = "none"; std::string phy_level = "none";
std::string phy_lib_level = "none"; std::string phy_lib_level = "none";
std::string id_preamble = ""; std::string id_preamble = "";
int phy_hex_limit = -1; int phy_hex_limit = -1;
} phy_log_args_t; };
typedef struct { struct rf_args_band_t {
float min; float min;
float max; float max;
} rf_args_band_t; };
// RF/radio args // RF/radio args
typedef struct { struct rf_args_t {
std::string type; std::string type;
std::string log_level; std::string log_level;
double srate_hz; double srate_hz;
@ -56,8 +56,7 @@ typedef struct {
std::array<rf_args_band_t, SRSRAN_MAX_CARRIERS> ch_rx_bands; std::array<rf_args_band_t, SRSRAN_MAX_CARRIERS> ch_rx_bands;
std::array<rf_args_band_t, SRSRAN_MAX_CARRIERS> ch_tx_bands; std::array<rf_args_band_t, SRSRAN_MAX_CARRIERS> ch_tx_bands;
};
} rf_args_t;
struct vnf_args_t { struct vnf_args_t {
std::string type; std::string type;

View File

@ -28,7 +28,7 @@ namespace srsran {
class channel class channel
{ {
public: public:
typedef struct { struct args_t {
// General // General
bool enable = false; bool enable = false;
@ -58,7 +58,7 @@ public:
bool rlf_enable = false; bool rlf_enable = false;
uint32_t rlf_t_on_ms = 10000; uint32_t rlf_t_on_ms = 10000;
uint32_t rlf_t_off_ms = 2000; uint32_t rlf_t_off_ms = 2000;
} args_t; };
channel(const args_t& channel_args, uint32_t _nof_channels, srslog::basic_logger& logger); channel(const args_t& channel_args, uint32_t _nof_channels, srslog::basic_logger& logger);
~channel(); ~channel();

View File

@ -155,12 +155,12 @@ private:
const static int NOF_BCCH_DLSCH_MSG = sched_interface::MAX_SIBS; const static int NOF_BCCH_DLSCH_MSG = sched_interface::MAX_SIBS;
const static int pcch_payload_buffer_len = 1024; const static int pcch_payload_buffer_len = 1024;
typedef struct { struct common_buffers_t {
uint8_t pcch_payload_buffer[pcch_payload_buffer_len] = {}; uint8_t pcch_payload_buffer[pcch_payload_buffer_len] = {};
srsran_softbuffer_tx_t bcch_softbuffer_tx[NOF_BCCH_DLSCH_MSG] = {}; srsran_softbuffer_tx_t bcch_softbuffer_tx[NOF_BCCH_DLSCH_MSG] = {};
srsran_softbuffer_tx_t pcch_softbuffer_tx = {}; srsran_softbuffer_tx_t pcch_softbuffer_tx = {};
srsran_softbuffer_tx_t rar_softbuffer_tx = {}; srsran_softbuffer_tx_t rar_softbuffer_tx = {};
} common_buffers_t; };
std::vector<common_buffers_t> common_buffers; std::vector<common_buffers_t> common_buffers;

View File

@ -34,15 +34,15 @@
namespace srsepc { namespace srsepc {
typedef struct { struct hss_args_t {
std::string db_file; std::string db_file;
uint16_t mcc; uint16_t mcc;
uint16_t mnc; uint16_t mnc;
} hss_args_t; };
enum hss_auth_algo { HSS_ALGO_XOR, HSS_ALGO_MILENAGE }; enum hss_auth_algo { HSS_ALGO_XOR, HSS_ALGO_MILENAGE };
typedef struct { struct hss_ue_ctx_t {
// Members // Members
std::string name; std::string name;
uint64_t imsi; uint64_t imsi;
@ -61,7 +61,7 @@ typedef struct {
void set_sqn(const uint8_t* sqn_); void set_sqn(const uint8_t* sqn_);
void set_last_rand(const uint8_t* rand_); void set_last_rand(const uint8_t* rand_);
void get_last_rand(uint8_t* rand_); void get_last_rand(uint8_t* rand_);
} hss_ue_ctx_t; };
class hss : public hss_interface_nas class hss : public hss_interface_nas
{ {

View File

@ -18,10 +18,10 @@
namespace srsue { namespace srsue {
typedef struct { struct nas_sim_args_t {
int airplane_t_on_ms = -1; int airplane_t_on_ms = -1;
int airplane_t_off_ms = -1; int airplane_t_off_ms = -1;
} nas_sim_args_t; };
class nas_args_t class nas_args_t
{ {