Merge branch 'next' into agpl_next

master
Andre Puschmann 4 years ago
commit 910dc5af86

@ -349,9 +349,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif(HAVE_AVX)
endif (HAVE_AVX2)
if(NOT WIN32)
# Do not hide symbols in debug mode so backtraces can display function info.
if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(NOT WIN32)
ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_CXX)
endif(NOT WIN32)
endif(NOT WIN32)
endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(FORCE_32BIT)
ADD_C_COMPILER_FLAG_IF_AVAILABLE("-m32" HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
@ -439,9 +442,12 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR "no SIMD instructions found")
endif(NOT HAVE_SSE AND NOT HAVE_NEON AND NOT DISABLE_SIMD)
if(NOT WIN32)
# Do not hide symbols in debug mode so backtraces can display function info.
if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(NOT WIN32)
ADD_C_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_C)
endif(NOT WIN32)
endif(NOT WIN32)
endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if (ENABLE_ASAN AND ENABLE_MSAN)
message(FATAL_ERROR "ASAN and MSAN cannot be enabled at the same time.")
@ -476,7 +482,7 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR})
endif()
# Add -Werror to C/C++ flags for newer compilers
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()

@ -22,14 +22,13 @@
#ifndef SRSASN_COMMON_UTILS_H
#define SRSASN_COMMON_UTILS_H
#include "srslte/srslog/bundled/fmt/format.h"
#include <algorithm>
#include <array>
#include <cmath>
#include <cstring>
#include <limits>
#include <map>
#include <sstream>
#include <stdarg.h> /* va_list, va_start, va_arg, va_end */
#include <stdint.h>
#include <string>
#include <vector>
@ -1310,6 +1309,8 @@ private:
JsonWriter
*******************/
using json_buffer = fmt::basic_memory_buffer<char, 2048>;
class json_writer
{
public:
@ -1330,9 +1331,9 @@ public:
std::string to_string() const;
private:
std::stringstream ss;
std::string ident;
enum separator_t { COMMA, NEWLINE, NONE };
json_buffer buffer;
std::string ident;
enum separator_t { COMMA = 0, NEWLINE, NONE };
separator_t sep;
};

@ -1733,6 +1733,148 @@ struct sc_mcch_msg_r13_s {
void to_json(json_writer& j) const;
};
// FailureReportSCG-v12d0 ::= SEQUENCE
struct fail_report_scg_v12d0_s {
bool meas_result_neigh_cells_v12d0_present = false;
meas_result_list2_eutra_v9e0_l meas_result_neigh_cells_v12d0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SCGFailureInformation-v12d0b-IEs ::= SEQUENCE
struct scg_fail_info_v12d0b_ies_s {
bool fail_report_scg_v12d0_present = false;
bool non_crit_ext_present = false;
fail_report_scg_v12d0_s fail_report_scg_v12d0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE
struct mimo_weighted_layers_cap_r13_s {
struct rel_weight_two_layers_r13_opts {
enum options { v1, v1dot25, v1dot5, v1dot75, v2, v2dot5, v3, v4, nulltype } value;
typedef float number_type;
std::string to_string() const;
float to_number() const;
std::string to_number_string() const;
};
typedef enumerated<rel_weight_two_layers_r13_opts> rel_weight_two_layers_r13_e_;
struct rel_weight_four_layers_r13_opts {
enum options { v1, v1dot25, v1dot5, v1dot75, v2, v2dot5, v3, v4, nulltype } value;
typedef float number_type;
std::string to_string() const;
float to_number() const;
std::string to_number_string() const;
};
typedef enumerated<rel_weight_four_layers_r13_opts> rel_weight_four_layers_r13_e_;
struct rel_weight_eight_layers_r13_opts {
enum options { v1, v1dot25, v1dot5, v1dot75, v2, v2dot5, v3, v4, nulltype } value;
typedef float number_type;
std::string to_string() const;
float to_number() const;
std::string to_number_string() const;
};
typedef enumerated<rel_weight_eight_layers_r13_opts> rel_weight_eight_layers_r13_e_;
// member variables
bool rel_weight_four_layers_r13_present = false;
bool rel_weight_eight_layers_r13_present = false;
rel_weight_two_layers_r13_e_ rel_weight_two_layers_r13;
rel_weight_four_layers_r13_e_ rel_weight_four_layers_r13;
rel_weight_eight_layers_r13_e_ rel_weight_eight_layers_r13;
uint8_t total_weighted_layers_r13 = 2;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MIMO-UE-Parameters-v13e0 ::= SEQUENCE
struct mimo_ue_params_v13e0_s {
bool mimo_weighted_layers_cap_r13_present = false;
mimo_weighted_layers_cap_r13_s mimo_weighted_layers_cap_r13;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MeasResult3EUTRA-r15 ::= SEQUENCE
struct meas_result3_eutra_r15_s {
bool ext = false;
bool meas_result_serving_cell_r15_present = false;
bool meas_result_neigh_cell_list_r15_present = false;
uint32_t carrier_freq_r15 = 0;
meas_result_eutra_s meas_result_serving_cell_r15;
meas_result_list_eutra_l meas_result_neigh_cell_list_r15;
// ...
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MeasResultList3EUTRA-r15 ::= SEQUENCE (SIZE (1..8)) OF MeasResult3EUTRA-r15
using meas_result_list3_eutra_r15_l = dyn_array<meas_result3_eutra_r15_s>;
// MeasResultSCG-FailureMRDC-r15 ::= SEQUENCE
struct meas_result_scg_fail_mrdc_r15_s {
bool ext = false;
meas_result_list3_eutra_r15_l meas_result_freq_list_eutra_r15;
// ...
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PhyLayerParameters-v13e0 ::= SEQUENCE
struct phy_layer_params_v13e0_s {
mimo_ue_params_v13e0_s mimo_ue_params_v13e0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE
struct ue_eutra_cap_v13e0b_ies_s {
bool non_crit_ext_present = false;
phy_layer_params_v13e0_s phy_layer_params_v13e0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SCG-Config-v12i0b-IEs ::= SEQUENCE
struct scg_cfg_v12i0b_ies_s {
bool scg_radio_cfg_v12i0_present = false;
bool non_crit_ext_present = false;
scg_cfg_part_scg_v12f0_s scg_radio_cfg_v12i0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CSI-RS-TriggeredList-r12 ::= SEQUENCE (SIZE (1..96)) OF INTEGER (1..96)
using csi_rs_triggered_list_r12_l = dyn_array<uint8_t>;

@ -51,6 +51,35 @@ struct bcch_bch_msg_s {
void to_json(json_writer& j) const;
};
// SIB-Type-v12j0 ::= ENUMERATED
struct sib_type_v12j0_opts {
enum options {
sib_type19_v1250,
sib_type20_v1310,
sib_type21_v1430,
sib_type24_v1530,
sib_type25_v1530,
sib_type26_v1530,
spare10,
spare9,
spare8,
spare7,
spare6,
spare5,
spare4,
spare3,
spare2,
spare1,
// ...
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<sib_type_v12j0_opts, true> sib_type_v12j0_e;
// NS-PmaxValue-v10l0 ::= SEQUENCE
struct ns_pmax_value_v10l0_s {
bool add_spec_emission_v10l0_present = false;
@ -62,6 +91,9 @@ struct ns_pmax_value_v10l0_s {
void to_json(json_writer& j) const;
};
// SIB-MappingInfo-v12j0 ::= SEQUENCE (SIZE (1..31)) OF SIB-Type-v12j0
using sib_map_info_v12j0_l = bounded_array<sib_type_v12j0_e, 31>;
// InterFreqCarrierFreqInfo-v1360 ::= SEQUENCE
struct inter_freq_carrier_freq_info_v1360_s {
bool cell_sel_info_ce1_v1360_present = false;
@ -88,6 +120,28 @@ struct ns_pmax_value_r10_s {
void to_json(json_writer& j) const;
};
// SchedulingInfo-v12j0 ::= SEQUENCE
struct sched_info_v12j0_s {
bool sib_map_info_v12j0_present = false;
sib_map_info_v12j0_l sib_map_info_v12j0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SchedulingInfoExt-r12 ::= SEQUENCE
struct sched_info_ext_r12_s {
si_periodicity_r12_e si_periodicity_r12;
sib_map_info_v12j0_l sib_map_info_r12;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// BandClassInfoCDMA2000 ::= SEQUENCE
struct band_class_info_cdma2000_s {
bool ext = false;
@ -133,6 +187,12 @@ using pci_list_cdma2000_l = bounded_array<uint16_t, 16>;
// PhysCellIdListCDMA2000-v920 ::= SEQUENCE (SIZE (0..24)) OF INTEGER (0..511)
using pci_list_cdma2000_v920_l = bounded_array<uint16_t, 24>;
// SchedulingInfoList-v12j0 ::= SEQUENCE (SIZE (1..32)) OF SchedulingInfo-v12j0
using sched_info_list_v12j0_l = dyn_array<sched_info_v12j0_s>;
// SchedulingInfoListExt-r12 ::= SEQUENCE (SIZE (1..32)) OF SchedulingInfoExt-r12
using sched_info_list_ext_r12_l = dyn_array<sched_info_ext_r12_s>;
// SystemInformationBlockType2-v13c0-IEs ::= SEQUENCE
struct sib_type2_v13c0_ies_s {
bool ul_pwr_ctrl_common_v13c0_present = false;
@ -175,6 +235,18 @@ struct multi_band_info_v9e0_s {
// MultiBandInfoList-v10j0 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxList-r10
using multi_band_info_list_v10j0_l = dyn_array<ns_pmax_list_r10_l>;
// NS-PmaxValueNR-r15 ::= SEQUENCE
struct ns_pmax_value_nr_r15_s {
bool add_pmax_nr_r15_present = false;
int8_t add_pmax_nr_r15 = -30;
uint8_t add_spec_emission_nr_r15 = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// NeighCellCDMA2000-r11 ::= SEQUENCE
struct neigh_cell_cdma2000_r11_s {
using neigh_freq_info_list_r11_l_ = dyn_array<neigh_cells_per_bandclass_cdma2000_r11_s>;
@ -221,6 +293,20 @@ struct redist_neigh_cell_r13_s {
void to_json(json_writer& j) const;
};
// SystemInformationBlockType1-v12j0-IEs ::= SEQUENCE
struct sib_type1_v12j0_ies_s {
bool sched_info_list_v12j0_present = false;
bool sched_info_list_ext_r12_present = false;
bool non_crit_ext_present = false;
sched_info_list_v12j0_l sched_info_list_v12j0;
sched_info_list_ext_r12_l sched_info_list_ext_r12;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SystemInformationBlockType2-v10n0-IEs ::= SEQUENCE
struct sib_type2_v10n0_ies_s {
bool late_non_crit_ext_present = false;
@ -341,17 +427,8 @@ struct inter_freq_neigh_cell_info_s {
// MultiBandInfoList-v9e0 ::= SEQUENCE (SIZE (1..8)) OF MultiBandInfo-v9e0
using multi_band_info_list_v9e0_l = dyn_array<multi_band_info_v9e0_s>;
// NS-PmaxValueNR-r15 ::= SEQUENCE
struct ns_pmax_value_nr_r15_s {
bool add_pmax_nr_r15_present = false;
int8_t add_pmax_nr_r15 = -30;
uint8_t add_spec_emission_nr_r15 = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// NS-PmaxListNR-r15 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxValueNR-r15
using ns_pmax_list_nr_r15_l = dyn_array<ns_pmax_value_nr_r15_s>;
// NeighCellsPerBandclassListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000
using neigh_cells_per_bandclass_list_cdma2000_l = dyn_array<neigh_cells_per_bandclass_cdma2000_s>;
@ -423,6 +500,19 @@ using redist_neigh_cell_list_r13_l = dyn_array<redist_neigh_cell_r13_s>;
// SL-SyncConfigListNFreq-r13 ::= SEQUENCE (SIZE (1..16)) OF SL-SyncConfigNFreq-r13
using sl_sync_cfg_list_nfreq_r13_l = dyn_array<sl_sync_cfg_nfreq_r13_s>;
// SystemInformationBlockType1-v10x0-IEs ::= SEQUENCE
struct sib_type1_v10x0_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
sib_type1_v12j0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE
struct sib_type2_v10m0_ies_s {
struct freq_info_v10l0_s_ {
@ -568,8 +658,11 @@ using mbms_sai_list_r11_l = dyn_array<uint32_t>;
// MultiBandInfoList ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..64)
using multi_band_info_list_l = bounded_array<uint8_t, 8>;
// NS-PmaxListNR-r15 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxValueNR-r15
using ns_pmax_list_nr_r15_l = dyn_array<ns_pmax_value_nr_r15_s>;
// MultiBandNsPmaxListNR-1-v1550 ::= SEQUENCE (SIZE (1..31)) OF NS-PmaxListNR-r15
using multi_band_ns_pmax_list_nr_minus1_v1550_l = dyn_array<ns_pmax_list_nr_r15_l>;
// MultiBandNsPmaxListNR-v1550 ::= SEQUENCE (SIZE (1..32)) OF NS-PmaxListNR-r15
using multi_band_ns_pmax_list_nr_v1550_l = dyn_array<ns_pmax_list_nr_r15_l>;
// NeighCellCDMA2000 ::= SEQUENCE
struct neigh_cell_cdma2000_s {
@ -707,6 +800,7 @@ struct sib_type1_v10l0_ies_s {
bool non_crit_ext_present = false;
ns_pmax_list_v10l0_l freq_band_info_v10l0;
multi_band_info_list_v10l0_l multi_band_info_list_v10l0;
sib_type1_v10x0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -803,11 +897,15 @@ struct carrier_freq_nr_r15_s {
int8_t q_rx_lev_min_sul_r15 = -70;
int8_t p_max_nr_r15 = -30;
ns_pmax_list_nr_r15_l ns_pmax_list_nr_r15;
int8_t q_qual_min_r15 = -34;
int8_t q_qual_min_r15 = -43;
bool derive_ssb_idx_from_cell_r15 = false;
uint8_t max_rs_idx_cell_qual_r15 = 1;
thres_list_nr_r15_s thresh_rs_idx_r15;
// ...
// group 0
copy_ptr<multi_band_ns_pmax_list_nr_minus1_v1550_l> multi_band_ns_pmax_list_nr_v1550;
copy_ptr<multi_band_ns_pmax_list_nr_v1550_l> multi_band_ns_pmax_list_nr_sul_v1550;
copy_ptr<ssb_to_measure_r15_c> ssb_to_measure_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -1234,7 +1332,7 @@ struct mbsfn_area_info_r9_s {
mcch_mod_period_v1430_e_ mcch_mod_period_v1430;
};
struct subcarrier_spacing_mbms_r14_opts {
enum options { khz_minus7dot5, khz_minus1dot25, nulltype } value;
enum options { khz7dot5, khz1dot25, nulltype } value;
typedef float number_type;
std::string to_string() const;
@ -2976,14 +3074,16 @@ struct sib_type26_r15_s {
bool sync_freq_list_r15_present = false;
bool slss_tx_multi_freq_r15_present = false;
bool v2x_freq_sel_cfg_list_r15_present = false;
bool thresh_s_rssi_cbr_r14_present = false;
bool thresh_s_rssi_cbr_r15_present = false;
sl_inter_freq_info_list_v2x_r14_l v2x_inter_freq_info_list_r15;
sl_cbr_pppp_tx_cfg_list_r15_l cbr_pssch_tx_cfg_list_r15;
sl_v2x_packet_dupl_cfg_r15_s v2x_packet_dupl_cfg_r15;
sl_v2x_sync_freq_list_r15_l sync_freq_list_r15;
sl_v2x_freq_sel_cfg_list_r15_l v2x_freq_sel_cfg_list_r15;
uint8_t thresh_s_rssi_cbr_r14 = 0;
uint8_t thresh_s_rssi_cbr_r15 = 0;
// ...
bool late_non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -121,6 +121,7 @@ namespace rrc {
#define ASN1_RRC_MAX_MEAS_ID_R12 64
#define ASN1_RRC_MAX_MULTI_BANDS 8
#define ASN1_RRC_MAX_MULTI_BANDS_NR_R15 32
#define ASN1_RRC_MAX_MULTI_BANDS_NR_MINUS1_R15 31
#define ASN1_RRC_MAX_NS_PMAX_R10 8
#define ASN1_RRC_MAX_NAICS_ENTRIES_R12 8
#define ASN1_RRC_MAX_NEIGH_CELL_R12 8

@ -346,6 +346,18 @@ struct rrc_conn_setup_v8a0_ies_s {
void to_json(json_writer& j) const;
};
// RRCEarlyDataComplete-v1590-IEs ::= SEQUENCE
struct rrc_early_data_complete_v1590_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RedirectedCarrierInfo-r15-IEs ::= CHOICE
struct redirected_carrier_info_r15_ies_c {
struct types_opts {
@ -522,17 +534,18 @@ struct rrc_conn_setup_r8_ies_s {
// RRCEarlyDataComplete-r15-IEs ::= SEQUENCE
struct rrc_early_data_complete_r15_ies_s {
bool ded_info_nas_r15_present = false;
bool extended_wait_time_r15_present = false;
bool idle_mode_mob_ctrl_info_r15_present = false;
bool idle_mode_mob_ctrl_info_ext_r15_present = false;
bool redirected_carrier_info_r15_present = false;
bool non_crit_ext_present = false;
dyn_octstring ded_info_nas_r15;
uint16_t extended_wait_time_r15 = 1;
idle_mode_mob_ctrl_info_s idle_mode_mob_ctrl_info_r15;
idle_mode_mob_ctrl_info_v9e0_s idle_mode_mob_ctrl_info_ext_r15;
redirected_carrier_info_r15_ies_c redirected_carrier_info_r15;
bool ded_info_nas_r15_present = false;
bool extended_wait_time_r15_present = false;
bool idle_mode_mob_ctrl_info_r15_present = false;
bool idle_mode_mob_ctrl_info_ext_r15_present = false;
bool redirected_carrier_info_r15_present = false;
bool non_crit_ext_present = false;
dyn_octstring ded_info_nas_r15;
uint16_t extended_wait_time_r15 = 1;
idle_mode_mob_ctrl_info_s idle_mode_mob_ctrl_info_r15;
idle_mode_mob_ctrl_info_v9e0_s idle_mode_mob_ctrl_info_ext_r15;
redirected_carrier_info_r15_ies_c redirected_carrier_info_r15;
rrc_early_data_complete_v1590_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -292,6 +292,16 @@ struct sl_tx_pool_to_add_mod_r14_s {
void to_json(json_writer& j) const;
};
// SubframeAssignment-r15 ::= ENUMERATED
struct sf_assign_r15_opts {
enum options { sa0, sa1, sa2, sa3, sa4, sa5, sa6, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<sf_assign_r15_opts> sf_assign_r15_e;
// UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE
struct ul_pwr_ctrl_common_ps_cell_r12_s {
struct delta_f_pucch_format3_r12_opts {
@ -653,15 +663,42 @@ using sl_tx_pool_to_add_mod_list_v2x_r14_l = dyn_array<sl_tx_pool_to_add_mod_r14
// SL-TxPoolToReleaseListV2X-r14 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8)
using sl_tx_pool_to_release_list_v2x_r14_l = bounded_array<uint8_t, 8>;
// SubframeAssignment-r15 ::= ENUMERATED
struct sf_assign_r15_opts {
enum options { sa0, sa1, sa2, sa3, sa4, sa5, sa6, nulltype } value;
typedef uint8_t number_type;
// TDM-PatternConfig-r15 ::= CHOICE
struct tdm_pattern_cfg_r15_c {
struct setup_s_ {
sf_assign_r15_e sf_assign_r15;
uint8_t harq_offset_r15 = 0;
};
typedef setup_e types;
std::string to_string() const;
uint8_t to_number() const;
// choice methods
tdm_pattern_cfg_r15_c() = default;
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
setup_s_& setup()
{
assert_choice_type("setup", type_.to_string(), "TDM-PatternConfig-r15");
return c;
}
const setup_s_& setup() const
{
assert_choice_type("setup", type_.to_string(), "TDM-PatternConfig-r15");
return c;
}
setup_s_& set_setup()
{
set(types::setup);
return c;
}
private:
types type_;
setup_s_ c;
};
typedef enumerated<sf_assign_r15_opts> sf_assign_r15_e;
// TunnelConfigLWIP-r13 ::= SEQUENCE
struct tunnel_cfg_lwip_r13_s {
@ -923,41 +960,6 @@ struct rrc_conn_recfg_v1510_ies_s {
return c;
}
private:
types type_;
setup_s_ c;
};
struct tdm_pattern_cfg_r15_c_ {
struct setup_s_ {
sf_assign_r15_e sf_assign_r15;
uint8_t harq_offset_r15 = 0;
};
typedef setup_e types;
// choice methods
tdm_pattern_cfg_r15_c_() = default;
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
setup_s_& setup()
{
assert_choice_type("setup", type_.to_string(), "tdm-PatternConfig-r15");
return c;
}
const setup_s_& setup() const
{
assert_choice_type("setup", type_.to_string(), "tdm-PatternConfig-r15");
return c;
}
setup_s_& set_setup()
{
set(types::setup);
return c;
}
private:
types type_;
setup_s_ c;
@ -974,7 +976,7 @@ struct rrc_conn_recfg_v1510_ies_s {
uint32_t sk_counter_r15 = 0;
dyn_octstring nr_radio_bearer_cfg1_r15;
dyn_octstring nr_radio_bearer_cfg2_r15;
tdm_pattern_cfg_r15_c_ tdm_pattern_cfg_r15;
tdm_pattern_cfg_r15_c tdm_pattern_cfg_r15;
rrc_conn_recfg_v1530_ies_s non_crit_ext;
// sequence methods
@ -1528,6 +1530,17 @@ struct rrc_conn_recfg_v1430_ies_s {
void to_json(json_writer& j) const;
};
// RRCConnectionRelease-v15b0-IEs ::= SEQUENCE
struct rrc_conn_release_v15b0_ies_s {
bool no_last_cell_upd_r15_present = false;
bool non_crit_ext_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RadioResourceConfigDedicated-v1370 ::= SEQUENCE
struct rr_cfg_ded_v1370_s {
bool phys_cfg_ded_v1370_present = false;
@ -1563,6 +1576,12 @@ struct scg_cfg_part_scg_r12_s {
// group 3
copy_ptr<scell_group_to_release_list_r15_l> scell_group_to_release_list_scg_r15;
copy_ptr<scell_group_to_add_mod_list_r15_l> scell_group_to_add_mod_list_scg_r15;
// group 4
copy_ptr<meas_cfg_s> meas_cfg_sn_r15;
copy_ptr<tdm_pattern_cfg_r15_c> tdm_pattern_cfg_ne_dc_r15;
// group 5
bool p_max_eutra_r15_present = false;
int8_t p_max_eutra_r15 = -30;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -1686,7 +1705,7 @@ struct rrc_inactive_cfg_r15_s {
bool ran_notif_area_info_r15_present = false;
bool periodic_rnau_timer_r15_present = false;
bool next_hop_chaining_count_r15_present = false;
bool non_crit_ext_present = false;
bool dummy_present = false;
fixed_bitstring<40> full_i_rnti_r15;
fixed_bitstring<24> short_i_rnti_r15;
ran_paging_cycle_r15_e_ ran_paging_cycle_r15;
@ -1738,9 +1757,10 @@ struct rrc_conn_recfg_v1370_ies_s {
// RRCConnectionRelease-v1540-IEs ::= SEQUENCE
struct rrc_conn_release_v1540_ies_s {
bool wait_time_present = false;
bool non_crit_ext_present = false;
uint8_t wait_time = 1;
bool wait_time_present = false;
bool non_crit_ext_present = false;
uint8_t wait_time = 1;
rrc_conn_release_v15b0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3170,16 +3190,16 @@ struct other_cfg_r9_s {
};
struct meas_cfg_app_layer_r15_c_ {
struct setup_s_ {
struct service_type_opts {
struct service_type_r15_opts {
enum options { qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value;
std::string to_string() const;
};
typedef enumerated<service_type_opts> service_type_e_;
typedef enumerated<service_type_r15_opts> service_type_r15_e_;
// member variables
bounded_octstring<1, 1000> meas_cfg_app_layer_container_r15;
service_type_e_ service_type;
service_type_r15_e_ service_type_r15;
};
typedef setup_e types;

@ -49,8 +49,8 @@ struct scg_cfg_v13c0_ies_s {
void to_json(json_writer& j) const;
};
// SCG-Config-v12x0-IEs ::= SEQUENCE
struct scg_cfg_v12x0_ies_s {
// SCG-Config-v12i0a-IEs ::= SEQUENCE
struct scg_cfg_v12i0a_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
@ -67,7 +67,26 @@ struct scg_cfg_r12_ies_s {
bool scg_radio_cfg_r12_present = false;
bool non_crit_ext_present = false;
scg_cfg_part_scg_r12_s scg_radio_cfg_r12;
scg_cfg_v12x0_ies_s non_crit_ext;
scg_cfg_v12i0a_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// AS-Config-v1550 ::= SEQUENCE
struct as_cfg_v1550_s {
struct tdm_pattern_cfg_r15_s_ {
sf_assign_r15_e sf_assign_r15;
uint8_t harq_offset_r15 = 0;
};
// member variables
bool tdm_pattern_cfg_r15_present = false;
bool p_max_eutra_r15_present = false;
tdm_pattern_cfg_r15_s_ tdm_pattern_cfg_r15;
int8_t p_max_eutra_r15 = -30;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -90,6 +109,14 @@ struct as_cfg_nr_r15_s {
void to_json(json_writer& j) const;
};
// AS-ConfigNR-v1570 ::= SEQUENCE
struct as_cfg_nr_v1570_s {
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SCG-Config-r12 ::= SEQUENCE
struct scg_cfg_r12_s {
struct crit_exts_c_ {
@ -197,6 +224,10 @@ struct as_cfg_s {
copy_ptr<scg_cfg_r12_s> source_cfg_scg_r12;
// group 3
copy_ptr<as_cfg_nr_r15_s> as_cfg_nr_r15;
// group 4
copy_ptr<as_cfg_v1550_s> as_cfg_v1550;
// group 5
copy_ptr<as_cfg_nr_v1570_s> as_cfg_nr_v1570;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -408,6 +408,81 @@ struct ss_rssi_meas_r15_s {
bool operator!=(const ss_rssi_meas_r15_s& other) const { return not(*this == other); }
};
// SSB-ToMeasure-r15 ::= CHOICE
struct ssb_to_measure_r15_c {
struct types_opts {
enum options { short_bitmap_r15, medium_bitmap_r15, long_bitmap_r15, nulltype } value;
std::string to_string() const;
};
typedef enumerated<types_opts> types;
// choice methods
ssb_to_measure_r15_c() = default;
ssb_to_measure_r15_c(const ssb_to_measure_r15_c& other);
ssb_to_measure_r15_c& operator=(const ssb_to_measure_r15_c& other);
~ssb_to_measure_r15_c() { destroy_(); }
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
bool operator==(const ssb_to_measure_r15_c& other) const;
bool operator!=(const ssb_to_measure_r15_c& other) const { return not(*this == other); }
// getters
fixed_bitstring<4>& short_bitmap_r15()
{
assert_choice_type("shortBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15");
return c.get<fixed_bitstring<4> >();
}
fixed_bitstring<8>& medium_bitmap_r15()
{
assert_choice_type("mediumBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15");
return c.get<fixed_bitstring<8> >();
}
fixed_bitstring<64>& long_bitmap_r15()
{
assert_choice_type("longBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15");
return c.get<fixed_bitstring<64> >();
}
const fixed_bitstring<4>& short_bitmap_r15() const
{
assert_choice_type("shortBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15");
return c.get<fixed_bitstring<4> >();
}
const fixed_bitstring<8>& medium_bitmap_r15() const
{
assert_choice_type("mediumBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15");
return c.get<fixed_bitstring<8> >();
}
const fixed_bitstring<64>& long_bitmap_r15() const
{
assert_choice_type("longBitmap-r15", type_.to_string(), "SSB-ToMeasure-r15");
return c.get<fixed_bitstring<64> >();
}
fixed_bitstring<4>& set_short_bitmap_r15()
{
set(types::short_bitmap_r15);
return c.get<fixed_bitstring<4> >();
}
fixed_bitstring<8>& set_medium_bitmap_r15()
{
set(types::medium_bitmap_r15);
return c.get<fixed_bitstring<8> >();
}
fixed_bitstring<64>& set_long_bitmap_r15()
{
set(types::long_bitmap_r15);
return c.get<fixed_bitstring<64> >();
}
private:
types type_;
choice_buffer_t<fixed_bitstring<64> > c;
void destroy_();
};
// ThresholdListNR-r15 ::= SEQUENCE
struct thres_list_nr_r15_s {
bool nr_rsrp_r15_present = false;
@ -469,108 +544,6 @@ struct carrier_freq_cdma2000_s {
bool operator!=(const carrier_freq_cdma2000_s& other) const { return not(*this == other); }
};
// WLAN-Id-List-r13 ::= SEQUENCE (SIZE (1..32)) OF WLAN-Identifiers-r12
using wlan_id_list_r13_l = dyn_array<wlan_ids_r12_s>;
// RACH-ConfigDedicated ::= SEQUENCE
struct rach_cfg_ded_s {
uint8_t ra_preamb_idx = 0;
uint8_t ra_prach_mask_idx = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RACH-Skip-r14 ::= SEQUENCE
struct rach_skip_r14_s {
struct target_ta_r14_c_ {
struct types_opts {
enum options { ta0_r14, mcg_ptag_r14, scg_ptag_r14, mcg_stag_r14, scg_stag_r14, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<types_opts> types;
// choice methods
target_ta_r14_c_() = default;
target_ta_r14_c_(const target_ta_r14_c_& other);
target_ta_r14_c_& operator=(const target_ta_r14_c_& other);
~target_ta_r14_c_() { destroy_(); }
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
uint8_t& mcg_stag_r14()
{
assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
uint8_t& scg_stag_r14()
{
assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
const uint8_t& mcg_stag_r14() const
{
assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
const uint8_t& scg_stag_r14() const
{
assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
uint8_t& set_mcg_stag_r14()
{
set(types::mcg_stag_r14);
return c.get<uint8_t>();
}
uint8_t& set_scg_stag_r14()
{
set(types::scg_stag_r14);
return c.get<uint8_t>();
}
private:
types type_;
pod_choice_buffer_t c;
void destroy_();
};
struct ul_cfg_info_r14_s_ {
struct ul_sched_interv_r14_opts {
enum options { sf2, sf5, sf10, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<ul_sched_interv_r14_opts> ul_sched_interv_r14_e_;
// member variables
uint8_t nof_conf_ul_processes_r14 = 1;
ul_sched_interv_r14_e_ ul_sched_interv_r14;
uint8_t ul_start_sf_r14 = 0;
fixed_bitstring<16> ul_grant_r14;
};
// member variables
bool ul_cfg_info_r14_present = false;
target_ta_r14_c_ target_ta_r14;
ul_cfg_info_r14_s_ ul_cfg_info_r14;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MeasCSI-RS-Config-r12 ::= SEQUENCE
struct meas_csi_rs_cfg_r12_s {
bool ext = false;
@ -794,17 +767,6 @@ struct csg_allowed_report_cells_r9_s {
bool operator!=(const csg_allowed_report_cells_r9_s& other) const { return not(*this == other); }
};
// CarrierFreqGERAN ::= SEQUENCE
struct carrier_freq_geran_s {
uint16_t arfcn = 0;
band_ind_geran_e band_ind;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CellIndexList ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..32)
using cell_idx_list_l = bounded_array<uint8_t, 32>;
@ -1478,17 +1440,6 @@ private:
setup_s_ c;
};
// MobilityControlInfo-v10l0 ::= SEQUENCE
struct mob_ctrl_info_v10l0_s {
bool add_spec_emission_v10l0_present = false;
uint16_t add_spec_emission_v10l0 = 33;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PhysCellIdGERAN ::= SEQUENCE
struct pci_geran_s {
fixed_bitstring<3> network_colour_code;
@ -1590,12 +1541,47 @@ struct rs_cfg_ssb_nr_r15_s {
uint8_t to_number() const;
};
typedef enumerated<subcarrier_spacing_ssb_r15_opts> subcarrier_spacing_ssb_r15_e_;
struct ssb_to_measure_r15_c_ {
typedef setup_e types;
// choice methods
ssb_to_measure_r15_c_() = default;
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
bool operator==(const ssb_to_measure_r15_c_& other) const;
bool operator!=(const ssb_to_measure_r15_c_& other) const { return not(*this == other); }
// getters
ssb_to_measure_r15_c& setup()
{
assert_choice_type("setup", type_.to_string(), "ssb-ToMeasure-r15");
return c;
}
const ssb_to_measure_r15_c& setup() const
{
assert_choice_type("setup", type_.to_string(), "ssb-ToMeasure-r15");
return c;
}
ssb_to_measure_r15_c& set_setup()
{
set(types::setup);
return c;
}
private:
types type_;
ssb_to_measure_r15_c c;
};
// member variables
bool ext = false;
mtc_ssb_nr_r15_s meas_timing_cfg_r15;
subcarrier_spacing_ssb_r15_e_ subcarrier_spacing_ssb_r15;
// ...
// group 0
copy_ptr<ssb_to_measure_r15_c_> ssb_to_measure_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -2023,6 +2009,9 @@ struct wlan_carrier_info_r13_s {
bool operator!=(const wlan_carrier_info_r13_s& other) const { return not(*this == other); }
};
// WLAN-Id-List-r13 ::= SEQUENCE (SIZE (1..32)) OF WLAN-Identifiers-r12
using wlan_id_list_r13_l = dyn_array<wlan_ids_r12_s>;
// WLAN-NameListConfig-r15 ::= CHOICE
struct wlan_name_list_cfg_r15_c {
typedef setup_e types;
@ -2061,20 +2050,6 @@ private:
// WhiteCellsToAddModList-r13 ::= SEQUENCE (SIZE (1..32)) OF WhiteCellsToAddMod-r13
using white_cells_to_add_mod_list_r13_l = dyn_array<white_cells_to_add_mod_r13_s>;
// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE
struct logged_meas_cfg_v1530_ies_s {
bool bt_name_list_r15_present = false;
bool wlan_name_list_r15_present = false;
bool non_crit_ext_present = false;
bt_name_list_r15_l bt_name_list_r15;
wlan_name_list_r15_l wlan_name_list_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MeasGapConfigPerCC-r14 ::= SEQUENCE
struct meas_gap_cfg_per_cc_r14_s {
uint8_t serv_cell_id_r14 = 0;
@ -2590,12 +2565,12 @@ struct eutra_event_s {
uint8_t v2_thres_r14 = 0;
};
struct event_h1_r15_s_ {
uint16_t h1_thres_offset_r15 = 0;
uint8_t h1_hysteresis_minus15 = 1;
uint16_t h1_thres_offset_r15 = 0;
uint8_t h1_hysteresis_r15 = 1;
};
struct event_h2_r15_s_ {
uint16_t h2_thres_offset_r15 = 0;
uint8_t h2_hysteresis_minus15 = 1;
uint16_t h2_thres_offset_r15 = 0;
uint8_t h2_hysteresis_r15 = 1;
};
struct types_opts {
enum options {
@ -3581,17 +3556,6 @@ struct report_cfg_inter_rat_s {
bool operator!=(const report_cfg_inter_rat_s& other) const { return not(*this == other); }
};
// CellGlobalIdEUTRA ::= SEQUENCE
struct cell_global_id_eutra_s {
plmn_id_s plmn_id;
fixed_bitstring<28> cell_id;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MeasGapConfigToAddModList-r14 ::= SEQUENCE (SIZE (1..32)) OF MeasGapConfigPerCC-r14
using meas_gap_cfg_to_add_mod_list_r14_l = dyn_array<meas_gap_cfg_per_cc_r14_s>;
@ -4142,96 +4106,6 @@ struct report_cfg_to_add_mod_s {
bool operator!=(const report_cfg_to_add_mod_s& other) const { return not(*this == other); }
};
// CarrierBandwidthEUTRA ::= SEQUENCE
struct carrier_bw_eutra_s {
struct dl_bw_opts {
enum options {
n6,
n15,
n25,
n50,
n75,
n100,
spare10,
spare9,
spare8,
spare7,
spare6,
spare5,
spare4,
spare3,
spare2,
spare1,
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<dl_bw_opts> dl_bw_e_;
struct ul_bw_opts {
enum options {
n6,
n15,
n25,
n50,
n75,
n100,
spare10,
spare9,
spare8,
spare7,
spare6,
spare5,
spare4,
spare3,
spare2,
spare1,
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<ul_bw_opts> ul_bw_e_;
// member variables
bool ul_bw_present = false;
dl_bw_e_ dl_bw;
ul_bw_e_ ul_bw;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CarrierFreqEUTRA ::= SEQUENCE
struct carrier_freq_eutra_s {
bool ul_carrier_freq_present = false;
uint32_t dl_carrier_freq = 0;
uint32_t ul_carrier_freq = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CarrierFreqEUTRA-v9e0 ::= SEQUENCE
struct carrier_freq_eutra_v9e0_s {
bool ul_carrier_freq_v9e0_present = false;
uint32_t dl_carrier_freq_v9e0 = 0;
uint32_t ul_carrier_freq_v9e0 = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MeasGapConfigDensePRS-r15 ::= CHOICE
struct meas_gap_cfg_dense_prs_r15_c {
struct setup_s_ {
@ -4766,23 +4640,6 @@ struct meas_scale_factor_r12_opts {
};
typedef enumerated<meas_scale_factor_r12_opts> meas_scale_factor_r12_e;
// MobilityControlInfoV2X-r14 ::= SEQUENCE
struct mob_ctrl_info_v2x_r14_s {
bool v2x_comm_tx_pool_exceptional_r14_present = false;
bool v2x_comm_rx_pool_r14_present = false;
bool v2x_comm_sync_cfg_r14_present = false;
bool cbr_mob_tx_cfg_list_r14_present = false;
sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14;
sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14;
sl_sync_cfg_list_v2x_r14_l v2x_comm_sync_cfg_r14;
sl_cbr_common_tx_cfg_list_r14_s cbr_mob_tx_cfg_list_r14;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// QuantityConfig ::= SEQUENCE
struct quant_cfg_s {
bool ext = false;
@ -4813,6 +4670,105 @@ struct quant_cfg_s {
bool operator!=(const quant_cfg_s& other) const { return not(*this == other); }
};
// RACH-ConfigDedicated ::= SEQUENCE
struct rach_cfg_ded_s {
uint8_t ra_preamb_idx = 0;
uint8_t ra_prach_mask_idx = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RACH-Skip-r14 ::= SEQUENCE
struct rach_skip_r14_s {
struct target_ta_r14_c_ {
struct types_opts {
enum options { ta0_r14, mcg_ptag_r14, scg_ptag_r14, mcg_stag_r14, scg_stag_r14, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<types_opts> types;
// choice methods
target_ta_r14_c_() = default;
target_ta_r14_c_(const target_ta_r14_c_& other);
target_ta_r14_c_& operator=(const target_ta_r14_c_& other);
~target_ta_r14_c_() { destroy_(); }
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
uint8_t& mcg_stag_r14()
{
assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
uint8_t& scg_stag_r14()
{
assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
const uint8_t& mcg_stag_r14() const
{
assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
const uint8_t& scg_stag_r14() const
{
assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14");
return c.get<uint8_t>();
}
uint8_t& set_mcg_stag_r14()
{
set(types::mcg_stag_r14);
return c.get<uint8_t>();
}
uint8_t& set_scg_stag_r14()
{
set(types::scg_stag_r14);
return c.get<uint8_t>();
}
private:
types type_;
pod_choice_buffer_t c;
void destroy_();
};
struct ul_cfg_info_r14_s_ {
struct ul_sched_interv_r14_opts {
enum options { sf2, sf5, sf10, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<ul_sched_interv_r14_opts> ul_sched_interv_r14_e_;
// member variables
uint8_t nof_conf_ul_processes_r14 = 1;
ul_sched_interv_r14_e_ ul_sched_interv_r14;
uint8_t ul_start_sf_r14 = 0;
fixed_bitstring<16> ul_grant_r14;
};
// member variables
bool ul_cfg_info_r14_present = false;
target_ta_r14_c_ target_ta_r14;
ul_cfg_info_r14_s_ ul_cfg_info_r14;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// ReportConfigToAddModList ::= SEQUENCE (SIZE (1..32)) OF ReportConfigToAddMod
using report_cfg_to_add_mod_list_l = dyn_array<report_cfg_to_add_mod_s>;
@ -4978,6 +4934,160 @@ struct meas_cfg_s {
void to_json(json_writer& j) const;
};
// CarrierFreqGERAN ::= SEQUENCE
struct carrier_freq_geran_s {
uint16_t arfcn = 0;
band_ind_geran_e band_ind;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MobilityControlInfo-v10l0 ::= SEQUENCE
struct mob_ctrl_info_v10l0_s {
bool add_spec_emission_v10l0_present = false;
uint16_t add_spec_emission_v10l0 = 33;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE
struct logged_meas_cfg_v1530_ies_s {
bool bt_name_list_r15_present = false;
bool wlan_name_list_r15_present = false;
bool non_crit_ext_present = false;
bt_name_list_r15_l bt_name_list_r15;
wlan_name_list_r15_l wlan_name_list_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CellGlobalIdEUTRA ::= SEQUENCE
struct cell_global_id_eutra_s {
plmn_id_s plmn_id;
fixed_bitstring<28> cell_id;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CarrierBandwidthEUTRA ::= SEQUENCE
struct carrier_bw_eutra_s {
struct dl_bw_opts {
enum options {
n6,
n15,
n25,
n50,
n75,
n100,
spare10,
spare9,
spare8,
spare7,
spare6,
spare5,
spare4,
spare3,
spare2,
spare1,
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<dl_bw_opts> dl_bw_e_;
struct ul_bw_opts {
enum options {
n6,
n15,
n25,
n50,
n75,
n100,
spare10,
spare9,
spare8,
spare7,
spare6,
spare5,
spare4,
spare3,
spare2,
spare1,
nulltype
} value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<ul_bw_opts> ul_bw_e_;
// member variables
bool ul_bw_present = false;
dl_bw_e_ dl_bw;
ul_bw_e_ ul_bw;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CarrierFreqEUTRA ::= SEQUENCE
struct carrier_freq_eutra_s {
bool ul_carrier_freq_present = false;
uint32_t dl_carrier_freq = 0;
uint32_t ul_carrier_freq = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CarrierFreqEUTRA-v9e0 ::= SEQUENCE
struct carrier_freq_eutra_v9e0_s {
bool ul_carrier_freq_v9e0_present = false;
uint32_t dl_carrier_freq_v9e0 = 0;
uint32_t ul_carrier_freq_v9e0 = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MobilityControlInfoV2X-r14 ::= SEQUENCE
struct mob_ctrl_info_v2x_r14_s {
bool v2x_comm_tx_pool_exceptional_r14_present = false;
bool v2x_comm_rx_pool_r14_present = false;
bool v2x_comm_sync_cfg_r14_present = false;
bool cbr_mob_tx_cfg_list_r14_present = false;
sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14;
sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14;
sl_sync_cfg_list_v2x_r14_l v2x_comm_sync_cfg_r14;
sl_cbr_common_tx_cfg_list_r14_s cbr_mob_tx_cfg_list_r14;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MobilityControlInfo ::= SEQUENCE
struct mob_ctrl_info_s {
struct t304_opts {
@ -5829,12 +5939,12 @@ struct cgi_info_nr_r15_s {
};
// member variables
bool ext = false;
bool plmn_id_info_list_r15_present = false;
bool freq_band_list_minus15_present = false;
bool no_sib1_r15_present = false;
bool ext = false;
bool plmn_id_info_list_r15_present = false;
bool freq_band_list_r15_present = false;
bool no_sib1_r15_present = false;
plmn_id_info_list_nr_r15_l plmn_id_info_list_r15;
multi_freq_band_list_nr_r15_l freq_band_list_minus15;
multi_freq_band_list_nr_r15_l freq_band_list_r15;
no_sib1_r15_s_ no_sib1_r15;
// ...

@ -4428,7 +4428,7 @@ private:
// SPUCCH-Config-r15 ::= CHOICE
struct spucch_cfg_r15_c {
struct setup_s_ {
struct two_ant_port_activ_spucch_format3_r15_s_ {
struct dummy_s_ {
using n3_spucch_an_list_r15_l_ = bounded_array<uint16_t, 4>;
// member variables
@ -4436,10 +4436,10 @@ struct spucch_cfg_r15_c {
};
// member variables
bool spucch_set_r15_present = false;
bool two_ant_port_activ_spucch_format1a1b_r15_present = false;
spucch_set_r15_l spucch_set_r15;
two_ant_port_activ_spucch_format3_r15_s_ two_ant_port_activ_spucch_format3_r15;
bool spucch_set_r15_present = false;
bool two_ant_port_activ_spucch_format1a1b_r15_present = false;
spucch_set_r15_l spucch_set_r15;
dummy_s_ dummy;
};
typedef setup_e types;
@ -7179,6 +7179,52 @@ private:
setup_s_ c;
};
// SPUCCH-Config-v1550 ::= CHOICE
struct spucch_cfg_v1550_c {
struct setup_s_ {
struct two_ant_port_activ_spucch_format3_v1550_s_ {
using n3_spucch_an_list_v1550_l_ = bounded_array<uint16_t, 4>;
// member variables
n3_spucch_an_list_v1550_l_ n3_spucch_an_list_v1550;
};
// member variables
two_ant_port_activ_spucch_format3_v1550_s_ two_ant_port_activ_spucch_format3_v1550;
};
typedef setup_e types;
// choice methods
spucch_cfg_v1550_c() = default;
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
bool operator==(const spucch_cfg_v1550_c& other) const;
bool operator!=(const spucch_cfg_v1550_c& other) const { return not(*this == other); }
// getters
setup_s_& setup()
{
assert_choice_type("setup", type_.to_string(), "SPUCCH-Config-v1550");
return c;
}
const setup_s_& setup() const
{
assert_choice_type("setup", type_.to_string(), "SPUCCH-Config-v1550");
return c;
}
setup_s_& set_setup()
{
set(types::setup);
return c;
}
private:
types type_;
setup_s_ c;
};
// SRS-TPC-PDCCH-Config-r14 ::= CHOICE
struct srs_tpc_pdcch_cfg_r14_c {
struct setup_s_ {
@ -8432,6 +8478,8 @@ struct phys_cfg_ded_s {
copy_ptr<ul_pwr_ctrl_ded_v1530_s> ul_pwr_ctrl_ded_v1530;
copy_ptr<semi_static_cfi_cfg_r15_c_> semi_static_cfi_cfg_r15;
copy_ptr<blind_pdsch_repeat_cfg_r15_c_> blind_pdsch_repeat_cfg_r15;
// group 11
copy_ptr<spucch_cfg_v1550_c> spucch_cfg_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -2036,6 +2036,27 @@ struct wus_cfg_r15_s {
void to_json(json_writer& j) const;
};
// WUS-Config-v1560 ::= SEQUENCE
struct wus_cfg_v1560_s {
struct pwr_boost_r15_opts {
enum options { db0, db1dot8, db3, db4dot8, nulltype } value;
typedef float number_type;
std::string to_string() const;
float to_number() const;
std::string to_number_string() const;
};
typedef enumerated<pwr_boost_r15_opts> pwr_boost_r15_e_;
// member variables
pwr_boost_r15_e_ pwr_boost_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RadioResourceConfigCommonSIB ::= SEQUENCE
struct rr_cfg_common_sib_s {
bool ext = false;
@ -2075,6 +2096,8 @@ struct rr_cfg_common_sib_s {
copy_ptr<high_speed_cfg_v1530_s> high_speed_cfg_v1530;
// group 6
copy_ptr<ul_pwr_ctrl_common_v1530_s> ul_pwr_ctrl_common_v1540;
// group 7
copy_ptr<wus_cfg_v1560_s> wus_cfg_v1560;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -585,27 +585,27 @@ struct lc_ch_cfg_s {
types type_;
setup_e_ c;
};
struct chl_access_prio_r15_c_ {
struct ch_access_prio_r15_c_ {
typedef setup_e types;
// choice methods
chl_access_prio_r15_c_() = default;
ch_access_prio_r15_c_() = default;
void set(types::options e = types::nulltype);
types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
bool operator==(const chl_access_prio_r15_c_& other) const;
bool operator!=(const chl_access_prio_r15_c_& other) const { return not(*this == other); }
bool operator==(const ch_access_prio_r15_c_& other) const;
bool operator!=(const ch_access_prio_r15_c_& other) const { return not(*this == other); }
// getters
uint8_t& setup()
{
assert_choice_type("setup", type_.to_string(), "channellAccessPriority-r15");
assert_choice_type("setup", type_.to_string(), "channelAccessPriority-r15");
return c;
}
const uint8_t& setup() const
{
assert_choice_type("setup", type_.to_string(), "channellAccessPriority-r15");
assert_choice_type("setup", type_.to_string(), "channelAccessPriority-r15");
return c;
}
uint8_t& set_setup()
@ -638,7 +638,7 @@ struct lc_ch_cfg_s {
bool lch_cell_restrict_r15_present = false;
copy_ptr<allowed_tti_lens_r15_c_> allowed_tti_lens_r15;
copy_ptr<lc_ch_sr_restrict_r15_c_> lc_ch_sr_restrict_r15;
copy_ptr<chl_access_prio_r15_c_> chl_access_prio_r15;
copy_ptr<ch_access_prio_r15_c_> ch_access_prio_r15;
fixed_bitstring<32> lch_cell_restrict_r15;
// sequence methods
@ -872,8 +872,8 @@ struct crs_assist_info_r13_s {
// CRS-AssistanceInfo-r15 ::= SEQUENCE
struct crs_assist_info_r15_s {
bool crs_intf_mitig_enabled_minus15_present = false;
uint16_t pci_r15 = 0;
bool crs_intf_mitig_enabled_r15_present = false;
uint16_t pci_r15 = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -2256,7 +2256,7 @@ struct drb_to_add_mod_s {
// group 4
bool lc_ch_id_r15_present = false;
copy_ptr<rlc_cfg_v1530_c> rlc_cfg_v1530;
copy_ptr<rlc_bearer_cfg_r15_c> rlc_bearer_cfg_dupl_r15;
copy_ptr<rlc_bearer_cfg_r15_c> rlc_bearer_cfg_secondary_r15;
uint8_t lc_ch_id_r15 = 32;
// sequence methods
@ -3293,8 +3293,10 @@ struct srb_to_add_mod_s {
bool pdcp_ver_change_r15_present = false;
bool srb_id_v1530_present = false;
copy_ptr<rlc_cfg_v1530_c> rlc_cfg_v1530;
copy_ptr<rlc_bearer_cfg_r15_c> rlc_bearer_cfg_dupl_r15;
copy_ptr<rlc_bearer_cfg_r15_c> rlc_bearer_cfg_secondary_r15;
uint8_t srb_id_v1530 = 4;
// group 1
copy_ptr<rlc_cfg_v1510_s> rlc_cfg_v1560;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -4289,12 +4291,12 @@ struct sps_cfg_v1540_s {
void to_json(json_writer& j) const;
};
// SRB-ToAddModExtList-r15 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod
using srb_to_add_mod_ext_list_r15_l = std::array<srb_to_add_mod_s, 1>;
// SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod
using srb_to_add_mod_list_l = dyn_array<srb_to_add_mod_s>;
// SRB-ToAddModListExt-r15 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod
using srb_to_add_mod_list_ext_r15_l = std::array<srb_to_add_mod_s, 1>;
// RadioResourceConfigDedicated ::= SEQUENCE
struct rr_cfg_ded_s {
struct mac_main_cfg_c_ {
@ -4335,20 +4337,18 @@ struct rr_cfg_ded_s {
};
struct crs_intf_mitig_cfg_r15_c_ {
struct setup_c_ {
struct crs_intf_mitig_num_prbs_r15_opts {
struct crs_intf_mitig_num_prbs_opts {
enum options { n6, n24, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<crs_intf_mitig_num_prbs_r15_opts> crs_intf_mitig_num_prbs_r15_e_;
typedef enumerated<crs_intf_mitig_num_prbs_opts> crs_intf_mitig_num_prbs_e_;
struct types_opts {
enum options { crs_intf_mitig_enabled_minus15, crs_intf_mitig_num_prbs_r15, nulltype } value;
typedef int8_t number_type;
enum options { crs_intf_mitig_enabled, crs_intf_mitig_num_prbs, nulltype } value;
std::string to_string() const;
int8_t to_number() const;
};
typedef enumerated<types_opts> types;
@ -4360,25 +4360,25 @@ struct rr_cfg_ded_s {
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15()
crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs()
{
assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "setup");
assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "setup");
return c;
}
const crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() const
const crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs() const
{
assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "setup");
assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "setup");
return c;
}
crs_intf_mitig_num_prbs_r15_e_& set_crs_intf_mitig_num_prbs_r15()
crs_intf_mitig_num_prbs_e_& set_crs_intf_mitig_num_prbs()
{
set(types::crs_intf_mitig_num_prbs_r15);
set(types::crs_intf_mitig_num_prbs);
return c;
}
private:
types type_;
crs_intf_mitig_num_prbs_r15_e_ c;
types type_;
crs_intf_mitig_num_prbs_e_ c;
};
typedef setup_e types;
@ -4441,9 +4441,9 @@ struct rr_cfg_ded_s {
// group 5
copy_ptr<sps_cfg_v1430_s> sps_cfg_v1430;
// group 6
bool srb_to_release_ext_list_r15_present = false;
copy_ptr<srb_to_add_mod_ext_list_r15_l> srb_to_add_mod_ext_list_r15;
uint8_t srb_to_release_ext_list_r15 = 4;
bool srb_to_release_list_ext_r15_present = false;
copy_ptr<srb_to_add_mod_list_ext_r15_l> srb_to_add_mod_list_ext_r15;
uint8_t srb_to_release_list_ext_r15 = 4;
copy_ptr<sps_cfg_v1530_s> sps_cfg_v1530;
copy_ptr<crs_intf_mitig_cfg_r15_c_> crs_intf_mitig_cfg_r15;
copy_ptr<neigh_cells_crs_info_r15_c> neigh_cells_crs_info_r15;
@ -6132,7 +6132,7 @@ struct phys_cfg_ded_scell_r10_s {
// group 7
copy_ptr<phys_cfg_ded_stti_r15_c> phys_cfg_ded_stti_r15;
copy_ptr<pdsch_cfg_ded_v1530_s> pdsch_cfg_ded_v1530;
copy_ptr<cqi_report_cfg_v1530_s> cqi_report_cfg_v1530;
copy_ptr<cqi_report_cfg_v1530_s> dummy;
copy_ptr<cqi_report_cfg_scell_r15_s> cqi_report_cfg_scell_r15;
copy_ptr<cqi_short_cfg_scell_r15_c> cqi_short_cfg_scell_r15;
copy_ptr<csi_rs_cfg_v1530_s> csi_rs_cfg_v1530;
@ -6141,6 +6141,8 @@ struct phys_cfg_ded_scell_r10_s {
copy_ptr<pusch_cfg_ded_scell_v1530_s> pusch_cfg_ded_v1530;
copy_ptr<semi_static_cfi_cfg_r15_c_> semi_static_cfi_cfg_r15;
copy_ptr<blind_pdsch_repeat_cfg_r15_c_> blind_pdsch_repeat_cfg_r15;
// group 8
copy_ptr<spucch_cfg_v1550_c> spucch_cfg_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -6465,7 +6467,9 @@ struct drb_to_add_mod_scg_r12_s {
bool lc_ch_id_scg_r15_present = false;
uint8_t lc_ch_id_scg_r15 = 32;
copy_ptr<rlc_cfg_v1530_c> rlc_cfg_v1530;
copy_ptr<rlc_bearer_cfg_r15_c> rlc_bearer_cfg_dupl_r15;
copy_ptr<rlc_bearer_cfg_r15_c> rlc_bearer_cfg_secondary_r15;
// group 2
copy_ptr<rlc_cfg_v1510_s> rlc_cfg_v1560;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -6693,6 +6697,8 @@ struct rr_cfg_ded_scg_r12_s {
// group 1
copy_ptr<srb_to_add_mod_list_l> srb_to_add_mod_list_scg_r15;
copy_ptr<srb_to_release_list_r15_l> srb_to_release_list_scg_r15;
// group 2
copy_ptr<drb_to_release_list_r15_l> drb_to_release_list_scg_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -239,20 +239,18 @@ struct sib_type1_v1540_ies_s {
// SystemInformationBlockType1-v1530-IEs ::= SEQUENCE
struct sib_type1_v1530_ies_s {
struct crs_intf_mitig_cfg_r15_c_ {
struct crs_intf_mitig_num_prbs_r15_opts {
struct crs_intf_mitig_num_prbs_opts {
enum options { n6, n24, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<crs_intf_mitig_num_prbs_r15_opts> crs_intf_mitig_num_prbs_r15_e_;
typedef enumerated<crs_intf_mitig_num_prbs_opts> crs_intf_mitig_num_prbs_e_;
struct types_opts {
enum options { crs_intf_mitig_enabled_minus15, crs_intf_mitig_num_prbs_r15, nulltype } value;
typedef int8_t number_type;
enum options { crs_intf_mitig_enabled, crs_intf_mitig_num_prbs, nulltype } value;
std::string to_string() const;
int8_t to_number() const;
};
typedef enumerated<types_opts> types;
@ -264,25 +262,25 @@ struct sib_type1_v1530_ies_s {
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15()
crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs()
{
assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "crs-IntfMitigConfig-r15");
assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "crs-IntfMitigConfig-r15");
return c;
}
const crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() const
const crs_intf_mitig_num_prbs_e_& crs_intf_mitig_num_prbs() const
{
assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "crs-IntfMitigConfig-r15");
assert_choice_type("crs-IntfMitigNumPRBs", type_.to_string(), "crs-IntfMitigConfig-r15");
return c;
}
crs_intf_mitig_num_prbs_r15_e_& set_crs_intf_mitig_num_prbs_r15()
crs_intf_mitig_num_prbs_e_& set_crs_intf_mitig_num_prbs()
{
set(types::crs_intf_mitig_num_prbs_r15);
set(types::crs_intf_mitig_num_prbs);
return c;
}
private:
types type_;
crs_intf_mitig_num_prbs_r15_e_ c;
types type_;
crs_intf_mitig_num_prbs_e_ c;
};
struct cell_barred_crs_r15_opts {
enum options { barred, not_barred, nulltype } value;
@ -357,6 +355,16 @@ struct cell_sel_info_ce1_v1360_s {
void to_json(json_writer& j) const;
};
// SI-Periodicity-r12 ::= ENUMERATED
struct si_periodicity_r12_opts {
enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value;
typedef uint16_t number_type;
std::string to_string() const;
uint16_t to_number() const;
};
typedef enumerated<si_periodicity_r12_opts> si_periodicity_r12_e;
// SystemInformationBlockType1-v1450-IEs ::= SEQUENCE
struct sib_type1_v1450_ies_s {
bool tdd_cfg_v1450_present = false;
@ -1174,18 +1182,8 @@ struct ue_timers_and_consts_s {
// SchedulingInfo ::= SEQUENCE
struct sched_info_s {
struct si_periodicity_opts {
enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value;
typedef uint16_t number_type;
std::string to_string() const;
uint16_t to_number() const;
};
typedef enumerated<si_periodicity_opts> si_periodicity_e_;
// member variables
si_periodicity_e_ si_periodicity;
sib_map_info_l sib_map_info;
si_periodicity_r12_e si_periodicity;
sib_map_info_l sib_map_info;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -45,6 +45,18 @@ struct ca_bw_class_r10_opts {
};
typedef enumerated<ca_bw_class_r10_opts, true> ca_bw_class_r10_e;
// UECapabilityEnquiry-v1560-IEs ::= SEQUENCE
struct ue_cap_enquiry_v1560_ies_s {
bool requested_cap_common_r15_present = false;
bool non_crit_ext_present = false;
dyn_octstring requested_cap_common_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// BandIndication-r14 ::= SEQUENCE
struct band_ind_r14_s {
bool ca_bw_class_ul_r14_present = false;
@ -58,14 +70,28 @@ struct band_ind_r14_s {
void to_json(json_writer& j) const;
};
// UECapabilityEnquiry-v1550-IEs ::= SEQUENCE
struct ue_cap_enquiry_v1550_ies_s {
bool requested_cap_nr_r15_present = false;
bool non_crit_ext_present = false;
dyn_octstring requested_cap_nr_r15;
ue_cap_enquiry_v1560_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// BandCombination-r14 ::= SEQUENCE (SIZE (1..64)) OF BandIndication-r14
using band_combination_r14_l = dyn_array<band_ind_r14_s>;
// UECapabilityEnquiry-v1530-IEs ::= SEQUENCE
struct ue_cap_enquiry_v1530_ies_s {
bool request_stti_spt_cap_r15_present = false;
bool eutra_nr_only_r15_present = false;
bool non_crit_ext_present = false;
bool request_stti_spt_cap_r15_present = false;
bool eutra_nr_only_r15_present = false;
bool non_crit_ext_present = false;
ue_cap_enquiry_v1550_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -1130,8 +1156,8 @@ struct mimo_ca_params_per_bo_bc_v1430_s {
void to_json(json_writer& j) const;
};
// RetuningTimeInfo-r14 ::= SEQUENCE
struct retuning_time_info_r14_s {
// SRS-CapabilityPerBandPair-r14 ::= SEQUENCE
struct srs_cap_per_band_pair_r14_s {
struct retuning_info_s_ {
struct rf_retuning_time_dl_r14_opts {
enum options {
@ -1217,16 +1243,16 @@ struct ul_minus256_qam_per_cc_info_r14_s {
// BandParameters-v1430 ::= SEQUENCE
struct band_params_v1430_s {
using ul_minus256_qam_per_cc_info_list_r14_l_ = dyn_array<ul_minus256_qam_per_cc_info_r14_s>;
using retuning_time_info_band_list_r14_l_ = dyn_array<retuning_time_info_r14_s>;
using srs_cap_per_band_pair_list_r14_l_ = dyn_array<srs_cap_per_band_pair_r14_s>;
// member variables
bool band_params_dl_v1430_present = false;
bool ul_minus256_qam_r14_present = false;
bool ul_minus256_qam_per_cc_info_list_r14_present = false;
bool retuning_time_info_band_list_r14_present = false;
bool srs_cap_per_band_pair_list_r14_present = false;
mimo_ca_params_per_bo_bc_v1430_s band_params_dl_v1430;
ul_minus256_qam_per_cc_info_list_r14_l_ ul_minus256_qam_per_cc_info_list_r14;
retuning_time_info_band_list_r14_l_ retuning_time_info_band_list_r14;
srs_cap_per_band_pair_list_r14_l_ srs_cap_per_band_pair_list_r14;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -1350,6 +1376,45 @@ struct band_combination_params_v1470_s {
void to_json(json_writer& j) const;
};
// SRS-CapabilityPerBandPair-v14b0 ::= SEQUENCE
struct srs_cap_per_band_pair_v14b0_s {
bool srs_flex_timing_r14_present = false;
bool srs_harq_ref_cfg_r14_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// BandParameters-v14b0 ::= SEQUENCE
struct band_params_v14b0_s {
using srs_cap_per_band_pair_list_v14b0_l_ = dyn_array<srs_cap_per_band_pair_v14b0_s>;
// member variables
bool srs_cap_per_band_pair_list_v14b0_present = false;
srs_cap_per_band_pair_list_v14b0_l_ srs_cap_per_band_pair_list_v14b0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// BandCombinationParameters-v14b0 ::= SEQUENCE
struct band_combination_params_v14b0_s {
using band_param_list_v14b0_l_ = dyn_array<band_params_v14b0_s>;
// member variables
bool band_param_list_v14b0_present = false;
band_param_list_v14b0_l_ band_param_list_v14b0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// DL-UL-CCs-r15 ::= SEQUENCE
struct dl_ul_ccs_r15_s {
bool max_num_dl_ccs_r15_present = false;
@ -1645,12 +1710,23 @@ struct feature_set_ul_r15_s {
void to_json(json_writer& j) const;
};
// FeatureSetDL-v1550 ::= SEQUENCE
struct feature_set_dl_v1550_s {
bool dl_minus1024_qam_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// FeatureSetsEUTRA-r15 ::= SEQUENCE
struct feature_sets_eutra_r15_s {
using feature_sets_dl_r15_l_ = dyn_array<feature_set_dl_r15_s>;
using feature_sets_dl_per_cc_r15_l_ = dyn_array<feature_set_dl_per_cc_r15_s>;
using feature_sets_ul_r15_l_ = dyn_array<feature_set_ul_r15_s>;
using feature_sets_ul_per_cc_r15_l_ = dyn_array<feature_set_ul_per_cc_r15_s>;
using feature_sets_dl_v1550_l_ = dyn_array<feature_set_dl_v1550_s>;
// member variables
bool ext = false;
@ -1663,6 +1739,8 @@ struct feature_sets_eutra_r15_s {
feature_sets_ul_r15_l_ feature_sets_ul_r15;
feature_sets_ul_per_cc_r15_l_ feature_sets_ul_per_cc_r15;
// ...
// group 0
copy_ptr<feature_sets_dl_v1550_l_> feature_sets_dl_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3033,6 +3111,30 @@ struct rf_params_v1470_s {
void to_json(json_writer& j) const;
};
// SupportedBandCombination-v14b0 ::= SEQUENCE (SIZE (1..128)) OF BandCombinationParameters-v14b0
using supported_band_combination_v14b0_l = dyn_array<band_combination_params_v14b0_s>;
// SupportedBandCombinationAdd-v14b0 ::= SEQUENCE (SIZE (1..256)) OF BandCombinationParameters-v14b0
using supported_band_combination_add_v14b0_l = dyn_array<band_combination_params_v14b0_s>;
// SupportedBandCombinationReduced-v14b0 ::= SEQUENCE (SIZE (1..384)) OF BandCombinationParameters-v14b0
using supported_band_combination_reduced_v14b0_l = dyn_array<band_combination_params_v14b0_s>;
// RF-Parameters-v14b0 ::= SEQUENCE
struct rf_params_v14b0_s {
bool supported_band_combination_v14b0_present = false;
bool supported_band_combination_add_v14b0_present = false;
bool supported_band_combination_reduced_v14b0_present = false;
supported_band_combination_v14b0_l supported_band_combination_v14b0;
supported_band_combination_add_v14b0_l supported_band_combination_add_v14b0;
supported_band_combination_reduced_v14b0_l supported_band_combination_reduced_v14b0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SupportedBandCombination-v1530 ::= SEQUENCE (SIZE (1..128)) OF BandCombinationParameters-v1530
using supported_band_combination_v1530_l = dyn_array<band_combination_params_v1530_s>;
@ -3218,6 +3320,42 @@ struct sl_params_v1530_s {
void to_json(json_writer& j) const;
};
// NeighCellSI-AcquisitionParameters-v15a0 ::= SEQUENCE
struct neigh_cell_si_acquisition_params_v15a0_s {
bool eutra_cgi_report_nedc_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PhyLayerParameters-v1540 ::= SEQUENCE
struct phy_layer_params_v1540_s {
struct stti_spt_cap_v1540_s_ {};
// member variables
bool stti_spt_cap_v1540_present = false;
bool crs_im_tm1_to_tm9_one_rx_port_v1540_present = false;
bool cch_im_ref_rec_type_a_one_rx_port_v1540_present = false;
stti_spt_cap_v1540_s_ stti_spt_cap_v1540;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PhyLayerParameters-v1550 ::= SEQUENCE
struct phy_layer_params_v1550_s {
bool dmrs_overhead_reduction_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// EUTRA-5GC-Parameters-r15 ::= SEQUENCE
struct eutra_minus5_gc_params_r15_s {
bool eutra_minus5_gc_r15_present = false;
@ -3234,10 +3372,15 @@ struct eutra_minus5_gc_params_r15_s {
void to_json(json_writer& j) const;
};
// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE
struct neigh_cell_si_acquisition_params_v1530_s {
bool report_cgi_nr_en_dc_r15_present = false;
bool report_cgi_nr_no_en_dc_r15_present = false;
// UE-EUTRA-CapabilityAddXDD-Mode-v15a0 ::= SEQUENCE
struct ue_eutra_cap_add_xdd_mode_v15a0_s {
bool phy_layer_params_v1530_present = false;
bool phy_layer_params_v1540_present = false;
bool phy_layer_params_v1550_present = false;
phy_layer_params_v1530_s phy_layer_params_v1530;
phy_layer_params_v1540_s phy_layer_params_v1540;
phy_layer_params_v1550_s phy_layer_params_v1550;
neigh_cell_si_acquisition_params_v15a0_s neigh_cell_si_acquisition_params_v15a0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3245,9 +3388,10 @@ struct neigh_cell_si_acquisition_params_v1530_s {
void to_json(json_writer& j) const;
};
// Other-Parameters-v1540 ::= SEQUENCE
struct other_params_v1540_s {
bool in_dev_coex_ind_endc_r15_present = false;
// IRAT-ParametersNR-v1570 ::= SEQUENCE
struct irat_params_nr_v1570_s {
bool ss_sinr_meas_nr_fr1_r15_present = false;
bool ss_sinr_meas_nr_fr2_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3255,15 +3399,153 @@ struct other_params_v1540_s {
void to_json(json_writer& j) const;
};
// PhyLayerParameters-v1540 ::= SEQUENCE
struct phy_layer_params_v1540_s {
struct stti_spt_cap_v1540_s_ {};
// PDCP-ParametersNR-v1560 ::= SEQUENCE
struct pdcp_params_nr_v1560_s {
bool ims_vo_nr_pdcp_scg_ngendc_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RF-Parameters-v1570 ::= SEQUENCE
struct rf_params_v1570_s {
struct dl_minus1024_qam_scaling_factor_r15_opts {
enum options { v1, v1dot2, v1dot25, nulltype } value;
typedef float number_type;
std::string to_string() const;
float to_number() const;
std::string to_number_string() const;
};
typedef enumerated<dl_minus1024_qam_scaling_factor_r15_opts> dl_minus1024_qam_scaling_factor_r15_e_;
// member variables
bool stti_spt_cap_v1540_present = false;
bool crs_im_tm1_to_tm9_one_rx_port_v1540_present = false;
bool cch_im_ref_rec_type_a_one_rx_port_v1540_present = false;
stti_spt_cap_v1540_s_ stti_spt_cap_v1540;
dl_minus1024_qam_scaling_factor_r15_e_ dl_minus1024_qam_scaling_factor_r15;
uint8_t dl_minus1024_qam_total_weighted_layers_r15 = 0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v15a0-IEs ::= SEQUENCE
struct ue_eutra_cap_v15a0_ies_s {
bool eutra_minus5_gc_params_r15_present = false;
bool fdd_add_ue_eutra_cap_v15a0_present = false;
bool tdd_add_ue_eutra_cap_v15a0_present = false;
bool non_crit_ext_present = false;
neigh_cell_si_acquisition_params_v15a0_s neigh_cell_si_acquisition_params_v15a0;
eutra_minus5_gc_params_r15_s eutra_minus5_gc_params_r15;
ue_eutra_cap_add_xdd_mode_v15a0_s fdd_add_ue_eutra_cap_v15a0;
ue_eutra_cap_add_xdd_mode_v15a0_s tdd_add_ue_eutra_cap_v15a0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// IRAT-ParametersNR-v1560 ::= SEQUENCE
struct irat_params_nr_v1560_s {
bool ng_en_dc_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// NeighCellSI-AcquisitionParameters-v1550 ::= SEQUENCE
struct neigh_cell_si_acquisition_params_v1550_s {
bool eutra_cgi_report_endc_r15_present = false;
bool utra_geran_cgi_report_endc_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v1570-IEs ::= SEQUENCE
struct ue_eutra_cap_v1570_ies_s {
bool rf_params_v1570_present = false;
bool irat_params_nr_v1570_present = false;
bool non_crit_ext_present = false;
rf_params_v1570_s rf_params_v1570;
irat_params_nr_v1570_s irat_params_nr_v1570;
ue_eutra_cap_v15a0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE
struct ue_eutra_cap_add_xdd_mode_v1560_s {
pdcp_params_nr_v1560_s pdcp_params_nr_v1560;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MAC-Parameters-v1550 ::= SEQUENCE
struct mac_params_v1550_s {
bool elcid_support_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v1560-IEs ::= SEQUENCE
struct ue_eutra_cap_v1560_ies_s {
bool applied_cap_filt_common_r15_present = false;
bool non_crit_ext_present = false;
pdcp_params_nr_v1560_s pdcp_params_nr_v1560;
irat_params_nr_v1560_s irat_params_nr_v1560;
dyn_octstring applied_cap_filt_common_r15;
ue_eutra_cap_add_xdd_mode_v1560_s fdd_add_ue_eutra_cap_v1560;
ue_eutra_cap_add_xdd_mode_v1560_s tdd_add_ue_eutra_cap_v1560;
ue_eutra_cap_v1570_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-CapabilityAddXDD-Mode-v1550 ::= SEQUENCE
struct ue_eutra_cap_add_xdd_mode_v1550_s {
bool neigh_cell_si_acquisition_params_v1550_present = false;
neigh_cell_si_acquisition_params_v1550_s neigh_cell_si_acquisition_params_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE
struct neigh_cell_si_acquisition_params_v1530_s {
bool report_cgi_nr_en_dc_r15_present = false;
bool report_cgi_nr_no_en_dc_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// Other-Parameters-v1540 ::= SEQUENCE
struct other_params_v1540_s {
bool in_dev_coex_ind_endc_r15_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3284,6 +3566,23 @@ struct sl_params_v1540_s {
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v1550-IEs ::= SEQUENCE
struct ue_eutra_cap_v1550_ies_s {
bool neigh_cell_si_acquisition_params_v1550_present = false;
bool non_crit_ext_present = false;
neigh_cell_si_acquisition_params_v1550_s neigh_cell_si_acquisition_params_v1550;
phy_layer_params_v1550_s phy_layer_params_v1550;
mac_params_v1550_s mac_params_v1550;
ue_eutra_cap_add_xdd_mode_v1550_s fdd_add_ue_eutra_cap_v1550;
ue_eutra_cap_add_xdd_mode_v1550_s tdd_add_ue_eutra_cap_v1550;
ue_eutra_cap_v1560_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-CapabilityAddXDD-Mode-v1540 ::= SEQUENCE
struct ue_eutra_cap_add_xdd_mode_v1540_s {
bool eutra_minus5_gc_params_r15_present = false;
@ -3376,6 +3675,7 @@ struct ue_eutra_cap_v1540_ies_s {
ue_eutra_cap_add_xdd_mode_v1540_s tdd_add_ue_eutra_cap_v1540;
sl_params_v1540_s sl_params_v1540;
irat_params_nr_v1540_s irat_params_nr_v1540;
ue_eutra_cap_v1550_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3397,8 +3697,8 @@ struct ue_eutra_cap_add_xdd_mode_v1530_s {
// MeasParameters-v1520 ::= SEQUENCE
struct meas_params_v1520_s {
bool meas_gap_patterns_v1520_present = false;
fixed_bitstring<8> meas_gap_patterns_v1520;
bool meas_gap_patterns_r15_present = false;
fixed_bitstring<8> meas_gap_patterns_r15;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3770,6 +4070,16 @@ struct pdcp_params_v1430_s {
void to_json(json_writer& j) const;
};
// PhyLayerParameters-v14a0 ::= SEQUENCE
struct phy_layer_params_v14a0_s {
bool ssp10_tdd_only_r14_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RLC-Parameters-v1430 ::= SEQUENCE
struct rlc_params_v1430_s {
bool extended_poll_byte_r14_present = false;
@ -3803,6 +4113,18 @@ struct ue_eutra_cap_v1440_ies_s {
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v14b0-IEs ::= SEQUENCE
struct ue_eutra_cap_v14b0_ies_s {
bool rf_params_v14b0_present = false;
bool non_crit_ext_present = false;
rf_params_v14b0_s rf_params_v14b0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// UE-EUTRA-CapabilityAddXDD-Mode-v1430 ::= SEQUENCE
struct ue_eutra_cap_add_xdd_mode_v1430_s {
bool phy_layer_params_v1430_present = false;
@ -3953,6 +4275,18 @@ struct ue_eutra_cap_v1430_ies_s {
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v14a0-IEs ::= SEQUENCE
struct ue_eutra_cap_v14a0_ies_s {
bool non_crit_ext_present = false;
phy_layer_params_v14a0_s phy_layer_params_v14a0;
ue_eutra_cap_v14b0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// CE-Parameters-v1350 ::= SEQUENCE
struct ce_params_v1350_s {
bool unicast_freq_hop_r13_present = false;
@ -3985,6 +4319,7 @@ struct ue_eutra_cap_v1470_ies_s {
mbms_params_v1470_s mbms_params_v1470;
phy_layer_params_v1470_s phy_layer_params_v1470;
rf_params_v1470_s rf_params_v1470;
ue_eutra_cap_v14a0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -4016,8 +4351,8 @@ struct ue_eutra_cap_v1350_ies_s {
void to_json(json_writer& j) const;
};
// UE-EUTRA-Capability-v13x0-IEs ::= SEQUENCE
struct ue_eutra_cap_v13x0_ies_s {
// UE-EUTRA-Capability-v13e0a-IEs ::= SEQUENCE
struct ue_eutra_cap_v13e0a_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
@ -4068,10 +4403,10 @@ struct ue_eutra_cap_v1340_ies_s {
// UE-EUTRA-Capability-v1390-IEs ::= SEQUENCE
struct ue_eutra_cap_v1390_ies_s {
bool rf_params_v1390_present = false;
bool non_crit_ext_present = false;
rf_params_v1390_s rf_params_v1390;
ue_eutra_cap_v13x0_ies_s non_crit_ext;
bool rf_params_v1390_present = false;
bool non_crit_ext_present = false;
rf_params_v1390_s rf_params_v1390;
ue_eutra_cap_v13e0a_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -191,6 +191,18 @@ private:
void destroy_();
};
// RRCEarlyDataRequest-v1590-IEs ::= SEQUENCE
struct rrc_early_data_request_v1590_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// ReestabUE-Identity ::= SEQUENCE
struct reestab_ue_id_s {
fixed_bitstring<16> c_rnti;
@ -428,17 +440,18 @@ struct rrc_conn_resume_request_r13_ies_s {
// RRCEarlyDataRequest-r15-IEs ::= SEQUENCE
struct rrc_early_data_request_r15_ies_s {
struct establishment_cause_r15_opts {
enum options { mo_data_r15, delay_tolerant_access_r15, nulltype } value;
enum options { mo_data, delay_tolerant_access, nulltype } value;
std::string to_string() const;
};
typedef enumerated<establishment_cause_r15_opts> establishment_cause_r15_e_;
// member variables
bool non_crit_ext_present = false;
s_tmsi_s s_tmsi_r15;
establishment_cause_r15_e_ establishment_cause_r15;
dyn_octstring ded_info_nas_r15;
bool non_crit_ext_present = false;
s_tmsi_s s_tmsi_r15;
establishment_cause_r15_e_ establishment_cause_r15;
dyn_octstring ded_info_nas_r15;
rrc_early_data_request_v1590_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -856,17 +856,6 @@ using affected_carrier_freq_list_v1310_l = dyn_array<affected_carrier_freq_v1310
// DRB-CountInfoListExt-r15 ::= SEQUENCE (SIZE (1..4)) OF DRB-CountInfo
using drb_count_info_list_ext_r15_l = dyn_array<drb_count_info_s>;
// FailureReportSCG-v12d0 ::= SEQUENCE
struct fail_report_scg_v12d0_s {
bool meas_result_neigh_cells_v12d0_present = false;
meas_result_list2_eutra_v9e0_l meas_result_neigh_cells_v12d0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// IDC-SubframePattern-r11 ::= CHOICE
struct idc_sf_pattern_r11_c {
struct sf_pattern_tdd_r11_c_ {
@ -2007,18 +1996,6 @@ struct rstd_inter_freq_info_r10_s {
void to_json(json_writer& j) const;
};
// SCGFailureInformation-v12d0-IEs ::= SEQUENCE
struct scg_fail_info_v12d0_ies_s {
bool fail_report_scg_v12d0_present = false;
bool non_crit_ext_present = false;
fail_report_scg_v12d0_s fail_report_scg_v12d0;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SL-CommTxResourceReq-r12 ::= SEQUENCE
struct sl_comm_tx_res_req_r12_s {
bool carrier_freq_r12_present = false;
@ -2239,6 +2216,18 @@ struct mbms_interest_ind_v1310_ies_s {
void to_json(json_writer& j) const;
};
// MeasReportAppLayer-v1590-IEs ::= SEQUENCE
struct meas_report_app_layer_v1590_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// ProximityIndication-v930-IEs ::= SEQUENCE
struct proximity_ind_v930_ies_s {
bool late_non_crit_ext_present = false;
@ -2592,8 +2581,20 @@ struct registered_mme_s {
void to_json(json_writer& j) const;
};
// SCGFailureInformation-v1310-IEs ::= SEQUENCE
struct scg_fail_info_v1310_ies_s {
// SCGFailureInformation-v12d0a-IEs ::= SEQUENCE
struct scg_fail_info_v12d0a_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SCGFailureInformationNR-v1590-IEs ::= SEQUENCE
struct scg_fail_info_nr_v1590_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
@ -3000,19 +3001,20 @@ struct mbms_interest_ind_r11_ies_s {
// MeasReportAppLayer-r15-IEs ::= SEQUENCE
struct meas_report_app_layer_r15_ies_s {
struct service_type_opts {
struct service_type_r15_opts {
enum options { qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value;
std::string to_string() const;
};
typedef enumerated<service_type_opts> service_type_e_;
typedef enumerated<service_type_r15_opts> service_type_r15_e_;
// member variables
bool meas_report_app_layer_container_r15_present = false;
bool service_type_present = false;
bool non_crit_ext_present = false;
bounded_octstring<1, 8000> meas_report_app_layer_container_r15;
service_type_e_ service_type;
bool meas_report_app_layer_container_r15_present = false;
bool service_type_r15_present = false;
bool non_crit_ext_present = false;
bounded_octstring<1, 8000> meas_report_app_layer_container_r15;
service_type_r15_e_ service_type_r15;
meas_report_app_layer_v1590_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3197,10 +3199,10 @@ struct rrc_conn_setup_complete_r8_ies_s {
// SCGFailureInformation-r12-IEs ::= SEQUENCE
struct scg_fail_info_r12_ies_s {
bool fail_report_scg_r12_present = false;
bool non_crit_ext_present = false;
fail_report_scg_r12_s fail_report_scg_r12;
scg_fail_info_v1310_ies_s non_crit_ext;
bool fail_report_scg_r12_present = false;
bool non_crit_ext_present = false;
fail_report_scg_r12_s fail_report_scg_r12;
scg_fail_info_v12d0a_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3210,9 +3212,10 @@ struct scg_fail_info_r12_ies_s {
// SCGFailureInformationNR-r15-IEs ::= SEQUENCE
struct scg_fail_info_nr_r15_ies_s {
bool fail_report_scg_nr_r15_present = false;
bool non_crit_ext_present = false;
fail_report_scg_nr_r15_s fail_report_scg_nr_r15;
bool fail_report_scg_nr_r15_present = false;
bool non_crit_ext_present = false;
fail_report_scg_nr_r15_s fail_report_scg_nr_r15;
scg_fail_info_nr_v1590_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -143,6 +143,27 @@ struct carrier_freq_nb_r13_s {
void to_json(json_writer& j) const;
};
// CarrierFreq-NB-v1550 ::= SEQUENCE
struct carrier_freq_nb_v1550_s {
struct carrier_freq_offset_v1550_opts {
enum options { v_minus8dot5, v_minus4dot5, v3dot5, v7dot5, nulltype } value;
typedef float number_type;
std::string to_string() const;
float to_number() const;
std::string to_number_string() const;
};
typedef enumerated<carrier_freq_offset_v1550_opts> carrier_freq_offset_v1550_e_;
// member variables
carrier_freq_offset_v1550_e_ carrier_freq_offset_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// DL-AM-RLC-NB-r13 ::= SEQUENCE
struct dl_am_rlc_nb_r13_s {
bool enable_status_report_sn_gap_r13_present = false;
@ -487,6 +508,8 @@ struct dl_carrier_cfg_ded_nb_r13_s {
nrs_pwr_offset_non_anchor_v1330_e_ nrs_pwr_offset_non_anchor_v1330;
// group 1
copy_ptr<dl_gap_cfg_nb_v1530_s> dl_gap_non_anchor_v1530;
// group 2
copy_ptr<carrier_freq_nb_v1550_s> dl_carrier_freq_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -1574,6 +1597,8 @@ struct as_cfg_nb_s {
fixed_bitstring<16> source_ue_id_r13;
carrier_freq_nb_r13_s source_dl_carrier_freq_r13;
// ...
// group 0
copy_ptr<carrier_freq_nb_v1550_s> source_dl_carrier_freq_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -2843,6 +2868,35 @@ struct nprach_params_tdd_nb_r15_s {
void to_json(json_writer& j) const;
};
// NPRACH-ParametersTDD-NB-v1550 ::= SEQUENCE
struct nprach_params_tdd_nb_v1550_s {
struct max_num_preamb_attempt_ce_v1550_opts {
enum options { n3, n4, n5, n6, n7, n8, n10, spare1, nulltype } value;
typedef uint8_t number_type;
std::string to_string() const;
uint8_t to_number() const;
};
typedef enumerated<max_num_preamb_attempt_ce_v1550_opts> max_num_preamb_attempt_ce_v1550_e_;
struct num_repeats_per_preamb_attempt_v1550_opts {
enum options { n1, n2, n4, n8, n16, n32, n64, n128, n256, n512, n1024, nulltype } value;
typedef uint16_t number_type;
std::string to_string() const;
uint16_t to_number() const;
};
typedef enumerated<num_repeats_per_preamb_attempt_v1550_opts> num_repeats_per_preamb_attempt_v1550_e_;
// member variables
max_num_preamb_attempt_ce_v1550_e_ max_num_preamb_attempt_ce_v1550;
num_repeats_per_preamb_attempt_v1550_e_ num_repeats_per_preamb_attempt_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PagingWeight-NB-r14 ::= ENUMERATED
struct paging_weight_nb_r14_opts {
enum options { w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, nulltype } value;
@ -3106,6 +3160,8 @@ struct dl_carrier_cfg_common_nb_r14_s {
// ...
// group 0
copy_ptr<dl_gap_cfg_nb_v1530_s> dl_gap_non_anchor_v1530;
// group 1
copy_ptr<carrier_freq_nb_v1550_s> dl_carrier_freq_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3143,6 +3199,9 @@ using nprach_params_list_fmt2_nb_r15_l = dyn_array<nprach_params_fmt2_nb_r15_s>;
// NPRACH-ParametersListTDD-NB-r15 ::= SEQUENCE (SIZE (1..3)) OF NPRACH-ParametersTDD-NB-r15
using nprach_params_list_tdd_nb_r15_l = dyn_array<nprach_params_tdd_nb_r15_s>;
// NPRACH-ParametersListTDD-NB-v1550 ::= SEQUENCE (SIZE (1..3)) OF NPRACH-ParametersTDD-NB-v1550
using nprach_params_list_tdd_nb_v1550_l = dyn_array<nprach_params_tdd_nb_v1550_s>;
// PCCH-Config-NB-r14 ::= SEQUENCE
struct pcch_cfg_nb_r14_s {
struct npdcch_num_repeat_paging_r14_opts {
@ -3428,6 +3487,8 @@ struct inter_freq_carrier_freq_info_nb_r13_s {
// group 2
copy_ptr<nsss_rrm_cfg_nb_r15_s> nsss_rrm_cfg_r15;
copy_ptr<inter_freq_neigh_cell_list_nb_v1530_l> inter_freq_neigh_cell_list_v1530;
// group 3
copy_ptr<carrier_freq_nb_v1550_s> dl_carrier_freq_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -3532,19 +3593,19 @@ struct nprach_cfg_sib_nb_v1530_s {
std::string to_string() const;
};
typedef enumerated<nprach_preamb_format_r15_opts> nprach_preamb_format_r15_e_;
struct num_repeats_per_preamb_attempt_r15_opts {
struct dummy_opts {
enum options { n1, n2, n4, n8, n16, n32, n64, n128, n256, n512, n1024, nulltype } value;
typedef uint16_t number_type;
std::string to_string() const;
uint16_t to_number() const;
};
typedef enumerated<num_repeats_per_preamb_attempt_r15_opts> num_repeats_per_preamb_attempt_r15_e_;
typedef enumerated<dummy_opts> dummy_e_;
// member variables
nprach_preamb_format_r15_e_ nprach_preamb_format_r15;
num_repeats_per_preamb_attempt_r15_e_ num_repeats_per_preamb_attempt_r15;
nprach_params_list_tdd_nb_r15_l nprach_params_list_tdd_r15;
nprach_preamb_format_r15_e_ nprach_preamb_format_r15;
dummy_e_ dummy;
nprach_params_list_tdd_nb_r15_l nprach_params_list_tdd_r15;
};
struct fmt2_params_r15_s_ {
bool nprach_params_list_fmt2_r15_present = false;
@ -3573,6 +3634,21 @@ struct nprach_cfg_sib_nb_v1530_s {
void to_json(json_writer& j) const;
};
// NPRACH-ConfigSIB-NB-v1550 ::= SEQUENCE
struct nprach_cfg_sib_nb_v1550_s {
struct tdd_params_v1550_s_ {
nprach_params_list_tdd_nb_v1550_l nprach_params_list_tdd_v1550;
};
// member variables
tdd_params_v1550_s_ tdd_params_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// NPRACH-ProbabilityAnchor-NB-r14 ::= SEQUENCE
struct nprach_probability_anchor_nb_r14_s {
struct nprach_probability_anchor_r14_opts {
@ -4129,6 +4205,8 @@ struct rr_cfg_common_sib_nb_r13_s {
copy_ptr<nprach_cfg_sib_nb_v1530_s> nprach_cfg_v1530;
copy_ptr<dl_gap_cfg_nb_v1530_s> dl_gap_v1530;
copy_ptr<wus_cfg_nb_r15_s> wus_cfg_r15;
// group 3
copy_ptr<nprach_cfg_sib_nb_v1550_s> nprach_cfg_v1550;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -5661,6 +5739,18 @@ struct rrc_conn_reest_nb_v1430_ies_s {
void to_json(json_writer& j) const;
};
// RRCEarlyDataComplete-NB-v1590-IEs ::= SEQUENCE
struct rrc_early_data_complete_nb_v1590_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RedirectedCarrierInfo-NB-r13 ::= CarrierFreq-NB-r13
typedef carrier_freq_nb_r13_s redirected_carrier_info_nb_r13_s;
@ -5755,15 +5845,16 @@ struct rrc_conn_setup_nb_r13_ies_s {
// RRCEarlyDataComplete-NB-r15-IEs ::= SEQUENCE
struct rrc_early_data_complete_nb_r15_ies_s {
bool ded_info_nas_r15_present = false;
bool extended_wait_time_r15_present = false;
bool redirected_carrier_info_r15_present = false;
bool redirected_carrier_info_ext_r15_present = false;
bool non_crit_ext_present = false;
dyn_octstring ded_info_nas_r15;
uint16_t extended_wait_time_r15 = 1;
redirected_carrier_info_nb_r13_s redirected_carrier_info_r15;
redirected_carrier_info_nb_v1430_s redirected_carrier_info_ext_r15;
bool ded_info_nas_r15_present = false;
bool extended_wait_time_r15_present = false;
bool redirected_carrier_info_r15_present = false;
bool redirected_carrier_info_ext_r15_present = false;
bool non_crit_ext_present = false;
dyn_octstring ded_info_nas_r15;
uint16_t extended_wait_time_r15 = 1;
redirected_carrier_info_nb_r13_s redirected_carrier_info_r15;
redirected_carrier_info_nb_v1430_s redirected_carrier_info_ext_r15;
rrc_early_data_complete_nb_v1590_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -6249,12 +6340,40 @@ struct dl_ccch_msg_nb_s {
void to_json(json_writer& j) const;
};
// RRCConnectionRelease-NB-v15b0-IEs ::= SEQUENCE
struct rrc_conn_release_nb_v15b0_ies_s {
bool no_last_cell_upd_r15_present = false;
bool non_crit_ext_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RedirectedCarrierInfo-NB-v1550 ::= CarrierFreq-NB-v1550
typedef carrier_freq_nb_v1550_s redirected_carrier_info_nb_v1550_s;
// RRCConnectionRelease-NB-v1550-IEs ::= SEQUENCE
struct rrc_conn_release_nb_v1550_ies_s {
bool redirected_carrier_info_v1550_present = false;
bool non_crit_ext_present = false;
redirected_carrier_info_nb_v1550_s redirected_carrier_info_v1550;
rrc_conn_release_nb_v15b0_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RRCConnectionRelease-NB-v1530-IEs ::= SEQUENCE
struct rrc_conn_release_nb_v1530_ies_s {
bool drb_continue_rohc_r15_present = false;
bool next_hop_chaining_count_r15_present = false;
bool non_crit_ext_present = false;
uint8_t next_hop_chaining_count_r15 = 0;
bool drb_continue_rohc_r15_present = false;
bool next_hop_chaining_count_r15_present = false;
bool non_crit_ext_present = false;
uint8_t next_hop_chaining_count_r15 = 0;
rrc_conn_release_nb_v1550_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
@ -8243,22 +8362,35 @@ struct rrc_conn_setup_complete_nb_s {
void to_json(json_writer& j) const;
};
// RRCEarlyDataRequest-NB-v1590-IEs ::= SEQUENCE
struct rrc_early_data_request_nb_v1590_ies_s {
bool late_non_crit_ext_present = false;
bool non_crit_ext_present = false;
dyn_octstring late_non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RRCEarlyDataRequest-NB-r15-IEs ::= SEQUENCE
struct rrc_early_data_request_nb_r15_ies_s {
struct establishment_cause_r15_opts {
enum options { mo_data_r15, mo_exception_data_r15, delay_tolerant_access_r15, spare1, nulltype } value;
enum options { mo_data, mo_exception_data, delay_tolerant_access, spare1, nulltype } value;
std::string to_string() const;
};
typedef enumerated<establishment_cause_r15_opts> establishment_cause_r15_e_;
// member variables
bool cqi_npdcch_r15_present = false;
bool non_crit_ext_present = false;
s_tmsi_s s_tmsi_r15;
establishment_cause_r15_e_ establishment_cause_r15;
cqi_npdcch_nb_r14_e cqi_npdcch_r15;
dyn_octstring ded_info_nas_r15;
bool cqi_npdcch_r15_present = false;
bool non_crit_ext_present = false;
s_tmsi_s s_tmsi_r15;
establishment_cause_r15_e_ establishment_cause_r15;
cqi_npdcch_nb_r14_e cqi_npdcch_r15;
dyn_octstring ded_info_nas_r15;
rrc_early_data_request_nb_v1590_ies_s non_crit_ext;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -35,6 +35,7 @@ struct init_context_setup_request_s;
struct ue_context_mod_request_s;
struct erab_setup_request_s;
struct erab_release_cmd_s;
struct erab_modify_request_s;
struct ue_paging_id_c;
struct ho_request_s;
struct sourceenb_to_targetenb_transparent_container_s;
@ -43,6 +44,7 @@ struct erab_setup_resp_s;
struct rrc_establishment_cause_opts;
struct cause_radio_network_opts;
struct bearers_subject_to_status_transfer_item_ies_o;
struct erab_level_qos_params_s;
template <class ies_set_paramT_>
struct protocol_ie_single_container_s;

@ -27,6 +27,7 @@
*******************************************************************************/
#include "srslte/adt/span.h"
#include <chrono>
#include <memory>
#include <stdint.h>
#include <string.h>
@ -91,7 +92,7 @@
namespace srslte {
//#define ENABLE_TIMESTAMP
#define ENABLE_TIMESTAMP
/******************************************************************************
* Byte and Bit buffers
@ -113,9 +114,6 @@ public:
byte_buffer_t() : N_bytes(0)
{
bzero(buffer, SRSLTE_MAX_BUFFER_SIZE_BYTES);
#ifdef ENABLE_TIMESTAMP
timestamp_is_set = false;
#endif
msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET];
next = NULL;
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
@ -153,28 +151,35 @@ public:
}
uint32_t get_headroom() { return msg - buffer; }
// Returns the remaining space from what is reported to be the length of msg
uint32_t get_tailroom() { return (sizeof(buffer) - (msg - buffer) - N_bytes); }
long get_latency_us()
uint32_t get_tailroom() { return (sizeof(buffer) - (msg - buffer) - N_bytes); }
std::chrono::microseconds get_latency_us()
{
#ifdef ENABLE_TIMESTAMP
if (!timestamp_is_set)
return 0;
gettimeofday(&timestamp[2], NULL);
get_time_interval(timestamp);
return timestamp[0].tv_usec;
if (!timestamp_is_set) {
return std::chrono::microseconds{0};
}
return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - tp);
#else
return 0;
return std::chrono::microseconds{0};
#endif
}
std::chrono::high_resolution_clock::time_point get_timestamp() { return tp; }
void set_timestamp()
{
#ifdef ENABLE_TIMESTAMP
gettimeofday(&timestamp[1], NULL);
tp = std::chrono::high_resolution_clock::now();
timestamp_is_set = true;
#endif
}
void set_timestamp(std::chrono::high_resolution_clock::time_point tp_)
{
tp = tp_;
timestamp_is_set = true;
}
void append_bytes(uint8_t* buf, uint32_t size)
{
memcpy(&msg[N_bytes], buf, size);
@ -183,8 +188,8 @@ public:
private:
#ifdef ENABLE_TIMESTAMP
struct timeval timestamp[3];
bool timestamp_is_set;
std::chrono::high_resolution_clock::time_point tp;
bool timestamp_is_set = false;
#endif
byte_buffer_t* next;
};
@ -272,7 +277,7 @@ typedef std::unique_ptr<byte_buffer_t, byte_buffer_deleter> unique_byte_buffer_t
/// Utilities to create a span out of a byte_buffer.
///
using byte_span = span<uint8_t>;
using byte_span = span<uint8_t>;
using const_byte_span = span<const uint8_t>;
inline byte_span make_span(byte_buffer_t& b)
@ -295,6 +300,25 @@ inline const_byte_span make_span(const unique_byte_buffer_t& b)
return const_byte_span{b->msg, b->N_bytes};
}
// helper functions
inline const char* enum_to_text(const char* const array[], uint32_t nof_types, uint32_t enum_val)
{
return enum_val >= nof_types ? "" : array[enum_val];
}
template <class ItemType>
ItemType enum_to_number(ItemType* array, uint32_t nof_types, uint32_t enum_val)
{
return enum_val >= nof_types ? -1 : array[enum_val];
}
enum class srslte_rat_t { lte, nr, nulltype };
inline std::string to_string(const srslte_rat_t& type)
{
constexpr static const char* options[] = {"LTE", "NR"};
return enum_to_text(options, (uint32_t)srslte_rat_t::nulltype, (uint32_t)type);
}
} // namespace srslte
#endif // SRSLTE_COMMON_H

@ -0,0 +1,70 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSENB_ENB_EVENTS_H
#define SRSENB_ENB_EVENTS_H
#include <cstdint>
#include <memory>
namespace srslog {
class log_channel;
}
namespace srsenb {
/// This interface logs different kinds of events to the configured channel. By default, if no log channel is configured
/// logging will be disabled.
class event_logger_interface
{
public:
virtual ~event_logger_interface() = default;
/// Logs into the underlying log channel the RRC connected event.
virtual void log_rrc_connected(unsigned cause) = 0;
/// Logs into the underlying log channel the RRC disconnected event.
virtual void log_rrc_disconnect(unsigned reason) = 0;
/// Logs into the underlying log channel the S1 context create event.
virtual void log_s1_ctx_create(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0;
/// Logs into the underlying log channel the S1 context delete event.
virtual void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0;
/// Logs into the underlying log channel the when a sector has been started.
virtual void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) = 0;
/// Logs into the underlying log channel the when a sector has been stopped.
virtual void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) = 0;
};
/// Singleton class to provide global access to the event_logger_interface interface.
class event_logger
{
event_logger() = default;
public:
/// Returns the instance of the event logger.
static event_logger_interface& get();
/// Uses the specified log channel for event logging.
/// NOTE: This method is not thread safe.
static void configure(srslog::log_channel& c);
private:
static std::unique_ptr<event_logger_interface> pimpl;
};
} // namespace srsenb
#endif // SRSENB_ENB_EVENTS_H

@ -169,6 +169,9 @@ public:
/**
* Informs MAC about a received PUSCH transmission for given RNTI, TTI and eNb Cell/carrier.
*
* This function does not deallocate the uplink buffer. The function push_pdu() must be called after this
* to inform the MAC that the uplink buffer can be discarded or pushed to the stack
*
* @param tti the given TTI
* @param rnti the UE identifier in the eNb
* @param cc_idx the eNb Cell/Carrier identifier
@ -178,6 +181,18 @@ public:
*/
virtual int crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc_res) = 0;
/**
* Pushes an uplink PDU through the stack if crc_res==true or discards it if crc_res==false
*
* @param tti the given TTI
* @param rnti the UE identifier in the eNb
* @param pdu_ptr pointer to the uplink buffer
* @param nof_bytes the number of grants carrierd by the PUSCH message
* @param crc_res the CRC check, set to true if the message was decoded succesfully
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/
virtual int push_pdu(uint32_t tti_rx, uint16_t rnti, const uint8_t* pdu_ptr, uint32_t nof_bytes, bool crc_res) = 0;
virtual int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) = 0;
virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) = 0;
virtual int get_ul_sched(uint32_t tti, ul_sched_list_t& ul_sched_res) = 0;
@ -419,6 +434,10 @@ public:
virtual bool setup_ue_ctxt(uint16_t rnti, const asn1::s1ap::init_context_setup_request_s& msg) = 0;
virtual bool modify_ue_ctxt(uint16_t rnti, const asn1::s1ap::ue_context_mod_request_s& msg) = 0;
virtual bool setup_ue_erabs(uint16_t rnti, const asn1::s1ap::erab_setup_request_s& msg) = 0;
virtual void modify_erabs(uint16_t rnti,
const asn1::s1ap::erab_modify_request_s& msg,
std::vector<uint16_t>* erabs_modified,
std::vector<uint16_t>* erabs_failed_to_modify) = 0;
virtual bool release_erabs(uint32_t rnti) = 0;
virtual void release_erabs(uint32_t rnti,
const asn1::s1ap::erab_release_cmd_s& msg,

@ -36,10 +36,15 @@
namespace srsenb {
struct rlc_metrics_t {
std::vector<srslte::rlc_metrics_t> ues;
};
struct stack_metrics_t {
std::vector<mac_metrics_t> mac;
rrc_metrics_t rrc;
s1ap_metrics_t s1ap;
mac_metrics_t mac;
rrc_metrics_t rrc;
rlc_metrics_t rlc;
s1ap_metrics_t s1ap;
};
struct enb_metrics_t {

@ -64,6 +64,7 @@ struct cell_cfg_t {
double ul_freq_hz;
int target_ul_sinr_db;
uint32_t initial_dl_cqi;
bool enable_phr_handling;
std::vector<scell_cfg_t> scell_list;
rrc_meas_cfg_t meas_cfg;
};

@ -72,6 +72,11 @@ public:
uint32_t mme_ue_s1ap_id,
std::vector<uint16_t> erabs_to_release,
struct sctp_sndrcvinfo enb_sri) = 0;
virtual bool send_erab_modify_request(uint32_t enb_ue_s1ap_id,
uint32_t mme_ue_s1ap_id,
std::map<uint16_t, uint16_t> erabs_to_modify,
srslte::byte_buffer_t* nas_msg,
struct sctp_sndrcvinfo enb_sri) = 0;
virtual bool send_downlink_nas_transport(uint32_t enb_ue_s1ap_id,
uint32_t mme_ue_s1ap_id,
srslte::byte_buffer_t* nas_msg,

@ -126,13 +126,6 @@ struct rlc_um_nr_config_t {
#define RLC_TX_QUEUE_LEN (256)
enum class srslte_rat_t { lte, nr, nulltype };
inline std::string to_string(const srslte_rat_t& type)
{
constexpr static const char* options[] = {"LTE", "NR"};
return enum_to_text(options, (uint32_t)srslte_rat_t::nulltype, (uint32_t)type);
}
class rlc_config_t
{
public:

@ -22,6 +22,7 @@
#ifndef SRSLTE_RRC_INTERFACE_TYPES_H
#define SRSLTE_RRC_INTERFACE_TYPES_H
#include "srslte/common/common.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/config.h"
#include "srslte/srslte.h"
@ -29,18 +30,6 @@
namespace srslte {
// helper functions
inline const char* enum_to_text(const char* const array[], uint32_t nof_types, uint32_t enum_val)
{
return enum_val >= nof_types ? "" : array[enum_val];
}
template <class ItemType>
ItemType enum_to_number(ItemType* array, uint32_t nof_types, uint32_t enum_val)
{
return enum_val >= nof_types ? -1 : array[enum_val];
}
/***************************
* PLMN ID
**************************/

@ -76,6 +76,8 @@ public:
/* pusch configuration */
srslte_pusch_hopping_cfg_t pusch_hopping_cfg;
float target_ul_sinr;
bool enable_phr_handling;
bool enable_64qam;
/* prach configuration */
uint32_t prach_config;
@ -87,7 +89,6 @@ public:
uint32_t maxharq_msg3tx;
uint32_t n1pucch_an;
uint32_t delta_pucch_shift;
bool enable_64qam;
// If non-negative, statically allocate N prbs at the edges of the uplink for PUCCH
int nrb_pucch;

@ -141,19 +141,35 @@ struct phy_cell_t {
float cfo_hz;
};
// Measurement object from phy
typedef struct {
float rsrp;
float rsrq;
float cfo_hz;
uint32_t earfcn;
uint32_t pci;
} phy_meas_t;
typedef struct {
float rsrp;
float rsrq;
float sinr;
float cfo_hz;
uint32_t arfcn_nr;
uint32_t pci_nr;
} phy_meas_nr_t;
// RRC interface for RRC NR
class rrc_interface_rrc_nr
{
public:
virtual void new_cell_meas_nr(const std::vector<phy_meas_nr_t>& meas) = 0;
};
// RRC interface for PHY
class rrc_interface_phy_lte
{
public:
// Measurement object from phy
typedef struct {
float rsrp;
float rsrq;
float cfo_hz;
uint32_t earfcn;
uint32_t pci;
} phy_meas_t;
virtual void in_sync() = 0;
virtual void out_of_sync() = 0;
virtual void new_cell_meas(const std::vector<phy_meas_t>& meas) = 0;

@ -46,8 +46,8 @@ public:
void init(process_callback* callback, log_ref log_h_);
uint8_t* request(uint32_t len);
void deallocate(uint8_t* pdu);
void push(uint8_t* ptr, uint32_t len, channel_t channel = DCH);
void deallocate(const uint8_t* pdu);
void push(const uint8_t* ptr, uint32_t len, channel_t channel = DCH);
bool process_pdus();

@ -293,8 +293,8 @@ typedef enum {
SRSLTE_DCI_FORMAT0 = 0,
SRSLTE_DCI_FORMAT1,
SRSLTE_DCI_FORMAT1A,
SRSLTE_DCI_FORMAT1C,
SRSLTE_DCI_FORMAT1B,
SRSLTE_DCI_FORMAT1C,
SRSLTE_DCI_FORMAT1D,
SRSLTE_DCI_FORMAT2,
SRSLTE_DCI_FORMAT2A,

@ -0,0 +1,67 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_POLAR_INTERLEAVER_H
#define SRSLTE_POLAR_INTERLEAVER_H
#include "srslte/config.h"
#include <stdbool.h>
#include <stdint.h>
#define SRSLTE_POLAR_INTERLEAVER_K_MAX_IL 164
/**
* * @brief Implements generic Polar code interleaver as described in TS 38.212 V15.9.0 Section 5.3.1.1
*
* @attention The input and output data cannot be the same.
*
* @param in Input data pointer
* @param out Output data pointer
* @param S Data element size in bytes
* @param K Number of elements
* @param dir Set to true for encoder and false for decoder
*/
SRSLTE_API void srslte_polar_interleaver_run(const void* in, void* out, uint32_t S, uint32_t K, bool dir);
#define SRSLTE_POLAR_INTERLEAVE_GEN(NAME, TYPE) \
static inline void srslte_polar_interleaver_run_##NAME(const TYPE* in, void* out, uint32_t K, bool dir) \
{ \
srslte_polar_interleaver_run(in, out, (uint32_t)sizeof(TYPE), K, dir); \
}
/**
* @brief Implements Polar code interleaver as described in TS 38.212 V15.9.0 Section 5.3.1.1
*
* @attention The input and output data cannot be the same.
*
* @param in unsigned 16 bit Input data
* @param out unsigned 16 bit Output data
* @param K Number of elements
* @param dir Set to true for encoder and false for decoder
*/
SRSLTE_POLAR_INTERLEAVE_GEN(u16, uint16_t)
/**
* @brief Implements Polar code interleaver as described in TS 38.212 V15.9.0 Section 5.3.1.1
*
* @attention The input and output data cannot be the same.
*
* @param in unsigned 8 bit Input data
* @param out unsigned 8 bit Output data
* @param K Number of elements
* @param dir Set to true for encoder and false for decoder
*/
SRSLTE_POLAR_INTERLEAVE_GEN(u8, uint8_t)
#undef SRSLTE_POLAR_INTERLEAVE_GEN
#endif // SRSLTE_POLAR_INTERLEAVER_H

@ -32,6 +32,7 @@
#define SRSLTE_SOFTBUFFER_H
#include "srslte/config.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C" {

@ -23,6 +23,8 @@
#define SRSLTE_RRC_CFG_UTILS_H
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/common.h"
#include "srslte/common/logmap.h"
#include <algorithm>
#include <cassert>
@ -298,12 +300,16 @@ void compute_cfg_diff(const toAddModList& src_list,
if (&src_list == &target_list) {
// early exit
return;
} else if (&src_list == &add_diff_list) {
}
if (&src_list == &add_diff_list) {
// use const src_list
toAddModList src_list2 = src_list;
compute_cfg_diff(src_list2, target_list, add_diff_list, rem_diff_list);
return;
} else if (&target_list == &add_diff_list) {
}
if (&target_list == &add_diff_list) {
// use const target_list
toAddModList target_list2 = target_list;
compute_cfg_diff(src_list, target_list2, add_diff_list, rem_diff_list);

@ -0,0 +1,250 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLOG_CONTEXT_H
#define SRSLOG_CONTEXT_H
#include "srslte/srslog/detail/support/tmp_utils.h"
#include <cassert>
#include <string>
namespace srslog {
/// Metric formatting kinds for textual conversion.
enum class metric_kind {
numeric, /// Metric represents a numeric value.
string /// Metric represents a string.
};
namespace detail {
/// This metrics container class is a wrapper to simplify access to the elements
/// of the underlying tuple that stores metrics and metric sets.
template <typename... Ts>
struct metrics_container {
/// Writes the arg value to metric T.
template <typename T, typename Arg>
void write(Arg&& arg)
{
constexpr std::size_t index = detail::get_type_index_in_tuple<T, Ts...>();
std::get<index>(metrics).value = std::forward<Arg>(arg);
}
/// Returns the value of metric T.
template <typename T>
auto read() const -> const decltype(T::value)&
{
constexpr std::size_t index = detail::get_type_index_in_tuple<T, Ts...>();
return std::get<index>(metrics).value;
}
/// Returns the element of type T.
template <typename T>
T& get()
{
constexpr std::size_t index = detail::get_type_index_in_tuple<T, Ts...>();
return std::get<index>(metrics);
}
/// Returns the element of type T.
template <typename T>
const T& get() const
{
constexpr std::size_t index = detail::get_type_index_in_tuple<T, Ts...>();
return std::get<index>(metrics);
}
/// Returns the element in the specified index of list T.
/// NOTE: T must have implemented the T operator.
template <typename T>
auto at(std::size_t i) -> typename T::value_type&
{
constexpr std::size_t index = detail::get_type_index_in_tuple<T, Ts...>();
auto& elem = std::get<index>(metrics);
assert(i < elem.size() && "Invalid index");
return elem[i];
}
/// Returns the element in the specified index of list T.
/// NOTE: T must have implemented the T operator.
template <typename T>
auto at(std::size_t i) const -> const typename T::value_type&
{
constexpr std::size_t index = detail::get_type_index_in_tuple<T, Ts...>();
const auto& elem = std::get<index>(metrics);
assert(i < elem.size() && "Invalid index");
return elem[i];
}
/// Returns the raw contents of the metric set as a tuple.
const std::tuple<Ts...>& contents() const { return metrics; }
private:
std::tuple<Ts...> metrics;
};
} // namespace detail
/// A generic list to store metric sets of the same type.
template <typename Name, typename T>
struct metric_list : public T {
/// Returns the name of the list.
static const char* name() { return Name::name(); }
};
/// Template specializations of this struct allow configuring what formatting
/// kind should be used for a concrete metric.
/// By default treat all metrics as strings.
template <typename T, typename = void>
struct metric_kind_selector {
static const metric_kind kind = metric_kind::string;
};
/// A metric is the most basic object that composes a context. It is generally
/// used to represent any kind of state of a program.
/// It stores a value of type T associated with a name and the units.
template <typename Ty, typename Name, typename Units>
struct metric {
/// Value of the metric.
Ty value{};
/// Returns the name of the metric.
static const char* name() { return Name::name(); }
/// Returns the units of the metric.
static const char* units() { return Units::units(); }
/// Returns the formatting kind of the metric.
static metric_kind kind()
{
return metric_kind_selector<metric<Ty, Name, Units>>::kind;
}
};
/// Template specialization that tags metrics with arithmetic values (integers
/// and floating point) as numeric.
template <typename Ty, typename Name, typename Units>
struct metric_kind_selector<
metric<Ty, Name, Units>,
typename std::enable_if<std::is_arithmetic<Ty>::value>::type> {
static const metric_kind kind = metric_kind::numeric;
};
/// A metric set is a group of metrics that share a logical relation. Allows
/// storing and mixing other metric sets and metrics for building complex
/// structures.
template <typename Name, typename... Ts>
struct metric_set : public detail::metrics_container<Ts...> {
/// Name of the metric set.
static const char* name() { return Name::name(); }
};
/// A context captures the state of different parts of a program grouping metric
/// sets. It is the root element of the metrics structure and allows mixing and
/// storing other metric sets and metrics.
template <typename... Ts>
struct context : public detail::metrics_container<Ts...> {
explicit context(std::string n) : name_str(std::move(n)) {}
/// Name of the context.
const std::string& name() const { return name_str; }
private:
const std::string name_str;
};
namespace detail {
/// Builds a metric set type using a list of metric, metric sets or list types.
/// eg: using my_metric_t = srslog::build_metric_set_type<m1_t, set1_t, m2_t>;
/// NOTE: Adding duplicated types into the list is not allowed.
template <typename Name, typename... Ts>
using build_metric_set_type =
metric_set<Name, typename std::decay<Ts>::type...>;
} // namespace detail
/// Builds a context type using a list of metric set types.
/// eg: using my_context_t = srslog::build_context_type<set1_t, set2_t>;
/// NOTE: Adding duplicated types into the list is not allowed.
template <typename... Ts>
using build_context_type = context<typename std::decay<Ts>::type...>;
/// This macro defines a new metric type using the following attributes:
/// a) name: encoded as a string.
/// b) Metric type: type identifier to create objects for this metric.
/// c) Value type: type of the underlying metric value.
/// d) Units: encoded as a string, leave as empty string for no units.
///
/// The following example declares a metric with the following attributes:
/// a) metric type: my_metric_t
/// b) metric value type: float
/// c) units: MB/s
/// d) name: Throughput
/// DECLARE_METRIC("Throughput", my_metric_t, float, "MB/s");
#define DECLARE_METRIC(_name_rep, _type, _value_type, _units) \
namespace metric_info { \
struct _type##__units { \
static const char* units() { return _units; } \
}; \
struct _type##__name_rep { \
static const char* name() { return _name_rep; } \
}; \
} \
using _type = srslog::metric<typename std::decay<_value_type>::type, \
metric_info::_type##__name_rep, \
metric_info::_type##__units>
/// This macro defines a new metric set type using the following attributes:
/// a) name: encoded as a string.
/// b) Metric set type: type identifier to create objects for this metric set.
/// c) Type list: list of types this set will hold (other sets, metrics,
/// lists).
///
/// The following example declares a metric set of three elements (two metrics
/// and one set) with the following attributes:
/// a) metric type: my_set_t
/// b) name: my_set
/// b) type list: metric1_t, metric2_t, set2_t
/// DECLARE_METRIC_SET("my_set", my_set_t, metric1_t, metric2_t, set2_t);
#define DECLARE_METRIC_SET(_name_rep, _type, ...) \
namespace metric_set_info { \
struct _type##__name_rep { \
static const char* name() { return _name_rep; } \
}; \
} \
using _type = srslog::detail:: \
build_metric_set_type<metric_set_info::_type##__name_rep, __VA_ARGS__>
/// This macro defines a list of metric sets of the same type:
/// a) name: encoded as a string.
/// b) List type: type identifier to create objects for this list.
/// c) Underlying type: type of the underlying list (vector, array, ...).
///
/// The following example declares a list of metrics sets of type set1_t with
/// the following attributes:
/// a) list type: my_list_t
/// b) name: my_list
/// b) underlying type: std::vector<set1_t>
/// DECLARE_METRIC_LIST("my_list", my_list_t, std::vector<set1_t>);
#define DECLARE_METRIC_LIST(_name_rep, _type, _list_type) \
namespace list_info { \
struct _type##__name_rep { \
static const char* name() { return _name_rep; } \
}; \
} \
using _type = srslog::metric_list<list_info::_type##__name_rep, \
typename std::decay<_list_type>::type>
} // namespace srslog
#endif // SRSLOG_CONTEXT_H

@ -22,12 +22,12 @@
#ifndef SRSLOG_DETAIL_LOG_BACKEND_H
#define SRSLOG_DETAIL_LOG_BACKEND_H
#include "srslte/srslog/detail/log_entry.h"
namespace srslog {
namespace detail {
struct log_entry;
/// The log backend receives generated log entries from the application. Each
/// entry gets distributed to the corresponding sinks.
/// NOTE: Thread safe class.
@ -41,7 +41,7 @@ public:
virtual void start() = 0;
/// Pushes a log entry into the backend.
virtual void push(detail::log_entry&& entry) = 0;
virtual void push(log_entry&& entry) = 0;
/// Returns true when the backend has been started, otherwise false.
virtual bool is_running() const = 0;

@ -22,9 +22,8 @@
#ifndef SRSLOG_DETAIL_LOG_ENTRY_H
#define SRSLOG_DETAIL_LOG_ENTRY_H
#include "srslte/srslog/bundled/fmt/printf.h"
#include "srslte/srslog/detail/log_entry_metadata.h"
#include "srslte/srslog/detail/support/thread_utils.h"
#include <chrono>
namespace srslog {
@ -32,14 +31,6 @@ class sink;
namespace detail {
/// This structure gives the user a way to log generic information as a context.
struct log_context {
/// Generic contxt value.
uint32_t value;
/// When true, the context value will be printed in the log entry.
bool enabled;
};
/// This command flushes all the messages pending in the backend.
struct flush_backend_cmd {
shared_variable<bool>& completion_flag;
@ -48,16 +39,13 @@ struct flush_backend_cmd {
/// This structure packs all the required data required to create a log entry in
/// the backend.
//:TODO: provide proper command objects when we have custom formatting.
//:TODO: replace this object using a real command pattern when we have a raw
// memory queue for passing entries.
struct log_entry {
sink* s;
std::chrono::high_resolution_clock::time_point tp;
log_context context;
std::string fmtstring;
fmt::dynamic_format_arg_store<fmt::printf_context> store;
std::string log_name;
char log_tag;
std::vector<uint8_t> hex_dump;
std::function<void(log_entry_metadata&& metadata, fmt::memory_buffer& buffer)>
format_func;
log_entry_metadata metadata;
std::unique_ptr<flush_backend_cmd> flush_cmd;
};

@ -0,0 +1,47 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLOG_DETAIL_LOG_ENTRY_METADATA_H
#define SRSLOG_DETAIL_LOG_ENTRY_METADATA_H
#include "srslte/srslog/bundled/fmt/printf.h"
#include <chrono>
namespace srslog {
namespace detail {
/// This structure gives the user a way to log generic information as a context.
//:TODO: legacy struct, will get replaced by the new context framework.
struct log_context {
/// Generic context value.
uint32_t value;
/// When true, the context value will be printed in the log entry.
bool enabled;
};
/// Metadata fields carried for each log entry.
struct log_entry_metadata {
std::chrono::high_resolution_clock::time_point tp;
log_context context;
std::string fmtstring;
fmt::dynamic_format_arg_store<fmt::printf_context> store;
std::string log_name;
char log_tag;
std::vector<uint8_t> hex_dump;
};
} // namespace detail
} // namespace srslog
#endif // SRSLOG_DETAIL_LOG_ENTRY_METADATA_H

@ -0,0 +1,70 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H
#define SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H
#include <cstddef>
#include <tuple>
namespace srslog {
namespace detail {
///
/// Implementation of the std::index_sequence C++14 library utility.
///
template <std::size_t...>
struct index_sequence {};
template <std::size_t N, std::size_t... Next>
struct index_sequence_helper
: public index_sequence_helper<N - 1U, N - 1U, Next...> {};
template <std::size_t... Next>
struct index_sequence_helper<0U, Next...> {
using type = index_sequence<Next...>;
};
template <std::size_t N>
using make_index_sequence = typename index_sequence_helper<N>::type;
///
/// Implementation of the std::get<T> C++14 library utility.
///
template <typename T, typename Tuple>
struct tuple_index;
template <typename T, typename... Ts>
struct tuple_index<T, std::tuple<T, Ts...>> {
static constexpr std::size_t value = 0;
};
template <typename T, typename U, typename... Ts>
struct tuple_index<T, std::tuple<U, Ts...>> {
static constexpr std::size_t value =
1 + tuple_index<T, std::tuple<Ts...>>::value;
};
template <typename T, typename... Ts>
constexpr std::size_t get_type_index_in_tuple()
{
return tuple_index<T, std::tuple<Ts...>>::value;
}
} // namespace detail
} // namespace srslog
#endif // SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H

@ -0,0 +1,185 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLOG_FORMATTER_H
#define SRSLOG_FORMATTER_H
#include "srslte/srslog/bundled/fmt/format.h"
#include "srslte/srslog/context.h"
namespace srslog {
namespace detail {
struct log_entry_metadata;
}
/// The generic metric value formatter.
template <typename T>
struct metric_value_formatter {
metric_value_formatter() = delete;
/// All specializations should implement the following method with signature:
/// template <typename T>
/// void format(const T& v, fmt::memory_buffer& buffer)
};
/// Default metric value formatter. Users that want to override this behaviour
/// should add an specialization of the metric they want to customize.
template <typename Ty, typename Name, typename Units>
struct metric_value_formatter<metric<Ty, Name, Units>> {
template <typename T>
void format(const T& v, fmt::memory_buffer& buffer)
{
fmt::format_to(buffer, "{}", v);
}
};
/// This is the base class that provides a common framework to format log
/// entries to different kinds of formats. User should implement two different
/// kinds of formats:
/// a) Basic log entry formatting.
/// b) Generic context formatting.
///
/// For context formatting, callbacks are provided so that derived classes
/// handle specific formatting rules.
class log_formatter
{
public:
virtual ~log_formatter() = default;
/// Returns a copy of the formatter.
virtual std::unique_ptr<log_formatter> clone() const = 0;
/// Formats the log entry into the input buffer.
virtual void format(detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) = 0;
/// Formats the context and log entry into the input buffer.
template <typename... Ts>
void format_ctx(const srslog::context<Ts...>& ctx,
detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer)
{
format_context_begin(metadata, ctx.name(), sizeof...(Ts), buffer);
iterate_tuple(ctx.contents(),
1,
buffer,
detail::make_index_sequence<sizeof...(Ts)>{});
format_context_end(metadata, ctx.name(), buffer);
}
private:
/// Processes all elements in a tuple.
template <typename... Ts, std::size_t... Is>
void iterate_tuple(const std::tuple<Ts...>& t,
unsigned level,
fmt::memory_buffer& buffer,
detail::index_sequence<Is...>)
{
(void)std::initializer_list<int>{
(process_element(std::get<Is>(t), level, buffer), 0)...};
}
/// Processes the input metric set.
template <typename Name, typename... Ts>
void process_element(const metric_set<Name, Ts...>& ms,
unsigned level,
fmt::memory_buffer& buffer)
{
format_metric_set_begin(ms.name(), sizeof...(Ts), level, buffer);
iterate_tuple(ms.contents(),
level + 1,
buffer,
detail::make_index_sequence<sizeof...(Ts)>{});
format_metric_set_end(ms.name(), level, buffer);
}
/// Processes the input metric list.
template <typename Name, typename T>
void process_element(const metric_list<Name, T>& list,
unsigned level,
fmt::memory_buffer& buffer)
{
format_list_begin(list.name(), list.size(), level, buffer);
for (const auto& elem : list) {
process_element(elem, level + 1, buffer);
}
format_list_end(list.name(), level, buffer);
}
/// Processes the input metric.
template <typename Ty, typename Name, typename Units>
void process_element(const metric<Ty, Name, Units>& t,
unsigned level,
fmt::memory_buffer& buffer)
{
fmt::memory_buffer value;
metric_value_formatter<typename std::decay<decltype(t)>::type>{}.format(
t.value, value);
format_metric(
t.name(), fmt::to_string(value), t.units(), t.kind(), level, buffer);
}
private:
/// Derived classes should implement the following callbacks to format metric
/// objects. Each callback is invoked at a different place of the formatting
/// algorithm.
/// This callback gets called at the beginning of the context formatting
/// algorithm.
virtual void format_context_begin(const detail::log_entry_metadata& md,
const std::string& ctx_name,
unsigned size,
fmt::memory_buffer& buffer) = 0;
/// This callback gets called at the end of the context formatting algorithm.
virtual void format_context_end(const detail::log_entry_metadata& md,
const std::string& ctx_name,
fmt::memory_buffer& buffer) = 0;
/// This callback gets called at the beginning of a metric set formatting
/// procedure.
virtual void format_metric_set_begin(const std::string& set_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer) = 0;
/// This callback gets called at the beginning of a metric set formatting end.
virtual void format_metric_set_end(const std::string& set_name,
unsigned level,
fmt::memory_buffer& buffer) = 0;
/// This callback gets called at the beginning of a metric list formatting
/// procedure.
virtual void format_list_begin(const std::string& list_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer) = 0;
/// This callback gets called at the end of a metric list formatting
/// procedure.
virtual void format_list_end(const std::string& list_name,
unsigned level,
fmt::memory_buffer& buffer) = 0;
/// This callback gets called for each metric.
virtual void format_metric(const std::string& metric_name,
const std::string& metric_value,
const std::string& metric_units,
metric_kind kind,
unsigned level,
fmt::memory_buffer& buffer) = 0;
};
} // namespace srslog
#endif // SRSLOG_FORMATTER_H

@ -23,7 +23,8 @@
#define SRSLOG_LOG_CHANNEL_H
#include "srslte/srslog/detail/log_backend.h"
#include <cassert>
#include "srslte/srslog/detail/log_entry.h"
#include "srslte/srslog/sink.h"
namespace srslog {
@ -31,9 +32,7 @@ namespace srslog {
struct log_channel_config {
log_channel_config() = default;
log_channel_config(std::string n, char tag, bool should_print_context) :
name(std::move(n)),
tag(tag),
should_print_context(should_print_context)
name(std::move(n)), tag(tag), should_print_context(should_print_context)
{}
/// Optional log channel name. If set, will get printed for each log entry.
@ -104,19 +103,25 @@ public:
if (!enabled()) {
return;
}
assert(&log_sink);
// Populate the store with all incoming arguments.
fmt::dynamic_format_arg_store<fmt::printf_context> store;
(void)std::initializer_list<int>{(store.push_back(args), 0)...};
// Send the log entry to the backend.
detail::log_entry entry = {&log_sink,
std::chrono::high_resolution_clock::now(),
{ctx_value, should_print_context},
fmtstr,
std::move(store),
log_name,
log_tag};
log_formatter& formatter = log_sink.get_formatter();
detail::log_entry entry = {
&log_sink,
[&formatter](detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) {
formatter.format(std::move(metadata), buffer);
},
{std::chrono::high_resolution_clock::now(),
{ctx_value, should_print_context},
fmtstr,
std::move(store),
log_name,
log_tag}};
backend.push(std::move(entry));
}
@ -132,7 +137,6 @@ public:
return;
}
assert(&log_sink);
// Populate the store with all incoming arguments.
fmt::dynamic_format_arg_store<fmt::printf_context> store;
(void)std::initializer_list<int>{(store.push_back(args), 0)...};
@ -142,14 +146,78 @@ public:
len = std::min<size_t>(len, hex_max_size);
// Send the log entry to the backend.
detail::log_entry entry = {&log_sink,
std::chrono::high_resolution_clock::now(),
{ctx_value, should_print_context},
fmtstr,
std::move(store),
log_name,
log_tag,
std::vector<uint8_t>(buffer, buffer + len)};
log_formatter& formatter = log_sink.get_formatter();
detail::log_entry entry = {
&log_sink,
[&formatter](detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) {
formatter.format(std::move(metadata), buffer);
},
{std::chrono::high_resolution_clock::now(),
{ctx_value, should_print_context},
fmtstr,
std::move(store),
log_name,
log_tag,
std::vector<uint8_t>(buffer, buffer + len)}};
backend.push(std::move(entry));
}
/// Builds the provided log entry and passes it to the backend. When the
/// channel is disabled the log entry will be discarded.
template <typename... Ts>
void operator()(const context<Ts...>& ctx)
{
if (!enabled()) {
return;
}
// Send the log entry to the backend.
log_formatter& formatter = log_sink.get_formatter();
detail::log_entry entry = {
&log_sink,
[&formatter, ctx](detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) {
formatter.format_ctx(ctx, std::move(metadata), buffer);
},
{std::chrono::high_resolution_clock::now(),
{ctx_value, should_print_context},
"",
{},
log_name,
log_tag}};
backend.push(std::move(entry));
}
/// Builds the provided log entry and passes it to the backend. When the
/// channel is disabled the log entry will be discarded.
template <typename... Ts, typename... Args>
void operator()(const context<Ts...>& ctx,
const std::string& fmtstr,
Args&&... args)
{
if (!enabled()) {
return;
}
// Populate the store with all incoming arguments.
fmt::dynamic_format_arg_store<fmt::printf_context> store;
(void)std::initializer_list<int>{(store.push_back(args), 0)...};
// Send the log entry to the backend.
log_formatter& formatter = log_sink.get_formatter();
detail::log_entry entry = {
&log_sink,
[&formatter, ctx](detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) {
formatter.format_ctx(ctx, std::move(metadata), buffer);
},
{std::chrono::high_resolution_clock::now(),
{ctx_value, should_print_context},
fmtstr,
std::move(store),
log_name,
log_tag}};
backend.push(std::move(entry));
}

@ -24,6 +24,8 @@
#include "srslte/srslog/detail/support/error_string.h"
#include "srslte/srslog/detail/support/memory_buffer.h"
#include "srslte/srslog/formatter.h"
#include <cassert>
namespace srslog {
@ -32,13 +34,25 @@ namespace srslog {
class sink
{
public:
explicit sink(std::unique_ptr<log_formatter> f) : formatter(std::move(f))
{
assert(formatter && "Invalid formatter");
}
virtual ~sink() = default;
/// Returns the formatter used by this sink.
log_formatter& get_formatter() { return *formatter; }
const log_formatter& get_formatter() const { return *formatter; }
/// Writes the provided memory buffer into the sink.
virtual detail::error_string write(detail::memory_buffer buffer) = 0;
/// Flushes any buffered contents to the backing store.
virtual detail::error_string flush() = 0;
private:
std::unique_ptr<log_formatter> formatter;
};
} // namespace srslog

@ -61,6 +61,10 @@ fetch_log_channel(const std::string& id, sink& s, log_channel_config config);
/// NOTE: Deprecated, use fetch_log_channel instead.
log_channel* create_log_channel(const std::string& id, sink& s);
///
/// Logger management functions.
///
namespace detail {
/// Internal helper functions.
@ -69,10 +73,6 @@ detail::any* find_logger(const std::string& id);
} // namespace detail
///
/// Logger management functions.
///
/// Finds a logger with the specified id string and type in the repository. On
/// success returns a pointer to the requested logger, otherwise nullptr.
/// NOTE: T should be a type that is a logger.
@ -142,13 +142,30 @@ inline T* create_logger(const std::string& id, Args&&... args)
return detail::any_cast<T>(p);
}
///
/// Formatter management functions.
///
/// Installs the specified formatter to be used as the default one by new sinks.
/// The initial default formatter formats plain text.
void set_default_log_formatter(std::unique_ptr<log_formatter> f);
/// Returns the instance of the default formatter being used.
std::unique_ptr<log_formatter> get_default_log_formatter();
/// Creates a new instance of a plain text formatter.
std::unique_ptr<log_formatter> create_text_formatter();
/// Creates a new instance of a JSON formatter.
std::unique_ptr<log_formatter> create_json_formatter();
///
/// Sink management functions.
///
/// Installs the specified sink to be used as the default one by new log
/// channels and loggers.
/// The initial default sink writes to stdout.
/// The initial default sink writes to stdout with a text formatter.
void set_default_sink(sink& s);
/// Returns the instance of the default sink being used.
@ -158,18 +175,35 @@ sink& get_default_sink();
/// success returns a pointer to the requested sink, otherwise nullptr.
sink* find_sink(const std::string& id);
/// Returns an instance of a sink that writes to the stdout stream.
sink& fetch_stdout_sink();
/// Returns an instance of a sink that writes to the stdout stream. You may use
/// different ids if you need to create multiple stdout sinks with different
/// formatters.
sink& fetch_stdout_sink(
const std::string& id = "stdout",
std::unique_ptr<log_formatter> f = get_default_log_formatter());
/// Returns an instance of a sink that writes to the stderr stream.
sink& fetch_stderr_sink();
/// Returns an instance of a sink that writes to the stderr stream. You may use
/// different ids if you need to create multiple stderr sinks with different
/// formatters.
sink& fetch_stderr_sink(
const std::string& id = "stderr",
std::unique_ptr<log_formatter> f = get_default_log_formatter());
/// Returns an instance of a sink that writes into a file in the specified path.
/// Specifying a max_size value different to zero will make the sink create a
/// new file each time the current file exceeds this value. The units of
/// max_size are bytes.
/// NOTE: Any '#' characters in the id will get removed.
sink& fetch_file_sink(const std::string& path, size_t max_size = 0);
/// NOTE: Any '#' characters in the path will get removed.
sink& fetch_file_sink(
const std::string& path,
size_t max_size = 0,
std::unique_ptr<log_formatter> f = get_default_log_formatter());
/// Installs a custom user defined sink in the framework getting associated to
/// the specified id. Returns true on success, otherwise false.
/// WARNING: This function is an advanced feature and users should really know
/// what they are doing when using it.
bool install_custom_sink(const std::string& id, std::unique_ptr<sink> s);
/// Creates a new sink that writes into the a file in the specified path and
/// registers it into a sink repository so that it can be later retrieved in

@ -111,7 +111,7 @@ private:
bsr_callback_t bsr_callback = nullptr;
// Timer needed for metrics calculation
struct timeval metrics_time[3] = {};
std::chrono::high_resolution_clock::time_point metrics_tp;
bool valid_lcid(uint32_t lcid);
bool valid_lcid_mrb(uint32_t lcid);

@ -22,6 +22,7 @@
#ifndef SRSLTE_RLC_AM_LTE_H
#define SRSLTE_RLC_AM_LTE_H
#include "srslte/adt/accumulators.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
@ -206,7 +207,8 @@ private:
void write_pdu(uint8_t* payload, uint32_t nof_bytes);
uint32_t get_num_rx_bytes();
uint32_t get_rx_buffered_bytes(); // returns sum of PDUs in rx_window
uint32_t get_sdu_rx_latency_ms();
// Timeout callback interface
void timer_expired(uint32_t timeout_id);
@ -267,6 +269,8 @@ private:
***************************************************************************/
srslte::timer_handler::unique_timer reordering_timer;
srslte::rolling_average<double> sdu_rx_latency_ms;
};
// Common variables needed/provided by parent class

@ -34,13 +34,17 @@ typedef struct {
uint64_t num_tx_sdu_bytes;
uint64_t num_rx_sdu_bytes;
uint32_t num_lost_sdus; //< Count dropped SDUs at Tx due to bearer inactivity or empty buffer
uint64_t rx_latency_ms; //< Average time in ms from first RLC segment to full SDU
// PDU metrics
uint32_t num_tx_pdus;
uint32_t num_rx_pdus;
uint64_t num_tx_pdu_bytes;
uint64_t num_rx_pdu_bytes;
uint32_t num_lost_pdus; //< Lost PDUs registered at Rx
uint32_t num_lost_pdus; //< Lost PDUs registered at Rx
// misc metrics
uint32_t rx_buffered_bytes; //< sum of payload of PDUs buffered in rx_window
} rlc_bearer_metrics_t;
typedef struct {

@ -22,6 +22,7 @@
#ifndef SRSLTE_RLC_UM_BASE_H
#define SRSLTE_RLC_UM_BASE_H
#include "srslte/adt/accumulators.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
@ -93,6 +94,7 @@ protected:
byte_buffer_pool* pool = nullptr;
srslte::log_ref log;
std::string rb_name;
rlc_um_base* parent = nullptr;
rlc_config_t cfg = {};
@ -103,6 +105,11 @@ protected:
// Mutexes
std::mutex mutex;
// Metrics
#ifdef ENABLE_TIMESTAMP
srslte::rolling_average<double> mean_pdu_latency_us;
#endif
virtual int build_data_pdu(unique_byte_buffer_t pdu, uint8_t* payload, uint32_t nof_bytes) = 0;
// helper functions

@ -72,6 +72,7 @@ private:
***************************************************************************/
uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU.
// Metrics
void debug_state();
};

@ -21,7 +21,9 @@
#include "srslte/asn1/asn1_utils.h"
#include "srslte/common/logmap.h"
#include "srslte/srslog/bundled/fmt/core.h"
#include <cmath>
#include <stdarg.h> /* va_list, va_start, va_arg, va_end */
#include <stdio.h>
namespace asn1 {
@ -696,7 +698,6 @@ IntType unconstrained_whole_number_length(IntType n)
template <typename IntType>
SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, IntType n, bool aligned)
{
// TODO: Test
uint32_t len = unconstrained_whole_number_length(n);
if (aligned) {
HANDLE_CODE(bref.align_bytes_zero());
@ -706,11 +707,8 @@ SRSASN_CODE pack_unconstrained_whole_number(bit_ref& bref, IntType n, bool align
return SRSASN_SUCCESS;
}
template <typename IntType>
SRSASN_CODE unpack_unconstrained_whole_number(IntType& n, cbit_ref& bref, bool aligned)
SRSASN_CODE unpack_unconstrained_whole_number(IntType& n, cbit_ref& bref, uint32_t len, bool aligned)
{
// TODO: Test
uint32_t len;
HANDLE_CODE(unpack_length(len, bref, aligned));
if (aligned) {
HANDLE_CODE(bref.align_bytes());
}
@ -722,18 +720,21 @@ template SRSASN_CODE pack_unconstrained_whole_number<int8_t>(bit_ref& bref, int8
template SRSASN_CODE pack_unconstrained_whole_number<int16_t>(bit_ref& bref, int16_t n, bool aligned);
template SRSASN_CODE pack_unconstrained_whole_number<int32_t>(bit_ref& bref, int32_t n, bool aligned);
template SRSASN_CODE pack_unconstrained_whole_number<int64_t>(bit_ref& bref, int64_t n, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int8_t>(int8_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int16_t>(int16_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int32_t>(int32_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int64_t>(int64_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int8_t>(int8_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int16_t>(int16_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int32_t>(int32_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<int64_t>(int64_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE pack_unconstrained_whole_number<uint8_t>(bit_ref& bref, uint8_t n, bool aligned);
template SRSASN_CODE pack_unconstrained_whole_number<uint16_t>(bit_ref& bref, uint16_t n, bool aligned);
template SRSASN_CODE pack_unconstrained_whole_number<uint32_t>(bit_ref& bref, uint32_t n, bool aligned);
template SRSASN_CODE pack_unconstrained_whole_number<uint64_t>(bit_ref& bref, uint64_t n, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<uint8_t>(uint8_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<uint16_t>(uint16_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<uint32_t>(uint32_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<uint64_t>(uint64_t& n, cbit_ref& bref, bool aligned);
template SRSASN_CODE unpack_unconstrained_whole_number<uint8_t>(uint8_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE
unpack_unconstrained_whole_number<uint16_t>(uint16_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE
unpack_unconstrained_whole_number<uint32_t>(uint32_t& n, cbit_ref& bref, uint32_t len, bool aligned);
template SRSASN_CODE
unpack_unconstrained_whole_number<uint64_t>(uint64_t& n, cbit_ref& bref, uint32_t len, bool aligned);
/*********************
varlength_packing
@ -742,6 +743,9 @@ template SRSASN_CODE unpack_unconstrained_whole_number<uint64_t>(uint64_t& n, cb
template <typename IntType>
SRSASN_CODE pack_length(bit_ref& bref, IntType n, IntType lb, IntType ub, bool aligned)
{
if (ub >= ASN_64K) {
return pack_length(bref, n, aligned);
}
return pack_constrained_whole_number(bref, n, lb, ub, aligned);
}
template SRSASN_CODE pack_length<uint8_t>(bit_ref& bref, uint8_t n, uint8_t lb, uint8_t ub, bool aligned);
@ -756,6 +760,12 @@ template SRSASN_CODE pack_length<int64_t>(bit_ref& bref, int64_t n, int64_t lb,
template <typename IntType>
SRSASN_CODE unpack_length(IntType& n, cbit_ref& bref, IntType lb, IntType ub, bool aligned)
{
if (ub >= ASN_64K) {
uint32_t len;
SRSASN_CODE ret = unpack_length(len, bref, aligned);
n = len;
return ret;
}
return unpack_constrained_whole_number(n, bref, lb, ub, aligned);
}
template SRSASN_CODE unpack_length<uint8_t>(uint8_t& n, cbit_ref& bref, uint8_t lb, uint8_t ub, bool aligned);
@ -880,6 +890,7 @@ SRSASN_CODE pack_integer(bit_ref& bref, IntType n, IntType lb, IntType ub, bool
// }
HANDLE_CODE(pack_constrained_whole_number(bref, n, (IntType)lb, (IntType)ub, aligned));
} else {
// See X.691 - 12.2.6
if (not within_bounds or (not lower_bounded and not upper_bounded)) {
HANDLE_CODE(pack_length(bref, unconstrained_whole_number_length(n), aligned));
HANDLE_CODE(pack_unconstrained_whole_number(bref, n, aligned));
@ -937,10 +948,11 @@ SRSASN_CODE unpack_integer(IntType& n, cbit_ref& bref, IntType lb, IntType ub, b
// TODO: Check if we are in the indefinite length case, and pack length prefix if needed
HANDLE_CODE(unpack_constrained_whole_number(n, bref, (IntType)lb, (IntType)ub, aligned));
} else {
// See X.691 - 12.2.6
if (not within_bounds or (not lower_bounded and not upper_bounded)) {
uint32_t len;
HANDLE_CODE(unpack_length(len, bref, aligned));
HANDLE_CODE(unpack_unconstrained_whole_number(n, bref, aligned)); // TODO
HANDLE_CODE(unpack_unconstrained_whole_number(n, bref, len, aligned));
} else {
// pack as semi-constrained
// TODO
@ -1522,13 +1534,11 @@ json_writer::json_writer() : ident(""), sep(NONE) {}
void json_writer::write_fieldname(const std::string& fieldname)
{
if (sep == COMMA) {
ss << ",\n" << ident;
} else if (sep == NEWLINE) {
ss << "\n" << ident;
}
constexpr static const char* septable[] = {",\n", "\n", ""};
fmt::format_to(buffer, "{}{}", septable[sep], sep != NONE ? ident : "");
if (not fieldname.empty()) {
ss << "\"" << fieldname << "\": ";
fmt::format_to(buffer, "\"{}\": ", fieldname);
}
sep = NONE;
}
@ -1536,7 +1546,7 @@ void json_writer::write_fieldname(const std::string& fieldname)
void json_writer::write_str(const std::string& fieldname, const std::string& value)
{
write_fieldname(fieldname);
ss << "\"" << value << "\"";
fmt::format_to(buffer, "\"{}\"", value);
sep = COMMA;
}
void json_writer::write_str(const std::string& value)
@ -1547,7 +1557,7 @@ void json_writer::write_str(const std::string& value)
void json_writer::write_int(const std::string& fieldname, int64_t value)
{
write_fieldname(fieldname);
ss << value;
fmt::format_to(buffer, "{}", value);
sep = COMMA;
}
void json_writer::write_int(int64_t value)
@ -1558,7 +1568,7 @@ void json_writer::write_int(int64_t value)
void json_writer::write_bool(const std::string& fieldname, bool value)
{
write_fieldname(fieldname);
ss << (value ? "true" : "false");
fmt::format_to(buffer, "{}", value ? "true" : "false");
sep = COMMA;
}
void json_writer::write_bool(bool value)
@ -1569,7 +1579,7 @@ void json_writer::write_bool(bool value)
void json_writer::write_null(const std::string& fieldname)
{
write_fieldname(fieldname);
ss << "null";
fmt::format_to(buffer, "null");
sep = COMMA;
}
void json_writer::write_null()
@ -1580,33 +1590,34 @@ void json_writer::write_null()
void json_writer::start_obj(const std::string& fieldname)
{
write_fieldname(fieldname);
ss << "{";
fmt::format_to(buffer, "{{");
ident += " ";
sep = NEWLINE;
}
void json_writer::end_obj()
{
ident.erase(ident.size() - 2, 2);
ss << "\n" << ident << "}";
fmt::format_to(buffer, "\n{}}}", ident);
sep = COMMA;
}
void json_writer::start_array(const std::string& fieldname)
{
write_fieldname(fieldname);
ss << "[";
fmt::format_to(buffer, "[");
ident += " ";
sep = NEWLINE;
}
void json_writer::end_array()
{
ident.erase(ident.size() - 2, 2);
ss << "\n" << ident << "]";
fmt::format_to(buffer, "\n{}]", ident);
sep = COMMA;
}
std::string json_writer::to_string() const
{
return ss.str();
return std::string(buffer.data(), buffer.size());
}
} // namespace asn1

@ -123,14 +123,9 @@ int8_t sl_tx_pwr_r14_c::types_opts::to_number() const
std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types_opts::to_string() const
{
static const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"};
static const char* options[] = {"crs-IntfMitigEnabled", "crs-IntfMitigNumPRBs"};
return convert_enum_idx(options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types");
}
int8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types_opts::to_number() const
{
static const int8_t options[] = {-15};
return map_enum_number(options, 1, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types");
}
std::string sl_offset_ind_r12_c::types_opts::to_string() const
{
@ -245,6 +240,12 @@ std::string sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types_op
return convert_enum_idx(options, 2, value, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types");
}
std::string ssb_to_measure_r15_c::types_opts::to_string() const
{
static const char* options[] = {"shortBitmap-r15", "mediumBitmap-r15", "longBitmap-r15"};
return convert_enum_idx(options, 3, value, "ssb_to_measure_r15_c::types");
}
std::string
sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types_opts::to_string()
const
@ -1072,14 +1073,9 @@ std::string rr_cfg_ded_s::mac_main_cfg_c_::types_opts::to_string() const
std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"};
static const char* options[] = {"crs-IntfMitigEnabled", "crs-IntfMitigNumPRBs"};
return convert_enum_idx(options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types");
}
int8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types_opts::to_number() const
{
static const int8_t options[] = {-15};
return map_enum_number(options, 1, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types");
}
std::string redirected_carrier_info_r15_ies_c::types_opts::to_string() const
{
@ -1205,100 +1201,6 @@ std::string phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::type
return convert_enum_idx(options, 2, value, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::types");
}
std::string drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types_opts::to_string() const
{
static const char* options[] = {"split-r12", "scg-r12"};
return convert_enum_idx(options, 2, value, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types");
}
std::string ip_address_r13_c::types_opts::to_string() const
{
static const char* options[] = {"ipv4-r13", "ipv6-r13"};
return convert_enum_idx(options, 2, value, "ip_address_r13_c::types");
}
uint8_t ip_address_r13_c::types_opts::to_number() const
{
static const uint8_t options[] = {4, 6};
return map_enum_number(options, 2, value, "ip_address_r13_c::types");
}
std::string security_cfg_ho_v1530_s::handov_type_v1530_c_::types_opts::to_string() const
{
static const char* options[] = {"intra5GC-r15", "fivegc-ToEPC-r15", "epc-To5GC-r15"};
return convert_enum_idx(options, 3, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types");
}
std::string rach_skip_r14_s::target_ta_r14_c_::types_opts::to_string() const
{
static const char* options[] = {"ta0-r14", "mcg-PTAG-r14", "scg-PTAG-r14", "mcg-STAG-r14", "scg-STAG-r14"};
return convert_enum_idx(options, 5, value, "rach_skip_r14_s::target_ta_r14_c_::types");
}
uint8_t rach_skip_r14_s::target_ta_r14_c_::types_opts::to_number() const
{
static const uint8_t options[] = {0};
return map_enum_number(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types");
}
std::string sl_disc_tx_ref_carrier_ded_r13_c::types_opts::to_string() const
{
static const char* options[] = {"pCell", "sCell"};
return convert_enum_idx(options, 2, value, "sl_disc_tx_ref_carrier_ded_r13_c::types");
}
std::string sl_disc_tx_res_r13_c::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r13", "ue-Selected-r13"};
return convert_enum_idx(options, 2, value, "sl_disc_tx_res_r13_c::setup_c_::types");
}
std::string rclwi_cfg_r13_s::cmd_c_::types_opts::to_string() const
{
static const char* options[] = {"steerToWLAN-r13", "steerToLTE-r13"};
return convert_enum_idx(options, 2, value, "rclwi_cfg_r13_s::cmd_c_::types");
}
std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r14", "ue-Selected-r14"};
return convert_enum_idx(options, 2, value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types");
}
std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-v1530", "ue-Selected-v1530"};
return convert_enum_idx(options, 2, value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types");
}
std::string ran_notif_area_info_r15_c::types_opts::to_string() const
{
static const char* options[] = {"cellList-r15", "ran-AreaConfigList-r15"};
return convert_enum_idx(options, 2, value, "ran_notif_area_info_r15_c::types");
}
std::string sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r12", "ue-Selected-r12"};
return convert_enum_idx(options, 2, value, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types");
}
std::string sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-v1310", "ue-Selected-v1310"};
return convert_enum_idx(options, 2, value, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types");
}
std::string sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r12", "ue-Selected-r12"};
return convert_enum_idx(options, 2, value, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types");
}
std::string sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r13", "ue-Selected-r13"};
return convert_enum_idx(options, 2, value, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types");
}
std::string meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types_opts::to_string() const
{
static const char* options[] = {"ms40-r12", "ms80-r12", "ms160-r12"};
@ -1443,6 +1345,23 @@ std::string report_cfg_inter_rat_s::trigger_type_c_::types_opts::to_string() con
return convert_enum_idx(options, 2, value, "report_cfg_inter_rat_s::trigger_type_c_::types");
}
std::string drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types_opts::to_string() const
{
static const char* options[] = {"split-r12", "scg-r12"};
return convert_enum_idx(options, 2, value, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types");
}
std::string ip_address_r13_c::types_opts::to_string() const
{
static const char* options[] = {"ipv4-r13", "ipv6-r13"};
return convert_enum_idx(options, 2, value, "ip_address_r13_c::types");
}
uint8_t ip_address_r13_c::types_opts::to_number() const
{
static const uint8_t options[] = {4, 6};
return map_enum_number(options, 2, value, "ip_address_r13_c::types");
}
std::string meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const
{
static const char* options[] = {"measObjectEUTRA",
@ -1481,18 +1400,18 @@ uint16_t meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types_opts::to_number()
return 0;
}
std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types_opts::to_string() const
{
static const char* options[] = {"fdd-r13", "tdd-r13"};
return convert_enum_idx(options, 2, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types");
}
std::string report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const
{
static const char* options[] = {"reportConfigEUTRA", "reportConfigInterRAT"};
return convert_enum_idx(options, 2, value, "report_cfg_to_add_mod_s::report_cfg_c_::types");
}
std::string security_cfg_ho_v1530_s::handov_type_v1530_c_::types_opts::to_string() const
{
static const char* options[] = {"intra5GC-r15", "fivegc-ToEPC-r15", "epc-To5GC-r15"};
return convert_enum_idx(options, 3, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types");
}
std::string meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types_opts::to_string() const
{
static const char* options[] = {"rstd0-r15", "rstd1-r15", "rstd2-r15", "rstd3-r15", "rstd4-r15", "rstd5-r15",
@ -1509,6 +1428,83 @@ uint8_t meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::typ
options, 21, value, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types");
}
std::string rach_skip_r14_s::target_ta_r14_c_::types_opts::to_string() const
{
static const char* options[] = {"ta0-r14", "mcg-PTAG-r14", "scg-PTAG-r14", "mcg-STAG-r14", "scg-STAG-r14"};
return convert_enum_idx(options, 5, value, "rach_skip_r14_s::target_ta_r14_c_::types");
}
uint8_t rach_skip_r14_s::target_ta_r14_c_::types_opts::to_number() const
{
static const uint8_t options[] = {0};
return map_enum_number(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types");
}
std::string sl_disc_tx_ref_carrier_ded_r13_c::types_opts::to_string() const
{
static const char* options[] = {"pCell", "sCell"};
return convert_enum_idx(options, 2, value, "sl_disc_tx_ref_carrier_ded_r13_c::types");
}
std::string sl_disc_tx_res_r13_c::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r13", "ue-Selected-r13"};
return convert_enum_idx(options, 2, value, "sl_disc_tx_res_r13_c::setup_c_::types");
}
std::string rclwi_cfg_r13_s::cmd_c_::types_opts::to_string() const
{
static const char* options[] = {"steerToWLAN-r13", "steerToLTE-r13"};
return convert_enum_idx(options, 2, value, "rclwi_cfg_r13_s::cmd_c_::types");
}
std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r14", "ue-Selected-r14"};
return convert_enum_idx(options, 2, value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types");
}
std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-v1530", "ue-Selected-v1530"};
return convert_enum_idx(options, 2, value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types");
}
std::string ran_notif_area_info_r15_c::types_opts::to_string() const
{
static const char* options[] = {"cellList-r15", "ran-AreaConfigList-r15"};
return convert_enum_idx(options, 2, value, "ran_notif_area_info_r15_c::types");
}
std::string sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r12", "ue-Selected-r12"};
return convert_enum_idx(options, 2, value, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types");
}
std::string sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-v1310", "ue-Selected-v1310"};
return convert_enum_idx(options, 2, value, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types");
}
std::string sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r12", "ue-Selected-r12"};
return convert_enum_idx(options, 2, value, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types");
}
std::string sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types_opts::to_string() const
{
static const char* options[] = {"scheduled-r13", "ue-Selected-r13"};
return convert_enum_idx(options, 2, value, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types");
}
std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types_opts::to_string() const
{
static const char* options[] = {"fdd-r13", "tdd-r13"};
return convert_enum_idx(options, 2, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types");
}
std::string rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::types_opts::to_string() const
{
static const char* options[] = {"geran-r9", "utra-FDD-r9", "utra-TDD-r9", "utra-TDD-r10"};
@ -4666,6 +4662,40 @@ std::string visited_cell_info_r12_s::visited_cell_id_r12_c_::types_opts::to_stri
return convert_enum_idx(options, 2, value, "visited_cell_info_r12_s::visited_cell_id_r12_c_::types");
}
// FailureReportSCG-v12d0 ::= SEQUENCE
SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE fail_report_scg_v12d0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8));
}
return SRSASN_SUCCESS;
}
void fail_report_scg_v12d0_s::to_json(json_writer& j) const
{
j.start_obj();
if (meas_result_neigh_cells_v12d0_present) {
j.start_array("measResultNeighCells-v12d0");
for (const auto& e1 : meas_result_neigh_cells_v12d0) {
e1.to_json(j);
}
j.end_array();
}
j.end_obj();
}
std::string idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types_opts::to_string() const
{
static const char* options[] = {"subframeConfig0-r11", "subframeConfig1-5-r11", "subframeConfig6-r11"};
@ -4708,6 +4738,44 @@ uint8_t rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types_opts::to_numbe
return map_enum_number(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types");
}
// SCGFailureInformation-v12d0b-IEs ::= SEQUENCE
SRSASN_CODE scg_fail_info_v12d0b_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_fail_info_v12d0b_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void scg_fail_info_v12d0b_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (fail_report_scg_v12d0_present) {
j.write_fieldname("failureReportSCG-v12d0");
fail_report_scg_v12d0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const
{
static const char* options[] = {"measResultListEUTRA",
@ -5037,12 +5105,304 @@ band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_
options, 3, value, "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types");
}
// MIMO-WeightedLayersCapabilities-r13 ::= SEQUENCE
SRSASN_CODE mimo_weighted_layers_cap_r13_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(rel_weight_four_layers_r13_present, 1));
HANDLE_CODE(bref.pack(rel_weight_eight_layers_r13_present, 1));
HANDLE_CODE(rel_weight_two_layers_r13.pack(bref));
if (rel_weight_four_layers_r13_present) {
HANDLE_CODE(rel_weight_four_layers_r13.pack(bref));
}
if (rel_weight_eight_layers_r13_present) {
HANDLE_CODE(rel_weight_eight_layers_r13.pack(bref));
}
HANDLE_CODE(pack_integer(bref, total_weighted_layers_r13, (uint8_t)2u, (uint8_t)128u));
return SRSASN_SUCCESS;
}
SRSASN_CODE mimo_weighted_layers_cap_r13_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(rel_weight_four_layers_r13_present, 1));
HANDLE_CODE(bref.unpack(rel_weight_eight_layers_r13_present, 1));
HANDLE_CODE(rel_weight_two_layers_r13.unpack(bref));
if (rel_weight_four_layers_r13_present) {
HANDLE_CODE(rel_weight_four_layers_r13.unpack(bref));
}
if (rel_weight_eight_layers_r13_present) {
HANDLE_CODE(rel_weight_eight_layers_r13.unpack(bref));
}
HANDLE_CODE(unpack_integer(total_weighted_layers_r13, bref, (uint8_t)2u, (uint8_t)128u));
return SRSASN_SUCCESS;
}
void mimo_weighted_layers_cap_r13_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_str("relWeightTwoLayers-r13", rel_weight_two_layers_r13.to_string());
if (rel_weight_four_layers_r13_present) {
j.write_str("relWeightFourLayers-r13", rel_weight_four_layers_r13.to_string());
}
if (rel_weight_eight_layers_r13_present) {
j.write_str("relWeightEightLayers-r13", rel_weight_eight_layers_r13.to_string());
}
j.write_int("totalWeightedLayers-r13", total_weighted_layers_r13);
j.end_obj();
}
std::string mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_opts::to_string() const
{
static const char* options[] = {"v1", "v1dot25", "v1dot5", "v1dot75", "v2", "v2dot5", "v3", "v4"};
return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_e_");
}
float mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_opts::to_number() const
{
static const float options[] = {1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0};
return map_enum_number(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_e_");
}
std::string mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_opts::to_number_string() const
{
static const char* options[] = {"1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4"};
return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_two_layers_r13_e_");
}
std::string mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_opts::to_string() const
{
static const char* options[] = {"v1", "v1dot25", "v1dot5", "v1dot75", "v2", "v2dot5", "v3", "v4"};
return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_e_");
}
float mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_opts::to_number() const
{
static const float options[] = {1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0};
return map_enum_number(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_e_");
}
std::string mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_opts::to_number_string() const
{
static const char* options[] = {"1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4"};
return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_four_layers_r13_e_");
}
std::string mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_opts::to_string() const
{
static const char* options[] = {"v1", "v1dot25", "v1dot5", "v1dot75", "v2", "v2dot5", "v3", "v4"};
return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_e_");
}
float mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_opts::to_number() const
{
static const float options[] = {1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0};
return map_enum_number(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_e_");
}
std::string mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_opts::to_number_string() const
{
static const char* options[] = {"1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4"};
return convert_enum_idx(options, 8, value, "mimo_weighted_layers_cap_r13_s::rel_weight_eight_layers_r13_e_");
}
// MIMO-UE-Parameters-v13e0 ::= SEQUENCE
SRSASN_CODE mimo_ue_params_v13e0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(mimo_weighted_layers_cap_r13_present, 1));
if (mimo_weighted_layers_cap_r13_present) {
HANDLE_CODE(mimo_weighted_layers_cap_r13.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE mimo_ue_params_v13e0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(mimo_weighted_layers_cap_r13_present, 1));
if (mimo_weighted_layers_cap_r13_present) {
HANDLE_CODE(mimo_weighted_layers_cap_r13.unpack(bref));
}
return SRSASN_SUCCESS;
}
void mimo_ue_params_v13e0_s::to_json(json_writer& j) const
{
j.start_obj();
if (mimo_weighted_layers_cap_r13_present) {
j.write_fieldname("mimo-WeightedLayersCapabilities-r13");
mimo_weighted_layers_cap_r13.to_json(j);
}
j.end_obj();
}
// MeasResult3EUTRA-r15 ::= SEQUENCE
SRSASN_CODE meas_result3_eutra_r15_s::pack(bit_ref& bref) const
{
bref.pack(ext, 1);
HANDLE_CODE(bref.pack(meas_result_serving_cell_r15_present, 1));
HANDLE_CODE(bref.pack(meas_result_neigh_cell_list_r15_present, 1));
HANDLE_CODE(pack_integer(bref, carrier_freq_r15, (uint32_t)0u, (uint32_t)262143u));
if (meas_result_serving_cell_r15_present) {
HANDLE_CODE(meas_result_serving_cell_r15.pack(bref));
}
if (meas_result_neigh_cell_list_r15_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_r15, 1, 8));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE meas_result3_eutra_r15_s::unpack(cbit_ref& bref)
{
bref.unpack(ext, 1);
HANDLE_CODE(bref.unpack(meas_result_serving_cell_r15_present, 1));
HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_r15_present, 1));
HANDLE_CODE(unpack_integer(carrier_freq_r15, bref, (uint32_t)0u, (uint32_t)262143u));
if (meas_result_serving_cell_r15_present) {
HANDLE_CODE(meas_result_serving_cell_r15.unpack(bref));
}
if (meas_result_neigh_cell_list_r15_present) {
HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cell_list_r15, bref, 1, 8));
}
return SRSASN_SUCCESS;
}
void meas_result3_eutra_r15_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_int("carrierFreq-r15", carrier_freq_r15);
if (meas_result_serving_cell_r15_present) {
j.write_fieldname("measResultServingCell-r15");
meas_result_serving_cell_r15.to_json(j);
}
if (meas_result_neigh_cell_list_r15_present) {
j.start_array("measResultNeighCellList-r15");
for (const auto& e1 : meas_result_neigh_cell_list_r15) {
e1.to_json(j);
}
j.end_array();
}
j.end_obj();
}
// MeasResultSCG-FailureMRDC-r15 ::= SEQUENCE
SRSASN_CODE meas_result_scg_fail_mrdc_r15_s::pack(bit_ref& bref) const
{
bref.pack(ext, 1);
HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_eutra_r15, 1, 8));
return SRSASN_SUCCESS;
}
SRSASN_CODE meas_result_scg_fail_mrdc_r15_s::unpack(cbit_ref& bref)
{
bref.unpack(ext, 1);
HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_eutra_r15, bref, 1, 8));
return SRSASN_SUCCESS;
}
void meas_result_scg_fail_mrdc_r15_s::to_json(json_writer& j) const
{
j.start_obj();
j.start_array("measResultFreqListEUTRA-r15");
for (const auto& e1 : meas_result_freq_list_eutra_r15) {
e1.to_json(j);
}
j.end_array();
j.end_obj();
}
// PhyLayerParameters-v13e0 ::= SEQUENCE
SRSASN_CODE phy_layer_params_v13e0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(mimo_ue_params_v13e0.pack(bref));
return SRSASN_SUCCESS;
}
SRSASN_CODE phy_layer_params_v13e0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(mimo_ue_params_v13e0.unpack(bref));
return SRSASN_SUCCESS;
}
void phy_layer_params_v13e0_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_fieldname("mimo-UE-Parameters-v13e0");
mimo_ue_params_v13e0.to_json(j);
j.end_obj();
}
std::string mbms_params_v1470_s::mbms_max_bw_r14_c_::types_opts::to_string() const
{
static const char* options[] = {"implicitValue", "explicitValue"};
return convert_enum_idx(options, 2, value, "mbms_params_v1470_s::mbms_max_bw_r14_c_::types");
}
// UE-EUTRA-Capability-v13e0b-IEs ::= SEQUENCE
SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
HANDLE_CODE(phy_layer_params_v13e0.pack(bref));
return SRSASN_SUCCESS;
}
SRSASN_CODE ue_eutra_cap_v13e0b_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
HANDLE_CODE(phy_layer_params_v13e0.unpack(bref));
return SRSASN_SUCCESS;
}
void ue_eutra_cap_v13e0b_ies_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_fieldname("phyLayerParameters-v13e0");
phy_layer_params_v13e0.to_json(j);
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// SCG-Config-v12i0b-IEs ::= SEQUENCE
SRSASN_CODE scg_cfg_v12i0b_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(scg_radio_cfg_v12i0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (scg_radio_cfg_v12i0_present) {
HANDLE_CODE(scg_radio_cfg_v12i0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_cfg_v12i0b_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(scg_radio_cfg_v12i0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (scg_radio_cfg_v12i0_present) {
HANDLE_CODE(scg_radio_cfg_v12i0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void scg_cfg_v12i0b_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (scg_radio_cfg_v12i0_present) {
j.write_fieldname("scg-RadioConfig-v12i0");
scg_radio_cfg_v12i0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
std::string scg_cfg_r12_s::crit_exts_c_::c1_c_::types_opts::to_string() const
{
static const char* options[] = {

@ -58,6 +58,33 @@ void bcch_bch_msg_s::to_json(json_writer& j) const
j.end_array();
}
// SIB-Type-v12j0 ::= ENUMERATED
std::string sib_type_v12j0_opts::to_string() const
{
static const char* options[] = {"sibType19-v1250",
"sibType20-v1310",
"sibType21-v1430",
"sibType24-v1530",
"sibType25-v1530",
"sibType26-v1530",
"spare10",
"spare9",
"spare8",
"spare7",
"spare6",
"spare5",
"spare4",
"spare3",
"spare2",
"spare1"};
return convert_enum_idx(options, 16, value, "sib_type_v12j0_e");
}
uint8_t sib_type_v12j0_opts::to_number() const
{
static const uint8_t options[] = {19, 20, 21, 24, 25, 26};
return map_enum_number(options, 6, value, "sib_type_v12j0_e");
}
// NS-PmaxValue-v10l0 ::= SEQUENCE
SRSASN_CODE ns_pmax_value_v10l0_s::pack(bit_ref& bref) const
{
@ -152,6 +179,67 @@ void ns_pmax_value_r10_s::to_json(json_writer& j) const
j.end_obj();
}
// SchedulingInfo-v12j0 ::= SEQUENCE
SRSASN_CODE sched_info_v12j0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(sib_map_info_v12j0_present, 1));
if (sib_map_info_v12j0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_v12j0, 1, 31));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE sched_info_v12j0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(sib_map_info_v12j0_present, 1));
if (sib_map_info_v12j0_present) {
HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_v12j0, bref, 1, 31));
}
return SRSASN_SUCCESS;
}
void sched_info_v12j0_s::to_json(json_writer& j) const
{
j.start_obj();
if (sib_map_info_v12j0_present) {
j.start_array("sib-MappingInfo-v12j0");
for (const auto& e1 : sib_map_info_v12j0) {
j.write_str(e1.to_string());
}
j.end_array();
}
j.end_obj();
}
// SchedulingInfoExt-r12 ::= SEQUENCE
SRSASN_CODE sched_info_ext_r12_s::pack(bit_ref& bref) const
{
HANDLE_CODE(si_periodicity_r12.pack(bref));
HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_r12, 1, 31));
return SRSASN_SUCCESS;
}
SRSASN_CODE sched_info_ext_r12_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(si_periodicity_r12.unpack(bref));
HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_r12, bref, 1, 31));
return SRSASN_SUCCESS;
}
void sched_info_ext_r12_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_str("si-Periodicity-r12", si_periodicity_r12.to_string());
j.start_array("sib-MappingInfo-r12");
for (const auto& e1 : sib_map_info_r12) {
j.write_str(e1.to_string());
}
j.end_array();
j.end_obj();
}
// BandClassInfoCDMA2000 ::= SEQUENCE
SRSASN_CODE band_class_info_cdma2000_s::pack(bit_ref& bref) const
{
@ -341,6 +429,39 @@ void multi_band_info_v9e0_s::to_json(json_writer& j) const
j.end_obj();
}
// NS-PmaxValueNR-r15 ::= SEQUENCE
SRSASN_CODE ns_pmax_value_nr_r15_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(add_pmax_nr_r15_present, 1));
if (add_pmax_nr_r15_present) {
HANDLE_CODE(pack_integer(bref, add_pmax_nr_r15, (int8_t)-30, (int8_t)33));
}
HANDLE_CODE(pack_integer(bref, add_spec_emission_nr_r15, (uint8_t)0u, (uint8_t)7u));
return SRSASN_SUCCESS;
}
SRSASN_CODE ns_pmax_value_nr_r15_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(add_pmax_nr_r15_present, 1));
if (add_pmax_nr_r15_present) {
HANDLE_CODE(unpack_integer(add_pmax_nr_r15, bref, (int8_t)-30, (int8_t)33));
}
HANDLE_CODE(unpack_integer(add_spec_emission_nr_r15, bref, (uint8_t)0u, (uint8_t)7u));
return SRSASN_SUCCESS;
}
void ns_pmax_value_nr_r15_s::to_json(json_writer& j) const
{
j.start_obj();
if (add_pmax_nr_r15_present) {
j.write_int("additionalPmaxNR-r15", add_pmax_nr_r15);
}
j.write_int("additionalSpectrumEmissionNR-r15", add_spec_emission_nr_r15);
j.end_obj();
}
// NeighCellCDMA2000-r11 ::= SEQUENCE
SRSASN_CODE neigh_cell_cdma2000_r11_s::pack(bit_ref& bref) const
{
@ -442,6 +563,62 @@ void redist_neigh_cell_r13_s::to_json(json_writer& j) const
j.end_obj();
}
// SystemInformationBlockType1-v12j0-IEs ::= SEQUENCE
SRSASN_CODE sib_type1_v12j0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(sched_info_list_v12j0_present, 1));
HANDLE_CODE(bref.pack(sched_info_list_ext_r12_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (sched_info_list_v12j0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list_v12j0, 1, 32));
}
if (sched_info_list_ext_r12_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list_ext_r12, 1, 32));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE sib_type1_v12j0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(sched_info_list_v12j0_present, 1));
HANDLE_CODE(bref.unpack(sched_info_list_ext_r12_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (sched_info_list_v12j0_present) {
HANDLE_CODE(unpack_dyn_seq_of(sched_info_list_v12j0, bref, 1, 32));
}
if (sched_info_list_ext_r12_present) {
HANDLE_CODE(unpack_dyn_seq_of(sched_info_list_ext_r12, bref, 1, 32));
}
return SRSASN_SUCCESS;
}
void sib_type1_v12j0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (sched_info_list_v12j0_present) {
j.start_array("schedulingInfoList-v12j0");
for (const auto& e1 : sched_info_list_v12j0) {
e1.to_json(j);
}
j.end_array();
}
if (sched_info_list_ext_r12_present) {
j.start_array("schedulingInfoListExt-r12");
for (const auto& e1 : sched_info_list_ext_r12) {
e1.to_json(j);
}
j.end_array();
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// SystemInformationBlockType2-v10n0-IEs ::= SEQUENCE
SRSASN_CODE sib_type2_v10n0_ies_s::pack(bit_ref& bref) const
{
@ -779,39 +956,6 @@ void inter_freq_neigh_cell_info_s::to_json(json_writer& j) const
j.end_obj();
}
// NS-PmaxValueNR-r15 ::= SEQUENCE
SRSASN_CODE ns_pmax_value_nr_r15_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(add_pmax_nr_r15_present, 1));
if (add_pmax_nr_r15_present) {
HANDLE_CODE(pack_integer(bref, add_pmax_nr_r15, (int8_t)-30, (int8_t)33));
}
HANDLE_CODE(pack_integer(bref, add_spec_emission_nr_r15, (uint8_t)0u, (uint8_t)7u));
return SRSASN_SUCCESS;
}
SRSASN_CODE ns_pmax_value_nr_r15_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(add_pmax_nr_r15_present, 1));
if (add_pmax_nr_r15_present) {
HANDLE_CODE(unpack_integer(add_pmax_nr_r15, bref, (int8_t)-30, (int8_t)33));
}
HANDLE_CODE(unpack_integer(add_spec_emission_nr_r15, bref, (uint8_t)0u, (uint8_t)7u));
return SRSASN_SUCCESS;
}
void ns_pmax_value_nr_r15_s::to_json(json_writer& j) const
{
j.start_obj();
if (add_pmax_nr_r15_present) {
j.write_int("additionalPmaxNR-r15", add_pmax_nr_r15);
}
j.write_int("additionalSpectrumEmissionNR-r15", add_spec_emission_nr_r15);
j.end_obj();
}
// PLMN-IdentityInfo2-r12 ::= CHOICE
void plmn_id_info2_r12_c::destroy_()
{
@ -927,6 +1071,48 @@ SRSASN_CODE plmn_id_info2_r12_c::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
// SystemInformationBlockType1-v10x0-IEs ::= SEQUENCE
SRSASN_CODE sib_type1_v10x0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE sib_type1_v10x0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void sib_type1_v10x0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
non_crit_ext.to_json(j);
}
j.end_obj();
}
// SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE
SRSASN_CODE sib_type2_v10m0_ies_s::pack(bit_ref& bref) const
{
@ -1619,6 +1805,9 @@ SRSASN_CODE sib_type1_v10l0_ies_s::pack(bit_ref& bref) const
if (multi_band_info_list_v10l0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10l0, 1, 8, SeqOfPacker<Packer>(1, 8, Packer())));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -1634,6 +1823,9 @@ SRSASN_CODE sib_type1_v10l0_ies_s::unpack(cbit_ref& bref)
if (multi_band_info_list_v10l0_present) {
HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10l0, bref, 1, 8, SeqOfPacker<Packer>(1, 8, Packer())));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -1660,8 +1852,7 @@ void sib_type1_v10l0_ies_s::to_json(json_writer& j) const
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
@ -1835,7 +2026,7 @@ SRSASN_CODE carrier_freq_nr_r15_s::pack(bit_ref& bref) const
HANDLE_CODE(pack_dyn_seq_of(bref, ns_pmax_list_nr_r15, 1, 8));
}
if (q_qual_min_r15_present) {
HANDLE_CODE(pack_integer(bref, q_qual_min_r15, (int8_t)-34, (int8_t)-3));
HANDLE_CODE(pack_integer(bref, q_qual_min_r15, (int8_t)-43, (int8_t)-12));
}
HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_r15, 1));
if (max_rs_idx_cell_qual_r15_present) {
@ -1845,6 +2036,32 @@ SRSASN_CODE carrier_freq_nr_r15_s::pack(bit_ref& bref) const
HANDLE_CODE(thresh_rs_idx_r15.pack(bref));
}
if (ext) {
ext_groups_packer_guard group_flags;
group_flags[0] |= multi_band_ns_pmax_list_nr_v1550.is_present();
group_flags[0] |= multi_band_ns_pmax_list_nr_sul_v1550.is_present();
group_flags[0] |= ssb_to_measure_r15.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(multi_band_ns_pmax_list_nr_v1550.is_present(), 1));
HANDLE_CODE(bref.pack(multi_band_ns_pmax_list_nr_sul_v1550.is_present(), 1));
HANDLE_CODE(bref.pack(ssb_to_measure_r15.is_present(), 1));
if (multi_band_ns_pmax_list_nr_v1550.is_present()) {
HANDLE_CODE(
pack_dyn_seq_of(bref, *multi_band_ns_pmax_list_nr_v1550, 1, 31, SeqOfPacker<Packer>(1, 8, Packer())));
}
if (multi_band_ns_pmax_list_nr_sul_v1550.is_present()) {
HANDLE_CODE(
pack_dyn_seq_of(bref, *multi_band_ns_pmax_list_nr_sul_v1550, 1, 32, SeqOfPacker<Packer>(1, 8, Packer())));
}
if (ssb_to_measure_r15.is_present()) {
HANDLE_CODE(ssb_to_measure_r15->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
SRSASN_CODE carrier_freq_nr_r15_s::unpack(cbit_ref& bref)
@ -1898,7 +2115,7 @@ SRSASN_CODE carrier_freq_nr_r15_s::unpack(cbit_ref& bref)
HANDLE_CODE(unpack_dyn_seq_of(ns_pmax_list_nr_r15, bref, 1, 8));
}
if (q_qual_min_r15_present) {
HANDLE_CODE(unpack_integer(q_qual_min_r15, bref, (int8_t)-34, (int8_t)-3));
HANDLE_CODE(unpack_integer(q_qual_min_r15, bref, (int8_t)-43, (int8_t)-12));
}
HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_r15, 1));
if (max_rs_idx_cell_qual_r15_present) {
@ -1908,6 +2125,35 @@ SRSASN_CODE carrier_freq_nr_r15_s::unpack(cbit_ref& bref)
HANDLE_CODE(thresh_rs_idx_r15.unpack(bref));
}
if (ext) {
ext_groups_unpacker_guard group_flags(1);
group_flags.unpack(bref);
if (group_flags[0]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool multi_band_ns_pmax_list_nr_v1550_present;
HANDLE_CODE(bref.unpack(multi_band_ns_pmax_list_nr_v1550_present, 1));
multi_band_ns_pmax_list_nr_v1550.set_present(multi_band_ns_pmax_list_nr_v1550_present);
bool multi_band_ns_pmax_list_nr_sul_v1550_present;
HANDLE_CODE(bref.unpack(multi_band_ns_pmax_list_nr_sul_v1550_present, 1));
multi_band_ns_pmax_list_nr_sul_v1550.set_present(multi_band_ns_pmax_list_nr_sul_v1550_present);
bool ssb_to_measure_r15_present;
HANDLE_CODE(bref.unpack(ssb_to_measure_r15_present, 1));
ssb_to_measure_r15.set_present(ssb_to_measure_r15_present);
if (multi_band_ns_pmax_list_nr_v1550.is_present()) {
HANDLE_CODE(
unpack_dyn_seq_of(*multi_band_ns_pmax_list_nr_v1550, bref, 1, 31, SeqOfPacker<Packer>(1, 8, Packer())));
}
if (multi_band_ns_pmax_list_nr_sul_v1550.is_present()) {
HANDLE_CODE(
unpack_dyn_seq_of(*multi_band_ns_pmax_list_nr_sul_v1550, bref, 1, 32, SeqOfPacker<Packer>(1, 8, Packer())));
}
if (ssb_to_measure_r15.is_present()) {
HANDLE_CODE(ssb_to_measure_r15->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
void carrier_freq_nr_r15_s::to_json(json_writer& j) const
@ -1975,6 +2221,34 @@ void carrier_freq_nr_r15_s::to_json(json_writer& j) const
j.write_fieldname("threshRS-Index-r15");
thresh_rs_idx_r15.to_json(j);
}
if (ext) {
if (multi_band_ns_pmax_list_nr_v1550.is_present()) {
j.start_array("multiBandNsPmaxListNR-v1550");
for (const auto& e1 : *multi_band_ns_pmax_list_nr_v1550) {
j.start_array();
for (const auto& e2 : e1) {
e2.to_json(j);
}
j.end_array();
}
j.end_array();
}
if (multi_band_ns_pmax_list_nr_sul_v1550.is_present()) {
j.start_array("multiBandNsPmaxListNR-SUL-v1550");
for (const auto& e1 : *multi_band_ns_pmax_list_nr_sul_v1550) {
j.start_array();
for (const auto& e2 : e1) {
e2.to_json(j);
}
j.end_array();
}
j.end_array();
}
if (ssb_to_measure_r15.is_present()) {
j.write_fieldname("ssb-ToMeasure-r15");
ssb_to_measure_r15->to_json(j);
}
}
j.end_obj();
}
@ -3257,17 +3531,17 @@ uint16_t mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_opts::to_n
std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_string() const
{
static const char* options[] = {"khz-7dot5", "khz-1dot25"};
static const char* options[] = {"kHz7dot5", "kHz1dot25"};
return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_");
}
float mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_number() const
{
static const float options[] = {-7.5, -1.25};
static const float options[] = {7.5, 1.25};
return map_enum_number(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_");
}
std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_number_string() const
{
static const char* options[] = {"-7.5", "-1.25"};
static const char* options[] = {"7.5", "1.25"};
return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_");
}
@ -7102,7 +7376,7 @@ SRSASN_CODE sib_type26_r15_s::pack(bit_ref& bref) const
HANDLE_CODE(bref.pack(sync_freq_list_r15_present, 1));
HANDLE_CODE(bref.pack(slss_tx_multi_freq_r15_present, 1));
HANDLE_CODE(bref.pack(v2x_freq_sel_cfg_list_r15_present, 1));
HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r14_present, 1));
HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r15_present, 1));
if (v2x_inter_freq_info_list_r15_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, v2x_inter_freq_info_list_r15, 0, 7));
@ -7119,10 +7393,17 @@ SRSASN_CODE sib_type26_r15_s::pack(bit_ref& bref) const
if (v2x_freq_sel_cfg_list_r15_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, v2x_freq_sel_cfg_list_r15, 1, 8));
}
if (thresh_s_rssi_cbr_r14_present) {
HANDLE_CODE(pack_integer(bref, thresh_s_rssi_cbr_r14, (uint8_t)0u, (uint8_t)45u));
if (thresh_s_rssi_cbr_r15_present) {
HANDLE_CODE(pack_integer(bref, thresh_s_rssi_cbr_r15, (uint8_t)0u, (uint8_t)45u));
}
if (ext) {
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
}
return SRSASN_SUCCESS;
}
SRSASN_CODE sib_type26_r15_s::unpack(cbit_ref& bref)
@ -7134,7 +7415,7 @@ SRSASN_CODE sib_type26_r15_s::unpack(cbit_ref& bref)
HANDLE_CODE(bref.unpack(sync_freq_list_r15_present, 1));
HANDLE_CODE(bref.unpack(slss_tx_multi_freq_r15_present, 1));
HANDLE_CODE(bref.unpack(v2x_freq_sel_cfg_list_r15_present, 1));
HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r14_present, 1));
HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r15_present, 1));
if (v2x_inter_freq_info_list_r15_present) {
HANDLE_CODE(unpack_dyn_seq_of(v2x_inter_freq_info_list_r15, bref, 0, 7));
@ -7151,10 +7432,17 @@ SRSASN_CODE sib_type26_r15_s::unpack(cbit_ref& bref)
if (v2x_freq_sel_cfg_list_r15_present) {
HANDLE_CODE(unpack_dyn_seq_of(v2x_freq_sel_cfg_list_r15, bref, 1, 8));
}
if (thresh_s_rssi_cbr_r14_present) {
HANDLE_CODE(unpack_integer(thresh_s_rssi_cbr_r14, bref, (uint8_t)0u, (uint8_t)45u));
if (thresh_s_rssi_cbr_r15_present) {
HANDLE_CODE(unpack_integer(thresh_s_rssi_cbr_r15, bref, (uint8_t)0u, (uint8_t)45u));
}
if (ext) {
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
}
return SRSASN_SUCCESS;
}
void sib_type26_r15_s::to_json(json_writer& j) const
@ -7195,8 +7483,13 @@ void sib_type26_r15_s::to_json(json_writer& j) const
}
j.end_array();
}
if (thresh_s_rssi_cbr_r14_present) {
j.write_int("threshS-RSSI-CBR-r14", thresh_s_rssi_cbr_r14);
if (thresh_s_rssi_cbr_r15_present) {
j.write_int("threshS-RSSI-CBR-r15", thresh_s_rssi_cbr_r15);
}
if (ext) {
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
}
j.end_obj();
}

@ -844,6 +844,43 @@ void rrc_conn_setup_v8a0_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// RRCEarlyDataComplete-v1590-IEs ::= SEQUENCE
SRSASN_CODE rrc_early_data_complete_v1590_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_early_data_complete_v1590_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void rrc_early_data_complete_v1590_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// RedirectedCarrierInfo-r15-IEs ::= CHOICE
void redirected_carrier_info_r15_ies_c::destroy_()
{
@ -1211,6 +1248,9 @@ SRSASN_CODE rrc_early_data_complete_r15_ies_s::pack(bit_ref& bref) const
if (redirected_carrier_info_r15_present) {
HANDLE_CODE(redirected_carrier_info_r15.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -1238,6 +1278,9 @@ SRSASN_CODE rrc_early_data_complete_r15_ies_s::unpack(cbit_ref& bref)
if (redirected_carrier_info_r15_present) {
HANDLE_CODE(redirected_carrier_info_r15.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -1264,8 +1307,7 @@ void rrc_early_data_complete_r15_ies_s::to_json(json_writer& j) const
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}

@ -617,6 +617,18 @@ void sl_tx_pool_to_add_mod_r14_s::to_json(json_writer& j) const
j.end_obj();
}
// SubframeAssignment-r15 ::= ENUMERATED
std::string sf_assign_r15_opts::to_string() const
{
static const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"};
return convert_enum_idx(options, 7, value, "sf_assign_r15_e");
}
uint8_t sf_assign_r15_opts::to_number() const
{
static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6};
return map_enum_number(options, 7, value, "sf_assign_r15_e");
}
// UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE
SRSASN_CODE ul_pwr_ctrl_common_ps_cell_r12_s::pack(bit_ref& bref) const
{
@ -1574,16 +1586,62 @@ SRSASN_CODE sl_disc_tx_res_r13_c::setup_c_::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
// SubframeAssignment-r15 ::= ENUMERATED
std::string sf_assign_r15_opts::to_string() const
// TDM-PatternConfig-r15 ::= CHOICE
void tdm_pattern_cfg_r15_c::set(types::options e)
{
static const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"};
return convert_enum_idx(options, 7, value, "sf_assign_r15_e");
type_ = e;
}
uint8_t sf_assign_r15_opts::to_number() const
void tdm_pattern_cfg_r15_c::to_json(json_writer& j) const
{
static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6};
return map_enum_number(options, 7, value, "sf_assign_r15_e");
j.start_obj();
switch (type_) {
case types::release:
break;
case types::setup:
j.write_fieldname("setup");
j.start_obj();
j.write_str("subframeAssignment-r15", c.sf_assign_r15.to_string());
j.write_int("harq-Offset-r15", c.harq_offset_r15);
j.end_obj();
break;
default:
log_invalid_choice_id(type_, "tdm_pattern_cfg_r15_c");
}
j.end_obj();
}
SRSASN_CODE tdm_pattern_cfg_r15_c::pack(bit_ref& bref) const
{
type_.pack(bref);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.sf_assign_r15.pack(bref));
HANDLE_CODE(pack_integer(bref, c.harq_offset_r15, (uint8_t)0u, (uint8_t)9u));
break;
default:
log_invalid_choice_id(type_, "tdm_pattern_cfg_r15_c");
return SRSASN_ERROR_ENCODE_FAIL;
}
return SRSASN_SUCCESS;
}
SRSASN_CODE tdm_pattern_cfg_r15_c::unpack(cbit_ref& bref)
{
types e;
e.unpack(bref);
set(e);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.sf_assign_r15.unpack(bref));
HANDLE_CODE(unpack_integer(c.harq_offset_r15, bref, (uint8_t)0u, (uint8_t)9u));
break;
default:
log_invalid_choice_id(type_, "tdm_pattern_cfg_r15_c");
return SRSASN_ERROR_DECODE_FAIL;
}
return SRSASN_SUCCESS;
}
// TunnelConfigLWIP-r13 ::= SEQUENCE
@ -2462,63 +2520,6 @@ SRSASN_CODE rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
void rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::set(types::options e)
{
type_ = e;
}
void rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::to_json(json_writer& j) const
{
j.start_obj();
switch (type_) {
case types::release:
break;
case types::setup:
j.write_fieldname("setup");
j.start_obj();
j.write_str("subframeAssignment-r15", c.sf_assign_r15.to_string());
j.write_int("harq-Offset-r15", c.harq_offset_r15);
j.end_obj();
break;
default:
log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_");
}
j.end_obj();
}
SRSASN_CODE rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::pack(bit_ref& bref) const
{
type_.pack(bref);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.sf_assign_r15.pack(bref));
HANDLE_CODE(pack_integer(bref, c.harq_offset_r15, (uint8_t)0u, (uint8_t)9u));
break;
default:
log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_");
return SRSASN_ERROR_ENCODE_FAIL;
}
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::unpack(cbit_ref& bref)
{
types e;
e.unpack(bref);
set(e);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.sf_assign_r15.unpack(bref));
HANDLE_CODE(unpack_integer(c.harq_offset_r15, bref, (uint8_t)0u, (uint8_t)9u));
break;
default:
log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_");
return SRSASN_ERROR_DECODE_FAIL;
}
return SRSASN_SUCCESS;
}
// SCG-Configuration-v13c0 ::= CHOICE
void scg_cfg_v13c0_c::set(types::options e)
{
@ -3894,6 +3895,35 @@ void rrc_conn_recfg_v1430_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// RRCConnectionRelease-v15b0-IEs ::= SEQUENCE
SRSASN_CODE rrc_conn_release_v15b0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(no_last_cell_upd_r15_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_conn_release_v15b0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(no_last_cell_upd_r15_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
return SRSASN_SUCCESS;
}
void rrc_conn_release_v15b0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (no_last_cell_upd_r15_present) {
j.write_str("noLastCellUpdate-r15", "true");
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// RadioResourceConfigDedicated-v1370 ::= SEQUENCE
SRSASN_CODE rr_cfg_ded_v1370_s::pack(bit_ref& bref) const
{
@ -3959,6 +3989,9 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::pack(bit_ref& bref) const
group_flags[2] |= pscell_to_add_mod_v1440.is_present();
group_flags[3] |= scell_group_to_release_list_scg_r15.is_present();
group_flags[3] |= scell_group_to_add_mod_list_scg_r15.is_present();
group_flags[4] |= meas_cfg_sn_r15.is_present();
group_flags[4] |= tdm_pattern_cfg_ne_dc_r15.is_present();
group_flags[5] |= p_max_eutra_r15_present;
group_flags.pack(bref);
if (group_flags[0]) {
@ -4001,6 +4034,26 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::pack(bit_ref& bref) const
HANDLE_CODE(pack_dyn_seq_of(bref, *scell_group_to_add_mod_list_scg_r15, 1, 4));
}
}
if (group_flags[4]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(meas_cfg_sn_r15.is_present(), 1));
HANDLE_CODE(bref.pack(tdm_pattern_cfg_ne_dc_r15.is_present(), 1));
if (meas_cfg_sn_r15.is_present()) {
HANDLE_CODE(meas_cfg_sn_r15->pack(bref));
}
if (tdm_pattern_cfg_ne_dc_r15.is_present()) {
HANDLE_CODE(tdm_pattern_cfg_ne_dc_r15->pack(bref));
}
}
if (group_flags[5]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(p_max_eutra_r15_present, 1));
if (p_max_eutra_r15_present) {
HANDLE_CODE(pack_integer(bref, p_max_eutra_r15, (int8_t)-30, (int8_t)33));
}
}
}
return SRSASN_SUCCESS;
}
@ -4030,7 +4083,7 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(4);
ext_groups_unpacker_guard group_flags(6);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -4085,6 +4138,30 @@ SRSASN_CODE scg_cfg_part_scg_r12_s::unpack(cbit_ref& bref)
HANDLE_CODE(unpack_dyn_seq_of(*scell_group_to_add_mod_list_scg_r15, bref, 1, 4));
}
}
if (group_flags[4]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool meas_cfg_sn_r15_present;
HANDLE_CODE(bref.unpack(meas_cfg_sn_r15_present, 1));
meas_cfg_sn_r15.set_present(meas_cfg_sn_r15_present);
bool tdm_pattern_cfg_ne_dc_r15_present;
HANDLE_CODE(bref.unpack(tdm_pattern_cfg_ne_dc_r15_present, 1));
tdm_pattern_cfg_ne_dc_r15.set_present(tdm_pattern_cfg_ne_dc_r15_present);
if (meas_cfg_sn_r15.is_present()) {
HANDLE_CODE(meas_cfg_sn_r15->unpack(bref));
}
if (tdm_pattern_cfg_ne_dc_r15.is_present()) {
HANDLE_CODE(tdm_pattern_cfg_ne_dc_r15->unpack(bref));
}
}
if (group_flags[5]) {
varlength_field_unpack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.unpack(p_max_eutra_r15_present, 1));
if (p_max_eutra_r15_present) {
HANDLE_CODE(unpack_integer(p_max_eutra_r15, bref, (int8_t)-30, (int8_t)33));
}
}
}
return SRSASN_SUCCESS;
}
@ -4157,6 +4234,17 @@ void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const
}
j.end_array();
}
if (meas_cfg_sn_r15.is_present()) {
j.write_fieldname("measConfigSN-r15");
meas_cfg_sn_r15->to_json(j);
}
if (tdm_pattern_cfg_ne_dc_r15.is_present()) {
j.write_fieldname("tdm-PatternConfigNE-DC-r15");
tdm_pattern_cfg_ne_dc_r15->to_json(j);
}
if (p_max_eutra_r15_present) {
j.write_int("p-MaxEUTRA-r15", p_max_eutra_r15);
}
}
j.end_obj();
}
@ -4366,7 +4454,7 @@ SRSASN_CODE rrc_inactive_cfg_r15_s::pack(bit_ref& bref) const
HANDLE_CODE(bref.pack(ran_notif_area_info_r15_present, 1));
HANDLE_CODE(bref.pack(periodic_rnau_timer_r15_present, 1));
HANDLE_CODE(bref.pack(next_hop_chaining_count_r15_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(dummy_present, 1));
HANDLE_CODE(full_i_rnti_r15.pack(bref));
HANDLE_CODE(short_i_rnti_r15.pack(bref));
@ -4391,7 +4479,7 @@ SRSASN_CODE rrc_inactive_cfg_r15_s::unpack(cbit_ref& bref)
HANDLE_CODE(bref.unpack(ran_notif_area_info_r15_present, 1));
HANDLE_CODE(bref.unpack(periodic_rnau_timer_r15_present, 1));
HANDLE_CODE(bref.unpack(next_hop_chaining_count_r15_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(dummy_present, 1));
HANDLE_CODE(full_i_rnti_r15.unpack(bref));
HANDLE_CODE(short_i_rnti_r15.unpack(bref));
@ -4428,8 +4516,8 @@ void rrc_inactive_cfg_r15_s::to_json(json_writer& j) const
if (next_hop_chaining_count_r15_present) {
j.write_int("nextHopChainingCount-r15", next_hop_chaining_count_r15);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
if (dummy_present) {
j.write_fieldname("dummy");
j.start_obj();
j.end_obj();
}
@ -4622,6 +4710,9 @@ SRSASN_CODE rrc_conn_release_v1540_ies_s::pack(bit_ref& bref) const
if (wait_time_present) {
HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -4633,6 +4724,9 @@ SRSASN_CODE rrc_conn_release_v1540_ies_s::unpack(cbit_ref& bref)
if (wait_time_present) {
HANDLE_CODE(unpack_integer(wait_time, bref, (uint8_t)1u, (uint8_t)16u));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -4644,8 +4738,7 @@ void rrc_conn_release_v1540_ies_s::to_json(json_writer& j) const
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
@ -8082,7 +8175,7 @@ void other_cfg_r9_s::meas_cfg_app_layer_r15_c_::to_json(json_writer& j) const
j.write_fieldname("setup");
j.start_obj();
j.write_str("measConfigAppLayerContainer-r15", c.meas_cfg_app_layer_container_r15.to_string());
j.write_str("serviceType", c.service_type.to_string());
j.write_str("serviceType-r15", c.service_type_r15.to_string());
j.end_obj();
break;
default:
@ -8098,7 +8191,7 @@ SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::pack(bit_ref& bref) const
break;
case types::setup:
HANDLE_CODE(c.meas_cfg_app_layer_container_r15.pack(bref));
HANDLE_CODE(c.service_type.pack(bref));
HANDLE_CODE(c.service_type_r15.pack(bref));
break;
default:
log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_");
@ -8116,7 +8209,7 @@ SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::unpack(cbit_ref& bref)
break;
case types::setup:
HANDLE_CODE(c.meas_cfg_app_layer_container_r15.unpack(bref));
HANDLE_CODE(c.service_type.unpack(bref));
HANDLE_CODE(c.service_type_r15.unpack(bref));
break;
default:
log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_");
@ -8125,10 +8218,11 @@ SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
std::string other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_opts::to_string() const
std::string other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_r15_opts::to_string() const
{
static const char* options[] = {"qoe", "qoemtsi", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"};
return convert_enum_idx(options, 8, value, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_e_");
return convert_enum_idx(
options, 8, value, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_r15_e_");
}
// RRCConnectionReconfiguration-v1020-IEs ::= SEQUENCE

@ -67,8 +67,8 @@ void scg_cfg_v13c0_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// SCG-Config-v12x0-IEs ::= SEQUENCE
SRSASN_CODE scg_cfg_v12x0_ies_s::pack(bit_ref& bref) const
// SCG-Config-v12i0a-IEs ::= SEQUENCE
SRSASN_CODE scg_cfg_v12i0a_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
@ -82,7 +82,7 @@ SRSASN_CODE scg_cfg_v12x0_ies_s::pack(bit_ref& bref) const
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_cfg_v12x0_ies_s::unpack(cbit_ref& bref)
SRSASN_CODE scg_cfg_v12i0a_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
@ -96,7 +96,7 @@ SRSASN_CODE scg_cfg_v12x0_ies_s::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
void scg_cfg_v12x0_ies_s::to_json(json_writer& j) const
void scg_cfg_v12i0a_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
@ -152,6 +152,53 @@ void scg_cfg_r12_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// AS-Config-v1550 ::= SEQUENCE
SRSASN_CODE as_cfg_v1550_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(tdm_pattern_cfg_r15_present, 1));
HANDLE_CODE(bref.pack(p_max_eutra_r15_present, 1));
if (tdm_pattern_cfg_r15_present) {
HANDLE_CODE(tdm_pattern_cfg_r15.sf_assign_r15.pack(bref));
HANDLE_CODE(pack_integer(bref, tdm_pattern_cfg_r15.harq_offset_r15, (uint8_t)0u, (uint8_t)9u));
}
if (p_max_eutra_r15_present) {
HANDLE_CODE(pack_integer(bref, p_max_eutra_r15, (int8_t)-30, (int8_t)33));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE as_cfg_v1550_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(tdm_pattern_cfg_r15_present, 1));
HANDLE_CODE(bref.unpack(p_max_eutra_r15_present, 1));
if (tdm_pattern_cfg_r15_present) {
HANDLE_CODE(tdm_pattern_cfg_r15.sf_assign_r15.unpack(bref));
HANDLE_CODE(unpack_integer(tdm_pattern_cfg_r15.harq_offset_r15, bref, (uint8_t)0u, (uint8_t)9u));
}
if (p_max_eutra_r15_present) {
HANDLE_CODE(unpack_integer(p_max_eutra_r15, bref, (int8_t)-30, (int8_t)33));
}
return SRSASN_SUCCESS;
}
void as_cfg_v1550_s::to_json(json_writer& j) const
{
j.start_obj();
if (tdm_pattern_cfg_r15_present) {
j.write_fieldname("tdm-PatternConfig-r15");
j.start_obj();
j.write_str("subframeAssignment-r15", tdm_pattern_cfg_r15.sf_assign_r15.to_string());
j.write_int("harq-Offset-r15", tdm_pattern_cfg_r15.harq_offset_r15);
j.end_obj();
}
if (p_max_eutra_r15_present) {
j.write_int("p-MaxEUTRA-r15", p_max_eutra_r15);
}
j.end_obj();
}
// AS-ConfigNR-r15 ::= SEQUENCE
SRSASN_CODE as_cfg_nr_r15_s::pack(bit_ref& bref) const
{
@ -204,6 +251,22 @@ void as_cfg_nr_r15_s::to_json(json_writer& j) const
j.end_obj();
}
// AS-ConfigNR-v1570 ::= SEQUENCE
SRSASN_CODE as_cfg_nr_v1570_s::pack(bit_ref& bref) const
{
return SRSASN_SUCCESS;
}
SRSASN_CODE as_cfg_nr_v1570_s::unpack(cbit_ref& bref)
{
return SRSASN_SUCCESS;
}
void as_cfg_nr_v1570_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_str("sourceSCG-ConfiguredNR-r15", "true");
j.end_obj();
}
// SCG-Config-r12 ::= SEQUENCE
SRSASN_CODE scg_cfg_r12_s::pack(bit_ref& bref) const
{
@ -443,6 +506,8 @@ SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const
group_flags[1] |= source_scell_cfg_list_r10.is_present();
group_flags[2] |= source_cfg_scg_r12.is_present();
group_flags[3] |= as_cfg_nr_r15.is_present();
group_flags[4] |= as_cfg_v1550.is_present();
group_flags[5] |= as_cfg_nr_v1570.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -478,6 +543,22 @@ SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const
HANDLE_CODE(as_cfg_nr_r15->pack(bref));
}
}
if (group_flags[4]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(as_cfg_v1550.is_present(), 1));
if (as_cfg_v1550.is_present()) {
HANDLE_CODE(as_cfg_v1550->pack(bref));
}
}
if (group_flags[5]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(as_cfg_nr_v1570.is_present(), 1));
if (as_cfg_nr_v1570.is_present()) {
HANDLE_CODE(as_cfg_nr_v1570->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -495,7 +576,7 @@ SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref)
HANDLE_CODE(unpack_integer(source_dl_carrier_freq, bref, (uint32_t)0u, (uint32_t)65535u));
if (ext) {
ext_groups_unpacker_guard group_flags(4);
ext_groups_unpacker_guard group_flags(6);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -537,6 +618,26 @@ SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref)
HANDLE_CODE(as_cfg_nr_r15->unpack(bref));
}
}
if (group_flags[4]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool as_cfg_v1550_present;
HANDLE_CODE(bref.unpack(as_cfg_v1550_present, 1));
as_cfg_v1550.set_present(as_cfg_v1550_present);
if (as_cfg_v1550.is_present()) {
HANDLE_CODE(as_cfg_v1550->unpack(bref));
}
}
if (group_flags[5]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool as_cfg_nr_v1570_present;
HANDLE_CODE(bref.unpack(as_cfg_nr_v1570_present, 1));
as_cfg_nr_v1570.set_present(as_cfg_nr_v1570_present);
if (as_cfg_nr_v1570.is_present()) {
HANDLE_CODE(as_cfg_nr_v1570->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -580,6 +681,14 @@ void as_cfg_s::to_json(json_writer& j) const
j.write_fieldname("as-ConfigNR-r15");
as_cfg_nr_r15->to_json(j);
}
if (as_cfg_v1550.is_present()) {
j.write_fieldname("as-Config-v1550");
as_cfg_v1550->to_json(j);
}
if (as_cfg_nr_v1570.is_present()) {
j.write_fieldname("as-ConfigNR-v1570");
as_cfg_nr_v1570->to_json(j);
}
}
j.end_obj();
}

File diff suppressed because it is too large Load Diff

@ -9786,10 +9786,10 @@ void spucch_cfg_r15_c::to_json(json_writer& j) const
if (c.two_ant_port_activ_spucch_format1a1b_r15_present) {
j.write_str("twoAntennaPortActivatedSPUCCH-Format1a1b-r15", "true");
}
j.write_fieldname("twoAntennaPortActivatedSPUCCH-Format3-r15");
j.write_fieldname("dummy");
j.start_obj();
j.start_array("n3SPUCCH-AN-List-r15");
for (const auto& e1 : c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15) {
for (const auto& e1 : c.dummy.n3_spucch_an_list_r15) {
j.write_int(e1);
}
j.end_array();
@ -9813,8 +9813,7 @@ SRSASN_CODE spucch_cfg_r15_c::pack(bit_ref& bref) const
if (c.spucch_set_r15_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, c.spucch_set_r15, 1, 4));
}
HANDLE_CODE(pack_dyn_seq_of(
bref, c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15, 1, 4, integer_packer<uint16_t>(0, 549)));
HANDLE_CODE(pack_dyn_seq_of(bref, c.dummy.n3_spucch_an_list_r15, 1, 4, integer_packer<uint16_t>(0, 549)));
break;
default:
log_invalid_choice_id(type_, "spucch_cfg_r15_c");
@ -9836,8 +9835,7 @@ SRSASN_CODE spucch_cfg_r15_c::unpack(cbit_ref& bref)
if (c.spucch_set_r15_present) {
HANDLE_CODE(unpack_dyn_seq_of(c.spucch_set_r15, bref, 1, 4));
}
HANDLE_CODE(unpack_dyn_seq_of(
c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15, bref, 1, 4, integer_packer<uint16_t>(0, 549)));
HANDLE_CODE(unpack_dyn_seq_of(c.dummy.n3_spucch_an_list_r15, bref, 1, 4, integer_packer<uint16_t>(0, 549)));
break;
default:
log_invalid_choice_id(type_, "spucch_cfg_r15_c");
@ -9851,8 +9849,7 @@ bool spucch_cfg_r15_c::operator==(const spucch_cfg_r15_c& other) const
(not c.spucch_set_r15_present or c.spucch_set_r15 == other.c.spucch_set_r15) and
c.two_ant_port_activ_spucch_format1a1b_r15_present ==
other.c.two_ant_port_activ_spucch_format1a1b_r15_present and
c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15 ==
other.c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15;
c.dummy.n3_spucch_an_list_r15 == other.c.dummy.n3_spucch_an_list_r15;
}
// SRS-CC-SetIndex-r14 ::= SEQUENCE
@ -15751,6 +15748,81 @@ bool phys_cfg_ded_stti_r15_c::operator==(const phys_cfg_ded_stti_r15_c& other) c
(not c.short_tti_r15_present or c.short_tti_r15 == other.c.short_tti_r15);
}
// SPUCCH-Config-v1550 ::= CHOICE
void spucch_cfg_v1550_c::set(types::options e)
{
type_ = e;
}
void spucch_cfg_v1550_c::to_json(json_writer& j) const
{
j.start_obj();
switch (type_) {
case types::release:
break;
case types::setup:
j.write_fieldname("setup");
j.start_obj();
j.write_fieldname("twoAntennaPortActivatedSPUCCH-Format3-v1550");
j.start_obj();
j.start_array("n3SPUCCH-AN-List-v1550");
for (const auto& e1 : c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550) {
j.write_int(e1);
}
j.end_array();
j.end_obj();
j.end_obj();
break;
default:
log_invalid_choice_id(type_, "spucch_cfg_v1550_c");
}
j.end_obj();
}
SRSASN_CODE spucch_cfg_v1550_c::pack(bit_ref& bref) const
{
type_.pack(bref);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(pack_dyn_seq_of(bref,
c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550,
1,
4,
integer_packer<uint16_t>(0, 549)));
break;
default:
log_invalid_choice_id(type_, "spucch_cfg_v1550_c");
return SRSASN_ERROR_ENCODE_FAIL;
}
return SRSASN_SUCCESS;
}
SRSASN_CODE spucch_cfg_v1550_c::unpack(cbit_ref& bref)
{
types e;
e.unpack(bref);
set(e);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(unpack_dyn_seq_of(c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550,
bref,
1,
4,
integer_packer<uint16_t>(0, 549)));
break;
default:
log_invalid_choice_id(type_, "spucch_cfg_v1550_c");
return SRSASN_ERROR_DECODE_FAIL;
}
return SRSASN_SUCCESS;
}
bool spucch_cfg_v1550_c::operator==(const spucch_cfg_v1550_c& other) const
{
return type() == other.type() and c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550 ==
other.c.two_ant_port_activ_spucch_format3_v1550.n3_spucch_an_list_v1550;
}
// SRS-TPC-PDCCH-Config-r14 ::= CHOICE
void srs_tpc_pdcch_cfg_r14_c::set(types::options e)
{
@ -17266,6 +17338,7 @@ SRSASN_CODE phys_cfg_ded_s::pack(bit_ref& bref) const
group_flags[10] |= ul_pwr_ctrl_ded_v1530.is_present();
group_flags[10] |= semi_static_cfi_cfg_r15.is_present();
group_flags[10] |= blind_pdsch_repeat_cfg_r15.is_present();
group_flags[11] |= spucch_cfg_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -17602,6 +17675,14 @@ SRSASN_CODE phys_cfg_ded_s::pack(bit_ref& bref) const
HANDLE_CODE(blind_pdsch_repeat_cfg_r15->pack(bref));
}
}
if (group_flags[11]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(spucch_cfg_v1550.is_present(), 1));
if (spucch_cfg_v1550.is_present()) {
HANDLE_CODE(spucch_cfg_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -17651,7 +17732,7 @@ SRSASN_CODE phys_cfg_ded_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(11);
ext_groups_unpacker_guard group_flags(12);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -18128,6 +18209,16 @@ SRSASN_CODE phys_cfg_ded_s::unpack(cbit_ref& bref)
HANDLE_CODE(blind_pdsch_repeat_cfg_r15->unpack(bref));
}
}
if (group_flags[11]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool spucch_cfg_v1550_present;
HANDLE_CODE(bref.unpack(spucch_cfg_v1550_present, 1));
spucch_cfg_v1550.set_present(spucch_cfg_v1550_present);
if (spucch_cfg_v1550.is_present()) {
HANDLE_CODE(spucch_cfg_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -18494,6 +18585,10 @@ void phys_cfg_ded_s::to_json(json_writer& j) const
j.write_fieldname("blindPDSCH-Repetition-Config-r15");
blind_pdsch_repeat_cfg_r15->to_json(j);
}
if (spucch_cfg_v1550.is_present()) {
j.write_fieldname("spucch-Config-v1550");
spucch_cfg_v1550->to_json(j);
}
}
j.end_obj();
}

@ -3633,6 +3633,42 @@ uint16_t wus_cfg_r15_s::time_offset_e_drx_long_r15_opts::to_number() const
return map_enum_number(options, 2, value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_");
}
// WUS-Config-v1560 ::= SEQUENCE
SRSASN_CODE wus_cfg_v1560_s::pack(bit_ref& bref) const
{
HANDLE_CODE(pwr_boost_r15.pack(bref));
return SRSASN_SUCCESS;
}
SRSASN_CODE wus_cfg_v1560_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(pwr_boost_r15.unpack(bref));
return SRSASN_SUCCESS;
}
void wus_cfg_v1560_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_str("powerBoost-r15", pwr_boost_r15.to_string());
j.end_obj();
}
std::string wus_cfg_v1560_s::pwr_boost_r15_opts::to_string() const
{
static const char* options[] = {"dB0", "dB1dot8", "dB3", "dB4dot8"};
return convert_enum_idx(options, 4, value, "wus_cfg_v1560_s::pwr_boost_r15_e_");
}
float wus_cfg_v1560_s::pwr_boost_r15_opts::to_number() const
{
static const float options[] = {0.0, 1.8, 3.0, 4.8};
return map_enum_number(options, 4, value, "wus_cfg_v1560_s::pwr_boost_r15_e_");
}
std::string wus_cfg_v1560_s::pwr_boost_r15_opts::to_number_string() const
{
static const char* options[] = {"0", "1.8", "3", "4.8"};
return convert_enum_idx(options, 4, value, "wus_cfg_v1560_s::pwr_boost_r15_e_");
}
// RadioResourceConfigCommonSIB ::= SEQUENCE
SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const
{
@ -3668,6 +3704,7 @@ SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const
group_flags[5] |= wus_cfg_r15.is_present();
group_flags[5] |= high_speed_cfg_v1530.is_present();
group_flags[6] |= ul_pwr_ctrl_common_v1540.is_present();
group_flags[7] |= wus_cfg_v1560.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -3770,6 +3807,14 @@ SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const
HANDLE_CODE(ul_pwr_ctrl_common_v1540->pack(bref));
}
}
if (group_flags[7]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(wus_cfg_v1560.is_present(), 1));
if (wus_cfg_v1560.is_present()) {
HANDLE_CODE(wus_cfg_v1560->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -3788,7 +3833,7 @@ SRSASN_CODE rr_cfg_common_sib_s::unpack(cbit_ref& bref)
HANDLE_CODE(ul_cp_len.unpack(bref));
if (ext) {
ext_groups_unpacker_guard group_flags(7);
ext_groups_unpacker_guard group_flags(8);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -3927,6 +3972,16 @@ SRSASN_CODE rr_cfg_common_sib_s::unpack(cbit_ref& bref)
HANDLE_CODE(ul_pwr_ctrl_common_v1540->unpack(bref));
}
}
if (group_flags[7]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool wus_cfg_v1560_present;
HANDLE_CODE(bref.unpack(wus_cfg_v1560_present, 1));
wus_cfg_v1560.set_present(wus_cfg_v1560_present);
if (wus_cfg_v1560.is_present()) {
HANDLE_CODE(wus_cfg_v1560->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -4025,6 +4080,10 @@ void rr_cfg_common_sib_s::to_json(json_writer& j) const
j.write_fieldname("uplinkPowerControlCommon-v1540");
ul_pwr_ctrl_common_v1540->to_json(j);
}
if (wus_cfg_v1560.is_present()) {
j.write_fieldname("wus-Config-v1560");
wus_cfg_v1560->to_json(j);
}
}
j.end_obj();
}

@ -410,7 +410,7 @@ SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const
group_flags[2] |= bit_rate_query_prohibit_timer_r14_present;
group_flags[3] |= allowed_tti_lens_r15.is_present();
group_flags[3] |= lc_ch_sr_restrict_r15.is_present();
group_flags[3] |= chl_access_prio_r15.is_present();
group_flags[3] |= ch_access_prio_r15.is_present();
group_flags[3] |= lch_cell_restrict_r15_present;
group_flags.pack(bref);
@ -444,7 +444,7 @@ SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const
HANDLE_CODE(bref.pack(allowed_tti_lens_r15.is_present(), 1));
HANDLE_CODE(bref.pack(lc_ch_sr_restrict_r15.is_present(), 1));
HANDLE_CODE(bref.pack(chl_access_prio_r15.is_present(), 1));
HANDLE_CODE(bref.pack(ch_access_prio_r15.is_present(), 1));
HANDLE_CODE(bref.pack(lch_cell_restrict_r15_present, 1));
if (allowed_tti_lens_r15.is_present()) {
HANDLE_CODE(allowed_tti_lens_r15->pack(bref));
@ -452,8 +452,8 @@ SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const
if (lc_ch_sr_restrict_r15.is_present()) {
HANDLE_CODE(lc_ch_sr_restrict_r15->pack(bref));
}
if (chl_access_prio_r15.is_present()) {
HANDLE_CODE(chl_access_prio_r15->pack(bref));
if (ch_access_prio_r15.is_present()) {
HANDLE_CODE(ch_access_prio_r15->pack(bref));
}
if (lch_cell_restrict_r15_present) {
HANDLE_CODE(lch_cell_restrict_r15.pack(bref));
@ -515,9 +515,9 @@ SRSASN_CODE lc_ch_cfg_s::unpack(cbit_ref& bref)
bool lc_ch_sr_restrict_r15_present;
HANDLE_CODE(bref.unpack(lc_ch_sr_restrict_r15_present, 1));
lc_ch_sr_restrict_r15.set_present(lc_ch_sr_restrict_r15_present);
bool chl_access_prio_r15_present;
HANDLE_CODE(bref.unpack(chl_access_prio_r15_present, 1));
chl_access_prio_r15.set_present(chl_access_prio_r15_present);
bool ch_access_prio_r15_present;
HANDLE_CODE(bref.unpack(ch_access_prio_r15_present, 1));
ch_access_prio_r15.set_present(ch_access_prio_r15_present);
HANDLE_CODE(bref.unpack(lch_cell_restrict_r15_present, 1));
if (allowed_tti_lens_r15.is_present()) {
HANDLE_CODE(allowed_tti_lens_r15->unpack(bref));
@ -525,8 +525,8 @@ SRSASN_CODE lc_ch_cfg_s::unpack(cbit_ref& bref)
if (lc_ch_sr_restrict_r15.is_present()) {
HANDLE_CODE(lc_ch_sr_restrict_r15->unpack(bref));
}
if (chl_access_prio_r15.is_present()) {
HANDLE_CODE(chl_access_prio_r15->unpack(bref));
if (ch_access_prio_r15.is_present()) {
HANDLE_CODE(ch_access_prio_r15->unpack(bref));
}
if (lch_cell_restrict_r15_present) {
HANDLE_CODE(lch_cell_restrict_r15.unpack(bref));
@ -570,9 +570,9 @@ void lc_ch_cfg_s::to_json(json_writer& j) const
j.write_fieldname("logicalChannelSR-Restriction-r15");
lc_ch_sr_restrict_r15->to_json(j);
}
if (chl_access_prio_r15.is_present()) {
j.write_fieldname("channellAccessPriority-r15");
chl_access_prio_r15->to_json(j);
if (ch_access_prio_r15.is_present()) {
j.write_fieldname("channelAccessPriority-r15");
ch_access_prio_r15->to_json(j);
}
if (lch_cell_restrict_r15_present) {
j.write_str("lch-CellRestriction-r15", lch_cell_restrict_r15.to_string());
@ -601,8 +601,8 @@ bool lc_ch_cfg_s::operator==(const lc_ch_cfg_s& other) const
(not allowed_tti_lens_r15.is_present() or *allowed_tti_lens_r15 == *other.allowed_tti_lens_r15) and
lc_ch_sr_restrict_r15.is_present() == other.lc_ch_sr_restrict_r15.is_present() and
(not lc_ch_sr_restrict_r15.is_present() or *lc_ch_sr_restrict_r15 == *other.lc_ch_sr_restrict_r15) and
chl_access_prio_r15.is_present() == other.chl_access_prio_r15.is_present() and
(not chl_access_prio_r15.is_present() or *chl_access_prio_r15 == *other.chl_access_prio_r15) and
ch_access_prio_r15.is_present() == other.ch_access_prio_r15.is_present() and
(not ch_access_prio_r15.is_present() or *ch_access_prio_r15 == *other.ch_access_prio_r15) and
lch_cell_restrict_r15_present == other.lch_cell_restrict_r15_present and
(not lch_cell_restrict_r15_present or lch_cell_restrict_r15 == other.lch_cell_restrict_r15)));
}
@ -782,11 +782,11 @@ std::string lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_opts::to_string() const
return convert_enum_idx(options, 2, value, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_e_");
}
void lc_ch_cfg_s::chl_access_prio_r15_c_::set(types::options e)
void lc_ch_cfg_s::ch_access_prio_r15_c_::set(types::options e)
{
type_ = e;
}
void lc_ch_cfg_s::chl_access_prio_r15_c_::to_json(json_writer& j) const
void lc_ch_cfg_s::ch_access_prio_r15_c_::to_json(json_writer& j) const
{
j.start_obj();
switch (type_) {
@ -796,11 +796,11 @@ void lc_ch_cfg_s::chl_access_prio_r15_c_::to_json(json_writer& j) const
j.write_int("setup", c);
break;
default:
log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_");
log_invalid_choice_id(type_, "lc_ch_cfg_s::ch_access_prio_r15_c_");
}
j.end_obj();
}
SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::pack(bit_ref& bref) const
SRSASN_CODE lc_ch_cfg_s::ch_access_prio_r15_c_::pack(bit_ref& bref) const
{
type_.pack(bref);
switch (type_) {
@ -810,12 +810,12 @@ SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::pack(bit_ref& bref) const
HANDLE_CODE(pack_integer(bref, c, (uint8_t)1u, (uint8_t)4u));
break;
default:
log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_");
log_invalid_choice_id(type_, "lc_ch_cfg_s::ch_access_prio_r15_c_");
return SRSASN_ERROR_ENCODE_FAIL;
}
return SRSASN_SUCCESS;
}
SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::unpack(cbit_ref& bref)
SRSASN_CODE lc_ch_cfg_s::ch_access_prio_r15_c_::unpack(cbit_ref& bref)
{
types e;
e.unpack(bref);
@ -827,12 +827,12 @@ SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::unpack(cbit_ref& bref)
HANDLE_CODE(unpack_integer(c, bref, (uint8_t)1u, (uint8_t)4u));
break;
default:
log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_");
log_invalid_choice_id(type_, "lc_ch_cfg_s::ch_access_prio_r15_c_");
return SRSASN_ERROR_DECODE_FAIL;
}
return SRSASN_SUCCESS;
}
bool lc_ch_cfg_s::chl_access_prio_r15_c_::operator==(const chl_access_prio_r15_c_& other) const
bool lc_ch_cfg_s::ch_access_prio_r15_c_::operator==(const ch_access_prio_r15_c_& other) const
{
return type() == other.type() and c == other.c;
}
@ -1340,7 +1340,7 @@ uint8_t crs_assist_info_r13_s::ant_ports_count_r13_opts::to_number() const
// CRS-AssistanceInfo-r15 ::= SEQUENCE
SRSASN_CODE crs_assist_info_r15_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_minus15_present, 1));
HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_r15_present, 1));
HANDLE_CODE(pack_integer(bref, pci_r15, (uint16_t)0u, (uint16_t)503u));
@ -1348,7 +1348,7 @@ SRSASN_CODE crs_assist_info_r15_s::pack(bit_ref& bref) const
}
SRSASN_CODE crs_assist_info_r15_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_minus15_present, 1));
HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_r15_present, 1));
HANDLE_CODE(unpack_integer(pci_r15, bref, (uint16_t)0u, (uint16_t)503u));
@ -1358,15 +1358,14 @@ void crs_assist_info_r15_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_int("physCellId-r15", pci_r15);
if (crs_intf_mitig_enabled_minus15_present) {
j.write_str("crs-IntfMitigEnabled-15", "enabled");
if (crs_intf_mitig_enabled_r15_present) {
j.write_str("crs-IntfMitigEnabled-r15", "enabled");
}
j.end_obj();
}
bool crs_assist_info_r15_s::operator==(const crs_assist_info_r15_s& other) const
{
return pci_r15 == other.pci_r15 and
crs_intf_mitig_enabled_minus15_present == other.crs_intf_mitig_enabled_minus15_present;
return pci_r15 == other.pci_r15 and crs_intf_mitig_enabled_r15_present == other.crs_intf_mitig_enabled_r15_present;
}
// NeighCellsInfo-r12 ::= SEQUENCE
@ -3992,7 +3991,7 @@ SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const
group_flags[2] |= lwa_wlan_ac_r14_present;
group_flags[3] |= rlc_cfg_v1510.is_present();
group_flags[4] |= rlc_cfg_v1530.is_present();
group_flags[4] |= rlc_bearer_cfg_dupl_r15.is_present();
group_flags[4] |= rlc_bearer_cfg_secondary_r15.is_present();
group_flags[4] |= lc_ch_id_r15_present;
group_flags.pack(bref);
@ -4053,13 +4052,13 @@ SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(rlc_cfg_v1530.is_present(), 1));
HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15.is_present(), 1));
HANDLE_CODE(bref.pack(rlc_bearer_cfg_secondary_r15.is_present(), 1));
HANDLE_CODE(bref.pack(lc_ch_id_r15_present, 1));
if (rlc_cfg_v1530.is_present()) {
HANDLE_CODE(rlc_cfg_v1530->pack(bref));
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref));
if (rlc_bearer_cfg_secondary_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_secondary_r15->pack(bref));
}
if (lc_ch_id_r15_present) {
HANDLE_CODE(pack_integer(bref, lc_ch_id_r15, (uint8_t)32u, (uint8_t)38u));
@ -4165,15 +4164,15 @@ SRSASN_CODE drb_to_add_mod_s::unpack(cbit_ref& bref)
bool rlc_cfg_v1530_present;
HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1));
rlc_cfg_v1530.set_present(rlc_cfg_v1530_present);
bool rlc_bearer_cfg_dupl_r15_present;
HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1));
rlc_bearer_cfg_dupl_r15.set_present(rlc_bearer_cfg_dupl_r15_present);
bool rlc_bearer_cfg_secondary_r15_present;
HANDLE_CODE(bref.unpack(rlc_bearer_cfg_secondary_r15_present, 1));
rlc_bearer_cfg_secondary_r15.set_present(rlc_bearer_cfg_secondary_r15_present);
HANDLE_CODE(bref.unpack(lc_ch_id_r15_present, 1));
if (rlc_cfg_v1530.is_present()) {
HANDLE_CODE(rlc_cfg_v1530->unpack(bref));
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref));
if (rlc_bearer_cfg_secondary_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_secondary_r15->unpack(bref));
}
if (lc_ch_id_r15_present) {
HANDLE_CODE(unpack_integer(lc_ch_id_r15, bref, (uint8_t)32u, (uint8_t)38u));
@ -4243,9 +4242,9 @@ void drb_to_add_mod_s::to_json(json_writer& j) const
j.write_fieldname("rlc-Config-v1530");
rlc_cfg_v1530->to_json(j);
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
j.write_fieldname("rlc-BearerConfigDupl-r15");
rlc_bearer_cfg_dupl_r15->to_json(j);
if (rlc_bearer_cfg_secondary_r15.is_present()) {
j.write_fieldname("rlc-BearerConfigSecondary-r15");
rlc_bearer_cfg_secondary_r15->to_json(j);
}
if (lc_ch_id_r15_present) {
j.write_int("logicalChannelIdentity-r15", lc_ch_id_r15);
@ -4283,8 +4282,9 @@ bool drb_to_add_mod_s::operator==(const drb_to_add_mod_s& other) const
(not rlc_cfg_v1510.is_present() or *rlc_cfg_v1510 == *other.rlc_cfg_v1510) and
rlc_cfg_v1530.is_present() == other.rlc_cfg_v1530.is_present() and
(not rlc_cfg_v1530.is_present() or *rlc_cfg_v1530 == *other.rlc_cfg_v1530) and
rlc_bearer_cfg_dupl_r15.is_present() == other.rlc_bearer_cfg_dupl_r15.is_present() and
(not rlc_bearer_cfg_dupl_r15.is_present() or *rlc_bearer_cfg_dupl_r15 == *other.rlc_bearer_cfg_dupl_r15) and
rlc_bearer_cfg_secondary_r15.is_present() == other.rlc_bearer_cfg_secondary_r15.is_present() and
(not rlc_bearer_cfg_secondary_r15.is_present() or
*rlc_bearer_cfg_secondary_r15 == *other.rlc_bearer_cfg_secondary_r15) and
lc_ch_id_r15_present == other.lc_ch_id_r15_present and
(not lc_ch_id_r15_present or lc_ch_id_r15 == other.lc_ch_id_r15)));
}
@ -5584,8 +5584,9 @@ SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const
ext_groups_packer_guard group_flags;
group_flags[0] |= pdcp_ver_change_r15_present;
group_flags[0] |= rlc_cfg_v1530.is_present();
group_flags[0] |= rlc_bearer_cfg_dupl_r15.is_present();
group_flags[0] |= rlc_bearer_cfg_secondary_r15.is_present();
group_flags[0] |= srb_id_v1530_present;
group_flags[1] |= rlc_cfg_v1560.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -5593,18 +5594,26 @@ SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const
HANDLE_CODE(bref.pack(pdcp_ver_change_r15_present, 1));
HANDLE_CODE(bref.pack(rlc_cfg_v1530.is_present(), 1));
HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15.is_present(), 1));
HANDLE_CODE(bref.pack(rlc_bearer_cfg_secondary_r15.is_present(), 1));
HANDLE_CODE(bref.pack(srb_id_v1530_present, 1));
if (rlc_cfg_v1530.is_present()) {
HANDLE_CODE(rlc_cfg_v1530->pack(bref));
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref));
if (rlc_bearer_cfg_secondary_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_secondary_r15->pack(bref));
}
if (srb_id_v1530_present) {
HANDLE_CODE(pack_integer(bref, srb_id_v1530, (uint8_t)4u, (uint8_t)4u));
}
}
if (group_flags[1]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(rlc_cfg_v1560.is_present(), 1));
if (rlc_cfg_v1560.is_present()) {
HANDLE_CODE(rlc_cfg_v1560->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -5623,7 +5632,7 @@ SRSASN_CODE srb_to_add_mod_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(1);
ext_groups_unpacker_guard group_flags(2);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -5633,20 +5642,30 @@ SRSASN_CODE srb_to_add_mod_s::unpack(cbit_ref& bref)
bool rlc_cfg_v1530_present;
HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1));
rlc_cfg_v1530.set_present(rlc_cfg_v1530_present);
bool rlc_bearer_cfg_dupl_r15_present;
HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1));
rlc_bearer_cfg_dupl_r15.set_present(rlc_bearer_cfg_dupl_r15_present);
bool rlc_bearer_cfg_secondary_r15_present;
HANDLE_CODE(bref.unpack(rlc_bearer_cfg_secondary_r15_present, 1));
rlc_bearer_cfg_secondary_r15.set_present(rlc_bearer_cfg_secondary_r15_present);
HANDLE_CODE(bref.unpack(srb_id_v1530_present, 1));
if (rlc_cfg_v1530.is_present()) {
HANDLE_CODE(rlc_cfg_v1530->unpack(bref));
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref));
if (rlc_bearer_cfg_secondary_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_secondary_r15->unpack(bref));
}
if (srb_id_v1530_present) {
HANDLE_CODE(unpack_integer(srb_id_v1530, bref, (uint8_t)4u, (uint8_t)4u));
}
}
if (group_flags[1]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool rlc_cfg_v1560_present;
HANDLE_CODE(bref.unpack(rlc_cfg_v1560_present, 1));
rlc_cfg_v1560.set_present(rlc_cfg_v1560_present);
if (rlc_cfg_v1560.is_present()) {
HANDLE_CODE(rlc_cfg_v1560->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -5670,13 +5689,17 @@ void srb_to_add_mod_s::to_json(json_writer& j) const
j.write_fieldname("rlc-Config-v1530");
rlc_cfg_v1530->to_json(j);
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
j.write_fieldname("rlc-BearerConfigDupl-r15");
rlc_bearer_cfg_dupl_r15->to_json(j);
if (rlc_bearer_cfg_secondary_r15.is_present()) {
j.write_fieldname("rlc-BearerConfigSecondary-r15");
rlc_bearer_cfg_secondary_r15->to_json(j);
}
if (srb_id_v1530_present) {
j.write_int("srb-Identity-v1530", srb_id_v1530);
}
if (rlc_cfg_v1560.is_present()) {
j.write_fieldname("rlc-Config-v1560");
rlc_cfg_v1560->to_json(j);
}
}
j.end_obj();
}
@ -5685,14 +5708,16 @@ bool srb_to_add_mod_s::operator==(const srb_to_add_mod_s& other) const
return ext == other.ext and srb_id == other.srb_id and rlc_cfg_present == other.rlc_cfg_present and
(not rlc_cfg_present or rlc_cfg == other.rlc_cfg) and lc_ch_cfg_present == other.lc_ch_cfg_present and
(not lc_ch_cfg_present or lc_ch_cfg == other.lc_ch_cfg) and
(not ext or
(pdcp_ver_change_r15_present == other.pdcp_ver_change_r15_present and
rlc_cfg_v1530.is_present() == other.rlc_cfg_v1530.is_present() and
(not rlc_cfg_v1530.is_present() or *rlc_cfg_v1530 == *other.rlc_cfg_v1530) and
rlc_bearer_cfg_dupl_r15.is_present() == other.rlc_bearer_cfg_dupl_r15.is_present() and
(not rlc_bearer_cfg_dupl_r15.is_present() or *rlc_bearer_cfg_dupl_r15 == *other.rlc_bearer_cfg_dupl_r15) and
srb_id_v1530_present == other.srb_id_v1530_present and
(not srb_id_v1530_present or srb_id_v1530 == other.srb_id_v1530)));
(not ext or (pdcp_ver_change_r15_present == other.pdcp_ver_change_r15_present and
rlc_cfg_v1530.is_present() == other.rlc_cfg_v1530.is_present() and
(not rlc_cfg_v1530.is_present() or *rlc_cfg_v1530 == *other.rlc_cfg_v1530) and
rlc_bearer_cfg_secondary_r15.is_present() == other.rlc_bearer_cfg_secondary_r15.is_present() and
(not rlc_bearer_cfg_secondary_r15.is_present() or
*rlc_bearer_cfg_secondary_r15 == *other.rlc_bearer_cfg_secondary_r15) and
srb_id_v1530_present == other.srb_id_v1530_present and
(not srb_id_v1530_present or srb_id_v1530 == other.srb_id_v1530) and
rlc_cfg_v1560.is_present() == other.rlc_cfg_v1560.is_present() and
(not rlc_cfg_v1560.is_present() or *rlc_cfg_v1560 == *other.rlc_cfg_v1560)));
}
void srb_to_add_mod_s::rlc_cfg_c_::set(types::options e)
@ -7997,8 +8022,8 @@ SRSASN_CODE rr_cfg_ded_s::pack(bit_ref& bref) const
group_flags[4] |= neigh_cells_crs_info_r13.is_present();
group_flags[4] |= rlf_timers_and_consts_r13.is_present();
group_flags[5] |= sps_cfg_v1430.is_present();
group_flags[6] |= srb_to_add_mod_ext_list_r15.is_present();
group_flags[6] |= srb_to_release_ext_list_r15_present;
group_flags[6] |= srb_to_add_mod_list_ext_r15.is_present();
group_flags[6] |= srb_to_release_list_ext_r15_present;
group_flags[6] |= sps_cfg_v1530.is_present();
group_flags[6] |= crs_intf_mitig_cfg_r15.is_present();
group_flags[6] |= neigh_cells_crs_info_r15.is_present();
@ -8063,19 +8088,19 @@ SRSASN_CODE rr_cfg_ded_s::pack(bit_ref& bref) const
if (group_flags[6]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(srb_to_add_mod_ext_list_r15.is_present(), 1));
HANDLE_CODE(bref.pack(srb_to_release_ext_list_r15_present, 1));
HANDLE_CODE(bref.pack(srb_to_add_mod_list_ext_r15.is_present(), 1));
HANDLE_CODE(bref.pack(srb_to_release_list_ext_r15_present, 1));
HANDLE_CODE(bref.pack(sps_cfg_v1530.is_present(), 1));
HANDLE_CODE(bref.pack(crs_intf_mitig_cfg_r15.is_present(), 1));
HANDLE_CODE(bref.pack(neigh_cells_crs_info_r15.is_present(), 1));
HANDLE_CODE(bref.pack(drb_to_add_mod_list_r15.is_present(), 1));
HANDLE_CODE(bref.pack(drb_to_release_list_r15.is_present(), 1));
HANDLE_CODE(bref.pack(dummy.is_present(), 1));
if (srb_to_add_mod_ext_list_r15.is_present()) {
HANDLE_CODE(pack_fixed_seq_of(bref, &(*srb_to_add_mod_ext_list_r15)[0], srb_to_add_mod_ext_list_r15->size()));
if (srb_to_add_mod_list_ext_r15.is_present()) {
HANDLE_CODE(pack_fixed_seq_of(bref, &(*srb_to_add_mod_list_ext_r15)[0], srb_to_add_mod_list_ext_r15->size()));
}
if (srb_to_release_ext_list_r15_present) {
HANDLE_CODE(pack_integer(bref, srb_to_release_ext_list_r15, (uint8_t)4u, (uint8_t)4u));
if (srb_to_release_list_ext_r15_present) {
HANDLE_CODE(pack_integer(bref, srb_to_release_list_ext_r15, (uint8_t)4u, (uint8_t)4u));
}
if (sps_cfg_v1530.is_present()) {
HANDLE_CODE(sps_cfg_v1530->pack(bref));
@ -8209,10 +8234,10 @@ SRSASN_CODE rr_cfg_ded_s::unpack(cbit_ref& bref)
if (group_flags[6]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool srb_to_add_mod_ext_list_r15_present;
HANDLE_CODE(bref.unpack(srb_to_add_mod_ext_list_r15_present, 1));
srb_to_add_mod_ext_list_r15.set_present(srb_to_add_mod_ext_list_r15_present);
HANDLE_CODE(bref.unpack(srb_to_release_ext_list_r15_present, 1));
bool srb_to_add_mod_list_ext_r15_present;
HANDLE_CODE(bref.unpack(srb_to_add_mod_list_ext_r15_present, 1));
srb_to_add_mod_list_ext_r15.set_present(srb_to_add_mod_list_ext_r15_present);
HANDLE_CODE(bref.unpack(srb_to_release_list_ext_r15_present, 1));
bool sps_cfg_v1530_present;
HANDLE_CODE(bref.unpack(sps_cfg_v1530_present, 1));
sps_cfg_v1530.set_present(sps_cfg_v1530_present);
@ -8231,11 +8256,11 @@ SRSASN_CODE rr_cfg_ded_s::unpack(cbit_ref& bref)
bool dummy_present;
HANDLE_CODE(bref.unpack(dummy_present, 1));
dummy.set_present(dummy_present);
if (srb_to_add_mod_ext_list_r15.is_present()) {
HANDLE_CODE(unpack_fixed_seq_of(&(*srb_to_add_mod_ext_list_r15)[0], bref, srb_to_add_mod_ext_list_r15->size()));
if (srb_to_add_mod_list_ext_r15.is_present()) {
HANDLE_CODE(unpack_fixed_seq_of(&(*srb_to_add_mod_list_ext_r15)[0], bref, srb_to_add_mod_list_ext_r15->size()));
}
if (srb_to_release_ext_list_r15_present) {
HANDLE_CODE(unpack_integer(srb_to_release_ext_list_r15, bref, (uint8_t)4u, (uint8_t)4u));
if (srb_to_release_list_ext_r15_present) {
HANDLE_CODE(unpack_integer(srb_to_release_list_ext_r15, bref, (uint8_t)4u, (uint8_t)4u));
}
if (sps_cfg_v1530.is_present()) {
HANDLE_CODE(sps_cfg_v1530->unpack(bref));
@ -8334,15 +8359,15 @@ void rr_cfg_ded_s::to_json(json_writer& j) const
j.write_fieldname("sps-Config-v1430");
sps_cfg_v1430->to_json(j);
}
if (srb_to_add_mod_ext_list_r15.is_present()) {
j.start_array("srb-ToAddModExtList-r15");
for (const auto& e1 : *srb_to_add_mod_ext_list_r15) {
if (srb_to_add_mod_list_ext_r15.is_present()) {
j.start_array("srb-ToAddModListExt-r15");
for (const auto& e1 : *srb_to_add_mod_list_ext_r15) {
e1.to_json(j);
}
j.end_array();
}
if (srb_to_release_ext_list_r15_present) {
j.write_int("srb-ToReleaseExtList-r15", srb_to_release_ext_list_r15);
if (srb_to_release_list_ext_r15_present) {
j.write_int("srb-ToReleaseListExt-r15", srb_to_release_list_ext_r15);
}
if (sps_cfg_v1530.is_present()) {
j.write_fieldname("sps-Config-v1530");
@ -8497,10 +8522,10 @@ void rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::to_json(json_writer& j)
{
j.start_obj();
switch (type_) {
case types::crs_intf_mitig_enabled_minus15:
case types::crs_intf_mitig_enabled:
break;
case types::crs_intf_mitig_num_prbs_r15:
j.write_str("crs-IntfMitigNumPRBs-r15", c.to_string());
case types::crs_intf_mitig_num_prbs:
j.write_str("crs-IntfMitigNumPRBs", c.to_string());
break;
default:
log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_");
@ -8511,9 +8536,9 @@ SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::pack(bit_ref& bre
{
type_.pack(bref);
switch (type_) {
case types::crs_intf_mitig_enabled_minus15:
case types::crs_intf_mitig_enabled:
break;
case types::crs_intf_mitig_num_prbs_r15:
case types::crs_intf_mitig_num_prbs:
HANDLE_CODE(c.pack(bref));
break;
default:
@ -8528,9 +8553,9 @@ SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::unpack(cbit_ref&
e.unpack(bref);
set(e);
switch (type_) {
case types::crs_intf_mitig_enabled_minus15:
case types::crs_intf_mitig_enabled:
break;
case types::crs_intf_mitig_num_prbs_r15:
case types::crs_intf_mitig_num_prbs:
HANDLE_CODE(c.unpack(bref));
break;
default:
@ -8540,17 +8565,17 @@ SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::unpack(cbit_ref&
return SRSASN_SUCCESS;
}
std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_opts::to_string() const
std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_opts::to_string() const
{
static const char* options[] = {"n6", "n24"};
return convert_enum_idx(
options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_");
options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_e_");
}
uint8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_opts::to_number() const
uint8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_opts::to_number() const
{
static const uint8_t options[] = {6, 24};
return map_enum_number(
options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_");
options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_e_");
}
// PDCCH-CandidateReductionValue-r14 ::= ENUMERATED
@ -11399,7 +11424,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const
group_flags[6] |= csi_rs_cfg_v1480.is_present();
group_flags[7] |= phys_cfg_ded_stti_r15.is_present();
group_flags[7] |= pdsch_cfg_ded_v1530.is_present();
group_flags[7] |= cqi_report_cfg_v1530.is_present();
group_flags[7] |= dummy.is_present();
group_flags[7] |= cqi_report_cfg_scell_r15.is_present();
group_flags[7] |= cqi_short_cfg_scell_r15.is_present();
group_flags[7] |= csi_rs_cfg_v1530.is_present();
@ -11408,6 +11433,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const
group_flags[7] |= pusch_cfg_ded_v1530.is_present();
group_flags[7] |= semi_static_cfi_cfg_r15.is_present();
group_flags[7] |= blind_pdsch_repeat_cfg_r15.is_present();
group_flags[8] |= spucch_cfg_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -11621,7 +11647,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const
HANDLE_CODE(bref.pack(phys_cfg_ded_stti_r15.is_present(), 1));
HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1530.is_present(), 1));
HANDLE_CODE(bref.pack(cqi_report_cfg_v1530.is_present(), 1));
HANDLE_CODE(bref.pack(dummy.is_present(), 1));
HANDLE_CODE(bref.pack(cqi_report_cfg_scell_r15.is_present(), 1));
HANDLE_CODE(bref.pack(cqi_short_cfg_scell_r15.is_present(), 1));
HANDLE_CODE(bref.pack(csi_rs_cfg_v1530.is_present(), 1));
@ -11636,8 +11662,8 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const
if (pdsch_cfg_ded_v1530.is_present()) {
HANDLE_CODE(pdsch_cfg_ded_v1530->pack(bref));
}
if (cqi_report_cfg_v1530.is_present()) {
HANDLE_CODE(cqi_report_cfg_v1530->pack(bref));
if (dummy.is_present()) {
HANDLE_CODE(dummy->pack(bref));
}
if (cqi_report_cfg_scell_r15.is_present()) {
HANDLE_CODE(cqi_report_cfg_scell_r15->pack(bref));
@ -11664,6 +11690,14 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const
HANDLE_CODE(blind_pdsch_repeat_cfg_r15->pack(bref));
}
}
if (group_flags[8]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(spucch_cfg_v1550.is_present(), 1));
if (spucch_cfg_v1550.is_present()) {
HANDLE_CODE(spucch_cfg_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -11723,7 +11757,7 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(8);
ext_groups_unpacker_guard group_flags(9);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -12027,9 +12061,9 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref)
bool pdsch_cfg_ded_v1530_present;
HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1530_present, 1));
pdsch_cfg_ded_v1530.set_present(pdsch_cfg_ded_v1530_present);
bool cqi_report_cfg_v1530_present;
HANDLE_CODE(bref.unpack(cqi_report_cfg_v1530_present, 1));
cqi_report_cfg_v1530.set_present(cqi_report_cfg_v1530_present);
bool dummy_present;
HANDLE_CODE(bref.unpack(dummy_present, 1));
dummy.set_present(dummy_present);
bool cqi_report_cfg_scell_r15_present;
HANDLE_CODE(bref.unpack(cqi_report_cfg_scell_r15_present, 1));
cqi_report_cfg_scell_r15.set_present(cqi_report_cfg_scell_r15_present);
@ -12060,8 +12094,8 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref)
if (pdsch_cfg_ded_v1530.is_present()) {
HANDLE_CODE(pdsch_cfg_ded_v1530->unpack(bref));
}
if (cqi_report_cfg_v1530.is_present()) {
HANDLE_CODE(cqi_report_cfg_v1530->unpack(bref));
if (dummy.is_present()) {
HANDLE_CODE(dummy->unpack(bref));
}
if (cqi_report_cfg_scell_r15.is_present()) {
HANDLE_CODE(cqi_report_cfg_scell_r15->unpack(bref));
@ -12088,6 +12122,16 @@ SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(cbit_ref& bref)
HANDLE_CODE(blind_pdsch_repeat_cfg_r15->unpack(bref));
}
}
if (group_flags[8]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool spucch_cfg_v1550_present;
HANDLE_CODE(bref.unpack(spucch_cfg_v1550_present, 1));
spucch_cfg_v1550.set_present(spucch_cfg_v1550_present);
if (spucch_cfg_v1550.is_present()) {
HANDLE_CODE(spucch_cfg_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -12365,9 +12409,9 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const
j.write_fieldname("pdsch-ConfigDedicated-v1530");
pdsch_cfg_ded_v1530->to_json(j);
}
if (cqi_report_cfg_v1530.is_present()) {
j.write_fieldname("cqi-ReportConfig-v1530");
cqi_report_cfg_v1530->to_json(j);
if (dummy.is_present()) {
j.write_fieldname("dummy");
dummy->to_json(j);
}
if (cqi_report_cfg_scell_r15.is_present()) {
j.write_fieldname("cqi-ReportConfigSCell-r15");
@ -12401,6 +12445,10 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const
j.write_fieldname("blindPDSCH-Repetition-Config-r15");
blind_pdsch_repeat_cfg_r15->to_json(j);
}
if (spucch_cfg_v1550.is_present()) {
j.write_fieldname("spucch-Config-v1550");
spucch_cfg_v1550->to_json(j);
}
}
j.end_obj();
}
@ -12560,8 +12608,7 @@ bool phys_cfg_ded_scell_r10_s::operator==(const phys_cfg_ded_scell_r10_s& other)
(not phys_cfg_ded_stti_r15.is_present() or *phys_cfg_ded_stti_r15 == *other.phys_cfg_ded_stti_r15) and
pdsch_cfg_ded_v1530.is_present() == other.pdsch_cfg_ded_v1530.is_present() and
(not pdsch_cfg_ded_v1530.is_present() or *pdsch_cfg_ded_v1530 == *other.pdsch_cfg_ded_v1530) and
cqi_report_cfg_v1530.is_present() == other.cqi_report_cfg_v1530.is_present() and
(not cqi_report_cfg_v1530.is_present() or *cqi_report_cfg_v1530 == *other.cqi_report_cfg_v1530) and
dummy.is_present() == other.dummy.is_present() and (not dummy.is_present() or *dummy == *other.dummy) and
cqi_report_cfg_scell_r15.is_present() == other.cqi_report_cfg_scell_r15.is_present() and
(not cqi_report_cfg_scell_r15.is_present() or
*cqi_report_cfg_scell_r15 == *other.cqi_report_cfg_scell_r15) and
@ -12580,7 +12627,9 @@ bool phys_cfg_ded_scell_r10_s::operator==(const phys_cfg_ded_scell_r10_s& other)
(not semi_static_cfi_cfg_r15.is_present() or *semi_static_cfi_cfg_r15 == *other.semi_static_cfi_cfg_r15) and
blind_pdsch_repeat_cfg_r15.is_present() == other.blind_pdsch_repeat_cfg_r15.is_present() and
(not blind_pdsch_repeat_cfg_r15.is_present() or
*blind_pdsch_repeat_cfg_r15 == *other.blind_pdsch_repeat_cfg_r15)));
*blind_pdsch_repeat_cfg_r15 == *other.blind_pdsch_repeat_cfg_r15) and
spucch_cfg_v1550.is_present() == other.spucch_cfg_v1550.is_present() and
(not spucch_cfg_v1550.is_present() or *spucch_cfg_v1550 == *other.spucch_cfg_v1550)));
}
void phys_cfg_ded_scell_r10_s::pucch_scell_c_::set(types::options e)
@ -13974,7 +14023,8 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::pack(bit_ref& bref) const
group_flags[0] |= rlc_cfg_v1430.is_present();
group_flags[1] |= lc_ch_id_scg_r15_present;
group_flags[1] |= rlc_cfg_v1530.is_present();
group_flags[1] |= rlc_bearer_cfg_dupl_r15.is_present();
group_flags[1] |= rlc_bearer_cfg_secondary_r15.is_present();
group_flags[2] |= rlc_cfg_v1560.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -13990,15 +14040,23 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::pack(bit_ref& bref) const
HANDLE_CODE(bref.pack(lc_ch_id_scg_r15_present, 1));
HANDLE_CODE(bref.pack(rlc_cfg_v1530.is_present(), 1));
HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15.is_present(), 1));
HANDLE_CODE(bref.pack(rlc_bearer_cfg_secondary_r15.is_present(), 1));
if (lc_ch_id_scg_r15_present) {
HANDLE_CODE(pack_integer(bref, lc_ch_id_scg_r15, (uint8_t)32u, (uint8_t)38u));
}
if (rlc_cfg_v1530.is_present()) {
HANDLE_CODE(rlc_cfg_v1530->pack(bref));
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref));
if (rlc_bearer_cfg_secondary_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_secondary_r15->pack(bref));
}
}
if (group_flags[2]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(rlc_cfg_v1560.is_present(), 1));
if (rlc_cfg_v1560.is_present()) {
HANDLE_CODE(rlc_cfg_v1560->pack(bref));
}
}
}
@ -14031,7 +14089,7 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(2);
ext_groups_unpacker_guard group_flags(3);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -14051,17 +14109,27 @@ SRSASN_CODE drb_to_add_mod_scg_r12_s::unpack(cbit_ref& bref)
bool rlc_cfg_v1530_present;
HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1));
rlc_cfg_v1530.set_present(rlc_cfg_v1530_present);
bool rlc_bearer_cfg_dupl_r15_present;
HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1));
rlc_bearer_cfg_dupl_r15.set_present(rlc_bearer_cfg_dupl_r15_present);
bool rlc_bearer_cfg_secondary_r15_present;
HANDLE_CODE(bref.unpack(rlc_bearer_cfg_secondary_r15_present, 1));
rlc_bearer_cfg_secondary_r15.set_present(rlc_bearer_cfg_secondary_r15_present);
if (lc_ch_id_scg_r15_present) {
HANDLE_CODE(unpack_integer(lc_ch_id_scg_r15, bref, (uint8_t)32u, (uint8_t)38u));
}
if (rlc_cfg_v1530.is_present()) {
HANDLE_CODE(rlc_cfg_v1530->unpack(bref));
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref));
if (rlc_bearer_cfg_secondary_r15.is_present()) {
HANDLE_CODE(rlc_bearer_cfg_secondary_r15->unpack(bref));
}
}
if (group_flags[2]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool rlc_cfg_v1560_present;
HANDLE_CODE(bref.unpack(rlc_cfg_v1560_present, 1));
rlc_cfg_v1560.set_present(rlc_cfg_v1560_present);
if (rlc_cfg_v1560.is_present()) {
HANDLE_CODE(rlc_cfg_v1560->unpack(bref));
}
}
}
@ -14102,9 +14170,13 @@ void drb_to_add_mod_scg_r12_s::to_json(json_writer& j) const
j.write_fieldname("rlc-Config-v1530");
rlc_cfg_v1530->to_json(j);
}
if (rlc_bearer_cfg_dupl_r15.is_present()) {
j.write_fieldname("rlc-BearerConfigDupl-r15");
rlc_bearer_cfg_dupl_r15->to_json(j);
if (rlc_bearer_cfg_secondary_r15.is_present()) {
j.write_fieldname("rlc-BearerConfigSecondary-r15");
rlc_bearer_cfg_secondary_r15->to_json(j);
}
if (rlc_cfg_v1560.is_present()) {
j.write_fieldname("rlc-Config-v1560");
rlc_cfg_v1560->to_json(j);
}
}
j.end_obj();
@ -14686,6 +14758,7 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::pack(bit_ref& bref) const
group_flags[0] |= drb_to_add_mod_list_scg_r15.is_present();
group_flags[1] |= srb_to_add_mod_list_scg_r15.is_present();
group_flags[1] |= srb_to_release_list_scg_r15.is_present();
group_flags[2] |= drb_to_release_list_scg_r15.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -14708,6 +14781,14 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::pack(bit_ref& bref) const
HANDLE_CODE(pack_dyn_seq_of(bref, *srb_to_release_list_scg_r15, 1, 2, integer_packer<uint8_t>(1, 2)));
}
}
if (group_flags[2]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(drb_to_release_list_scg_r15.is_present(), 1));
if (drb_to_release_list_scg_r15.is_present()) {
HANDLE_CODE(pack_dyn_seq_of(bref, *drb_to_release_list_scg_r15, 1, 15, integer_packer<uint8_t>(1, 32)));
}
}
}
return SRSASN_SUCCESS;
}
@ -14729,7 +14810,7 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(2);
ext_groups_unpacker_guard group_flags(3);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -14758,6 +14839,16 @@ SRSASN_CODE rr_cfg_ded_scg_r12_s::unpack(cbit_ref& bref)
HANDLE_CODE(unpack_dyn_seq_of(*srb_to_release_list_scg_r15, bref, 1, 2, integer_packer<uint8_t>(1, 2)));
}
}
if (group_flags[2]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool drb_to_release_list_scg_r15_present;
HANDLE_CODE(bref.unpack(drb_to_release_list_scg_r15_present, 1));
drb_to_release_list_scg_r15.set_present(drb_to_release_list_scg_r15_present);
if (drb_to_release_list_scg_r15.is_present()) {
HANDLE_CODE(unpack_dyn_seq_of(*drb_to_release_list_scg_r15, bref, 1, 15, integer_packer<uint8_t>(1, 32)));
}
}
}
return SRSASN_SUCCESS;
}
@ -14801,6 +14892,13 @@ void rr_cfg_ded_scg_r12_s::to_json(json_writer& j) const
}
j.end_array();
}
if (drb_to_release_list_scg_r15.is_present()) {
j.start_array("drb-ToReleaseListSCG-r15");
for (const auto& e1 : *drb_to_release_list_scg_r15) {
j.write_int(e1);
}
j.end_array();
}
}
j.end_obj();
}

@ -458,10 +458,10 @@ void sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::to_json(json_writer& j) c
{
j.start_obj();
switch (type_) {
case types::crs_intf_mitig_enabled_minus15:
case types::crs_intf_mitig_enabled:
break;
case types::crs_intf_mitig_num_prbs_r15:
j.write_str("crs-IntfMitigNumPRBs-r15", c.to_string());
case types::crs_intf_mitig_num_prbs:
j.write_str("crs-IntfMitigNumPRBs", c.to_string());
break;
default:
log_invalid_choice_id(type_, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_");
@ -472,9 +472,9 @@ SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::pack(bit_ref& bref
{
type_.pack(bref);
switch (type_) {
case types::crs_intf_mitig_enabled_minus15:
case types::crs_intf_mitig_enabled:
break;
case types::crs_intf_mitig_num_prbs_r15:
case types::crs_intf_mitig_num_prbs:
HANDLE_CODE(c.pack(bref));
break;
default:
@ -489,9 +489,9 @@ SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::unpack(cbit_ref& b
e.unpack(bref);
set(e);
switch (type_) {
case types::crs_intf_mitig_enabled_minus15:
case types::crs_intf_mitig_enabled:
break;
case types::crs_intf_mitig_num_prbs_r15:
case types::crs_intf_mitig_num_prbs:
HANDLE_CODE(c.unpack(bref));
break;
default:
@ -501,17 +501,17 @@ SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::unpack(cbit_ref& b
return SRSASN_SUCCESS;
}
std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_opts::to_string() const
std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_opts::to_string() const
{
static const char* options[] = {"n6", "n24"};
return convert_enum_idx(
options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_");
options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_e_");
}
uint8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_opts::to_number() const
uint8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_opts::to_number() const
{
static const uint8_t options[] = {6, 24};
return map_enum_number(
options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_");
options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_e_");
}
std::string sib_type1_v1530_ies_s::cell_barred_crs_r15_opts::to_string() const
@ -592,6 +592,18 @@ void cell_sel_info_ce1_v1360_s::to_json(json_writer& j) const
j.end_obj();
}
// SI-Periodicity-r12 ::= ENUMERATED
std::string si_periodicity_r12_opts::to_string() const
{
static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"};
return convert_enum_idx(options, 7, value, "si_periodicity_r12_e");
}
uint16_t si_periodicity_r12_opts::to_number() const
{
static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512};
return map_enum_number(options, 7, value, "si_periodicity_r12_e");
}
// SystemInformationBlockType1-v1450-IEs ::= SEQUENCE
SRSASN_CODE sib_type1_v1450_ies_s::pack(bit_ref& bref) const
{
@ -2481,17 +2493,6 @@ void sched_info_s::to_json(json_writer& j) const
j.end_obj();
}
std::string sched_info_s::si_periodicity_opts::to_string() const
{
static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"};
return convert_enum_idx(options, 7, value, "sched_info_s::si_periodicity_e_");
}
uint16_t sched_info_s::si_periodicity_opts::to_number() const
{
static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512};
return map_enum_number(options, 7, value, "sched_info_s::si_periodicity_e_");
}
// SystemInformationBlockType1-v920-IEs ::= SEQUENCE
SRSASN_CODE sib_type1_v920_ies_s::pack(bit_ref& bref) const
{

File diff suppressed because it is too large Load Diff

@ -288,6 +288,43 @@ SRSASN_CODE init_ue_id_minus5_gc_c::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
// RRCEarlyDataRequest-v1590-IEs ::= SEQUENCE
SRSASN_CODE rrc_early_data_request_v1590_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_early_data_request_v1590_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void rrc_early_data_request_v1590_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// ReestabUE-Identity ::= SEQUENCE
SRSASN_CODE reestab_ue_id_s::pack(bit_ref& bref) const
{
@ -737,6 +774,9 @@ SRSASN_CODE rrc_early_data_request_r15_ies_s::pack(bit_ref& bref) const
HANDLE_CODE(s_tmsi_r15.pack(bref));
HANDLE_CODE(establishment_cause_r15.pack(bref));
HANDLE_CODE(ded_info_nas_r15.pack(bref));
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -747,6 +787,9 @@ SRSASN_CODE rrc_early_data_request_r15_ies_s::unpack(cbit_ref& bref)
HANDLE_CODE(s_tmsi_r15.unpack(bref));
HANDLE_CODE(establishment_cause_r15.unpack(bref));
HANDLE_CODE(ded_info_nas_r15.unpack(bref));
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -759,15 +802,14 @@ void rrc_early_data_request_r15_ies_s::to_json(json_writer& j) const
j.write_str("dedicatedInfoNAS-r15", ded_info_nas_r15.to_string());
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
std::string rrc_early_data_request_r15_ies_s::establishment_cause_r15_opts::to_string() const
{
static const char* options[] = {"mo-Data-r15", "delayTolerantAccess-r15"};
static const char* options[] = {"mo-Data", "delayTolerantAccess"};
return convert_enum_idx(options, 2, value, "rrc_early_data_request_r15_ies_s::establishment_cause_r15_e_");
}

@ -230,7 +230,7 @@ void rrc_conn_setup_complete_v1540_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (gummei_type_v1540_present) {
j.write_str("gummei-Type-v1540", "mappedFrom5G");
j.write_str("gummei-Type-v1540", "mappedFrom5G-v1540");
}
if (guami_type_r15_present) {
j.write_str("guami-Type-r15", guami_type_r15.to_string());
@ -2174,40 +2174,6 @@ void ue_info_resp_v1250_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// FailureReportSCG-v12d0 ::= SEQUENCE
SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE fail_report_scg_v12d0_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1));
if (meas_result_neigh_cells_v12d0_present) {
HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8));
}
return SRSASN_SUCCESS;
}
void fail_report_scg_v12d0_s::to_json(json_writer& j) const
{
j.start_obj();
if (meas_result_neigh_cells_v12d0_present) {
j.start_array("measResultNeighCells-v12d0");
for (const auto& e1 : meas_result_neigh_cells_v12d0) {
e1.to_json(j);
}
j.end_array();
}
j.end_obj();
}
// IDC-SubframePattern-r11 ::= CHOICE
void idc_sf_pattern_r11_c::destroy_()
{
@ -4419,44 +4385,6 @@ SRSASN_CODE rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::unpack(cbit_ref&
return SRSASN_SUCCESS;
}
// SCGFailureInformation-v12d0-IEs ::= SEQUENCE
SRSASN_CODE scg_fail_info_v12d0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_fail_info_v12d0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (fail_report_scg_v12d0_present) {
HANDLE_CODE(fail_report_scg_v12d0.unpack(bref));
}
return SRSASN_SUCCESS;
}
void scg_fail_info_v12d0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (fail_report_scg_v12d0_present) {
j.write_fieldname("failureReportSCG-v12d0");
fail_report_scg_v12d0.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// SL-CommTxResourceReq-r12 ::= SEQUENCE
SRSASN_CODE sl_comm_tx_res_req_r12_s::pack(bit_ref& bref) const
{
@ -5079,6 +5007,43 @@ void mbms_interest_ind_v1310_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// MeasReportAppLayer-v1590-IEs ::= SEQUENCE
SRSASN_CODE meas_report_app_layer_v1590_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE meas_report_app_layer_v1590_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void meas_report_app_layer_v1590_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// ProximityIndication-v930-IEs ::= SEQUENCE
SRSASN_CODE proximity_ind_v930_ies_s::pack(bit_ref& bref) const
{
@ -6128,8 +6093,45 @@ void registered_mme_s::to_json(json_writer& j) const
j.end_obj();
}
// SCGFailureInformation-v1310-IEs ::= SEQUENCE
SRSASN_CODE scg_fail_info_v1310_ies_s::pack(bit_ref& bref) const
// SCGFailureInformation-v12d0a-IEs ::= SEQUENCE
SRSASN_CODE scg_fail_info_v12d0a_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_fail_info_v12d0a_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void scg_fail_info_v12d0a_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// SCGFailureInformationNR-v1590-IEs ::= SEQUENCE
SRSASN_CODE scg_fail_info_nr_v1590_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
@ -6140,7 +6142,7 @@ SRSASN_CODE scg_fail_info_v1310_ies_s::pack(bit_ref& bref) const
return SRSASN_SUCCESS;
}
SRSASN_CODE scg_fail_info_v1310_ies_s::unpack(cbit_ref& bref)
SRSASN_CODE scg_fail_info_nr_v1590_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
@ -6151,7 +6153,7 @@ SRSASN_CODE scg_fail_info_v1310_ies_s::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
void scg_fail_info_v1310_ies_s::to_json(json_writer& j) const
void scg_fail_info_nr_v1590_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
@ -7225,14 +7227,17 @@ void mbms_interest_ind_r11_ies_s::to_json(json_writer& j) const
SRSASN_CODE meas_report_app_layer_r15_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(meas_report_app_layer_container_r15_present, 1));
HANDLE_CODE(bref.pack(service_type_present, 1));
HANDLE_CODE(bref.pack(service_type_r15_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (meas_report_app_layer_container_r15_present) {
HANDLE_CODE(meas_report_app_layer_container_r15.pack(bref));
}
if (service_type_present) {
HANDLE_CODE(service_type.pack(bref));
if (service_type_r15_present) {
HANDLE_CODE(service_type_r15.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
@ -7240,14 +7245,17 @@ SRSASN_CODE meas_report_app_layer_r15_ies_s::pack(bit_ref& bref) const
SRSASN_CODE meas_report_app_layer_r15_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(meas_report_app_layer_container_r15_present, 1));
HANDLE_CODE(bref.unpack(service_type_present, 1));
HANDLE_CODE(bref.unpack(service_type_r15_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (meas_report_app_layer_container_r15_present) {
HANDLE_CODE(meas_report_app_layer_container_r15.unpack(bref));
}
if (service_type_present) {
HANDLE_CODE(service_type.unpack(bref));
if (service_type_r15_present) {
HANDLE_CODE(service_type_r15.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
@ -7258,21 +7266,20 @@ void meas_report_app_layer_r15_ies_s::to_json(json_writer& j) const
if (meas_report_app_layer_container_r15_present) {
j.write_str("measReportAppLayerContainer-r15", meas_report_app_layer_container_r15.to_string());
}
if (service_type_present) {
j.write_str("serviceType", service_type.to_string());
if (service_type_r15_present) {
j.write_str("serviceType-r15", service_type_r15.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
std::string meas_report_app_layer_r15_ies_s::service_type_opts::to_string() const
std::string meas_report_app_layer_r15_ies_s::service_type_r15_opts::to_string() const
{
static const char* options[] = {"qoe", "qoemtsi", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"};
return convert_enum_idx(options, 8, value, "meas_report_app_layer_r15_ies_s::service_type_e_");
return convert_enum_idx(options, 8, value, "meas_report_app_layer_r15_ies_s::service_type_r15_e_");
}
// ProximityIndication-r9-IEs ::= SEQUENCE
@ -7736,6 +7743,9 @@ SRSASN_CODE scg_fail_info_nr_r15_ies_s::pack(bit_ref& bref) const
if (fail_report_scg_nr_r15_present) {
HANDLE_CODE(fail_report_scg_nr_r15.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -7747,6 +7757,9 @@ SRSASN_CODE scg_fail_info_nr_r15_ies_s::unpack(cbit_ref& bref)
if (fail_report_scg_nr_r15_present) {
HANDLE_CODE(fail_report_scg_nr_r15.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -7759,8 +7772,7 @@ void scg_fail_info_nr_r15_ies_s::to_json(json_writer& j) const
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
@ -8573,9 +8585,6 @@ void fail_info_r15_s::to_json(json_writer& j) const
j.write_fieldname("failedLogicalChannelInfo-r15");
failed_lc_ch_info_r15.to_json(j);
}
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
j.end_obj();
}

@ -179,6 +179,42 @@ std::string carrier_freq_nb_r13_s::carrier_freq_offset_r13_opts::to_number_strin
return convert_enum_idx(options, 21, value, "carrier_freq_nb_r13_s::carrier_freq_offset_r13_e_");
}
// CarrierFreq-NB-v1550 ::= SEQUENCE
SRSASN_CODE carrier_freq_nb_v1550_s::pack(bit_ref& bref) const
{
HANDLE_CODE(carrier_freq_offset_v1550.pack(bref));
return SRSASN_SUCCESS;
}
SRSASN_CODE carrier_freq_nb_v1550_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(carrier_freq_offset_v1550.unpack(bref));
return SRSASN_SUCCESS;
}
void carrier_freq_nb_v1550_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_str("carrierFreqOffset-v1550", carrier_freq_offset_v1550.to_string());
j.end_obj();
}
std::string carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_opts::to_string() const
{
static const char* options[] = {"v-8dot5", "v-4dot5", "v3dot5", "v7dot5"};
return convert_enum_idx(options, 4, value, "carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_e_");
}
float carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_opts::to_number() const
{
static const float options[] = {-8.5, -4.5, 3.5, 7.5};
return map_enum_number(options, 4, value, "carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_e_");
}
std::string carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_opts::to_number_string() const
{
static const char* options[] = {"-8.5", "-4.5", "3.5", "7.5"};
return convert_enum_idx(options, 4, value, "carrier_freq_nb_v1550_s::carrier_freq_offset_v1550_e_");
}
// DL-AM-RLC-NB-r13 ::= SEQUENCE
SRSASN_CODE dl_am_rlc_nb_r13_s::pack(bit_ref& bref) const
{
@ -500,6 +536,7 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::pack(bit_ref& bref) const
ext_groups_packer_guard group_flags;
group_flags[0] |= nrs_pwr_offset_non_anchor_v1330_present;
group_flags[1] |= dl_gap_non_anchor_v1530.is_present();
group_flags[2] |= dl_carrier_freq_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -518,6 +555,14 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::pack(bit_ref& bref) const
HANDLE_CODE(dl_gap_non_anchor_v1530->pack(bref));
}
}
if (group_flags[2]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(dl_carrier_freq_v1550.is_present(), 1));
if (dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(dl_carrier_freq_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -544,7 +589,7 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(2);
ext_groups_unpacker_guard group_flags(3);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -565,6 +610,16 @@ SRSASN_CODE dl_carrier_cfg_ded_nb_r13_s::unpack(cbit_ref& bref)
HANDLE_CODE(dl_gap_non_anchor_v1530->unpack(bref));
}
}
if (group_flags[2]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool dl_carrier_freq_v1550_present;
HANDLE_CODE(bref.unpack(dl_carrier_freq_v1550_present, 1));
dl_carrier_freq_v1550.set_present(dl_carrier_freq_v1550_present);
if (dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(dl_carrier_freq_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -599,6 +654,10 @@ void dl_carrier_cfg_ded_nb_r13_s::to_json(json_writer& j) const
j.write_fieldname("dl-GapNonAnchor-v1530");
dl_gap_non_anchor_v1530->to_json(j);
}
if (dl_carrier_freq_v1550.is_present()) {
j.write_fieldname("dl-CarrierFreq-v1550");
dl_carrier_freq_v1550->to_json(j);
}
}
j.end_obj();
}
@ -3211,6 +3270,20 @@ SRSASN_CODE as_cfg_nb_s::pack(bit_ref& bref) const
HANDLE_CODE(source_ue_id_r13.pack(bref));
HANDLE_CODE(source_dl_carrier_freq_r13.pack(bref));
if (ext) {
ext_groups_packer_guard group_flags;
group_flags[0] |= source_dl_carrier_freq_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(source_dl_carrier_freq_v1550.is_present(), 1));
if (source_dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(source_dl_carrier_freq_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
SRSASN_CODE as_cfg_nb_s::unpack(cbit_ref& bref)
@ -3221,6 +3294,21 @@ SRSASN_CODE as_cfg_nb_s::unpack(cbit_ref& bref)
HANDLE_CODE(source_ue_id_r13.unpack(bref));
HANDLE_CODE(source_dl_carrier_freq_r13.unpack(bref));
if (ext) {
ext_groups_unpacker_guard group_flags(1);
group_flags.unpack(bref);
if (group_flags[0]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool source_dl_carrier_freq_v1550_present;
HANDLE_CODE(bref.unpack(source_dl_carrier_freq_v1550_present, 1));
source_dl_carrier_freq_v1550.set_present(source_dl_carrier_freq_v1550_present);
if (source_dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(source_dl_carrier_freq_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
void as_cfg_nb_s::to_json(json_writer& j) const
@ -3233,6 +3321,12 @@ void as_cfg_nb_s::to_json(json_writer& j) const
j.write_str("sourceUE-Identity-r13", source_ue_id_r13.to_string());
j.write_fieldname("sourceDl-CarrierFreq-r13");
source_dl_carrier_freq_r13.to_json(j);
if (ext) {
if (source_dl_carrier_freq_v1550.is_present()) {
j.write_fieldname("sourceDL-CarrierFreq-v1550");
source_dl_carrier_freq_v1550->to_json(j);
}
}
j.end_obj();
}
@ -5699,6 +5793,51 @@ uint8_t nprach_params_tdd_nb_r15_s::nprach_params_r15_s_::nprach_num_cbra_start_
options, 16, value, "nprach_params_tdd_nb_r15_s::nprach_params_r15_s_::nprach_num_cbra_start_subcarriers_r15_e_");
}
// NPRACH-ParametersTDD-NB-v1550 ::= SEQUENCE
SRSASN_CODE nprach_params_tdd_nb_v1550_s::pack(bit_ref& bref) const
{
HANDLE_CODE(max_num_preamb_attempt_ce_v1550.pack(bref));
HANDLE_CODE(num_repeats_per_preamb_attempt_v1550.pack(bref));
return SRSASN_SUCCESS;
}
SRSASN_CODE nprach_params_tdd_nb_v1550_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(max_num_preamb_attempt_ce_v1550.unpack(bref));
HANDLE_CODE(num_repeats_per_preamb_attempt_v1550.unpack(bref));
return SRSASN_SUCCESS;
}
void nprach_params_tdd_nb_v1550_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_str("maxNumPreambleAttemptCE-v1550", max_num_preamb_attempt_ce_v1550.to_string());
j.write_str("numRepetitionsPerPreambleAttempt-v1550", num_repeats_per_preamb_attempt_v1550.to_string());
j.end_obj();
}
std::string nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_opts::to_string() const
{
static const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "spare1"};
return convert_enum_idx(options, 8, value, "nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_e_");
}
uint8_t nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_opts::to_number() const
{
static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 10};
return map_enum_number(options, 7, value, "nprach_params_tdd_nb_v1550_s::max_num_preamb_attempt_ce_v1550_e_");
}
std::string nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_opts::to_string() const
{
static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32", "n64", "n128", "n256", "n512", "n1024"};
return convert_enum_idx(options, 11, value, "nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_e_");
}
uint16_t nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_opts::to_number() const
{
static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
return map_enum_number(options, 11, value, "nprach_params_tdd_nb_v1550_s::num_repeats_per_preamb_attempt_v1550_e_");
}
// PagingWeight-NB-r14 ::= ENUMERATED
std::string paging_weight_nb_r14_opts::to_string() const
{
@ -5863,6 +6002,7 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::pack(bit_ref& bref) const
if (ext) {
ext_groups_packer_guard group_flags;
group_flags[0] |= dl_gap_non_anchor_v1530.is_present();
group_flags[1] |= dl_carrier_freq_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -5873,6 +6013,14 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::pack(bit_ref& bref) const
HANDLE_CODE(dl_gap_non_anchor_v1530->pack(bref));
}
}
if (group_flags[1]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(dl_carrier_freq_v1550.is_present(), 1));
if (dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(dl_carrier_freq_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -5897,7 +6045,7 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(1);
ext_groups_unpacker_guard group_flags(2);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -5910,6 +6058,16 @@ SRSASN_CODE dl_carrier_cfg_common_nb_r14_s::unpack(cbit_ref& bref)
HANDLE_CODE(dl_gap_non_anchor_v1530->unpack(bref));
}
}
if (group_flags[1]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool dl_carrier_freq_v1550_present;
HANDLE_CODE(bref.unpack(dl_carrier_freq_v1550_present, 1));
dl_carrier_freq_v1550.set_present(dl_carrier_freq_v1550_present);
if (dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(dl_carrier_freq_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -5940,6 +6098,10 @@ void dl_carrier_cfg_common_nb_r14_s::to_json(json_writer& j) const
j.write_fieldname("dl-GapNonAnchor-v1530");
dl_gap_non_anchor_v1530->to_json(j);
}
if (dl_carrier_freq_v1550.is_present()) {
j.write_fieldname("dl-CarrierFreq-v1550");
dl_carrier_freq_v1550->to_json(j);
}
}
j.end_obj();
}
@ -6646,6 +6808,7 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::pack(bit_ref& bref) const
group_flags[1] |= ce_authorisation_offset_r14_present;
group_flags[2] |= nsss_rrm_cfg_r15.is_present();
group_flags[2] |= inter_freq_neigh_cell_list_v1530.is_present();
group_flags[3] |= dl_carrier_freq_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -6680,6 +6843,14 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::pack(bit_ref& bref) const
HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_neigh_cell_list_v1530, 1, 16));
}
}
if (group_flags[3]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(dl_carrier_freq_v1550.is_present(), 1));
if (dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(dl_carrier_freq_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -6715,7 +6886,7 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(3);
ext_groups_unpacker_guard group_flags(4);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -6754,6 +6925,16 @@ SRSASN_CODE inter_freq_carrier_freq_info_nb_r13_s::unpack(cbit_ref& bref)
HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_neigh_cell_list_v1530, bref, 1, 16));
}
}
if (group_flags[3]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool dl_carrier_freq_v1550_present;
HANDLE_CODE(bref.unpack(dl_carrier_freq_v1550_present, 1));
dl_carrier_freq_v1550.set_present(dl_carrier_freq_v1550_present);
if (dl_carrier_freq_v1550.is_present()) {
HANDLE_CODE(dl_carrier_freq_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -6814,6 +6995,10 @@ void inter_freq_carrier_freq_info_nb_r13_s::to_json(json_writer& j) const
}
j.end_array();
}
if (dl_carrier_freq_v1550.is_present()) {
j.write_fieldname("dl-CarrierFreq-v1550");
dl_carrier_freq_v1550->to_json(j);
}
}
j.end_obj();
}
@ -7060,7 +7245,7 @@ SRSASN_CODE nprach_cfg_sib_nb_v1530_s::pack(bit_ref& bref) const
if (tdd_params_r15_present) {
HANDLE_CODE(tdd_params_r15.nprach_preamb_format_r15.pack(bref));
HANDLE_CODE(tdd_params_r15.num_repeats_per_preamb_attempt_r15.pack(bref));
HANDLE_CODE(tdd_params_r15.dummy.pack(bref));
HANDLE_CODE(pack_dyn_seq_of(bref, tdd_params_r15.nprach_params_list_tdd_r15, 1, 3));
}
if (fmt2_params_r15_present) {
@ -7092,7 +7277,7 @@ SRSASN_CODE nprach_cfg_sib_nb_v1530_s::unpack(cbit_ref& bref)
if (tdd_params_r15_present) {
HANDLE_CODE(tdd_params_r15.nprach_preamb_format_r15.unpack(bref));
HANDLE_CODE(tdd_params_r15.num_repeats_per_preamb_attempt_r15.unpack(bref));
HANDLE_CODE(tdd_params_r15.dummy.unpack(bref));
HANDLE_CODE(unpack_dyn_seq_of(tdd_params_r15.nprach_params_list_tdd_r15, bref, 1, 3));
}
if (fmt2_params_r15_present) {
@ -7123,7 +7308,7 @@ void nprach_cfg_sib_nb_v1530_s::to_json(json_writer& j) const
j.write_fieldname("tdd-Parameters-r15");
j.start_obj();
j.write_str("nprach-PreambleFormat-r15", tdd_params_r15.nprach_preamb_format_r15.to_string());
j.write_str("numRepetitionsPerPreambleAttempt-r15", tdd_params_r15.num_repeats_per_preamb_attempt_r15.to_string());
j.write_str("dummy", tdd_params_r15.dummy.to_string());
j.start_array("nprach-ParametersListTDD-r15");
for (const auto& e1 : tdd_params_r15.nprach_params_list_tdd_r15) {
e1.to_json(j);
@ -7180,17 +7365,42 @@ std::string nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::nprach_preamb_format_r
options, 5, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::nprach_preamb_format_r15_e_");
}
std::string nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_opts::to_string() const
std::string nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_opts::to_string() const
{
static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32", "n64", "n128", "n256", "n512", "n1024"};
return convert_enum_idx(
options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_e_");
return convert_enum_idx(options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_e_");
}
uint16_t nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_opts::to_number() const
uint16_t nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_opts::to_number() const
{
static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
return map_enum_number(
options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::num_repeats_per_preamb_attempt_r15_e_");
return map_enum_number(options, 11, value, "nprach_cfg_sib_nb_v1530_s::tdd_params_r15_s_::dummy_e_");
}
// NPRACH-ConfigSIB-NB-v1550 ::= SEQUENCE
SRSASN_CODE nprach_cfg_sib_nb_v1550_s::pack(bit_ref& bref) const
{
HANDLE_CODE(pack_dyn_seq_of(bref, tdd_params_v1550.nprach_params_list_tdd_v1550, 1, 3));
return SRSASN_SUCCESS;
}
SRSASN_CODE nprach_cfg_sib_nb_v1550_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(unpack_dyn_seq_of(tdd_params_v1550.nprach_params_list_tdd_v1550, bref, 1, 3));
return SRSASN_SUCCESS;
}
void nprach_cfg_sib_nb_v1550_s::to_json(json_writer& j) const
{
j.start_obj();
j.write_fieldname("tdd-Parameters-v1550");
j.start_obj();
j.start_array("nprach-ParametersListTDD-v1550");
for (const auto& e1 : tdd_params_v1550.nprach_params_list_tdd_v1550) {
e1.to_json(j);
}
j.end_array();
j.end_obj();
j.end_obj();
}
// NPRACH-ProbabilityAnchor-NB-r14 ::= SEQUENCE
@ -8310,6 +8520,7 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::pack(bit_ref& bref) const
group_flags[2] |= nprach_cfg_v1530.is_present();
group_flags[2] |= dl_gap_v1530.is_present();
group_flags[2] |= wus_cfg_r15.is_present();
group_flags[3] |= nprach_cfg_v1550.is_present();
group_flags.pack(bref);
if (group_flags[0]) {
@ -8344,6 +8555,14 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::pack(bit_ref& bref) const
HANDLE_CODE(wus_cfg_r15->pack(bref));
}
}
if (group_flags[3]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(nprach_cfg_v1550.is_present(), 1));
if (nprach_cfg_v1550.is_present()) {
HANDLE_CODE(nprach_cfg_v1550->pack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -8364,7 +8583,7 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::unpack(cbit_ref& bref)
HANDLE_CODE(ul_pwr_ctrl_common_r13.unpack(bref));
if (ext) {
ext_groups_unpacker_guard group_flags(3);
ext_groups_unpacker_guard group_flags(4);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -8409,6 +8628,16 @@ SRSASN_CODE rr_cfg_common_sib_nb_r13_s::unpack(cbit_ref& bref)
HANDLE_CODE(wus_cfg_r15->unpack(bref));
}
}
if (group_flags[3]) {
varlength_field_unpack_guard varlen_scope(bref, false);
bool nprach_cfg_v1550_present;
HANDLE_CODE(bref.unpack(nprach_cfg_v1550_present, 1));
nprach_cfg_v1550.set_present(nprach_cfg_v1550_present);
if (nprach_cfg_v1550.is_present()) {
HANDLE_CODE(nprach_cfg_v1550->unpack(bref));
}
}
}
return SRSASN_SUCCESS;
}
@ -8454,6 +8683,10 @@ void rr_cfg_common_sib_nb_r13_s::to_json(json_writer& j) const
j.write_fieldname("wus-Config-r15");
wus_cfg_r15->to_json(j);
}
if (nprach_cfg_v1550.is_present()) {
j.write_fieldname("nprach-Config-v1550");
nprach_cfg_v1550->to_json(j);
}
}
j.end_obj();
}
@ -11836,6 +12069,43 @@ void rrc_conn_reest_nb_v1430_ies_s::to_json(json_writer& j) const
j.end_obj();
}
// RRCEarlyDataComplete-NB-v1590-IEs ::= SEQUENCE
SRSASN_CODE rrc_early_data_complete_nb_v1590_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_early_data_complete_nb_v1590_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void rrc_early_data_complete_nb_v1590_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// RedirectedCarrierInfo-NB-v1430 ::= SEQUENCE
SRSASN_CODE redirected_carrier_info_nb_v1430_s::pack(bit_ref& bref) const
{
@ -12054,6 +12324,9 @@ SRSASN_CODE rrc_early_data_complete_nb_r15_ies_s::pack(bit_ref& bref) const
if (redirected_carrier_info_ext_r15_present) {
HANDLE_CODE(redirected_carrier_info_ext_r15.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -12077,6 +12350,9 @@ SRSASN_CODE rrc_early_data_complete_nb_r15_ies_s::unpack(cbit_ref& bref)
if (redirected_carrier_info_ext_r15_present) {
HANDLE_CODE(redirected_carrier_info_ext_r15.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -12099,8 +12375,7 @@ void rrc_early_data_complete_nb_r15_ies_s::to_json(json_writer& j) const
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
@ -13200,6 +13475,78 @@ void dl_ccch_msg_nb_s::to_json(json_writer& j) const
j.end_array();
}
// RRCConnectionRelease-NB-v15b0-IEs ::= SEQUENCE
SRSASN_CODE rrc_conn_release_nb_v15b0_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(no_last_cell_upd_r15_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_conn_release_nb_v15b0_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(no_last_cell_upd_r15_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
return SRSASN_SUCCESS;
}
void rrc_conn_release_nb_v15b0_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (no_last_cell_upd_r15_present) {
j.write_str("noLastCellUpdate-r15", "true");
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// RRCConnectionRelease-NB-v1550-IEs ::= SEQUENCE
SRSASN_CODE rrc_conn_release_nb_v1550_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(redirected_carrier_info_v1550_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (redirected_carrier_info_v1550_present) {
HANDLE_CODE(redirected_carrier_info_v1550.pack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_conn_release_nb_v1550_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(redirected_carrier_info_v1550_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (redirected_carrier_info_v1550_present) {
HANDLE_CODE(redirected_carrier_info_v1550.unpack(bref));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void rrc_conn_release_nb_v1550_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (redirected_carrier_info_v1550_present) {
j.write_fieldname("redirectedCarrierInfo-v1550");
redirected_carrier_info_v1550.to_json(j);
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
non_crit_ext.to_json(j);
}
j.end_obj();
}
// RRCConnectionRelease-NB-v1530-IEs ::= SEQUENCE
SRSASN_CODE rrc_conn_release_nb_v1530_ies_s::pack(bit_ref& bref) const
{
@ -13210,6 +13557,9 @@ SRSASN_CODE rrc_conn_release_nb_v1530_ies_s::pack(bit_ref& bref) const
if (next_hop_chaining_count_r15_present) {
HANDLE_CODE(pack_integer(bref, next_hop_chaining_count_r15, (uint8_t)0u, (uint8_t)7u));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -13222,6 +13572,9 @@ SRSASN_CODE rrc_conn_release_nb_v1530_ies_s::unpack(cbit_ref& bref)
if (next_hop_chaining_count_r15_present) {
HANDLE_CODE(unpack_integer(next_hop_chaining_count_r15, bref, (uint8_t)0u, (uint8_t)7u));
}
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -13236,8 +13589,7 @@ void rrc_conn_release_nb_v1530_ies_s::to_json(json_writer& j) const
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
@ -18036,6 +18388,43 @@ std::string rrc_conn_setup_complete_nb_s::crit_exts_c_::types_opts::to_string()
return convert_enum_idx(options, 2, value, "rrc_conn_setup_complete_nb_s::crit_exts_c_::types");
}
// RRCEarlyDataRequest-NB-v1590-IEs ::= SEQUENCE
SRSASN_CODE rrc_early_data_request_nb_v1590_ies_s::pack(bit_ref& bref) const
{
HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.pack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE rrc_early_data_request_nb_v1590_ies_s::unpack(cbit_ref& bref)
{
HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1));
HANDLE_CODE(bref.unpack(non_crit_ext_present, 1));
if (late_non_crit_ext_present) {
HANDLE_CODE(late_non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
void rrc_early_data_request_nb_v1590_ies_s::to_json(json_writer& j) const
{
j.start_obj();
if (late_non_crit_ext_present) {
j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string());
}
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
}
j.end_obj();
}
// RRCEarlyDataRequest-NB-r15-IEs ::= SEQUENCE
SRSASN_CODE rrc_early_data_request_nb_r15_ies_s::pack(bit_ref& bref) const
{
@ -18048,6 +18437,9 @@ SRSASN_CODE rrc_early_data_request_nb_r15_ies_s::pack(bit_ref& bref) const
HANDLE_CODE(cqi_npdcch_r15.pack(bref));
}
HANDLE_CODE(ded_info_nas_r15.pack(bref));
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.pack(bref));
}
return SRSASN_SUCCESS;
}
@ -18062,6 +18454,9 @@ SRSASN_CODE rrc_early_data_request_nb_r15_ies_s::unpack(cbit_ref& bref)
HANDLE_CODE(cqi_npdcch_r15.unpack(bref));
}
HANDLE_CODE(ded_info_nas_r15.unpack(bref));
if (non_crit_ext_present) {
HANDLE_CODE(non_crit_ext.unpack(bref));
}
return SRSASN_SUCCESS;
}
@ -18077,15 +18472,14 @@ void rrc_early_data_request_nb_r15_ies_s::to_json(json_writer& j) const
j.write_str("dedicatedInfoNAS-r15", ded_info_nas_r15.to_string());
if (non_crit_ext_present) {
j.write_fieldname("nonCriticalExtension");
j.start_obj();
j.end_obj();
non_crit_ext.to_json(j);
}
j.end_obj();
}
std::string rrc_early_data_request_nb_r15_ies_s::establishment_cause_r15_opts::to_string() const
{
static const char* options[] = {"mo-Data-r15", "mo-ExceptionData-r15", "delayTolerantAccess-r15", "spare1"};
static const char* options[] = {"mo-Data", "mo-ExceptionData", "delayTolerantAccess", "spare1"};
return convert_enum_idx(options, 4, value, "rrc_early_data_request_nb_r15_ies_s::establishment_cause_r15_e_");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -20,6 +20,7 @@
set(SOURCES arch_select.cc
enb_events.cc
backtrace.c
buffer_pool.cc
crash_handler.c

@ -0,0 +1,150 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "srslte/common/enb_events.h"
#include "srslte/srslog/context.h"
#include "srslte/srslog/log_channel.h"
using namespace srsenb;
namespace {
/// Null object implementation that is used when no log channel is configured.
class null_event_logger : public event_logger_interface
{
public:
void log_rrc_connected(unsigned cause) override {}
void log_rrc_disconnect(unsigned reason) override {}
void log_s1_ctx_create(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {}
void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {}
void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {}
void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {}
};
} // namespace
namespace {
/// Common metrics to all events.
DECLARE_METRIC("type", metric_type_tag, std::string, "");
DECLARE_METRIC("event_name", metric_event_name, std::string, "");
/// Context for sector start/stop.
DECLARE_METRIC("pci", metric_pci, uint32_t, "");
DECLARE_METRIC("cell_identity", metric_cell_identity, uint32_t, "");
DECLARE_METRIC("sector_id", metric_sector_id, uint32_t, "");
DECLARE_METRIC_SET("event_data", mset_sector_event, metric_pci, metric_cell_identity, metric_sector_id);
using sector_event_t = srslog::build_context_type<metric_type_tag, metric_event_name, mset_sector_event>;
/// Context for RRC connect/disconnect.
DECLARE_METRIC("cause", metric_cause, uint32_t, "");
DECLARE_METRIC_SET("event_data", mset_rrc_event, metric_cause);
using rrc_event_t = srslog::build_context_type<metric_type_tag, metric_event_name, mset_rrc_event>;
/// Context for S1 context create/delete.
DECLARE_METRIC("mme_ue_s1ap_id", metric_ue_mme_id, uint32_t, "");
DECLARE_METRIC("enb_ue_s1ap_id", metric_ue_enb_id, uint32_t, "");
DECLARE_METRIC("rnti", metric_rnti, uint16_t, "");
DECLARE_METRIC_SET("event_data", mset_s1apctx_event, metric_ue_mme_id, metric_ue_enb_id, metric_rnti);
using s1apctx_event_t = srslog::build_context_type<metric_type_tag, metric_event_name, mset_s1apctx_event>;
/// Logs events into the configured log channel.
class logging_event_logger : public event_logger_interface
{
public:
explicit logging_event_logger(srslog::log_channel& c) : event_channel(c) {}
void log_rrc_connected(unsigned cause) override
{
rrc_event_t ctx("");
ctx.write<metric_type_tag>("event");
ctx.write<metric_event_name>("rrc_connect");
ctx.get<mset_rrc_event>().write<metric_cause>(cause);
event_channel(ctx);
}
void log_rrc_disconnect(unsigned reason) override
{
rrc_event_t ctx("");
ctx.write<metric_type_tag>("event");
ctx.write<metric_event_name>("rrc_disconnect");
ctx.get<mset_rrc_event>().write<metric_cause>(reason);
event_channel(ctx);
}
void log_s1_ctx_create(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override
{
s1apctx_event_t ctx("");
ctx.write<metric_type_tag>("event");
ctx.write<metric_event_name>("s1_context_create");
ctx.get<mset_s1apctx_event>().write<metric_ue_mme_id>(mme_id);
ctx.get<mset_s1apctx_event>().write<metric_ue_enb_id>(enb_id);
ctx.get<mset_s1apctx_event>().write<metric_rnti>(rnti);
event_channel(ctx);
}
void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override
{
s1apctx_event_t ctx("");
ctx.write<metric_type_tag>("event");
ctx.write<metric_event_name>("s1_context_delete");
ctx.get<mset_s1apctx_event>().write<metric_ue_mme_id>(mme_id);
ctx.get<mset_s1apctx_event>().write<metric_ue_enb_id>(enb_id);
ctx.get<mset_s1apctx_event>().write<metric_rnti>(rnti);
event_channel(ctx);
}
void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override
{
sector_event_t ctx("");
ctx.write<metric_type_tag>("event");
ctx.write<metric_event_name>("sector_start");
ctx.get<mset_sector_event>().write<metric_pci>(pci);
ctx.get<mset_sector_event>().write<metric_cell_identity>(cell_id);
ctx.get<mset_sector_event>().write<metric_sector_id>(cc_idx);
event_channel(ctx);
}
void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override
{
sector_event_t ctx("");
ctx.write<metric_type_tag>("event");
ctx.write<metric_event_name>("sector_stop");
ctx.get<mset_sector_event>().write<metric_pci>(pci);
ctx.get<mset_sector_event>().write<metric_cell_identity>(cell_id);
ctx.get<mset_sector_event>().write<metric_sector_id>(cc_idx);
event_channel(ctx);
}
private:
srslog::log_channel& event_channel;
};
} // namespace
std::unique_ptr<event_logger_interface> event_logger::pimpl = std::unique_ptr<null_event_logger>(new null_event_logger);
event_logger_interface& event_logger::get()
{
return *pimpl;
}
void event_logger::configure(srslog::log_channel& c)
{
pimpl = std::unique_ptr<logging_event_logger>(new logging_event_logger(c));
}

@ -89,7 +89,7 @@ bool threads_new_rt_cpu(pthread_t* thread, void* (*start_routine)(void*), void*
#else
// All threads have normal priority except prio_offset=0,1,2,3,4
if (prio_offset >= 0 && prio_offset < 5) {
param.sched_priority = 50 - prio_offset;
param.sched_priority = sched_get_priority_max(SCHED_FIFO) - prio_offset;
if (pthread_attr_init(&attr)) {
perror("pthread_attr_init");
} else {

@ -574,13 +574,13 @@ bool sch_subh::is_var_len_ce()
uint16_t sch_subh::get_c_rnti()
{
return (uint16_t)payload[0] << 8 | payload[1];
return le16toh((uint16_t)payload[0] << 8 | payload[1]);
}
uint64_t sch_subh::get_con_res_id()
{
return ((uint64_t)payload[5]) | (((uint64_t)payload[4]) << 8) | (((uint64_t)payload[3]) << 16) |
(((uint64_t)payload[2]) << 24) | (((uint64_t)payload[1]) << 32) | (((uint64_t)payload[0]) << 40);
return le64toh(((uint64_t)payload[5]) | (((uint64_t)payload[4]) << 8) | (((uint64_t)payload[3]) << 16) |
(((uint64_t)payload[2]) << 24) | (((uint64_t)payload[1]) << 32) | (((uint64_t)payload[0]) << 40));
}
float sch_subh::get_phr()
@ -720,6 +720,7 @@ bool sch_subh::set_bsr(uint32_t buff_size[4], ul_sch_lcid format)
bool sch_subh::set_c_rnti(uint16_t crnti)
{
crnti = htole32(crnti);
if (((sch_pdu*)parent)->has_space_ce(2)) {
w_payload_ce[0] = (uint8_t)((crnti & 0xff00) >> 8);
w_payload_ce[1] = (uint8_t)((crnti & 0x00ff));
@ -733,6 +734,7 @@ bool sch_subh::set_c_rnti(uint16_t crnti)
}
bool sch_subh::set_con_res_id(uint64_t con_res_id)
{
con_res_id = htole64(con_res_id);
if (((sch_pdu*)parent)->has_space_ce(6)) {
w_payload_ce[0] = (uint8_t)((con_res_id & 0xff0000000000) >> 40);
w_payload_ce[1] = (uint8_t)((con_res_id & 0x00ff00000000) >> 32);
@ -963,7 +965,7 @@ std::string sch_subh::to_string()
ss << "CON_RES: id=0x" << std::hex << get_con_res_id() << std::dec;
break;
case dl_sch_lcid::TA_CMD:
ss << "TA: ta=" << get_ta_cmd();
ss << "TA: ta=" << std::to_string(get_ta_cmd());
break;
case dl_sch_lcid::SCELL_ACTIVATION_4_OCTET:
case dl_sch_lcid::SCELL_ACTIVATION:

@ -51,7 +51,7 @@ uint8_t* pdu_queue::request(uint32_t len)
return pdu->ptr;
}
void pdu_queue::deallocate(uint8_t* pdu)
void pdu_queue::deallocate(const uint8_t* pdu)
{
if (!pool.deallocate((pdu_t*)pdu)) {
log_h->warning("Error deallocating from buffer pool in deallocate(): buffer not created in this pool.\n");
@ -62,7 +62,7 @@ void pdu_queue::deallocate(uint8_t* pdu)
* This function enqueues the packet and returns quicly because ACK
* deadline is important here.
*/
void pdu_queue::push(uint8_t* ptr, uint32_t len, channel_t channel)
void pdu_queue::push(const uint8_t* ptr, uint32_t len, channel_t channel)
{
if (ptr) {
pdu_t* pdu = (pdu_t*)ptr;

@ -33,8 +33,9 @@
static uint32_t dmrs_pdcch_get_cinit(uint32_t slot_idx, uint32_t symbol_idx, uint32_t n_id)
{
return (uint32_t)((((SRSLTE_NSYMB_PER_SLOT_NR * slot_idx + symbol_idx + 1UL) << 17UL) * (2 * n_id + 1) + 2 * n_id) &
(uint64_t)INT32_MAX);
return (uint32_t)(
((1UL << 17UL) * (SRSLTE_NSYMB_PER_SLOT_NR * slot_idx + symbol_idx + 1UL) * (2UL * n_id + 1UL) + 2UL * n_id) %
INT32_MAX);
}
static void dmrs_pdcch_put_symbol_noninterleaved(const srslte_carrier_nr_t* carrier,

@ -37,6 +37,7 @@ set(FEC_SOURCES ${FEC_SOURCES} ${AVX2_SOURCES}
polar/polar_decoder_ssc_s.c
polar/polar_decoder_ssc_c.c
polar/polar_decoder_vector.c
polar/polar_interleaver.c
polar/polar_rm.c
PARENT_SCOPE)

@ -0,0 +1,50 @@
/**
*
* section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "srslte/phy/fec/polar/polar_interleaver.h"
#include "srslte/phy/utils/vector.h"
#include <memory.h>
#include <stddef.h>
// Table 5.3.1.1-1: Interleaving pattern
static const uint16_t polar_interleaver_pattern[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL] = {
0, 2, 4, 7, 9, 14, 19, 20, 24, 25, 26, 28, 31, 34, 42, 45, 49, 50, 51, 53, 54,
56, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 72, 76, 77, 81, 82, 83, 87, 88, 89, 91,
93, 95, 98, 101, 104, 106, 108, 110, 111, 113, 115, 118, 119, 120, 122, 123, 126, 127, 129, 132, 134,
138, 139, 140, 1, 3, 5, 8, 10, 15, 21, 27, 29, 32, 35, 43, 46, 52, 55, 57, 60, 63,
68, 73, 78, 84, 90, 92, 94, 96, 99, 102, 105, 107, 109, 112, 114, 116, 121, 124, 128, 130, 133,
135, 141, 6, 11, 16, 22, 30, 33, 36, 44, 47, 64, 74, 79, 85, 97, 100, 103, 117, 125, 131,
136, 142, 12, 17, 23, 37, 48, 75, 80, 86, 137, 143, 13, 18, 38, 144, 39, 145, 40, 146, 41,
147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163};
void srslte_polar_interleaver_run(const void* in, void* out, uint32_t S, uint32_t K, bool dir)
{
if (in == NULL || out == NULL) {
return;
}
const uint8_t* in_ptr = (const uint8_t*)in;
uint8_t* out_ptr = (uint8_t*)out;
uint32_t k = 0;
for (uint32_t m = 0; m < SRSLTE_POLAR_INTERLEAVER_K_MAX_IL; m++) {
if (polar_interleaver_pattern[m] >= SRSLTE_POLAR_INTERLEAVER_K_MAX_IL - K) {
uint32_t pi_k = polar_interleaver_pattern[m] - (SRSLTE_POLAR_INTERLEAVER_K_MAX_IL - K);
if (dir) {
memcpy(out_ptr + S * k, in_ptr + S * pi_k, S);
} else {
memcpy(out_ptr + S * pi_k, in_ptr + S * k, S);
}
k++;
}
}
}

@ -97,4 +97,9 @@ polar_tests_lite(-3)
# Unit tests full
set(test_name POLAR-UNIT-TEST)
set(test_command polar_chain_test)
polar_tests(101)
polar_tests(101)
# Polar inter-leaver test
add_executable(polar_interleaver_test polar_interleaver_test.c)
target_link_libraries(polar_interleaver_test srslte_phy)
add_test(polar_interleaver_test polar_interleaver_test)

@ -187,7 +187,6 @@ int main(int argc, char** argv)
double var[SNR_POINTS + 1];
double snr_db_vec[SNR_POINTS + 1];
int i = 0;
int reportinfo = 0;
@ -326,7 +325,7 @@ int main(int argc, char** argv)
if (snr_db == 100.0) {
snr_points = SNR_POINTS;
for (int32_t i = 0; i < snr_points; i++) {
for (int i = 0; i < snr_points; i++) {
snr_db = SNR_MIN + i * snr_inc;
snr_db_vec[i] = snr_db;
var[i] = srslte_convert_dB_to_amplitude(-snr_db);
@ -398,7 +397,7 @@ int main(int argc, char** argv)
}
#else
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
for (j = 0; j < K; j++) {
data_tx[i * K + j] = srslte_random_uniform_int_dist(random_gen, 0, 1);
}
@ -424,7 +423,7 @@ int main(int argc, char** argv)
(double)(K + code.nPC) / code.N);
}
// subchannel_allocation block
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
srslte_polar_chanalloc_tx(
data_tx + i * K, input_enc + i * code.N, code.N, code.K, code.nPC, code.K_set, code.PC_set);
}
@ -456,7 +455,7 @@ int main(int argc, char** argv)
elapsed_time_enc_avx2[i_snr] += t[0].tv_sec + 1e-6 * t[0].tv_usec;
// check errors with respect the output of the pipeline encoder
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
if (srslte_bit_diff(output_enc + i * code.N, output_enc_avx2 + i * code.N, code.N) != 0) {
printf("ERROR: Wrong avx2 encoder output. SNR= %f, Batch: %d\n", snr_db_vec[i_snr], i);
exit(-1);
@ -504,7 +503,7 @@ int main(int argc, char** argv)
#ifdef debug
int i_error = 0;
#endif
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
errors_symb = srslte_bit_diff(data_tx + i * K, data_rx + i * K, K);
if (errors_symb != 0) {
@ -545,7 +544,7 @@ int main(int argc, char** argv)
}
// check errors 16-bit decoder
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
errors_symb_s = srslte_bit_diff(data_tx + i * K, data_rx_s + i * K, K);
if (errors_symb_s != 0) {
@ -584,7 +583,7 @@ int main(int argc, char** argv)
}
// check errors 8-bits decoder
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
errors_symb_c = srslte_bit_diff(data_tx + i * K, data_rx_c + i * K, K);
@ -624,7 +623,7 @@ int main(int argc, char** argv)
}
// check errors 8-bits decoder
for (i = 0; i < BATCH_SIZE; i++) {
for (int i = 0; i < BATCH_SIZE; i++) {
errors_symb_c_avx2 = srslte_bit_diff(data_tx + i * K, data_rx_c_avx2 + i * K, K);

File diff suppressed because it is too large Load Diff

@ -0,0 +1,50 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "polar_interleaver_gold.h"
#include "srslte/common/test_common.h"
#include "srslte/phy/fec/polar/polar_interleaver.h"
int main(int argc, char** argv)
{
uint32_t idx = 0;
while (polar_interleaver_gold[idx].K) {
uint32_t K = polar_interleaver_gold[idx].K;
// Create indexes in order
uint16_t indexes_in[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL];
for (uint16_t i = 0; i < (uint16_t)K; i++) {
indexes_in[i] = i;
}
// Run interleaver forward
uint16_t indexes_out[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL];
srslte_polar_interleaver_run_u16(indexes_in, indexes_out, K, true);
// Check indexes
for (uint32_t i = 0; i < K; i++) {
TESTASSERT(polar_interleaver_gold[idx].indexes[i] == indexes_out[i]);
}
// Run interleaver backwards
srslte_polar_interleaver_run_u16(indexes_out, indexes_in, K, false);
// Check indexes
for (uint16_t i = 0; i < (uint16_t)K; i++) {
TESTASSERT(indexes_in[i] == i);
}
idx++;
}
return SRSLTE_SUCCESS;
}

@ -21,6 +21,7 @@
#include "srslte/phy/phch/pdcch_nr.h"
#include "srslte/phy/fec/polar/polar_chanalloc.h"
#include "srslte/phy/fec/polar/polar_interleaver.h"
#include "srslte/phy/utils/debug.h"
#include "srslte/phy/utils/vector.h"
@ -325,7 +326,7 @@ static uint32_t pdcch_nr_cp(const srslte_pdcch_nr_t* q,
return count;
}
uint32_t pdcch_nr_c_init(const srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_msg)
static uint32_t pdcch_nr_c_init(const srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_msg)
{
uint32_t n_id = (dci_msg->search_space == srslte_search_space_type_ue && q->coreset.dmrs_scrambling_id_present)
? q->coreset.dmrs_scrambling_id
@ -349,21 +350,26 @@ int srslte_pdcch_nr_encode(srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_
}
// Calculate...
q->K = dci_msg->nof_bits + 24U; // Payload size including CRC
q->M = (1U << dci_msg->location.L) * (SRSLTE_NRE - 3U) * 6U; // Number of RE
q->E = q->M * 2; // Number of Rate-Matched bits
q->K = dci_msg->nof_bits + 24U; // Payload size including CRC
q->M = (1U << dci_msg->location.L) * (SRSLTE_NRE - 3U) * 6U; // Number of RE
q->E = q->M * 2; // Number of Rate-Matched bits
uint32_t cinit = pdcch_nr_c_init(q, dci_msg); // Pseudo-random sequence initiation
// Get polar code
if (srslte_polar_code_get(&q->code, q->K, q->E, 9U) < SRSLTE_SUCCESS) {
return SRSLTE_ERROR;
}
PDCCH_INFO_TX("K=%d; E=%d; M=%d; n=%d;\n", q->K, q->E, q->M, q->code.n);
PDCCH_INFO_TX("K=%d; E=%d; M=%d; n=%d; cinit=%08x;\n", q->K, q->E, q->M, q->code.n, cinit);
// Set first L bits to ones, c will have an offset of 24 bits
uint8_t* c = q->c;
srslte_bit_unpack(UINT32_MAX, &c, 24U);
// Copy DCI message
srslte_vec_u8_copy(q->c, dci_msg->payload, dci_msg->nof_bits);
srslte_vec_u8_copy(c, dci_msg->payload, dci_msg->nof_bits);
// Append CRC
srslte_crc_attach(&q->crc24c, q->c, dci_msg->nof_bits);
srslte_crc_attach(&q->crc24c, q->c, q->K);
PDCCH_INFO_TX("Append CRC %06x\n", (uint32_t)srslte_crc_checksum_get(&q->crc24c));
@ -373,16 +379,22 @@ int srslte_pdcch_nr_encode(srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_
srslte_bit_unpack(dci_msg->rnti, &ptr, 16);
// Scramble CRC with RNTI
srslte_vec_xor_bbb(unpacked_rnti, &q->c[q->K - 16], &q->c[q->K - 16], 16);
srslte_vec_xor_bbb(unpacked_rnti, &c[q->K - 16], &c[q->K - 16], 16);
// Print c
// Interleave
uint8_t c_prime[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL];
srslte_polar_interleaver_run_u8(c, c_prime, q->K, true);
// Print c and c_prime (after interleaving)
if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) {
PDCCH_INFO_TX("c=");
srslte_vec_fprint_hex(stdout, q->c, q->K);
srslte_vec_fprint_hex(stdout, c, q->K);
PDCCH_INFO_TX("c_prime=");
srslte_vec_fprint_hex(stdout, c_prime, q->K);
}
// Allocate channel
srslte_polar_chanalloc_tx(q->c, q->allocated, q->code.N, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set);
srslte_polar_chanalloc_tx(c_prime, q->allocated, q->code.N, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set);
// Encode bits
if (srslte_polar_encoder_encode(&q->encoder, q->allocated, q->d, q->code.n) < SRSLTE_SUCCESS) {
@ -392,14 +404,14 @@ int srslte_pdcch_nr_encode(srslte_pdcch_nr_t* q, const srslte_dci_msg_nr_t* dci_
// Print d
if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) {
PDCCH_INFO_TX("d=");
srslte_vec_fprint_byte(stdout, q->d, q->K);
srslte_vec_fprint_byte(stdout, q->d, q->code.N);
}
// Rate matching
srslte_polar_rm_tx(&q->rm, q->d, q->f, q->code.n, q->E, q->K, PDCCH_NR_POLAR_RM_IBIL);
// Scrambling
srslte_sequence_apply_bit(q->f, q->f, q->E, pdcch_nr_c_init(q, dci_msg));
srslte_sequence_apply_bit(q->f, q->f, q->E, cinit);
// Modulation
srslte_mod_modulate(&q->modem_table, q->f, q->symbols, q->E);
@ -518,12 +530,22 @@ int srslte_pdcch_nr_decode(srslte_pdcch_nr_t* q,
}
// De-allocate channel
srslte_polar_chanalloc_rx(q->allocated, q->c, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set);
uint8_t c_prime[SRSLTE_POLAR_INTERLEAVER_K_MAX_IL];
srslte_polar_chanalloc_rx(q->allocated, c_prime, q->code.K, q->code.nPC, q->code.K_set, q->code.PC_set);
// Set first L bits to ones, c will have an offset of 24 bits
uint8_t* c = q->c;
srslte_bit_unpack(UINT32_MAX, &c, 24U);
// De-interleave
srslte_polar_interleaver_run_u8(c_prime, c, q->K, false);
// Print c
if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) {
PDCCH_INFO_RX("c_prime=");
srslte_vec_fprint_hex(stdout, c_prime, q->K);
PDCCH_INFO_RX("c=");
srslte_vec_fprint_hex(stdout, q->c, q->K);
srslte_vec_fprint_hex(stdout, c, q->K);
}
// Unpack RNTI
@ -532,21 +554,21 @@ int srslte_pdcch_nr_decode(srslte_pdcch_nr_t* q,
srslte_bit_unpack(dci_msg->rnti, &ptr, 16);
// De-Scramble CRC with RNTI
ptr = &q->c[q->K - 24];
srslte_vec_xor_bbb(unpacked_rnti, &q->c[q->K - 16], &q->c[q->K - 16], 16);
srslte_vec_xor_bbb(unpacked_rnti, &c[q->K - 16], &c[q->K - 16], 16);
// Check CRC
uint32_t checksum1 = srslte_crc_checksum(&q->crc24c, q->c, dci_msg->nof_bits);
ptr = &c[q->K - 24];
uint32_t checksum1 = srslte_crc_checksum(&q->crc24c, q->c, q->K);
uint32_t checksum2 = srslte_bit_pack(&ptr, 24);
res->crc = checksum1 == checksum2;
if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) {
PDCCH_INFO_RX("CRC={%06x, %06x}; msg=", checksum1, checksum2);
srslte_vec_fprint_hex(stdout, q->c, dci_msg->nof_bits);
srslte_vec_fprint_hex(stdout, c, dci_msg->nof_bits);
}
// Copy DCI message
srslte_vec_u8_copy(dci_msg->payload, q->c, dci_msg->nof_bits);
srslte_vec_u8_copy(dci_msg->payload, c, dci_msg->nof_bits);
if (q->meas_time_en) {
gettimeofday(&t[2], NULL);

@ -25,9 +25,9 @@ set(SOURCES
event_trace.cpp)
add_subdirectory(bundled/fmt)
add_subdirectory(formatters)
find_package(Threads REQUIRED)
add_library(srslog STATIC ${SOURCES})
target_link_libraries(srslog fmt "${CMAKE_THREAD_LIBS_INIT}")
INSTALL(TARGETS srslog DESTINATION ${LIBRARY_DIR})
target_link_libraries(srslog formatters fmt "${CMAKE_THREAD_LIBS_INIT}")

@ -20,9 +20,7 @@
*/
#include "backend_worker.h"
#include "formatter.h"
#include "srslte/srslog/sink.h"
#include <cassert>
using namespace srslog;
@ -99,13 +97,14 @@ void backend_worker::process_log_entry(detail::log_entry&& entry)
return;
}
// Save sink pointer before moving the entry.
sink* s = entry.s;
fmt::memory_buffer fmt_buffer;
std::string result = format_log_entry_to_text(std::move(entry));
detail::memory_buffer buffer(result);
assert(entry.format_func && "Invalid format function");
entry.format_func(std::move(entry.metadata), fmt_buffer);
if (auto err_str = s->write(buffer)) {
const auto str = fmt::to_string(fmt_buffer);
detail::memory_buffer buffer(str);
if (auto err_str = entry.s->write(buffer)) {
err_handler(err_str.get_error());
}
}

@ -21,7 +21,6 @@
#include "srslte/srslog/event_trace.h"
#include "srslte/srslog/srslog.h"
#include <cassert>
#include <ctime>
#undef trace_duration_begin

@ -1,96 +0,0 @@
/**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
*
* srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* A copy of the GNU Affero General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/
#ifndef SRSLOG_FORMATTER_H
#define SRSLOG_FORMATTER_H
#include "srslte/srslog/bundled/fmt/chrono.h"
#include "srslte/srslog/bundled/fmt/ranges.h"
#include "srslte/srslog/detail/log_entry.h"
namespace srslog {
namespace detail {
/// Formats into a hex dump a range of elements, storing the result in the input
/// buffer.
inline void format_hex_dump(const std::vector<uint8_t>& v,
fmt::memory_buffer& buffer)
{
if (v.empty()) {
return;
}
const size_t elements_per_line = 16;
for (auto i = v.cbegin(), e = v.cend(); i != e;) {
auto num_elements =
std::min<size_t>(elements_per_line, std::distance(i, e));
fmt::format_to(buffer,
" {:04x}: {:02x}\n",
std::distance(v.cbegin(), i),
fmt::join(i, i + num_elements, " "));
std::advance(i, num_elements);
}
}
} // namespace detail
/// Formats to text all the fields of a log entry,
inline std::string format_log_entry_to_text(detail::log_entry&& entry)
{
fmt::memory_buffer buffer;
// Time stamp data preparation.
std::tm current_time =
fmt::gmtime(std::chrono::high_resolution_clock::to_time_t(entry.tp));
auto us_fraction = std::chrono::duration_cast<std::chrono::microseconds>(
entry.tp.time_since_epoch())
.count() %
1000000u;
fmt::format_to(buffer, "{:%H:%M:%S}.{:06} ", current_time, us_fraction);
// Format optional fields if present.
if (!entry.log_name.empty()) {
fmt::format_to(buffer, "[{: <4.4}] ", entry.log_name);
}
if (entry.log_tag != '\0') {
fmt::format_to(buffer, "[{}] ", entry.log_tag);
}
if (entry.context.enabled) {
fmt::format_to(buffer, "[{:5}] ", entry.context.value);
}
// Message formatting.
fmt::format_to(
buffer, "{}\n", fmt::vsprintf(entry.fmtstring, std::move(entry.store)));
// Optional hex dump formatting.
detail::format_hex_dump(entry.hex_dump, buffer);
return fmt::to_string(buffer);
}
} // namespace srslog
#endif // SRSLOG_FORMATTER_H

@ -0,0 +1,13 @@
#
# Copyright 2013-2020 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#
set(SOURCES
json_formatter.cpp
text_formatter.cpp)
add_library(formatters STATIC ${SOURCES})

@ -0,0 +1,149 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "json_formatter.h"
#include "srslte/srslog/detail/log_entry_metadata.h"
using namespace srslog;
std::unique_ptr<log_formatter> json_formatter::clone() const
{
return std::unique_ptr<log_formatter>(new json_formatter);
}
void json_formatter::format(detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer)
{
fmt::format_to(buffer,
"{{\n"
" \"log_entry\": \"{}\"",
fmt::vsprintf(metadata.fmtstring, std::move(metadata.store)));
if (!metadata.hex_dump.empty()) {
fmt::format_to(
buffer,
",\n \"hex_dump\": \"{:02x}\"",
fmt::join(metadata.hex_dump.cbegin(), metadata.hex_dump.cend(), " "));
}
fmt::format_to(buffer, "\n}}\n");
}
void json_formatter::format_context_begin(const detail::log_entry_metadata& md,
const std::string& ctx_name,
unsigned size,
fmt::memory_buffer& buffer)
{
assert(scope_stack.empty() && "Stack should be empty");
assert(nest_level == 0 && "Nesting level should be 0");
fmt::format_to(buffer, "{{\n");
push_scope(size);
if (!md.fmtstring.empty()) {
fmt::format_to(buffer,
" \"log_entry\": \"{}\",\n",
fmt::vsprintf(md.fmtstring, std::move(md.store)));
}
}
void json_formatter::format_context_end(const detail::log_entry_metadata& md,
const std::string& ctx_name,
fmt::memory_buffer& buffer)
{
pop_scope();
fmt::format_to(buffer, "}}\n");
assert(scope_stack.empty() && "Stack should be empty");
assert(nest_level == 0 && "Nesting level should be 0");
}
void json_formatter::format_metric_set_begin(const std::string& set_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer)
{
// Arrays in JSON require an additional nesting level before inserting the
// object.
// array: [
// {
// "obj: {}
// }
// ]
if (in_list_scope()) {
fmt::format_to(buffer, "{: <{}}{{\n", ' ', indents(level));
increment_nest_level();
}
consume_element();
fmt::format_to(buffer, "{: <{}}\"{}\": {{\n", ' ', indents(level), set_name);
push_scope(size);
}
void json_formatter::format_metric_set_end(const std::string& set_name,
unsigned level,
fmt::memory_buffer& buffer)
{
pop_scope();
fmt::format_to(buffer,
"{: <{}}}}{}\n",
' ',
indents(level),
needs_comma() && !in_list_scope() ? "," : "");
if (in_list_scope()) {
decrement_nest_level();
fmt::format_to(
buffer, "{: <{}}}}{}\n", ' ', indents(level), needs_comma() ? "," : "");
}
}
void json_formatter::format_metric(const std::string& metric_name,
const std::string& metric_value,
const std::string& metric_units,
metric_kind kind,
unsigned level,
fmt::memory_buffer& buffer)
{
consume_element();
fmt::format_to(buffer,
"{: <{}}\"{}\": {}{}{}{}\n",
' ',
indents(level),
metric_name,
kind == metric_kind::string ? "\"" : "",
metric_value,
kind == metric_kind::string ? "\"" : "",
needs_comma() ? "," : "");
}
void json_formatter::format_list_begin(const std::string& list_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer)
{
consume_element();
fmt::format_to(buffer, "{: <{}}\"{}\": [\n", ' ', indents(level), list_name);
push_list_scope(size);
}
void json_formatter::format_list_end(const std::string& list_name,
unsigned level,
fmt::memory_buffer& buffer)
{
pop_scope();
fmt::format_to(
buffer, "{: <{}}]{}\n", ' ', indents(level), needs_comma() ? "," : "");
}

@ -0,0 +1,137 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLOG_JSON_FORMATTER_H
#define SRSLOG_JSON_FORMATTER_H
#include "srslte/srslog/formatter.h"
namespace srslog {
/// JSON formatter class implementation.
/// Formats each log entry and context into its own JSON object making the
/// formatter stateless so that new entries do not depend on the state of
/// previous ones. The output is ready for JSON streaming following the
/// "Concatenated JSON" style.
class json_formatter : public log_formatter
{
public:
json_formatter() { scope_stack.reserve(16); }
std::unique_ptr<log_formatter> clone() const override;
void format(detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) override;
private:
void format_context_begin(const detail::log_entry_metadata& md,
const std::string& ctx_name,
unsigned size,
fmt::memory_buffer& buffer) override;
void format_context_end(const detail::log_entry_metadata& md,
const std::string& ctx_name,
fmt::memory_buffer& buffer) override;
void format_metric_set_begin(const std::string& set_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer) override;
void format_metric_set_end(const std::string& set_name,
unsigned level,
fmt::memory_buffer& buffer) override;
void format_list_begin(const std::string& list_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer) override;
void format_list_end(const std::string& list_name,
unsigned level,
fmt::memory_buffer& buffer) override;
void format_metric(const std::string& metric_name,
const std::string& metric_value,
const std::string& metric_units,
metric_kind kind,
unsigned level,
fmt::memory_buffer& buffer) override;
/// Pushes a new entry in the scope stack.
void push_scope(unsigned size) { scope_stack.emplace_back(size, false); }
/// Pushes a new list entry in the scope stack.
void push_list_scope(unsigned size) { scope_stack.emplace_back(size, true); }
/// Pops the topmost entry in the scope stack.
void pop_scope()
{
assert(!scope_stack.empty() && "Popping scope in empty stack");
scope_stack.pop_back();
}
/// Consumes an element in the current scope.
void consume_element()
{
assert(!scope_stack.empty() && "Consuming element in void scope");
assert(scope_stack.back().size && "No more elements to consume");
--scope_stack.back().size;
}
/// Returns true if the current element needs a comma.
bool needs_comma() const
{
assert(!scope_stack.empty() && "No scope exists");
return scope_stack.back().size;
}
/// Returns true if the current scope is a list.
bool in_list_scope() const
{
assert(!scope_stack.empty() && "No scope exists");
return scope_stack.back().inside_list;
}
/// Increments the nesting level by one.
void increment_nest_level() { ++nest_level; }
/// Decrements the nesting level by one.
void decrement_nest_level()
{
assert(nest_level && "Expected the nesting level to greater than 0");
--nest_level;
}
/// Return the number of space chars to indent the specified level.
unsigned indents(unsigned level) const { return (nest_level + level) * 2; }
private:
/// Keeps track of some information about a JSON scope.
struct scope {
scope(unsigned size, bool inside_list) :
size(size), inside_list(inside_list)
{}
/// Number of elements this scope holds.
unsigned size;
/// If true, indicates this scope belongs to a list.
const bool inside_list;
};
private:
unsigned nest_level = 0;
std::vector<scope> scope_stack;
};
} // namespace srslog
#endif // SRSLOG_JSON_FORMATTER_H

@ -0,0 +1,160 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "text_formatter.h"
#include "srslte/srslog/bundled/fmt/chrono.h"
#include "srslte/srslog/detail/log_entry_metadata.h"
using namespace srslog;
std::unique_ptr<log_formatter> text_formatter::clone() const
{
return std::unique_ptr<log_formatter>(new text_formatter(*this));
}
/// Formats into a hex dump a range of elements, storing the result in the input
/// buffer.
static void format_hex_dump(const std::vector<uint8_t>& v,
fmt::memory_buffer& buffer)
{
if (v.empty()) {
return;
}
const size_t elements_per_line = 16;
for (auto i = v.cbegin(), e = v.cend(); i != e;) {
auto num_elements =
std::min<size_t>(elements_per_line, std::distance(i, e));
fmt::format_to(buffer,
" {:04x}: {:02x}\n",
std::distance(v.cbegin(), i),
fmt::join(i, i + num_elements, " "));
std::advance(i, num_elements);
}
}
/// Format the log metadata into the input buffer.
static void format_metadata(const detail::log_entry_metadata& metadata,
fmt::memory_buffer& buffer)
{
// Time stamp data preparation.
std::tm current_time =
fmt::gmtime(std::chrono::high_resolution_clock::to_time_t(metadata.tp));
auto us_fraction = std::chrono::duration_cast<std::chrono::microseconds>(
metadata.tp.time_since_epoch())
.count() %
1000000u;
fmt::format_to(buffer, "{:%H:%M:%S}.{:06} ", current_time, us_fraction);
// Format optional fields if present.
if (!metadata.log_name.empty()) {
fmt::format_to(buffer, "[{: <4.4}] ", metadata.log_name);
}
if (metadata.log_tag != '\0') {
fmt::format_to(buffer, "[{}] ", metadata.log_tag);
}
if (metadata.context.enabled) {
fmt::format_to(buffer, "[{:5}] ", metadata.context.value);
}
}
void text_formatter::format(detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer)
{
// Prefix first.
format_metadata(metadata, buffer);
// Message formatting.
fmt::format_to(buffer,
"{}\n",
fmt::vsprintf(metadata.fmtstring, std::move(metadata.store)));
// Optional hex dump formatting.
format_hex_dump(metadata.hex_dump, buffer);
}
void text_formatter::format_context_begin(const detail::log_entry_metadata& md,
const std::string& ctx_name,
unsigned size,
fmt::memory_buffer& buffer)
{
do_one_line_ctx_format = !md.fmtstring.empty();
format_metadata(md, buffer);
if (do_one_line_ctx_format) {
fmt::format_to(buffer, "[");
return;
}
fmt::format_to(buffer, "Context dump for \"{}\"\n", ctx_name);
}
void text_formatter::format_context_end(const detail::log_entry_metadata& md,
const std::string& ctx_name,
fmt::memory_buffer& buffer)
{
if (do_one_line_ctx_format) {
fmt::format_to(buffer, "]: {}\n", fmt::vsprintf(md.fmtstring, md.store));
return;
}
}
void text_formatter::format_metric_set_begin(const std::string& set_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer)
{
/*if (do_one_line_ctx_format) {
fmt::format_to(buffer, "{}", is_first ? "[" : " [");
return;
}
fmt::format_to(buffer, " {}\n", set_name);*/
}
void text_formatter::format_metric_set_end(const std::string& set_name,
unsigned level,
fmt::memory_buffer& buffer)
{
if (do_one_line_ctx_format) {
fmt::format_to(buffer, "]");
return;
}
}
void text_formatter::format_metric(const std::string& metric_name,
const std::string& metric_value,
const std::string& metric_units,
metric_kind kind,
unsigned level,
fmt::memory_buffer& buffer)
{
//:TODO: re-enable
/*if (do_one_line_ctx_format) {
fmt::format_to(buffer,
"{}{}_{}: {}{}{}",
ctx.is_first_metric ? "" : ", ",
ctx.set_name,
ctx.metric_name,
ctx.metric_value,
ctx.metric_units.empty() ? "" : " ",
ctx.metric_units);
return;
}
fmt::format_to(buffer,
" {}: {}{}{}\n",
ctx.metric_name,
ctx.metric_value,
ctx.metric_units.empty() ? "" : " ",
ctx.metric_units);*/
}

@ -0,0 +1,79 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLOG_TEXT_FORMATTER_H
#define SRSLOG_TEXT_FORMATTER_H
#include "srslte/srslog/formatter.h"
namespace srslog {
/// Plain text formatter implementation class.
//:TODO: this class needs refactoring to be compatible with multiple nesting of
// metrics.
class text_formatter : public log_formatter
{
public:
std::unique_ptr<log_formatter> clone() const override;
void format(detail::log_entry_metadata&& metadata,
fmt::memory_buffer& buffer) override;
private:
void format_context_begin(const detail::log_entry_metadata& md,
const std::string& ctx_name,
unsigned size,
fmt::memory_buffer& buffer) override;
void format_context_end(const detail::log_entry_metadata& md,
const std::string& ctx_name,
fmt::memory_buffer& buffer) override;
void format_metric_set_begin(const std::string& set_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer) override;
void format_metric_set_end(const std::string& set_name,
unsigned level,
fmt::memory_buffer& buffer) override;
void format_list_begin(const std::string& list_name,
unsigned size,
unsigned level,
fmt::memory_buffer& buffer) override
{
//:TODO: implement me
}
void format_list_end(const std::string& list_name,
unsigned level,
fmt::memory_buffer& buffer) override
{
//:TODO: implement me
}
void format_metric(const std::string& metric_name,
const std::string& metric_value,
const std::string& metric_units,
metric_kind kind,
unsigned level,
fmt::memory_buffer& buffer) override;
private:
/// Flags that the formatting should take place into a single line.
bool do_one_line_ctx_format = false;
};
} // namespace srslog
#endif // SRSLOG_TEXT_FORMATTER_H

@ -1,123 +0,0 @@
/**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
*
* srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* A copy of the GNU Affero General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/
#ifndef SRSLOG_SINK_REPOSITORY_H
#define SRSLOG_SINK_REPOSITORY_H
#include "object_repository.h"
#include "sinks/stream_sink.h"
namespace srslog {
/// The sink repository stores sink instances associated to an id. Both stdout
/// and stderr stream sinks are created on construction so they accessible
/// without the need of creating them previously.
/// NOTE: Thread safe class.
class sink_repository
{
/// Identifiers for stdout and stderr sinks.
static constexpr char stdout_id[] = "stdout#";
static constexpr char stderr_id[] = "stderr#";
object_repository<std::string, std::unique_ptr<sink> > repo;
public:
sink_repository()
{
//:TODO: GCC5 or lower versions emits an error if we use the new() expression directly, use redundant
//piecewise_construct instead.
repo.emplace(std::piecewise_construct,
std::forward_as_tuple(stdout_id),
std::forward_as_tuple(new stream_sink(sink_stream_type::stdout)));
repo.emplace(std::piecewise_construct,
std::forward_as_tuple(stderr_id),
std::forward_as_tuple(new stream_sink(sink_stream_type::stderr)));
}
/// Returns the instance of the sink that writes to stdout.
sink& get_stdout_sink()
{
auto s = repo.find(stdout_id);
assert(s && "stdout sink should always exist");
return *(s->get());
}
const sink& get_stdout_sink() const
{
const auto s = repo.find(stdout_id);
assert(s && "stdout sink should always exist");
return *(s->get());
}
/// Returns the instance of the sink that writes to stderr.
sink& get_stderr_sink()
{
auto s = repo.find(stderr_id);
assert(s && "stderr sink should always exist");
return *(s->get());
}
const sink& get_stderr_sink() const
{
const auto s = repo.find(stderr_id);
assert(s && "stderr sink should always exist");
return *(s->get());
}
/// Finds a sink with the specified id in the repository. Returns a pointer to
/// the sink, otherwise nullptr if not found.
sink* find(const std::string& id)
{
auto p = repo.find(id);
return (p) ? p->get() : nullptr;
}
const sink* find(const std::string& id) const
{
const auto p = repo.find(id);
return (p) ? p->get() : nullptr;
}
/// Returns an instance of a sink specified by the input arguments.
template <typename... Args>
sink& fetch_sink(Args&&... args)
{
return *repo.emplace(std::forward<Args>(args)...);
}
/// Returns a copy of the list of registered sinks.
std::vector<sink*> contents() const
{
auto repo_contents = repo.contents();
std::vector<sink*> data;
data.reserve(repo_contents.size());
for (const auto& s : repo_contents) {
data.push_back(s->get());
}
return data;
}
};
constexpr char sink_repository::stdout_id[];
constexpr char sink_repository::stderr_id[];
} // namespace srslog
#endif // SRSLOG_SINK_REPOSITORY_H

@ -24,7 +24,6 @@
#include "file_utils.h"
#include "srslte/srslog/sink.h"
#include <cassert>
namespace srslog {
@ -34,7 +33,10 @@ namespace srslog {
class file_sink : public sink
{
public:
file_sink(std::string name, size_t max_size) :
file_sink(std::string name,
size_t max_size,
std::unique_ptr<log_formatter> f) :
sink(std::move(f)),
base_filename(std::move(name)),
max_size((max_size == 0) ? 0 : std::max<size_t>(max_size, 4 * 1024))
{}
@ -42,8 +44,6 @@ public:
file_sink(const file_sink& other) = delete;
file_sink& operator=(const file_sink& other) = delete;
~file_sink() override { handler.close(); }
detail::error_string write(detail::memory_buffer buffer) override
{
// Create a new file the first time we hit this method.

@ -94,7 +94,7 @@ public:
explicit operator bool() const { return handle; }
/// Returns the handle of the underlying file.
std::FILE* get_handle() { return handle; }
std::FILE* get_handle() const { return handle; }
/// Returns the path of the file.
const std::string& get_path() const { return path; }
@ -110,8 +110,8 @@ public:
return {};
}
return format_error(fmt::format("Unable to create log file \"{}\"", path),
errno);
return format_error(
fmt::format("Unable to create log file \"{}\"", new_path), errno);
}
/// Writes the provided memory buffer into an open file, otherwise does
@ -121,9 +121,10 @@ public:
if (handle &&
std::fwrite(buffer.data(), sizeof(char), buffer.size(), handle) !=
buffer.size()) {
auto err_str = format_error(
fmt::format("Unable to write log file \"{}\"", path), errno);
close();
return format_error(fmt::format("Unable to write log file \"{}\"", path),
errno);
return err_str;
}
return {};
@ -133,10 +134,11 @@ public:
detail::error_string flush()
{
if (handle && ::fflush(handle) == EOF) {
close();
return format_error(
auto err_str = format_error(
fmt::format("Error encountered while flushing log file \"{}\"", path),
errno);
close();
return err_str;
}
return {};

@ -23,8 +23,6 @@
#define SRSLOG_STREAM_SINK_H
#include "srslte/srslog/sink.h"
#include <cassert>
#include <cstdio>
namespace srslog {
@ -35,7 +33,8 @@ enum class sink_stream_type { stdout, stderr };
class stream_sink : public sink
{
public:
explicit stream_sink(sink_stream_type s) :
stream_sink(sink_stream_type s, std::unique_ptr<log_formatter> f) :
sink(std::move(f)),
handle((s == sink_stream_type::stdout) ? stdout : stderr)
{}

@ -20,6 +20,7 @@
*/
#include "srslte/srslog/srslog.h"
#include "formatters/json_formatter.h"
#include "sinks/file_sink.h"
#include "srslog_instance.h"
@ -36,10 +37,13 @@ static std::string remove_sharp_chars(const std::string& s)
/// Generic argument function that fetches a log channel from the repository.
template <typename... Args>
static log_channel& fetch_log_channel_helper(const std::string& id, Args&&... args)
static log_channel& fetch_log_channel_helper(const std::string& id,
Args&&... args)
{
return srslog_instance::get().get_channel_repo().emplace(
std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(id, std::forward<Args>(args)...));
std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(id, std::forward<Args>(args)...));
}
///
@ -55,18 +59,46 @@ log_channel& srslog::fetch_log_channel(const std::string& id)
{
assert(!id.empty() && "Empty id string");
std::string clean_id = remove_sharp_chars(id);
std::string clean_id = remove_sharp_chars(id);
srslog_instance& instance = srslog_instance::get();
return fetch_log_channel_helper(clean_id, instance.get_default_sink(), instance.get_backend());
return fetch_log_channel_helper(
clean_id, instance.get_default_sink(), instance.get_backend());
}
log_channel& srslog::fetch_log_channel(const std::string& id, sink& s, log_channel_config config)
log_channel& srslog::fetch_log_channel(const std::string& id,
sink& s,
log_channel_config config)
{
assert(!id.empty() && "Empty id string");
std::string clean_id = remove_sharp_chars(id);
std::string clean_id = remove_sharp_chars(id);
srslog_instance& instance = srslog_instance::get();
return fetch_log_channel_helper(clean_id, s, instance.get_backend(), std::move(config));
return fetch_log_channel_helper(
clean_id, s, instance.get_backend(), std::move(config));
}
///
/// Formatter management functions.
///
void srslog::set_default_log_formatter(std::unique_ptr<log_formatter> f)
{
srslog_instance::get().set_default_formatter(std::move(f));
}
std::unique_ptr<log_formatter> srslog::get_default_log_formatter()
{
return srslog_instance::get().get_default_formatter();
}
std::unique_ptr<log_formatter> srslog::create_text_formatter()
{
return std::unique_ptr<log_formatter>(new text_formatter);
}
std::unique_ptr<log_formatter> srslog::create_json_formatter()
{
return std::unique_ptr<log_formatter>(new json_formatter);
}
///
@ -85,29 +117,65 @@ sink& srslog::get_default_sink()
sink* srslog::find_sink(const std::string& id)
{
return srslog_instance::get().get_sink_repo().find(id);
auto ptr = srslog_instance::get().get_sink_repo().find(id);
return (ptr) ? ptr->get() : nullptr;
}
sink& srslog::fetch_stdout_sink()
sink& srslog::fetch_stdout_sink(const std::string& id,
std::unique_ptr<log_formatter> f)
{
return srslog_instance::get().get_sink_repo().get_stdout_sink();
assert(!id.empty() && "Empty id string");
auto& s = srslog_instance::get().get_sink_repo().emplace(
std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(
new stream_sink(sink_stream_type::stdout, std::move(f))));
return *s;
}
sink& srslog::fetch_stderr_sink()
sink& srslog::fetch_stderr_sink(const std::string& id,
std::unique_ptr<log_formatter> f)
{
return srslog_instance::get().get_sink_repo().get_stderr_sink();
assert(!id.empty() && "Empty id string");
auto& s = srslog_instance::get().get_sink_repo().emplace(
std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(
new stream_sink(sink_stream_type::stderr, std::move(f))));
return *s;
}
sink& srslog::fetch_file_sink(const std::string& path, size_t max_size)
sink& srslog::fetch_file_sink(const std::string& path,
size_t max_size,
std::unique_ptr<log_formatter> f)
{
assert(!path.empty() && "Empty path string");
std::string clean_path = remove_sharp_chars(path);
//:TODO: GCC5 or lower versions emits an error if we use the new() expression directly, use redundant
// piecewise_construct instead.
return srslog_instance::get().get_sink_repo().fetch_sink(std::piecewise_construct,
std::forward_as_tuple(clean_path),
std::forward_as_tuple(new file_sink(clean_path, max_size)));
//:TODO: GCC5 or lower versions emits an error if we use the new() expression
// directly, use redundant piecewise_construct instead.
auto& s = srslog_instance::get().get_sink_repo().emplace(
std::piecewise_construct,
std::forward_as_tuple(path),
std::forward_as_tuple(new file_sink(path, max_size, std::move(f))));
return *s;
}
bool srslog::install_custom_sink(const std::string& id, std::unique_ptr<sink> s)
{
assert(!id.empty() && "Empty path string");
sink* input_sink = s.get();
sink* returned_sink =
srslog_instance::get().get_sink_repo().emplace(id, std::move(s)).get();
// Successful insertion occurs when the returned object is the same one as the
// input object.
return input_sink == returned_sink;
}
///
@ -131,9 +199,16 @@ void srslog::flush()
// The backend will set this shared variable when done.
detail::shared_variable<bool> completion_flag(false);
auto sink_ptrs = instance.get_sink_repo().contents();
std::vector<sink*> sinks;
sinks.reserve(sink_ptrs.size());
for (const auto& s : sink_ptrs) {
sinks.push_back(s->get());
}
detail::log_entry cmd;
cmd.flush_cmd = std::unique_ptr<detail::flush_backend_cmd>(
new detail::flush_backend_cmd{completion_flag, instance.get_sink_repo().contents()});
new detail::flush_backend_cmd{completion_flag, std::move(sinks)});
instance.get_backend().push(std::move(cmd));
@ -157,10 +232,12 @@ detail::any* srslog::detail::find_logger(const std::string& id)
return srslog_instance::get().get_logger_repo().find(id);
}
detail::any* srslog::detail::fetch_logger(const std::string& id, detail::any&& logger)
detail::any* srslog::detail::fetch_logger(const std::string& id,
detail::any&& logger)
{
assert(!id.empty() && "Empty id string");
return &srslog_instance::get().get_logger_repo().emplace(id, std::move(logger));
return &srslog_instance::get().get_logger_repo().emplace(id,
std::move(logger));
}
/// Builds a logger name out of the id and tag.
@ -170,7 +247,9 @@ static std::string build_logger_name(const std::string& id, char tag)
}
/// Fetches a logger with all its log channels.
static basic_logger& fetch_basic_logger_helper(const std::string& id, sink& s, bool should_print_context)
static basic_logger& fetch_basic_logger_helper(const std::string& id,
sink& s,
bool should_print_context)
{
static constexpr char basic_logger_chan_tags[] = {'E', 'W', 'I', 'D'};
@ -179,36 +258,41 @@ static basic_logger& fetch_basic_logger_helper(const std::string& id, sink& s, b
// User created log channels cannot have ids with a # character, encode the
// ids here with a # to ensure all channels are unique.
log_channel& error =
fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[0]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[0], should_print_context});
log_channel& warning =
fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[1]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[1], should_print_context});
log_channel& info = fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[2]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[2], should_print_context});
log_channel& debug =
fetch_log_channel_helper(build_logger_name(id, basic_logger_chan_tags[3]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[3], should_print_context});
log_channel& error = fetch_log_channel_helper(
build_logger_name(id, basic_logger_chan_tags[0]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[0], should_print_context});
log_channel& warning = fetch_log_channel_helper(
build_logger_name(id, basic_logger_chan_tags[1]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[1], should_print_context});
log_channel& info = fetch_log_channel_helper(
build_logger_name(id, basic_logger_chan_tags[2]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[2], should_print_context});
log_channel& debug = fetch_log_channel_helper(
build_logger_name(id, basic_logger_chan_tags[3]),
s,
instance.get_backend(),
log_channel_config{id, basic_logger_chan_tags[3], should_print_context});
return fetch_logger<basic_logger>(id, error, warning, info, debug);
}
basic_logger& srslog::fetch_basic_logger(const std::string& id, bool should_print_context)
basic_logger& srslog::fetch_basic_logger(const std::string& id,
bool should_print_context)
{
assert(!id.empty() && "Empty id string");
return fetch_basic_logger_helper(id, srslog_instance::get().get_default_sink(), should_print_context);
return fetch_basic_logger_helper(
id, srslog_instance::get().get_default_sink(), should_print_context);
}
basic_logger& srslog::fetch_basic_logger(const std::string& id, sink& s, bool should_print_context)
basic_logger& srslog::fetch_basic_logger(const std::string& id,
sink& s,
bool should_print_context)
{
assert(!id.empty() && "Empty id string");
return fetch_basic_logger_helper(id, s, should_print_context);
@ -220,28 +304,33 @@ basic_logger& srslog::fetch_basic_logger(const std::string& id, sink& s, bool sh
/// Creates and registers a log channel. Returns a pointer to the newly created
/// channel on success, otherwise nullptr.
static log_channel* create_and_register_log_channel(const std::string& id, sink& s)
static log_channel* create_and_register_log_channel(const std::string& id,
sink& s)
{
assert(!id.empty() && "Empty id string");
srslog_instance& instance = srslog_instance::get();
auto& p = instance.get_channel_repo().emplace(
std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(id, s, instance.get_backend()));
std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(id, s, instance.get_backend()));
return &p;
}
static log_channel* create_and_register_log_channel(const std::string& id, log_channel_config config, sink& s)
static log_channel* create_and_register_log_channel(const std::string& id,
log_channel_config config,
sink& s)
{
assert(!id.empty() && "Empty id string");
srslog_instance& instance = srslog_instance::get();
auto& p =
instance.get_channel_repo().emplace(std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(id, s, instance.get_backend(), std::move(config)));
auto& p = instance.get_channel_repo().emplace(
std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(id, s, instance.get_backend(), std::move(config)));
return &p;
}
@ -264,23 +353,32 @@ log_channel* srslog::create_log_channel(const std::string& id, sink& s)
sink* srslog::create_stdout_sink(const std::string& name)
{
return &srslog_instance::get().get_sink_repo().get_stdout_sink();
return srslog_instance::get().get_sink_repo().find("stdout")->get();
}
sink* srslog::create_stderr_sink(const std::string& name)
{
return &srslog_instance::get().get_sink_repo().get_stderr_sink();
return srslog_instance::get().get_sink_repo().find("stderr")->get();
}
sink* srslog::create_file_sink(const std::string& path, size_t max_size)
{
//:TODO: GCC5 or lower versions emits an error if we use the new() expression directly, use redundant
// piecewise_construct instead.
return &srslog_instance::get().get_sink_repo().fetch_sink(
std::piecewise_construct, std::forward_as_tuple(path), std::forward_as_tuple(new file_sink(path, max_size)));
//:TODO: GCC5 or lower versions emits an error if we use the new() expression
// directly, use redundant piecewise_construct instead.
return srslog_instance::get()
.get_sink_repo()
.emplace(std::piecewise_construct,
std::forward_as_tuple(path),
std::forward_as_tuple(new file_sink(
path,
max_size,
std::unique_ptr<log_formatter>(new text_formatter))))
.get();
}
basic_logger* srslog::create_basic_logger(const std::string& id, sink& s, bool should_print_context)
basic_logger* srslog::create_basic_logger(const std::string& id,
sink& s,
bool should_print_context)
{
assert(!id.empty() && "Empty id string");
@ -298,16 +396,24 @@ basic_logger* srslog::create_basic_logger(const std::string& id, sink& s, bool s
// without any id clashes.
log_channel* error = create_and_register_log_channel(
build_logger_name(id, basic_logger_chan_tags[0]), {id, basic_logger_chan_tags[0], should_print_context}, s);
build_logger_name(id, basic_logger_chan_tags[0]),
{id, basic_logger_chan_tags[0], should_print_context},
s);
assert(error && "Could not create channel");
log_channel* warning = create_and_register_log_channel(
build_logger_name(id, basic_logger_chan_tags[1]), {id, basic_logger_chan_tags[1], should_print_context}, s);
build_logger_name(id, basic_logger_chan_tags[1]),
{id, basic_logger_chan_tags[1], should_print_context},
s);
assert(warning && "Could not create channel");
log_channel* info = create_and_register_log_channel(
build_logger_name(id, basic_logger_chan_tags[2]), {id, basic_logger_chan_tags[2], should_print_context}, s);
build_logger_name(id, basic_logger_chan_tags[2]),
{id, basic_logger_chan_tags[2], should_print_context},
s);
assert(info && "Could not create channel");
log_channel* debug = create_and_register_log_channel(
build_logger_name(id, basic_logger_chan_tags[3]), {id, basic_logger_chan_tags[3], should_print_context}, s);
build_logger_name(id, basic_logger_chan_tags[3]),
{id, basic_logger_chan_tags[3], should_print_context},
s);
assert(debug && "Could not create channel");
return create_logger<basic_logger>(id, *error, *warning, *info, *debug);

@ -21,7 +21,6 @@
#include "srslte/srslog/srslog_c.h"
#include "srslte/srslog/srslog.h"
#include <cassert>
#include <cstdarg>
using namespace srslog;

@ -22,9 +22,10 @@
#ifndef SRSLOG_SRSLOG_INSTANCE_H
#define SRSLOG_SRSLOG_INSTANCE_H
#include "formatters/text_formatter.h"
#include "log_backend_impl.h"
#include "sink_repository.h"
#include "srslte/srslog/detail/support/any.h"
#include "object_repository.h"
#include "sinks/stream_sink.h"
#include "srslte/srslog/log_channel.h"
namespace srslog {
@ -32,7 +33,29 @@ namespace srslog {
/// Singleton of the framework containing all the required classes.
class srslog_instance
{
srslog_instance() { default_sink = &sink_repo.get_stdout_sink(); }
srslog_instance()
{
// stdout and stderr sinks are always present.
auto& stdout_sink = sink_repo.emplace(
std::piecewise_construct,
std::forward_as_tuple("stdout"),
std::forward_as_tuple(new stream_sink(
sink_stream_type::stdout,
std::unique_ptr<log_formatter>(new text_formatter))));
default_sink = stdout_sink.get();
sink_repo.emplace(std::piecewise_construct,
std::forward_as_tuple("stderr"),
std::forward_as_tuple(new stream_sink(
sink_stream_type::stderr,
std::unique_ptr<log_formatter>(new text_formatter))));
// Initialize the default formatter pointer with a text formatter.
{
detail::scoped_lock lock(formatter_mutex);
default_formatter = std::unique_ptr<log_formatter>(new text_formatter);
}
}
public:
srslog_instance(const srslog_instance& other) = delete;
@ -56,8 +79,9 @@ public:
const channel_repo_type& get_channel_repo() const { return channel_repo; }
/// Sink repository accessor.
sink_repository& get_sink_repo() { return sink_repo; }
const sink_repository& get_sink_repo() const { return sink_repo; }
using sink_repo_type = object_repository<std::string, std::unique_ptr<sink>>;
sink_repo_type& get_sink_repo() { return sink_repo; }
const sink_repo_type& get_sink_repo() const { return sink_repo; }
/// Backend accessor.
detail::log_backend& get_backend() { return backend; }
@ -73,16 +97,32 @@ public:
void set_default_sink(sink& s) { default_sink = &s; }
/// Returns the default sink.
sink& get_default_sink() { return *default_sink; }
sink& get_default_sink() const { return *default_sink; }
/// Set the specified formatter as the default one.
void set_default_formatter(std::unique_ptr<log_formatter> f)
{
detail::scoped_lock lock(formatter_mutex);
default_formatter = std::move(f);
}
/// Returns the default formatter.
std::unique_ptr<log_formatter> get_default_formatter() const
{
detail::scoped_lock lock(formatter_mutex);
return default_formatter->clone();
}
private:
/// NOTE: The order of declaration of each member is important here for proper
/// destruction.
sink_repository sink_repo;
sink_repo_type sink_repo;
log_backend_impl backend;
channel_repo_type channel_repo;
logger_repo_type logger_repo;
detail::shared_variable<sink*> default_sink{nullptr};
mutable detail::mutex formatter_mutex;
std::unique_ptr<log_formatter> default_formatter;
};
} // namespace srslog

@ -31,7 +31,6 @@ namespace srslte {
rlc::rlc(const char* logname) : rlc_log(logname)
{
pool = byte_buffer_pool::get_instance();
bzero(metrics_time, sizeof(metrics_time));
pthread_rwlock_init(&rwlock, NULL);
}
@ -65,7 +64,6 @@ void rlc::init(srsue::pdcp_interface_rlc* pdcp_,
timers = timers_;
default_lcid = lcid_;
gettimeofday(&metrics_time[1], NULL);
reset_metrics();
// create default RLC_TM bearer for SRB0
@ -91,6 +89,8 @@ void rlc::reset_metrics()
for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) {
it->second->reset_metrics();
}
metrics_tp = std::chrono::high_resolution_clock::now();
}
void rlc::stop()
@ -105,20 +105,18 @@ void rlc::stop()
void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti)
{
gettimeofday(&metrics_time[2], NULL);
get_time_interval(metrics_time);
double secs = (double)metrics_time[0].tv_sec + metrics_time[0].tv_usec * 1e-6;
std::chrono::duration<double> secs = std::chrono::high_resolution_clock::now() - metrics_tp;
for (rlc_map_t::iterator it = rlc_array.begin(); it != rlc_array.end(); ++it) {
rlc_bearer_metrics_t metrics = it->second->get_metrics();
// Rx/Tx rate based on real time
double rx_rate_mbps_real_time = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / secs;
double tx_rate_mbps_real_time = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / secs;
double rx_rate_mbps_real_time = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / secs.count();
double tx_rate_mbps_real_time = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / secs.count();
// Rx/Tx rate based on number of TTIs
double rx_rate_mbps = (metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0);
double tx_rate_mbps = (metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0);
double rx_rate_mbps = (nof_tti > 0) ? ((metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
double tx_rate_mbps = (nof_tti > 0) ? ((metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
rlc_log->info("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)\n",
it->first,
@ -134,11 +132,10 @@ void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti)
rlc_bearer_metrics_t metrics = it->second->get_metrics();
rlc_log->info("MCH_LCID=%d, rx_rate_mbps=%4.2f\n",
it->first,
(metrics.num_rx_pdu_bytes * 8 / static_cast<double>(1e6)) / secs);
(metrics.num_rx_pdu_bytes * 8 / static_cast<double>(1e6)) / secs.count());
m.bearer[it->first] = metrics;
}
memcpy(&metrics_time[1], &metrics_time[2], sizeof(struct timeval));
reset_metrics();
}
@ -152,6 +149,8 @@ void rlc::reestablish()
for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) {
it->second->reestablish();
}
reset_metrics();
}
// Reestablish a specific RLC bearer
@ -177,7 +176,8 @@ void rlc::reset()
delete (it->second);
}
rlc_array.clear();
// the multicast bearer (MRB) is not removed here because eMBMS services continue to be streamed in idle mode (3GPP TS 23.246 version 14.1.0 Release 14 section 8)
// the multicast bearer (MRB) is not removed here because eMBMS services continue to be streamed in idle mode (3GPP
// TS 23.246 version 14.1.0 Release 14 section 8)
}
// Add SRB0 again
@ -400,6 +400,13 @@ void rlc::add_bearer(uint32_t lcid, const rlc_config_t& cnfg)
rlc_common* rlc_entity = nullptr;
if (cnfg.rlc_mode != rlc_mode_t::tm and rlc_array.find(lcid) != rlc_array.end()) {
if (rlc_array[lcid]->get_mode() != cnfg.rlc_mode) {
rlc_log->info("Switching RLC entity type. Recreating it.\n");
rlc_array.erase(lcid);
}
}
if (not valid_lcid(lcid)) {
if (cnfg.rat == srslte_rat_t::lte) {
switch (cnfg.rlc_mode) {

@ -108,6 +108,9 @@ uint32_t rlc_am_lte::get_bearer()
rlc_bearer_metrics_t rlc_am_lte::get_metrics()
{
// update values that aren't calculated on the fly
metrics.rx_latency_ms = rx.get_sdu_rx_latency_ms();
metrics.rx_buffered_bytes = rx.get_rx_buffered_bytes();
return metrics;
}
@ -846,7 +849,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
tx_sdu->N_bytes -= to_move;
tx_sdu->msg += to_move;
if (tx_sdu->N_bytes == 0) {
log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", RB_NAME, tx_sdu->get_latency_us());
log->debug("%s Complete SDU scheduled for tx.\n", RB_NAME);
tx_sdu.reset();
}
if (pdu_space > to_move) {
@ -885,7 +888,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
tx_sdu->N_bytes -= to_move;
tx_sdu->msg += to_move;
if (tx_sdu->N_bytes == 0) {
log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n", RB_NAME, tx_sdu->get_latency_us());
log->debug("%s Complete SDU scheduled for tx.\n", RB_NAME);
tx_sdu.reset();
}
if (pdu_space > to_move) {
@ -945,6 +948,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
log->info_hex(payload, total_len, "%s Tx PDU SN=%d (%d B)\n", RB_NAME, header.sn, total_len);
log->debug("%s\n", rlc_amd_pdu_header_to_string(header).c_str());
debug_state();
return total_len;
}
@ -1263,6 +1267,7 @@ void rlc_am_lte::rlc_am_lte_rx::handle_data_pdu(uint8_t* payload, uint32_t nof_b
return;
#endif
}
pdu.buf->set_timestamp();
// check available space for payload
if (nof_bytes > pdu.buf->get_tailroom()) {
@ -1467,7 +1472,10 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus()
rx_sdu.reset();
goto exit;
}
// store timestamp of the first segment when starting to assemble SDUs
if (rx_sdu->N_bytes == 0) {
rx_sdu->set_timestamp(rx_window[vr_r].buf->get_timestamp());
}
memcpy(&rx_sdu->msg[rx_sdu->N_bytes], rx_window[vr_r].buf->msg, len);
rx_sdu->N_bytes += len;
@ -1475,7 +1483,9 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus()
rx_window[vr_r].buf->N_bytes -= len;
log->info_hex(rx_sdu->msg, rx_sdu->N_bytes, "%s Rx SDU (%d B)", RB_NAME, rx_sdu->N_bytes);
rx_sdu->set_timestamp();
sdu_rx_latency_ms.push(std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - rx_sdu->get_timestamp())
.count());
parent->pdcp->write_pdu(parent->lcid, std::move(rx_sdu));
parent->metrics.num_rx_sdus++;
@ -1506,6 +1516,10 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus()
len = rx_window[vr_r].buf->N_bytes;
log->debug_hex(rx_window[vr_r].buf->msg, len, "Handling last segment of length %d B of SN=%d\n", len, vr_r);
if (rx_sdu->get_tailroom() >= len) {
// store timestamp of the first segment when starting to assemble SDUs
if (rx_sdu->N_bytes == 0) {
rx_sdu->set_timestamp(rx_window[vr_r].buf->get_timestamp());
}
memcpy(&rx_sdu->msg[rx_sdu->N_bytes], rx_window[vr_r].buf->msg, len);
rx_sdu->N_bytes += rx_window[vr_r].buf->N_bytes;
} else {
@ -1519,7 +1533,9 @@ void rlc_am_lte::rlc_am_lte_rx::reassemble_rx_sdus()
if (rlc_am_end_aligned(rx_window[vr_r].header.fi)) {
log->info_hex(rx_sdu->msg, rx_sdu->N_bytes, "%s Rx SDU (%d B)", RB_NAME, rx_sdu->N_bytes);
rx_sdu->set_timestamp();
sdu_rx_latency_ms.push(std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - rx_sdu->get_timestamp())
.count());
parent->pdcp->write_pdu(parent->lcid, std::move(rx_sdu));
parent->metrics.num_rx_sdus++;
@ -1601,6 +1617,26 @@ void rlc_am_lte::rlc_am_lte_rx::write_pdu(uint8_t* payload, const uint32_t nof_b
}
}
uint32_t rlc_am_lte::rlc_am_lte_rx::get_rx_buffered_bytes()
{
uint32_t buff_size = 0;
pthread_mutex_lock(&mutex);
for (const auto& pdu : rx_window) {
buff_size += pdu.second.buf->N_bytes;
}
pthread_mutex_unlock(&mutex);
return buff_size;
}
uint32_t rlc_am_lte::rlc_am_lte_rx::get_sdu_rx_latency_ms()
{
uint32_t latency = 0;
pthread_mutex_lock(&mutex);
latency = sdu_rx_latency_ms.value();
pthread_mutex_unlock(&mutex);
return latency;
}
/**
* Function called from stack thread when timer has expired
*

@ -141,20 +141,20 @@ int rlc_tm::read_pdu(uint8_t* payload, uint32_t nof_bytes)
{
uint32_t pdu_size = ul_queue.size_tail_bytes();
if (pdu_size > nof_bytes) {
log->error(
"TX %s PDU size larger than MAC opportunity (%d > %d)\n", rrc->get_rb_name(lcid).c_str(), pdu_size, nof_bytes);
log->info(
"%s Tx PDU size larger than MAC opportunity (%d > %d)\n", rrc->get_rb_name(lcid).c_str(), pdu_size, nof_bytes);
return -1;
}
unique_byte_buffer_t buf;
if (ul_queue.try_read(&buf)) {
pdu_size = buf->N_bytes;
memcpy(payload, buf->msg, buf->N_bytes);
log->debug("%s Complete SDU scheduled for tx. Stack latency: %ld us\n",
log->debug("%s Complete SDU scheduled for tx. Stack latency: %" PRIu64 " us\n",
rrc->get_rb_name(lcid).c_str(),
buf->get_latency_us());
(uint64_t)buf->get_latency_us().count());
log->info_hex(payload,
pdu_size,
"TX %s, %s PDU, queue size=%d, bytes=%d",
"%s Tx %s PDU, queue size=%d, bytes=%d",
rrc->get_rb_name(lcid).c_str(),
srslte::to_string(rlc_mode_t::tm).c_str(),
ul_queue.size(),

@ -29,12 +29,7 @@ rlc_um_base::rlc_um_base(srslte::log_ref log_,
srsue::pdcp_interface_rlc* pdcp_,
srsue::rrc_interface_rlc* rrc_,
srslte::timer_handler* timers_) :
log(log_),
lcid(lcid_),
pdcp(pdcp_),
rrc(rrc_),
timers(timers_),
pool(byte_buffer_pool::get_instance())
log(log_), lcid(lcid_), pdcp(pdcp_), rrc(rrc_), timers(timers_), pool(byte_buffer_pool::get_instance())
{}
rlc_um_base::~rlc_um_base() {}
@ -211,7 +206,9 @@ rlc_um_base::rlc_um_base_rx::~rlc_um_base_rx() {}
* Tx subclass implementation (base)
***************************************************************************/
rlc_um_base::rlc_um_base_tx::rlc_um_base_tx(rlc_um_base* parent_) : log(parent_->log), pool(parent_->pool) {}
rlc_um_base::rlc_um_base_tx::rlc_um_base_tx(rlc_um_base* parent_) :
log(parent_->log), pool(parent_->pool), parent(parent_)
{}
rlc_um_base::rlc_um_base_tx::~rlc_um_base_tx() {}

@ -32,8 +32,7 @@ rlc_um_lte::rlc_um_lte(srslte::log_ref log_,
srsue::rrc_interface_rlc* rrc_,
srslte::timer_handler* timers_) :
rlc_um_base(log_, lcid_, pdcp_, rrc_, timers_)
{
}
{}
// Warning: must call stop() to properly deallocate all buffers
rlc_um_lte::~rlc_um_lte()
@ -155,9 +154,16 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t*
tx_sdu->N_bytes -= to_move;
tx_sdu->msg += to_move;
if (tx_sdu->N_bytes == 0) {
log->debug(
"%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rb_name.c_str(), tx_sdu->get_latency_us());
#ifdef ENABLE_TIMESTAMP
auto latency_us = tx_sdu->get_latency_us().count();
mean_pdu_latency_us.push(latency_us);
log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %" PRIu64 "/%ld us\n",
rb_name.c_str(),
(uint64_t)latency_us,
(long)mean_pdu_latency_us.value());
#else
log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str());
#endif
tx_sdu.reset();
}
pdu_space -= SRSLTE_MIN(to_move, pdu->get_tailroom());
@ -187,9 +193,16 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t*
tx_sdu->N_bytes -= to_move;
tx_sdu->msg += to_move;
if (tx_sdu->N_bytes == 0) {
log->debug(
"%s Complete SDU scheduled for tx. Stack latency: %ld us\n", rb_name.c_str(), tx_sdu->get_latency_us());
#ifdef ENABLE_TIMESTAMP
auto latency_us = tx_sdu->get_latency_us().count();
mean_pdu_latency_us.push(latency_us);
log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %" PRIu64 "/%ld us\n",
rb_name.c_str(),
(uint64_t)latency_us,
(long)mean_pdu_latency_us.value());
#else
log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str());
#endif
tx_sdu.reset();
}
pdu_space -= to_move;
@ -229,10 +242,8 @@ void rlc_um_lte::rlc_um_lte_tx::reset()
***************************************************************************/
rlc_um_lte::rlc_um_lte_rx::rlc_um_lte_rx(rlc_um_base* parent_) :
rlc_um_base_rx(parent_),
reordering_timer(timers->get_unique_timer())
{
}
rlc_um_base_rx(parent_), reordering_timer(timers->get_unique_timer())
{}
rlc_um_lte::rlc_um_lte_rx::~rlc_um_lte_rx() {}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save