mirror of https://github.com/pvnis/srsRAN_4G.git
update nr asn1 files, and asn1 tests
parent
082e002b67
commit
510959b50f
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,693 @@
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 3GPP TS ASN1 RRC v15.11.0 (2020-09)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef SRSASN1_RRC_COMMON_H
|
||||
#define SRSASN1_RRC_COMMON_H
|
||||
|
||||
#include "srslte/asn1/asn1_utils.h"
|
||||
#include <cstdio>
|
||||
#include <stdarg.h>
|
||||
|
||||
namespace asn1 {
|
||||
namespace rrc {
|
||||
|
||||
/*******************************************************************************
|
||||
* Constant Definitions
|
||||
******************************************************************************/
|
||||
|
||||
#define ASN1_RRC_MAX_ACCESS_CAT_MINUS1_R15 63
|
||||
#define ASN1_RRC_MAX_ACDC_CAT_R13 16
|
||||
#define ASN1_RRC_MAX_AVAIL_NARROW_BANDS_R13 16
|
||||
#define ASN1_RRC_MAX_BAND_COMB_R10 128
|
||||
#define ASN1_RRC_MAX_BAND_COMB_R11 256
|
||||
#define ASN1_RRC_MAX_BAND_COMB_R13 384
|
||||
#define ASN1_RRC_MAX_BANDS 64
|
||||
#define ASN1_RRC_MAX_BANDS_NR_R15 1024
|
||||
#define ASN1_RRC_MAX_BW_CLASS_R10 16
|
||||
#define ASN1_RRC_MAX_BW_COMB_SET_R10 32
|
||||
#define ASN1_RRC_MAX_BARR_INFO_SET_R15 8
|
||||
#define ASN1_RRC_MAX_BT_ID_REPORT_R15 32
|
||||
#define ASN1_RRC_MAX_BT_NAME_R15 4
|
||||
#define ASN1_RRC_MAX_CBR_LEVEL_R14 16
|
||||
#define ASN1_RRC_MAX_CBR_LEVEL_MINUS1_R14 15
|
||||
#define ASN1_RRC_MAX_CBR_REPORT_R14 72
|
||||
#define ASN1_RRC_MAX_CDMA_BAND_CLASS 32
|
||||
#define ASN1_RRC_MAX_CE_LEVEL_R13 4
|
||||
#define ASN1_RRC_MAX_CELL_BLACK 16
|
||||
#define ASN1_RRC_MAX_CELL_HISTORY_R12 16
|
||||
#define ASN1_RRC_MAX_CELL_INFO_GERAN_R9 32
|
||||
#define ASN1_RRC_MAX_CELL_INFO_UTRA_R9 16
|
||||
#define ASN1_RRC_MAX_CELL_MEAS_IDLE_R15 8
|
||||
#define ASN1_RRC_MAX_COMB_IDC_R11 128
|
||||
#define ASN1_RRC_MAX_CSI_IM_R11 3
|
||||
#define ASN1_RRC_MAX_CSI_IM_R12 4
|
||||
#define ASN1_RRC_MIN_CSI_IM_R13 5
|
||||
#define ASN1_RRC_MAX_CSI_IM_R13 24
|
||||
#define ASN1_RRC_MAX_CSI_IM_V1310 20
|
||||
#define ASN1_RRC_MAX_CSI_PROC_R11 4
|
||||
#define ASN1_RRC_MAX_CSI_RS_NZP_R11 3
|
||||
#define ASN1_RRC_MIN_CSI_RS_NZP_R13 4
|
||||
#define ASN1_RRC_MAX_CSI_RS_NZP_R13 24
|
||||
#define ASN1_RRC_MAX_CSI_RS_NZP_V1310 21
|
||||
#define ASN1_RRC_MAX_CSI_RS_ZP_R11 4
|
||||
#define ASN1_RRC_MAX_CQI_PROC_EXT_R11 3
|
||||
#define ASN1_RRC_MAX_FREQ_UTRA_TDD_R10 6
|
||||
#define ASN1_RRC_MAX_CELL_INTER 16
|
||||
#define ASN1_RRC_MAX_CELL_INTRA 16
|
||||
#define ASN1_RRC_MAX_CELL_LIST_GERAN 3
|
||||
#define ASN1_RRC_MAX_CELL_MEAS 32
|
||||
#define ASN1_RRC_MAX_CELL_REPORT 8
|
||||
#define ASN1_RRC_MAX_CELL_SFTD 3
|
||||
#define ASN1_RRC_MAX_CFG_SPS_R14 8
|
||||
#define ASN1_RRC_MAX_CFG_SPS_R15 6
|
||||
#define ASN1_RRC_MAX_CSI_RS_MEAS_R12 96
|
||||
#define ASN1_RRC_MAX_DRB 11
|
||||
#define ASN1_RRC_MAX_DRB_EXT_R15 4
|
||||
#define ASN1_RRC_MAX_DRB_R15 15
|
||||
#define ASN1_RRC_MAX_DS_DUR_R12 5
|
||||
#define ASN1_RRC_MAX_DS_ZTP_CSI_RS_R12 5
|
||||
#define ASN1_RRC_MAX_EARFCN 65535
|
||||
#define ASN1_RRC_MAX_EARFCN_PLUS1 65536
|
||||
#define ASN1_RRC_MAX_EARFCN2 262143
|
||||
#define ASN1_RRC_MAX_EPDCCH_SET_R11 2
|
||||
#define ASN1_RRC_MAX_FBI 64
|
||||
#define ASN1_RRC_MAX_FBI_NR_R15 1024
|
||||
#define ASN1_RRC_MAX_FBI_PLUS1 65
|
||||
#define ASN1_RRC_MAX_FBI2 256
|
||||
#define ASN1_RRC_MAX_FEATURE_SETS_R15 256
|
||||
#define ASN1_RRC_MAX_PER_CC_FEATURE_SETS_R15 32
|
||||
#define ASN1_RRC_MAX_FREQ 8
|
||||
#define ASN1_RRC_MAX_FREQ_IDC_R11 32
|
||||
#define ASN1_RRC_MAX_FREQ_IDLE_R15 8
|
||||
#define ASN1_RRC_MAX_FREQ_MBMS_R11 5
|
||||
#define ASN1_RRC_MAX_FREQ_NR_R15 5
|
||||
#define ASN1_RRC_MAX_FREQ_V2X_R14 8
|
||||
#define ASN1_RRC_MAX_FREQ_V2X_MINUS1_R14 7
|
||||
#define ASN1_RRC_MAX_GERAN_SI 10
|
||||
#define ASN1_RRC_MAX_GNFG 16
|
||||
#define ASN1_RRC_MAX_IDLE_MEAS_CARRIERS_R15 3
|
||||
#define ASN1_RRC_MAX_LCG_R13 4
|
||||
#define ASN1_RRC_MAX_LOG_MEAS_REPORT_R10 520
|
||||
#define ASN1_RRC_MAX_MBSFN_ALLOCS 8
|
||||
#define ASN1_RRC_MAX_MBSFN_AREA 8
|
||||
#define ASN1_RRC_MAX_MBSFN_AREA_MINUS1 7
|
||||
#define ASN1_RRC_MAX_MBMS_SERVICE_LIST_PER_UE_R13 15
|
||||
#define ASN1_RRC_MAX_MEAS_ID 32
|
||||
#define ASN1_RRC_MAX_MEAS_ID_PLUS1 33
|
||||
#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_NS_PMAX_R10 8
|
||||
#define ASN1_RRC_MAX_NAICS_ENTRIES_R12 8
|
||||
#define ASN1_RRC_MAX_NEIGH_CELL_R12 8
|
||||
#define ASN1_RRC_MAX_NEIGH_CELL_SCPTM_R13 8
|
||||
#define ASN1_RRC_MAX_NROF_S_NSSAI_R15 8
|
||||
#define ASN1_RRC_MAX_OBJ_ID 32
|
||||
#define ASN1_RRC_MAX_OBJ_ID_PLUS1_R13 33
|
||||
#define ASN1_RRC_MAX_OBJ_ID_R13 64
|
||||
#define ASN1_RRC_MAX_P_A_PER_NEIGH_CELL_R12 3
|
||||
#define ASN1_RRC_MAX_PAGE_REC 16
|
||||
#define ASN1_RRC_MAX_PCI_RANGE_R9 4
|
||||
#define ASN1_RRC_MAX_PLMN_R11 6
|
||||
#define ASN1_RRC_MAX_PLMN_MINUS1_R14 5
|
||||
#define ASN1_RRC_MAX_PLMN_R15 8
|
||||
#define ASN1_RRC_MAX_PLMN_NR_R15 12
|
||||
#define ASN1_RRC_MAX_PN_OFFSET 511
|
||||
#define ASN1_RRC_MAX_PMCH_PER_MBSFN 15
|
||||
#define ASN1_RRC_MAX_PSSCH_TX_CFG_R14 16
|
||||
#define ASN1_RRC_MAX_QUANT_SETS_NR_R15 2
|
||||
#define ASN1_RRC_MAX_QCI_R13 6
|
||||
#define ASN1_RRC_MAX_RAT_CAP 8
|
||||
#define ASN1_RRC_MAX_RE_MAP_QCL_R11 4
|
||||
#define ASN1_RRC_MAX_REPORT_CFG_ID 32
|
||||
#define ASN1_RRC_MAX_RESERV_PERIOD_R14 16
|
||||
#define ASN1_RRC_MAX_RS_IDX_R15 64
|
||||
#define ASN1_RRC_MAX_RS_IDX_MINUS1_R15 63
|
||||
#define ASN1_RRC_MAX_RS_IDX_CELL_QUAL_R15 16
|
||||
#define ASN1_RRC_MAX_RS_IDX_REPORT_R15 32
|
||||
#define ASN1_RRC_MAX_RSTD_FREQ_R10 3
|
||||
#define ASN1_RRC_MAX_SAI_MBMS_R11 64
|
||||
#define ASN1_RRC_MAX_SCELL_R10 4
|
||||
#define ASN1_RRC_MAX_SCELL_R13 31
|
||||
#define ASN1_RRC_MAX_SCELL_GROUPS_R15 4
|
||||
#define ASN1_RRC_MAX_SC_MTCH_R13 1023
|
||||
#define ASN1_RRC_MAX_SC_MTCH_BR_R14 128
|
||||
#define ASN1_RRC_MAX_SL_COMM_RX_POOL_NFREQ_R13 32
|
||||
#define ASN1_RRC_MAX_SL_COMM_RX_POOL_PRECONF_V1310 12
|
||||
#define ASN1_RRC_MAX_SL_TX_POOL_R12_PLUS1_R13 5
|
||||
#define ASN1_RRC_MAX_SL_TX_POOL_V1310 4
|
||||
#define ASN1_RRC_MAX_SL_TX_POOL_R13 8
|
||||
#define ASN1_RRC_MAX_SL_COMM_TX_POOL_PRECONF_V1310 7
|
||||
#define ASN1_RRC_MAX_SL_DEST_R12 16
|
||||
#define ASN1_RRC_MAX_SL_DISC_CELLS_R13 16
|
||||
#define ASN1_RRC_MAX_SL_DISC_PWR_CLASS_R12 3
|
||||
#define ASN1_RRC_MAX_SL_DISC_RX_POOL_PRECONF_R13 16
|
||||
#define ASN1_RRC_MAX_SL_DISC_SYS_INFO_REPORT_FREQ_R13 8
|
||||
#define ASN1_RRC_MAX_SL_DISC_TX_POOL_PRECONF_R13 4
|
||||
#define ASN1_RRC_MAX_SL_GP_R13 8
|
||||
#define ASN1_RRC_MAX_SL_POOL_TO_MEASURE_R14 72
|
||||
#define ASN1_RRC_MAX_SL_PRIO_R13 8
|
||||
#define ASN1_RRC_MAX_SL_RX_POOL_R12 16
|
||||
#define ASN1_RRC_MAX_SL_RELIABILITY_R15 8
|
||||
#define ASN1_RRC_MAX_SL_SYNC_CFG_R12 16
|
||||
#define ASN1_RRC_MAX_SL_TF_IDX_PAIR_R12 64
|
||||
#define ASN1_RRC_MAX_SL_TX_POOL_R12 4
|
||||
#define ASN1_RRC_MAX_SL_V2X_RX_POOL_R14 16
|
||||
#define ASN1_RRC_MAX_SL_V2X_RX_POOL_PRECONF_R14 16
|
||||
#define ASN1_RRC_MAX_SL_V2X_TX_POOL_R14 8
|
||||
#define ASN1_RRC_MAX_SL_V2X_TX_POOL_PRECONF_R14 8
|
||||
#define ASN1_RRC_MAX_SL_V2X_SYNC_CFG_R14 16
|
||||
#define ASN1_RRC_MAX_SL_V2X_CBR_CFG_R14 4
|
||||
#define ASN1_RRC_MAX_SL_V2X_CBR_CFG_MINUS1_R14 3
|
||||
#define ASN1_RRC_MAX_SL_V2X_TX_CFG_R14 64
|
||||
#define ASN1_RRC_MAX_SL_V2X_TX_CFG_MINUS1_R14 63
|
||||
#define ASN1_RRC_MAX_SL_V2X_CBR_CFG2_R14 8
|
||||
#define ASN1_RRC_MAX_SL_V2X_CBR_CFG2_MINUS1_R14 7
|
||||
#define ASN1_RRC_MAX_SL_V2X_TX_CFG2_R14 128
|
||||
#define ASN1_RRC_MAX_SL_V2X_TX_CFG2_MINUS1_R14 127
|
||||
#define ASN1_RRC_MAX_STAG_R11 3
|
||||
#define ASN1_RRC_MAX_SERV_CELL_R10 5
|
||||
#define ASN1_RRC_MAX_SERV_CELL_R13 32
|
||||
#define ASN1_RRC_MAX_SERV_CELL_NR_R15 16
|
||||
#define ASN1_RRC_MAX_SERVICE_COUNT 16
|
||||
#define ASN1_RRC_MAX_SERVICE_COUNT_MINUS1 15
|
||||
#define ASN1_RRC_MAX_SESSION_PER_PMCH 29
|
||||
#define ASN1_RRC_MAX_SESSION_PER_PMCH_MINUS1 28
|
||||
#define ASN1_RRC_MAX_SIB 32
|
||||
#define ASN1_RRC_MAX_SIB_MINUS1 31
|
||||
#define ASN1_RRC_MAX_SI_MSG 32
|
||||
#define ASN1_RRC_MAX_SIMUL_BANDS_R10 64
|
||||
#define ASN1_RRC_MAX_SF_PATTERN_IDC_R11 8
|
||||
#define ASN1_RRC_MAX_TRAFFIC_PATTERN_R14 8
|
||||
#define ASN1_RRC_MAX_UTRA_FDD_CARRIER 16
|
||||
#define ASN1_RRC_MAX_UTRA_TDD_CARRIER 16
|
||||
#define ASN1_RRC_MAX_WAY_POINT_R15 20
|
||||
#define ASN1_RRC_MAX_WLAN_ID_R12 16
|
||||
#define ASN1_RRC_MAX_WLAN_BANDS_R13 8
|
||||
#define ASN1_RRC_MAX_WLAN_ID_R13 32
|
||||
#define ASN1_RRC_MAX_WLAN_CHS_R13 16
|
||||
#define ASN1_RRC_MAX_WLAN_CARRIER_INFO_R13 8
|
||||
#define ASN1_RRC_MAX_WLAN_ID_REPORT_R14 32
|
||||
#define ASN1_RRC_MAX_WLAN_NAME_R15 4
|
||||
#define ASN1_RRC_MAX_LOG_MEAS_R10 4060
|
||||
#define ASN1_RRC_MAX_REESTAB_INFO 32
|
||||
#define ASN1_RRC_MAX_NPRACH_RES_NB_R13 3
|
||||
#define ASN1_RRC_MAX_NON_ANCHOR_CARRIERS_NB_R14 15
|
||||
#define ASN1_RRC_MAX_DRB_NB_R13 2
|
||||
#define ASN1_RRC_MAX_NEIGH_CELL_SCPTM_NB_R14 8
|
||||
#define ASN1_RRC_MAX_NS_PMAX_NB_R13 4
|
||||
#define ASN1_RRC_MAX_SC_MTCH_NB_R14 64
|
||||
#define ASN1_RRC_MAX_SI_MSG_NB_R13 8
|
||||
|
||||
/*******************************************************************************
|
||||
* Struct Definitions
|
||||
******************************************************************************/
|
||||
|
||||
// MCC ::= SEQUENCE (SIZE (3)) OF INTEGER (0..9)
|
||||
using mcc_l = std::array<uint8_t, 3>;
|
||||
|
||||
// MNC ::= SEQUENCE (SIZE (2..3)) OF INTEGER (0..9)
|
||||
using mnc_l = bounded_array<uint8_t, 3>;
|
||||
|
||||
// PLMN-Identity ::= SEQUENCE
|
||||
struct plmn_id_s {
|
||||
bool mcc_present = false;
|
||||
mcc_l mcc;
|
||||
mnc_l mnc;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// PLMN-IdentityInfo ::= SEQUENCE
|
||||
struct plmn_id_info_s {
|
||||
struct cell_reserved_for_oper_opts {
|
||||
enum options { reserved, not_reserved, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<cell_reserved_for_oper_opts> cell_reserved_for_oper_e_;
|
||||
|
||||
// member variables
|
||||
plmn_id_s plmn_id;
|
||||
cell_reserved_for_oper_e_ cell_reserved_for_oper;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// Alpha-r12 ::= ENUMERATED
|
||||
struct alpha_r12_opts {
|
||||
enum options { al0, al04, al05, al06, al07, al08, al09, al1, nulltype } value;
|
||||
typedef float number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
float to_number() const;
|
||||
std::string to_number_string() const;
|
||||
};
|
||||
typedef enumerated<alpha_r12_opts> alpha_r12_e;
|
||||
|
||||
// PLMN-IdentityList ::= SEQUENCE (SIZE (1..6)) OF PLMN-IdentityInfo
|
||||
using plmn_id_list_l = dyn_array<plmn_id_info_s>;
|
||||
|
||||
// BandclassCDMA2000 ::= ENUMERATED
|
||||
struct bandclass_cdma2000_opts {
|
||||
enum options {
|
||||
bc0,
|
||||
bc1,
|
||||
bc2,
|
||||
bc3,
|
||||
bc4,
|
||||
bc5,
|
||||
bc6,
|
||||
bc7,
|
||||
bc8,
|
||||
bc9,
|
||||
bc10,
|
||||
bc11,
|
||||
bc12,
|
||||
bc13,
|
||||
bc14,
|
||||
bc15,
|
||||
bc16,
|
||||
bc17,
|
||||
bc18_v9a0,
|
||||
bc19_v9a0,
|
||||
bc20_v9a0,
|
||||
bc21_v9a0,
|
||||
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<bandclass_cdma2000_opts, true> bandclass_cdma2000_e;
|
||||
|
||||
struct setup_opts {
|
||||
enum options { release, setup, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<setup_opts> setup_e;
|
||||
|
||||
// FilterCoefficient ::= ENUMERATED
|
||||
struct filt_coef_opts {
|
||||
enum options {
|
||||
fc0,
|
||||
fc1,
|
||||
fc2,
|
||||
fc3,
|
||||
fc4,
|
||||
fc5,
|
||||
fc6,
|
||||
fc7,
|
||||
fc8,
|
||||
fc9,
|
||||
fc11,
|
||||
fc13,
|
||||
fc15,
|
||||
fc17,
|
||||
fc19,
|
||||
spare1,
|
||||
/*...*/ nulltype
|
||||
} value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<filt_coef_opts, true> filt_coef_e;
|
||||
|
||||
// MBSFN-SubframeConfig ::= SEQUENCE
|
||||
struct mbsfn_sf_cfg_s {
|
||||
struct radioframe_alloc_period_opts {
|
||||
enum options { n1, n2, n4, n8, n16, n32, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<radioframe_alloc_period_opts> radioframe_alloc_period_e_;
|
||||
struct sf_alloc_c_ {
|
||||
struct types_opts {
|
||||
enum options { one_frame, four_frames, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
sf_alloc_c_() = default;
|
||||
sf_alloc_c_(const sf_alloc_c_& other);
|
||||
sf_alloc_c_& operator=(const sf_alloc_c_& other);
|
||||
~sf_alloc_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 sf_alloc_c_& other) const;
|
||||
bool operator!=(const sf_alloc_c_& other) const { return not(*this == other); }
|
||||
// getters
|
||||
fixed_bitstring<6>& one_frame()
|
||||
{
|
||||
assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation");
|
||||
return c.get<fixed_bitstring<6> >();
|
||||
}
|
||||
fixed_bitstring<24>& four_frames()
|
||||
{
|
||||
assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation");
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
const fixed_bitstring<6>& one_frame() const
|
||||
{
|
||||
assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation");
|
||||
return c.get<fixed_bitstring<6> >();
|
||||
}
|
||||
const fixed_bitstring<24>& four_frames() const
|
||||
{
|
||||
assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation");
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
fixed_bitstring<6>& set_one_frame()
|
||||
{
|
||||
set(types::one_frame);
|
||||
return c.get<fixed_bitstring<6> >();
|
||||
}
|
||||
fixed_bitstring<24>& set_four_frames()
|
||||
{
|
||||
set(types::four_frames);
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<24> > c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
radioframe_alloc_period_e_ radioframe_alloc_period;
|
||||
uint8_t radioframe_alloc_offset = 0;
|
||||
sf_alloc_c_ sf_alloc;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
bool operator==(const mbsfn_sf_cfg_s& other) const;
|
||||
bool operator!=(const mbsfn_sf_cfg_s& other) const { return not(*this == other); }
|
||||
};
|
||||
|
||||
// MBSFN-SubframeConfig-v1430 ::= SEQUENCE
|
||||
struct mbsfn_sf_cfg_v1430_s {
|
||||
struct sf_alloc_v1430_c_ {
|
||||
struct types_opts {
|
||||
enum options { one_frame_v1430, four_frames_v1430, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
sf_alloc_v1430_c_() = default;
|
||||
sf_alloc_v1430_c_(const sf_alloc_v1430_c_& other);
|
||||
sf_alloc_v1430_c_& operator=(const sf_alloc_v1430_c_& other);
|
||||
~sf_alloc_v1430_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 sf_alloc_v1430_c_& other) const;
|
||||
bool operator!=(const sf_alloc_v1430_c_& other) const { return not(*this == other); }
|
||||
// getters
|
||||
fixed_bitstring<2>& one_frame_v1430()
|
||||
{
|
||||
assert_choice_type("oneFrame-v1430", type_.to_string(), "subframeAllocation-v1430");
|
||||
return c.get<fixed_bitstring<2> >();
|
||||
}
|
||||
fixed_bitstring<8>& four_frames_v1430()
|
||||
{
|
||||
assert_choice_type("fourFrames-v1430", type_.to_string(), "subframeAllocation-v1430");
|
||||
return c.get<fixed_bitstring<8> >();
|
||||
}
|
||||
const fixed_bitstring<2>& one_frame_v1430() const
|
||||
{
|
||||
assert_choice_type("oneFrame-v1430", type_.to_string(), "subframeAllocation-v1430");
|
||||
return c.get<fixed_bitstring<2> >();
|
||||
}
|
||||
const fixed_bitstring<8>& four_frames_v1430() const
|
||||
{
|
||||
assert_choice_type("fourFrames-v1430", type_.to_string(), "subframeAllocation-v1430");
|
||||
return c.get<fixed_bitstring<8> >();
|
||||
}
|
||||
fixed_bitstring<2>& set_one_frame_v1430()
|
||||
{
|
||||
set(types::one_frame_v1430);
|
||||
return c.get<fixed_bitstring<2> >();
|
||||
}
|
||||
fixed_bitstring<8>& set_four_frames_v1430()
|
||||
{
|
||||
set(types::four_frames_v1430);
|
||||
return c.get<fixed_bitstring<8> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<8> > c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
sf_alloc_v1430_c_ sf_alloc_v1430;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
bool operator==(const mbsfn_sf_cfg_v1430_s& other) const;
|
||||
bool operator!=(const mbsfn_sf_cfg_v1430_s& other) const { return not(*this == other); }
|
||||
};
|
||||
|
||||
// MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..8)) OF MBSFN-SubframeConfig
|
||||
using mbsfn_sf_cfg_list_l = dyn_array<mbsfn_sf_cfg_s>;
|
||||
|
||||
// MBSFN-SubframeConfigList-v1430 ::= SEQUENCE (SIZE (1..8)) OF MBSFN-SubframeConfig-v1430
|
||||
using mbsfn_sf_cfg_list_v1430_l = dyn_array<mbsfn_sf_cfg_v1430_s>;
|
||||
|
||||
// MeasSubframePattern-r10 ::= CHOICE
|
||||
struct meas_sf_pattern_r10_c {
|
||||
struct sf_pattern_tdd_r10_c_ {
|
||||
struct types_opts {
|
||||
enum options { sf_cfg1_minus5_r10, sf_cfg0_r10, sf_cfg6_r10, /*...*/ nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts, true> types;
|
||||
|
||||
// choice methods
|
||||
sf_pattern_tdd_r10_c_() = default;
|
||||
sf_pattern_tdd_r10_c_(const sf_pattern_tdd_r10_c_& other);
|
||||
sf_pattern_tdd_r10_c_& operator=(const sf_pattern_tdd_r10_c_& other);
|
||||
~sf_pattern_tdd_r10_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 sf_pattern_tdd_r10_c_& other) const;
|
||||
bool operator!=(const sf_pattern_tdd_r10_c_& other) const { return not(*this == other); }
|
||||
// getters
|
||||
fixed_bitstring<20>& sf_cfg1_minus5_r10()
|
||||
{
|
||||
assert_choice_type("subframeConfig1-5-r10", type_.to_string(), "subframePatternTDD-r10");
|
||||
return c.get<fixed_bitstring<20> >();
|
||||
}
|
||||
fixed_bitstring<70>& sf_cfg0_r10()
|
||||
{
|
||||
assert_choice_type("subframeConfig0-r10", type_.to_string(), "subframePatternTDD-r10");
|
||||
return c.get<fixed_bitstring<70> >();
|
||||
}
|
||||
fixed_bitstring<60>& sf_cfg6_r10()
|
||||
{
|
||||
assert_choice_type("subframeConfig6-r10", type_.to_string(), "subframePatternTDD-r10");
|
||||
return c.get<fixed_bitstring<60> >();
|
||||
}
|
||||
const fixed_bitstring<20>& sf_cfg1_minus5_r10() const
|
||||
{
|
||||
assert_choice_type("subframeConfig1-5-r10", type_.to_string(), "subframePatternTDD-r10");
|
||||
return c.get<fixed_bitstring<20> >();
|
||||
}
|
||||
const fixed_bitstring<70>& sf_cfg0_r10() const
|
||||
{
|
||||
assert_choice_type("subframeConfig0-r10", type_.to_string(), "subframePatternTDD-r10");
|
||||
return c.get<fixed_bitstring<70> >();
|
||||
}
|
||||
const fixed_bitstring<60>& sf_cfg6_r10() const
|
||||
{
|
||||
assert_choice_type("subframeConfig6-r10", type_.to_string(), "subframePatternTDD-r10");
|
||||
return c.get<fixed_bitstring<60> >();
|
||||
}
|
||||
fixed_bitstring<20>& set_sf_cfg1_minus5_r10()
|
||||
{
|
||||
set(types::sf_cfg1_minus5_r10);
|
||||
return c.get<fixed_bitstring<20> >();
|
||||
}
|
||||
fixed_bitstring<70>& set_sf_cfg0_r10()
|
||||
{
|
||||
set(types::sf_cfg0_r10);
|
||||
return c.get<fixed_bitstring<70> >();
|
||||
}
|
||||
fixed_bitstring<60>& set_sf_cfg6_r10()
|
||||
{
|
||||
set(types::sf_cfg6_r10);
|
||||
return c.get<fixed_bitstring<60> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<70> > c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { sf_pattern_fdd_r10, sf_pattern_tdd_r10, /*...*/ nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts, true> types;
|
||||
|
||||
// choice methods
|
||||
meas_sf_pattern_r10_c() = default;
|
||||
meas_sf_pattern_r10_c(const meas_sf_pattern_r10_c& other);
|
||||
meas_sf_pattern_r10_c& operator=(const meas_sf_pattern_r10_c& other);
|
||||
~meas_sf_pattern_r10_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 meas_sf_pattern_r10_c& other) const;
|
||||
bool operator!=(const meas_sf_pattern_r10_c& other) const { return not(*this == other); }
|
||||
// getters
|
||||
fixed_bitstring<40>& sf_pattern_fdd_r10()
|
||||
{
|
||||
assert_choice_type("subframePatternFDD-r10", type_.to_string(), "MeasSubframePattern-r10");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
sf_pattern_tdd_r10_c_& sf_pattern_tdd_r10()
|
||||
{
|
||||
assert_choice_type("subframePatternTDD-r10", type_.to_string(), "MeasSubframePattern-r10");
|
||||
return c.get<sf_pattern_tdd_r10_c_>();
|
||||
}
|
||||
const fixed_bitstring<40>& sf_pattern_fdd_r10() const
|
||||
{
|
||||
assert_choice_type("subframePatternFDD-r10", type_.to_string(), "MeasSubframePattern-r10");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const sf_pattern_tdd_r10_c_& sf_pattern_tdd_r10() const
|
||||
{
|
||||
assert_choice_type("subframePatternTDD-r10", type_.to_string(), "MeasSubframePattern-r10");
|
||||
return c.get<sf_pattern_tdd_r10_c_>();
|
||||
}
|
||||
fixed_bitstring<40>& set_sf_pattern_fdd_r10()
|
||||
{
|
||||
set(types::sf_pattern_fdd_r10);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
sf_pattern_tdd_r10_c_& set_sf_pattern_tdd_r10()
|
||||
{
|
||||
set(types::sf_pattern_tdd_r10);
|
||||
return c.get<sf_pattern_tdd_r10_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<40>, sf_pattern_tdd_r10_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
struct c1_or_crit_ext_opts {
|
||||
enum options { c1, crit_exts_future, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<c1_or_crit_ext_opts> c1_or_crit_ext_e;
|
||||
|
||||
// CipheringAlgorithm-r12 ::= ENUMERATED
|
||||
struct ciphering_algorithm_r12_opts {
|
||||
enum options { eea0, eea1, eea2, eea3_v1130, spare4, spare3, spare2, spare1, /*...*/ nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<ciphering_algorithm_r12_opts, true> ciphering_algorithm_r12_e;
|
||||
|
||||
// WLAN-BandIndicator-r13 ::= ENUMERATED
|
||||
struct wlan_band_ind_r13_opts {
|
||||
enum options { band2dot4, band5, band60_v1430, spare5, spare4, spare3, spare2, spare1, /*...*/ nulltype } value;
|
||||
typedef float number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
float to_number() const;
|
||||
std::string to_number_string() const;
|
||||
};
|
||||
typedef enumerated<wlan_band_ind_r13_opts, true> wlan_band_ind_r13_e;
|
||||
|
||||
} // namespace rrc
|
||||
} // namespace asn1
|
||||
|
||||
#endif // SRSASN1_RRC_COMMON_H
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,938 @@
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 3GPP TS ASN1 RRC v15.11.0 (2020-09)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef SRSASN1_RRC_HO_CMD_H
|
||||
#define SRSASN1_RRC_HO_CMD_H
|
||||
|
||||
#include "dl_dcch_msg.h"
|
||||
|
||||
namespace asn1 {
|
||||
namespace rrc {
|
||||
|
||||
/*******************************************************************************
|
||||
* Struct Definitions
|
||||
******************************************************************************/
|
||||
|
||||
// SCG-Config-v13c0-IEs ::= SEQUENCE
|
||||
struct scg_cfg_v13c0_ies_s {
|
||||
bool scg_radio_cfg_v13c0_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
scg_cfg_part_scg_v13c0_s scg_radio_cfg_v13c0;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SCG-Config-v12x0-IEs ::= SEQUENCE
|
||||
struct scg_cfg_v12x0_ies_s {
|
||||
bool late_non_crit_ext_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring late_non_crit_ext;
|
||||
scg_cfg_v13c0_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;
|
||||
};
|
||||
|
||||
// SCG-Config-r12-IEs ::= SEQUENCE
|
||||
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;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-ConfigNR-r15 ::= SEQUENCE
|
||||
struct as_cfg_nr_r15_s {
|
||||
bool source_rb_cfg_nr_r15_present = false;
|
||||
bool source_rb_cfg_sn_nr_r15_present = false;
|
||||
bool source_other_cfg_sn_nr_r15_present = false;
|
||||
dyn_octstring source_rb_cfg_nr_r15;
|
||||
dyn_octstring source_rb_cfg_sn_nr_r15;
|
||||
dyn_octstring source_other_cfg_sn_nr_r15;
|
||||
|
||||
// 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_ {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options { scg_cfg_r12, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_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
|
||||
scg_cfg_r12_ies_s& scg_cfg_r12()
|
||||
{
|
||||
assert_choice_type("scg-Config-r12", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
const scg_cfg_r12_ies_s& scg_cfg_r12() const
|
||||
{
|
||||
assert_choice_type("scg-Config-r12", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
scg_cfg_r12_ies_s& set_scg_cfg_r12()
|
||||
{
|
||||
set(types::scg_cfg_r12);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
scg_cfg_r12_ies_s c;
|
||||
};
|
||||
typedef c1_or_crit_ext_e types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config ::= SEQUENCE
|
||||
struct as_cfg_s {
|
||||
bool ext = false;
|
||||
meas_cfg_s source_meas_cfg;
|
||||
rr_cfg_ded_s source_rr_cfg;
|
||||
security_algorithm_cfg_s source_security_algorithm_cfg;
|
||||
fixed_bitstring<16> source_ue_id;
|
||||
mib_s source_mib;
|
||||
sib_type1_s source_sib_type1;
|
||||
sib_type2_s source_sib_type2;
|
||||
ant_info_common_s ant_info_common;
|
||||
uint32_t source_dl_carrier_freq = 0;
|
||||
// ...
|
||||
// group 0
|
||||
bool source_sib_type1_ext_present = false;
|
||||
dyn_octstring source_sib_type1_ext;
|
||||
copy_ptr<other_cfg_r9_s> source_other_cfg_r9;
|
||||
// group 1
|
||||
copy_ptr<scell_to_add_mod_list_r10_l> source_scell_cfg_list_r10;
|
||||
// group 2
|
||||
copy_ptr<scg_cfg_r12_s> source_cfg_scg_r12;
|
||||
// group 3
|
||||
copy_ptr<as_cfg_nr_r15_s> as_cfg_nr_r15;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config-v10j0 ::= SEQUENCE
|
||||
struct as_cfg_v10j0_s {
|
||||
bool ant_info_ded_pcell_v10i0_present = false;
|
||||
ant_info_ded_v10i0_s ant_info_ded_pcell_v10i0;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config-v1250 ::= SEQUENCE
|
||||
struct as_cfg_v1250_s {
|
||||
bool source_wlan_offload_cfg_r12_present = false;
|
||||
bool source_sl_comm_cfg_r12_present = false;
|
||||
bool source_sl_disc_cfg_r12_present = false;
|
||||
wlan_offload_cfg_r12_s source_wlan_offload_cfg_r12;
|
||||
sl_comm_cfg_r12_s source_sl_comm_cfg_r12;
|
||||
sl_disc_cfg_r12_s source_sl_disc_cfg_r12;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config-v1320 ::= SEQUENCE
|
||||
struct as_cfg_v1320_s {
|
||||
bool source_scell_cfg_list_r13_present = false;
|
||||
bool source_rclwi_cfg_r13_present = false;
|
||||
scell_to_add_mod_list_ext_r13_l source_scell_cfg_list_r13;
|
||||
rclwi_cfg_r13_c source_rclwi_cfg_r13;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config-v13c0 ::= SEQUENCE
|
||||
struct as_cfg_v13c0_s {
|
||||
bool rr_cfg_ded_v13c01_present = false;
|
||||
bool rr_cfg_ded_v13c02_present = false;
|
||||
bool scell_to_add_mod_list_v13c0_present = false;
|
||||
bool scell_to_add_mod_list_ext_v13c0_present = false;
|
||||
rr_cfg_ded_v1370_s rr_cfg_ded_v13c01;
|
||||
rr_cfg_ded_v13c0_s rr_cfg_ded_v13c02;
|
||||
scell_to_add_mod_list_v13c0_l scell_to_add_mod_list_v13c0;
|
||||
scell_to_add_mod_list_ext_v13c0_l scell_to_add_mod_list_ext_v13c0;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config-v1430 ::= SEQUENCE
|
||||
struct as_cfg_v1430_s {
|
||||
bool source_sl_v2x_comm_cfg_r14_present = false;
|
||||
bool source_lwa_cfg_r14_present = false;
|
||||
bool source_wlan_meas_result_r14_present = false;
|
||||
sl_v2x_cfg_ded_r14_s source_sl_v2x_comm_cfg_r14;
|
||||
lwa_cfg_r13_s source_lwa_cfg_r14;
|
||||
meas_result_list_wlan_r13_l source_wlan_meas_result_r14;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Config-v9e0 ::= SEQUENCE
|
||||
struct as_cfg_v9e0_s {
|
||||
uint32_t source_dl_carrier_freq_v9e0 = 65536;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AdditionalReestabInfo ::= SEQUENCE
|
||||
struct add_reestab_info_s {
|
||||
fixed_bitstring<28> cell_id;
|
||||
fixed_bitstring<256> key_e_node_b_star;
|
||||
fixed_bitstring<16> short_mac_i;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AdditionalReestabInfoList ::= SEQUENCE (SIZE (1..32)) OF AdditionalReestabInfo
|
||||
using add_reestab_info_list_l = dyn_array<add_reestab_info_s>;
|
||||
|
||||
// ReestablishmentInfo ::= SEQUENCE
|
||||
struct reest_info_s {
|
||||
bool ext = false;
|
||||
bool add_reestab_info_list_present = false;
|
||||
uint16_t source_pci = 0;
|
||||
fixed_bitstring<16> target_cell_short_mac_i;
|
||||
add_reestab_info_list_l add_reestab_info_list;
|
||||
// ...
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Context ::= SEQUENCE
|
||||
struct as_context_s {
|
||||
bool reest_info_present = false;
|
||||
reest_info_s reest_info;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Context-v1130 ::= SEQUENCE
|
||||
struct as_context_v1130_s {
|
||||
bool ext = false;
|
||||
bool idc_ind_r11_present = false;
|
||||
bool mbms_interest_ind_r11_present = false;
|
||||
bool pwr_pref_ind_r11_present = false;
|
||||
dyn_octstring idc_ind_r11;
|
||||
dyn_octstring mbms_interest_ind_r11;
|
||||
dyn_octstring pwr_pref_ind_r11;
|
||||
// ...
|
||||
// group 0
|
||||
bool sidelink_ue_info_r12_present = false;
|
||||
dyn_octstring sidelink_ue_info_r12;
|
||||
// group 1
|
||||
bool source_context_en_dc_r15_present = false;
|
||||
dyn_octstring source_context_en_dc_r15;
|
||||
// group 2
|
||||
bool selband_combination_info_en_dc_v1540_present = false;
|
||||
dyn_octstring selband_combination_info_en_dc_v1540;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// AS-Context-v1320 ::= SEQUENCE
|
||||
struct as_context_v1320_s {
|
||||
bool wlan_conn_status_report_r13_present = false;
|
||||
dyn_octstring wlan_conn_status_report_r13;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// CandidateCellInfo-r10 ::= SEQUENCE
|
||||
struct candidate_cell_info_r10_s {
|
||||
bool ext = false;
|
||||
bool rsrp_result_r10_present = false;
|
||||
bool rsrq_result_r10_present = false;
|
||||
uint16_t pci_r10 = 0;
|
||||
uint32_t dl_carrier_freq_r10 = 0;
|
||||
uint8_t rsrp_result_r10 = 0;
|
||||
uint8_t rsrq_result_r10 = 0;
|
||||
// ...
|
||||
// group 0
|
||||
bool dl_carrier_freq_v1090_present = false;
|
||||
uint32_t dl_carrier_freq_v1090 = 65536;
|
||||
// group 1
|
||||
bool rsrq_result_v1250_present = false;
|
||||
int8_t rsrq_result_v1250 = -30;
|
||||
// group 2
|
||||
bool rs_sinr_result_r13_present = false;
|
||||
uint8_t rs_sinr_result_r13 = 0;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// CandidateCellInfoList-r10 ::= SEQUENCE (SIZE (1..8)) OF CandidateCellInfo-r10
|
||||
using candidate_cell_info_list_r10_l = dyn_array<candidate_cell_info_r10_s>;
|
||||
|
||||
// HandoverCommand-r8-IEs ::= SEQUENCE
|
||||
struct ho_cmd_r8_ies_s {
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring ho_cmd_msg;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// HandoverCommand ::= SEQUENCE
|
||||
struct ho_cmd_s {
|
||||
struct crit_exts_c_ {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options { ho_cmd_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_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
|
||||
ho_cmd_r8_ies_s& ho_cmd_r8()
|
||||
{
|
||||
assert_choice_type("handoverCommand-r8", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
const ho_cmd_r8_ies_s& ho_cmd_r8() const
|
||||
{
|
||||
assert_choice_type("handoverCommand-r8", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
ho_cmd_r8_ies_s& set_ho_cmd_r8()
|
||||
{
|
||||
set(types::ho_cmd_r8);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
ho_cmd_r8_ies_s c;
|
||||
};
|
||||
typedef c1_or_crit_ext_e types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v1540-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v1540_ies_s {
|
||||
bool source_rb_cfg_intra5_gc_r15_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring source_rb_cfg_intra5_gc_r15;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v1530-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v1530_ies_s {
|
||||
bool ran_notif_area_info_r15_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
ran_notif_area_info_r15_c ran_notif_area_info_r15;
|
||||
ho_prep_info_v1540_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v1430-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v1430_ies_s {
|
||||
bool as_cfg_v1430_present = false;
|
||||
bool make_before_break_req_r14_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
as_cfg_v1430_s as_cfg_v1430;
|
||||
ho_prep_info_v1530_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v1320-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v1320_ies_s {
|
||||
bool as_cfg_v1320_present = false;
|
||||
bool as_context_v1320_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
as_cfg_v1320_s as_cfg_v1320;
|
||||
as_context_v1320_s as_context_v1320;
|
||||
ho_prep_info_v1430_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v13c0-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v13c0_ies_s {
|
||||
bool as_cfg_v13c0_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
as_cfg_v13c0_s as_cfg_v13c0;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v10x0-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v10x0_ies_s {
|
||||
bool late_non_crit_ext_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring late_non_crit_ext;
|
||||
ho_prep_info_v13c0_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v1250-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v1250_ies_s {
|
||||
bool ue_supported_earfcn_r12_present = false;
|
||||
bool as_cfg_v1250_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
uint32_t ue_supported_earfcn_r12 = 0;
|
||||
as_cfg_v1250_s as_cfg_v1250;
|
||||
ho_prep_info_v1320_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v10j0_ies_s {
|
||||
bool as_cfg_v10j0_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
as_cfg_v10j0_s as_cfg_v10j0;
|
||||
ho_prep_info_v10x0_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v1130-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v1130_ies_s {
|
||||
bool as_context_v1130_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
as_context_v1130_s as_context_v1130;
|
||||
ho_prep_info_v1250_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v9e0-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v9e0_ies_s {
|
||||
bool as_cfg_v9e0_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
as_cfg_v9e0_s as_cfg_v9e0;
|
||||
ho_prep_info_v1130_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v9j0_ies_s {
|
||||
bool late_non_crit_ext_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring late_non_crit_ext;
|
||||
ho_prep_info_v10j0_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v9d0_ies_s {
|
||||
bool late_non_crit_ext_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring late_non_crit_ext;
|
||||
ho_prep_info_v9e0_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-v920-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_v920_ies_s {
|
||||
struct ue_cfg_release_r9_opts {
|
||||
enum options { rel9, rel10, rel11, rel12, v10j0, v11e0, v1280, rel13, /*...*/ rel14, rel15, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<ue_cfg_release_r9_opts, true, 2> ue_cfg_release_r9_e_;
|
||||
|
||||
// member variables
|
||||
bool ue_cfg_release_r9_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
ue_cfg_release_r9_e_ ue_cfg_release_r9;
|
||||
ho_prep_info_v9d0_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;
|
||||
};
|
||||
|
||||
// RRM-Config ::= SEQUENCE
|
||||
struct rrm_cfg_s {
|
||||
struct ue_inactive_time_opts {
|
||||
enum options {
|
||||
s1,
|
||||
s2,
|
||||
s3,
|
||||
s5,
|
||||
s7,
|
||||
s10,
|
||||
s15,
|
||||
s20,
|
||||
s25,
|
||||
s30,
|
||||
s40,
|
||||
s50,
|
||||
min1,
|
||||
min1s20c,
|
||||
min1s40,
|
||||
min2,
|
||||
min2s30,
|
||||
min3,
|
||||
min3s30,
|
||||
min4,
|
||||
min5,
|
||||
min6,
|
||||
min7,
|
||||
min8,
|
||||
min9,
|
||||
min10,
|
||||
min12,
|
||||
min14,
|
||||
min17,
|
||||
min20,
|
||||
min24,
|
||||
min28,
|
||||
min33,
|
||||
min38,
|
||||
min44,
|
||||
min50,
|
||||
hr1,
|
||||
hr1min30,
|
||||
hr2,
|
||||
hr2min30,
|
||||
hr3,
|
||||
hr3min30,
|
||||
hr4,
|
||||
hr5,
|
||||
hr6,
|
||||
hr8,
|
||||
hr10,
|
||||
hr13,
|
||||
hr16,
|
||||
hr20,
|
||||
day1,
|
||||
day1hr12,
|
||||
day2,
|
||||
day2hr12,
|
||||
day3,
|
||||
day4,
|
||||
day5,
|
||||
day7,
|
||||
day10,
|
||||
day14,
|
||||
day19,
|
||||
day24,
|
||||
day30,
|
||||
day_more_than30,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<ue_inactive_time_opts> ue_inactive_time_e_;
|
||||
|
||||
// member variables
|
||||
bool ext = false;
|
||||
bool ue_inactive_time_present = false;
|
||||
ue_inactive_time_e_ ue_inactive_time;
|
||||
// ...
|
||||
// group 0
|
||||
copy_ptr<candidate_cell_info_list_r10_l> candidate_cell_info_list_r10;
|
||||
// group 1
|
||||
copy_ptr<meas_result_serv_freq_list_nr_r15_l> candidate_cell_info_list_nr_r15;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation-r8-IEs ::= SEQUENCE
|
||||
struct ho_prep_info_r8_ies_s {
|
||||
bool as_cfg_present = false;
|
||||
bool rrm_cfg_present = false;
|
||||
bool as_context_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
ue_cap_rat_container_list_l ue_radio_access_cap_info;
|
||||
as_cfg_s as_cfg;
|
||||
rrm_cfg_s rrm_cfg;
|
||||
as_context_s as_context;
|
||||
ho_prep_info_v920_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;
|
||||
};
|
||||
|
||||
// HandoverPreparationInformation ::= SEQUENCE
|
||||
struct ho_prep_info_s {
|
||||
struct crit_exts_c_ {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options { ho_prep_info_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_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
|
||||
ho_prep_info_r8_ies_s& ho_prep_info_r8()
|
||||
{
|
||||
assert_choice_type("handoverPreparationInformation-r8", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
const ho_prep_info_r8_ies_s& ho_prep_info_r8() const
|
||||
{
|
||||
assert_choice_type("handoverPreparationInformation-r8", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
ho_prep_info_r8_ies_s& set_ho_prep_info_r8()
|
||||
{
|
||||
set(types::ho_prep_info_r8);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
ho_prep_info_r8_ies_s c;
|
||||
};
|
||||
typedef c1_or_crit_ext_e types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// VarMeasConfig ::= SEQUENCE
|
||||
struct var_meas_cfg_s {
|
||||
struct speed_state_pars_c_ {
|
||||
struct setup_s_ {
|
||||
mob_state_params_s mob_state_params;
|
||||
speed_state_scale_factors_s time_to_trigger_sf;
|
||||
};
|
||||
typedef setup_e types;
|
||||
|
||||
// choice methods
|
||||
speed_state_pars_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(), "speedStatePars");
|
||||
return c;
|
||||
}
|
||||
const setup_s_& setup() const
|
||||
{
|
||||
assert_choice_type("setup", type_.to_string(), "speedStatePars");
|
||||
return c;
|
||||
}
|
||||
setup_s_& set_setup()
|
||||
{
|
||||
set(types::setup);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
setup_s_ c;
|
||||
};
|
||||
|
||||
// member variables
|
||||
bool meas_id_list_present = false;
|
||||
bool meas_id_list_ext_r12_present = false;
|
||||
bool meas_id_list_v1310_present = false;
|
||||
bool meas_id_list_ext_v1310_present = false;
|
||||
bool meas_obj_list_present = false;
|
||||
bool meas_obj_list_ext_r13_present = false;
|
||||
bool meas_obj_list_v9i0_present = false;
|
||||
bool report_cfg_list_present = false;
|
||||
bool quant_cfg_present = false;
|
||||
bool meas_scale_factor_r12_present = false;
|
||||
bool s_measure_present = false;
|
||||
bool speed_state_pars_present = false;
|
||||
bool allow_interruptions_r11_present = false;
|
||||
meas_id_to_add_mod_list_l meas_id_list;
|
||||
meas_id_to_add_mod_list_ext_r12_l meas_id_list_ext_r12;
|
||||
meas_id_to_add_mod_list_v1310_l meas_id_list_v1310;
|
||||
meas_id_to_add_mod_list_ext_v1310_l meas_id_list_ext_v1310;
|
||||
meas_obj_to_add_mod_list_l meas_obj_list;
|
||||
meas_obj_to_add_mod_list_ext_r13_l meas_obj_list_ext_r13;
|
||||
meas_obj_to_add_mod_list_v9e0_l meas_obj_list_v9i0;
|
||||
report_cfg_to_add_mod_list_l report_cfg_list;
|
||||
quant_cfg_s quant_cfg;
|
||||
meas_scale_factor_r12_e meas_scale_factor_r12;
|
||||
int16_t s_measure = -140;
|
||||
speed_state_pars_c_ speed_state_pars;
|
||||
bool allow_interruptions_r11 = false;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
} // namespace rrc
|
||||
} // namespace asn1
|
||||
|
||||
#endif // SRSASN1_RRC_HO_CMD_H
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,549 @@
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 3GPP TS ASN1 RRC v15.11.0 (2020-09)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef SRSASN1_RRC_PAGING_H
|
||||
#define SRSASN1_RRC_PAGING_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
namespace asn1 {
|
||||
namespace rrc {
|
||||
|
||||
/*******************************************************************************
|
||||
* Struct Definitions
|
||||
******************************************************************************/
|
||||
|
||||
// Paging-v1530-IEs ::= SEQUENCE
|
||||
struct paging_v1530_ies_s {
|
||||
bool access_type_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;
|
||||
};
|
||||
|
||||
// IMSI ::= SEQUENCE (SIZE (6..21)) OF INTEGER (0..9)
|
||||
using imsi_l = bounded_array<uint8_t, 21>;
|
||||
|
||||
// Paging-v1310-IEs ::= SEQUENCE
|
||||
struct paging_v1310_ies_s {
|
||||
bool redist_ind_r13_present = false;
|
||||
bool sys_info_mod_e_drx_r13_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
paging_v1530_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;
|
||||
};
|
||||
|
||||
// S-TMSI ::= SEQUENCE
|
||||
struct s_tmsi_s {
|
||||
fixed_bitstring<8> mmec;
|
||||
fixed_bitstring<32> m_tmsi;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// Paging-v1130-IEs ::= SEQUENCE
|
||||
struct paging_v1130_ies_s {
|
||||
bool eab_param_mod_r11_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
paging_v1310_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;
|
||||
};
|
||||
|
||||
// PagingUE-Identity ::= CHOICE
|
||||
struct paging_ue_id_c {
|
||||
struct types_opts {
|
||||
enum options { s_tmsi, imsi, /*...*/ ng_minus5_g_s_tmsi_r15, full_i_rnti_r15, nulltype } value;
|
||||
typedef int8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
int8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts, true, 2> types;
|
||||
|
||||
// choice methods
|
||||
paging_ue_id_c() = default;
|
||||
paging_ue_id_c(const paging_ue_id_c& other);
|
||||
paging_ue_id_c& operator=(const paging_ue_id_c& other);
|
||||
~paging_ue_id_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
|
||||
s_tmsi_s& s_tmsi()
|
||||
{
|
||||
assert_choice_type("s-TMSI", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<s_tmsi_s>();
|
||||
}
|
||||
imsi_l& imsi()
|
||||
{
|
||||
assert_choice_type("imsi", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<imsi_l>();
|
||||
}
|
||||
fixed_bitstring<48>& ng_minus5_g_s_tmsi_r15()
|
||||
{
|
||||
assert_choice_type("ng-5G-S-TMSI-r15", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<fixed_bitstring<48> >();
|
||||
}
|
||||
fixed_bitstring<40>& full_i_rnti_r15()
|
||||
{
|
||||
assert_choice_type("fullI-RNTI-r15", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const s_tmsi_s& s_tmsi() const
|
||||
{
|
||||
assert_choice_type("s-TMSI", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<s_tmsi_s>();
|
||||
}
|
||||
const imsi_l& imsi() const
|
||||
{
|
||||
assert_choice_type("imsi", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<imsi_l>();
|
||||
}
|
||||
const fixed_bitstring<48>& ng_minus5_g_s_tmsi_r15() const
|
||||
{
|
||||
assert_choice_type("ng-5G-S-TMSI-r15", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<fixed_bitstring<48> >();
|
||||
}
|
||||
const fixed_bitstring<40>& full_i_rnti_r15() const
|
||||
{
|
||||
assert_choice_type("fullI-RNTI-r15", type_.to_string(), "PagingUE-Identity");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
s_tmsi_s& set_s_tmsi()
|
||||
{
|
||||
set(types::s_tmsi);
|
||||
return c.get<s_tmsi_s>();
|
||||
}
|
||||
imsi_l& set_imsi()
|
||||
{
|
||||
set(types::imsi);
|
||||
return c.get<imsi_l>();
|
||||
}
|
||||
fixed_bitstring<48>& set_ng_minus5_g_s_tmsi_r15()
|
||||
{
|
||||
set(types::ng_minus5_g_s_tmsi_r15);
|
||||
return c.get<fixed_bitstring<48> >();
|
||||
}
|
||||
fixed_bitstring<40>& set_full_i_rnti_r15()
|
||||
{
|
||||
set(types::full_i_rnti_r15);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<48>, imsi_l, s_tmsi_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// Paging-v920-IEs ::= SEQUENCE
|
||||
struct paging_v920_ies_s {
|
||||
bool cmas_ind_r9_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
paging_v1130_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;
|
||||
};
|
||||
|
||||
// PagingRecord ::= SEQUENCE
|
||||
struct paging_record_s {
|
||||
struct cn_domain_opts {
|
||||
enum options { ps, cs, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<cn_domain_opts> cn_domain_e_;
|
||||
|
||||
// member variables
|
||||
bool ext = false;
|
||||
paging_ue_id_c ue_id;
|
||||
cn_domain_e_ cn_domain;
|
||||
// ...
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// Paging-v890-IEs ::= SEQUENCE
|
||||
struct paging_v890_ies_s {
|
||||
bool late_non_crit_ext_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring late_non_crit_ext;
|
||||
paging_v920_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;
|
||||
};
|
||||
|
||||
// PagingRecordList ::= SEQUENCE (SIZE (1..16)) OF PagingRecord
|
||||
using paging_record_list_l = dyn_array<paging_record_s>;
|
||||
|
||||
// Paging ::= SEQUENCE
|
||||
struct paging_s {
|
||||
bool paging_record_list_present = false;
|
||||
bool sys_info_mod_present = false;
|
||||
bool etws_ind_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
paging_record_list_l paging_record_list;
|
||||
paging_v890_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;
|
||||
};
|
||||
|
||||
// PCCH-MessageType ::= CHOICE
|
||||
struct pcch_msg_type_c {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options { paging, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
types type() const { return types::paging; }
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
// getters
|
||||
paging_s& paging() { return c; }
|
||||
const paging_s& paging() const { return c; }
|
||||
|
||||
private:
|
||||
paging_s c;
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { c1, msg_class_ext, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
pcch_msg_type_c() = default;
|
||||
pcch_msg_type_c(const pcch_msg_type_c& other);
|
||||
pcch_msg_type_c& operator=(const pcch_msg_type_c& other);
|
||||
~pcch_msg_type_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "PCCH-MessageType");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "PCCH-MessageType");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// PCCH-Message ::= SEQUENCE
|
||||
struct pcch_msg_s {
|
||||
pcch_msg_type_c msg;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// UEPagingCoverageInformation-r13-IEs ::= SEQUENCE
|
||||
struct ue_paging_coverage_info_r13_ies_s {
|
||||
bool mpdcch_num_repeat_r13_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
uint16_t mpdcch_num_repeat_r13 = 1;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// UEPagingCoverageInformation ::= SEQUENCE
|
||||
struct ue_paging_coverage_info_s {
|
||||
struct crit_exts_c_ {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options {
|
||||
ue_paging_coverage_info_r13,
|
||||
spare7,
|
||||
spare6,
|
||||
spare5,
|
||||
spare4,
|
||||
spare3,
|
||||
spare2,
|
||||
spare1,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_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
|
||||
ue_paging_coverage_info_r13_ies_s& ue_paging_coverage_info_r13()
|
||||
{
|
||||
assert_choice_type("uePagingCoverageInformation-r13", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
const ue_paging_coverage_info_r13_ies_s& ue_paging_coverage_info_r13() const
|
||||
{
|
||||
assert_choice_type("uePagingCoverageInformation-r13", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
ue_paging_coverage_info_r13_ies_s& set_ue_paging_coverage_info_r13()
|
||||
{
|
||||
set(types::ue_paging_coverage_info_r13);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
ue_paging_coverage_info_r13_ies_s c;
|
||||
};
|
||||
typedef c1_or_crit_ext_e types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// UERadioPagingInformation-v1310-IEs ::= SEQUENCE
|
||||
struct ue_radio_paging_info_v1310_ies_s {
|
||||
using supported_band_list_eutra_for_paging_r13_l_ = dyn_array<uint16_t>;
|
||||
|
||||
// member variables
|
||||
bool supported_band_list_eutra_for_paging_r13_present = false;
|
||||
bool non_crit_ext_present = false;
|
||||
supported_band_list_eutra_for_paging_r13_l_ supported_band_list_eutra_for_paging_r13;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// UERadioPagingInformation-r12-IEs ::= SEQUENCE
|
||||
struct ue_radio_paging_info_r12_ies_s {
|
||||
bool non_crit_ext_present = false;
|
||||
dyn_octstring ue_radio_paging_info_r12;
|
||||
ue_radio_paging_info_v1310_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;
|
||||
};
|
||||
|
||||
// UERadioPagingInformation ::= SEQUENCE
|
||||
struct ue_radio_paging_info_s {
|
||||
struct crit_exts_c_ {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options {
|
||||
ue_radio_paging_info_r12,
|
||||
spare7,
|
||||
spare6,
|
||||
spare5,
|
||||
spare4,
|
||||
spare3,
|
||||
spare2,
|
||||
spare1,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_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
|
||||
ue_radio_paging_info_r12_ies_s& ue_radio_paging_info_r12()
|
||||
{
|
||||
assert_choice_type("ueRadioPagingInformation-r12", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
const ue_radio_paging_info_r12_ies_s& ue_radio_paging_info_r12() const
|
||||
{
|
||||
assert_choice_type("ueRadioPagingInformation-r12", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
ue_radio_paging_info_r12_ies_s& set_ue_radio_paging_info_r12()
|
||||
{
|
||||
set(types::ue_radio_paging_info_r12);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
ue_radio_paging_info_r12_ies_s c;
|
||||
};
|
||||
typedef c1_or_crit_ext_e types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
} // namespace rrc
|
||||
} // namespace asn1
|
||||
|
||||
#endif // SRSASN1_RRC_PAGING_H
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,532 @@
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 3GPP TS ASN1 RRC v15.11.0 (2020-09)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef SRSASN1_RRC_SECURITY_H
|
||||
#define SRSASN1_RRC_SECURITY_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
namespace asn1 {
|
||||
namespace rrc {
|
||||
|
||||
/*******************************************************************************
|
||||
* Struct Definitions
|
||||
******************************************************************************/
|
||||
|
||||
// SecurityAlgorithmConfig ::= SEQUENCE
|
||||
struct security_algorithm_cfg_s {
|
||||
struct integrity_prot_algorithm_opts {
|
||||
enum options { eia0_v920, eia1, eia2, eia3_v1130, spare4, spare3, spare2, spare1, /*...*/ nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<integrity_prot_algorithm_opts, true> integrity_prot_algorithm_e_;
|
||||
|
||||
// member variables
|
||||
ciphering_algorithm_r12_e ciphering_algorithm;
|
||||
integrity_prot_algorithm_e_ integrity_prot_algorithm;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SecurityConfigHO-v1530 ::= SEQUENCE
|
||||
struct security_cfg_ho_v1530_s {
|
||||
struct handov_type_v1530_c_ {
|
||||
struct intra5_gc_r15_s_ {
|
||||
bool security_algorithm_cfg_r15_present = false;
|
||||
bool nas_container_r15_present = false;
|
||||
security_algorithm_cfg_s security_algorithm_cfg_r15;
|
||||
bool key_change_ind_r15 = false;
|
||||
uint8_t next_hop_chaining_count_r15 = 0;
|
||||
dyn_octstring nas_container_r15;
|
||||
};
|
||||
struct fivegc_to_epc_r15_s_ {
|
||||
security_algorithm_cfg_s security_algorithm_cfg_r15;
|
||||
uint8_t next_hop_chaining_count_r15 = 0;
|
||||
};
|
||||
struct epc_to5_gc_r15_s_ {
|
||||
security_algorithm_cfg_s security_algorithm_cfg_r15;
|
||||
dyn_octstring nas_container_r15;
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { intra5_gc_r15, fivegc_to_epc_r15, epc_to5_gc_r15, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
handov_type_v1530_c_() = default;
|
||||
handov_type_v1530_c_(const handov_type_v1530_c_& other);
|
||||
handov_type_v1530_c_& operator=(const handov_type_v1530_c_& other);
|
||||
~handov_type_v1530_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
|
||||
intra5_gc_r15_s_& intra5_gc_r15()
|
||||
{
|
||||
assert_choice_type("intra5GC-r15", type_.to_string(), "handoverType-v1530");
|
||||
return c.get<intra5_gc_r15_s_>();
|
||||
}
|
||||
fivegc_to_epc_r15_s_& fivegc_to_epc_r15()
|
||||
{
|
||||
assert_choice_type("fivegc-ToEPC-r15", type_.to_string(), "handoverType-v1530");
|
||||
return c.get<fivegc_to_epc_r15_s_>();
|
||||
}
|
||||
epc_to5_gc_r15_s_& epc_to5_gc_r15()
|
||||
{
|
||||
assert_choice_type("epc-To5GC-r15", type_.to_string(), "handoverType-v1530");
|
||||
return c.get<epc_to5_gc_r15_s_>();
|
||||
}
|
||||
const intra5_gc_r15_s_& intra5_gc_r15() const
|
||||
{
|
||||
assert_choice_type("intra5GC-r15", type_.to_string(), "handoverType-v1530");
|
||||
return c.get<intra5_gc_r15_s_>();
|
||||
}
|
||||
const fivegc_to_epc_r15_s_& fivegc_to_epc_r15() const
|
||||
{
|
||||
assert_choice_type("fivegc-ToEPC-r15", type_.to_string(), "handoverType-v1530");
|
||||
return c.get<fivegc_to_epc_r15_s_>();
|
||||
}
|
||||
const epc_to5_gc_r15_s_& epc_to5_gc_r15() const
|
||||
{
|
||||
assert_choice_type("epc-To5GC-r15", type_.to_string(), "handoverType-v1530");
|
||||
return c.get<epc_to5_gc_r15_s_>();
|
||||
}
|
||||
intra5_gc_r15_s_& set_intra5_gc_r15()
|
||||
{
|
||||
set(types::intra5_gc_r15);
|
||||
return c.get<intra5_gc_r15_s_>();
|
||||
}
|
||||
fivegc_to_epc_r15_s_& set_fivegc_to_epc_r15()
|
||||
{
|
||||
set(types::fivegc_to_epc_r15);
|
||||
return c.get<fivegc_to_epc_r15_s_>();
|
||||
}
|
||||
epc_to5_gc_r15_s_& set_epc_to5_gc_r15()
|
||||
{
|
||||
set(types::epc_to5_gc_r15);
|
||||
return c.get<epc_to5_gc_r15_s_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<epc_to5_gc_r15_s_, fivegc_to_epc_r15_s_, intra5_gc_r15_s_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
bool ext = false;
|
||||
handov_type_v1530_c_ handov_type_v1530;
|
||||
// ...
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SecurityConfigHO ::= SEQUENCE
|
||||
struct security_cfg_ho_s {
|
||||
struct handov_type_c_ {
|
||||
struct intra_lte_s_ {
|
||||
bool security_algorithm_cfg_present = false;
|
||||
security_algorithm_cfg_s security_algorithm_cfg;
|
||||
bool key_change_ind = false;
|
||||
uint8_t next_hop_chaining_count = 0;
|
||||
};
|
||||
struct inter_rat_s_ {
|
||||
security_algorithm_cfg_s security_algorithm_cfg;
|
||||
fixed_octstring<6> nas_security_param_to_eutra;
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { intra_lte, inter_rat, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
handov_type_c_() = default;
|
||||
handov_type_c_(const handov_type_c_& other);
|
||||
handov_type_c_& operator=(const handov_type_c_& other);
|
||||
~handov_type_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
|
||||
intra_lte_s_& intra_lte()
|
||||
{
|
||||
assert_choice_type("intraLTE", type_.to_string(), "handoverType");
|
||||
return c.get<intra_lte_s_>();
|
||||
}
|
||||
inter_rat_s_& inter_rat()
|
||||
{
|
||||
assert_choice_type("interRAT", type_.to_string(), "handoverType");
|
||||
return c.get<inter_rat_s_>();
|
||||
}
|
||||
const intra_lte_s_& intra_lte() const
|
||||
{
|
||||
assert_choice_type("intraLTE", type_.to_string(), "handoverType");
|
||||
return c.get<intra_lte_s_>();
|
||||
}
|
||||
const inter_rat_s_& inter_rat() const
|
||||
{
|
||||
assert_choice_type("interRAT", type_.to_string(), "handoverType");
|
||||
return c.get<inter_rat_s_>();
|
||||
}
|
||||
intra_lte_s_& set_intra_lte()
|
||||
{
|
||||
set(types::intra_lte);
|
||||
return c.get<intra_lte_s_>();
|
||||
}
|
||||
inter_rat_s_& set_inter_rat()
|
||||
{
|
||||
set(types::inter_rat);
|
||||
return c.get<inter_rat_s_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<inter_rat_s_, intra_lte_s_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
bool ext = false;
|
||||
handov_type_c_ handov_type;
|
||||
// ...
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SecurityConfigSMC ::= SEQUENCE
|
||||
struct security_cfg_smc_s {
|
||||
bool ext = false;
|
||||
security_algorithm_cfg_s security_algorithm_cfg;
|
||||
// ...
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SecurityModeCommand-v8a0-IEs ::= SEQUENCE
|
||||
struct security_mode_cmd_v8a0_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;
|
||||
};
|
||||
|
||||
// SecurityModeCommand-r8-IEs ::= SEQUENCE
|
||||
struct security_mode_cmd_r8_ies_s {
|
||||
bool non_crit_ext_present = false;
|
||||
security_cfg_smc_s security_cfg_smc;
|
||||
security_mode_cmd_v8a0_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;
|
||||
};
|
||||
|
||||
// SecurityModeCommand ::= SEQUENCE
|
||||
struct security_mode_cmd_s {
|
||||
struct crit_exts_c_ {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options { security_mode_cmd_r8, spare3, spare2, spare1, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_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
|
||||
security_mode_cmd_r8_ies_s& security_mode_cmd_r8()
|
||||
{
|
||||
assert_choice_type("securityModeCommand-r8", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
const security_mode_cmd_r8_ies_s& security_mode_cmd_r8() const
|
||||
{
|
||||
assert_choice_type("securityModeCommand-r8", type_.to_string(), "c1");
|
||||
return c;
|
||||
}
|
||||
security_mode_cmd_r8_ies_s& set_security_mode_cmd_r8()
|
||||
{
|
||||
set(types::security_mode_cmd_r8);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
security_mode_cmd_r8_ies_s c;
|
||||
};
|
||||
typedef c1_or_crit_ext_e types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "criticalExtensions");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
uint8_t rrc_transaction_id = 0;
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SecurityModeComplete-v8a0-IEs ::= SEQUENCE
|
||||
struct security_mode_complete_v8a0_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;
|
||||
};
|
||||
|
||||
// SecurityModeFailure-v8a0-IEs ::= SEQUENCE
|
||||
struct security_mode_fail_v8a0_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;
|
||||
};
|
||||
|
||||
// SecurityModeComplete-r8-IEs ::= SEQUENCE
|
||||
struct security_mode_complete_r8_ies_s {
|
||||
bool non_crit_ext_present = false;
|
||||
security_mode_complete_v8a0_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;
|
||||
};
|
||||
|
||||
// SecurityModeFailure-r8-IEs ::= SEQUENCE
|
||||
struct security_mode_fail_r8_ies_s {
|
||||
bool non_crit_ext_present = false;
|
||||
security_mode_fail_v8a0_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;
|
||||
};
|
||||
|
||||
// SecurityModeComplete ::= SEQUENCE
|
||||
struct security_mode_complete_s {
|
||||
struct crit_exts_c_ {
|
||||
struct types_opts {
|
||||
enum options { security_mode_complete_r8, crit_exts_future, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
security_mode_complete_r8_ies_s& security_mode_complete_r8()
|
||||
{
|
||||
assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<security_mode_complete_r8_ies_s>();
|
||||
}
|
||||
const security_mode_complete_r8_ies_s& security_mode_complete_r8() const
|
||||
{
|
||||
assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<security_mode_complete_r8_ies_s>();
|
||||
}
|
||||
security_mode_complete_r8_ies_s& set_security_mode_complete_r8()
|
||||
{
|
||||
set(types::security_mode_complete_r8);
|
||||
return c.get<security_mode_complete_r8_ies_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<security_mode_complete_r8_ies_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
uint8_t rrc_transaction_id = 0;
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// SecurityModeFailure ::= SEQUENCE
|
||||
struct security_mode_fail_s {
|
||||
struct crit_exts_c_ {
|
||||
struct types_opts {
|
||||
enum options { security_mode_fail_r8, crit_exts_future, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
security_mode_fail_r8_ies_s& security_mode_fail_r8()
|
||||
{
|
||||
assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<security_mode_fail_r8_ies_s>();
|
||||
}
|
||||
const security_mode_fail_r8_ies_s& security_mode_fail_r8() const
|
||||
{
|
||||
assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<security_mode_fail_r8_ies_s>();
|
||||
}
|
||||
security_mode_fail_r8_ies_s& set_security_mode_fail_r8()
|
||||
{
|
||||
set(types::security_mode_fail_r8);
|
||||
return c.get<security_mode_fail_r8_ies_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<security_mode_fail_r8_ies_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
uint8_t rrc_transaction_id = 0;
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// VarShortMAC-Input ::= SEQUENCE
|
||||
struct var_short_mac_input_s {
|
||||
fixed_bitstring<28> cell_id;
|
||||
uint16_t pci = 0;
|
||||
fixed_bitstring<16> c_rnti;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
} // namespace rrc
|
||||
} // namespace asn1
|
||||
|
||||
#endif // SRSASN1_RRC_SECURITY_H
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,977 @@
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 3GPP TS ASN1 RRC v15.11.0 (2020-09)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef SRSASN1_RRC_ULCCCH_MSG_H
|
||||
#define SRSASN1_RRC_ULCCCH_MSG_H
|
||||
|
||||
#include "paging.h"
|
||||
|
||||
namespace asn1 {
|
||||
namespace rrc {
|
||||
|
||||
/*******************************************************************************
|
||||
* Struct Definitions
|
||||
******************************************************************************/
|
||||
|
||||
// EstablishmentCause ::= ENUMERATED
|
||||
struct establishment_cause_opts {
|
||||
enum options {
|
||||
emergency,
|
||||
high_prio_access,
|
||||
mt_access,
|
||||
mo_sig,
|
||||
mo_data,
|
||||
delay_tolerant_access_v1020,
|
||||
mo_voice_call_v1280,
|
||||
spare1,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<establishment_cause_opts> establishment_cause_e;
|
||||
|
||||
// EstablishmentCause-5GC ::= ENUMERATED
|
||||
struct establishment_cause_minus5_gc_opts {
|
||||
enum options {
|
||||
emergency,
|
||||
high_prio_access,
|
||||
mt_access,
|
||||
mo_sig,
|
||||
mo_data,
|
||||
mo_voice_call,
|
||||
spare2,
|
||||
spare1,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<establishment_cause_minus5_gc_opts> establishment_cause_minus5_gc_e;
|
||||
|
||||
// InitialUE-Identity ::= CHOICE
|
||||
struct init_ue_id_c {
|
||||
struct types_opts {
|
||||
enum options { s_tmsi, random_value, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
init_ue_id_c() = default;
|
||||
init_ue_id_c(const init_ue_id_c& other);
|
||||
init_ue_id_c& operator=(const init_ue_id_c& other);
|
||||
~init_ue_id_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
|
||||
s_tmsi_s& s_tmsi()
|
||||
{
|
||||
assert_choice_type("s-TMSI", type_.to_string(), "InitialUE-Identity");
|
||||
return c.get<s_tmsi_s>();
|
||||
}
|
||||
fixed_bitstring<40>& random_value()
|
||||
{
|
||||
assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const s_tmsi_s& s_tmsi() const
|
||||
{
|
||||
assert_choice_type("s-TMSI", type_.to_string(), "InitialUE-Identity");
|
||||
return c.get<s_tmsi_s>();
|
||||
}
|
||||
const fixed_bitstring<40>& random_value() const
|
||||
{
|
||||
assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
s_tmsi_s& set_s_tmsi()
|
||||
{
|
||||
set(types::s_tmsi);
|
||||
return c.get<s_tmsi_s>();
|
||||
}
|
||||
fixed_bitstring<40>& set_random_value()
|
||||
{
|
||||
set(types::random_value);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<40>, s_tmsi_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// InitialUE-Identity-5GC ::= CHOICE
|
||||
struct init_ue_id_minus5_gc_c {
|
||||
struct types_opts {
|
||||
enum options { ng_minus5_g_s_tmsi_part1, random_value, nulltype } value;
|
||||
typedef int8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
int8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
init_ue_id_minus5_gc_c() = default;
|
||||
init_ue_id_minus5_gc_c(const init_ue_id_minus5_gc_c& other);
|
||||
init_ue_id_minus5_gc_c& operator=(const init_ue_id_minus5_gc_c& other);
|
||||
~init_ue_id_minus5_gc_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
|
||||
fixed_bitstring<40>& ng_minus5_g_s_tmsi_part1()
|
||||
{
|
||||
assert_choice_type("ng-5G-S-TMSI-Part1", type_.to_string(), "InitialUE-Identity-5GC");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<40>& random_value()
|
||||
{
|
||||
assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity-5GC");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const fixed_bitstring<40>& ng_minus5_g_s_tmsi_part1() const
|
||||
{
|
||||
assert_choice_type("ng-5G-S-TMSI-Part1", type_.to_string(), "InitialUE-Identity-5GC");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const fixed_bitstring<40>& random_value() const
|
||||
{
|
||||
assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity-5GC");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<40>& set_ng_minus5_g_s_tmsi_part1()
|
||||
{
|
||||
set(types::ng_minus5_g_s_tmsi_part1);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<40>& set_random_value()
|
||||
{
|
||||
set(types::random_value);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<40> > c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// ReestabUE-Identity ::= SEQUENCE
|
||||
struct reestab_ue_id_s {
|
||||
fixed_bitstring<16> c_rnti;
|
||||
uint16_t pci = 0;
|
||||
fixed_bitstring<16> short_mac_i;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// ReestablishmentCause ::= ENUMERATED
|
||||
struct reest_cause_opts {
|
||||
enum options { recfg_fail, ho_fail, other_fail, spare1, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<reest_cause_opts> reest_cause_e;
|
||||
|
||||
// ResumeCause ::= ENUMERATED
|
||||
struct resume_cause_opts {
|
||||
enum options {
|
||||
emergency,
|
||||
high_prio_access,
|
||||
mt_access,
|
||||
mo_sig,
|
||||
mo_data,
|
||||
delay_tolerant_access_v1020,
|
||||
mo_voice_call_v1280,
|
||||
spare1,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<resume_cause_opts> resume_cause_e;
|
||||
|
||||
// ResumeCause-r15 ::= ENUMERATED
|
||||
struct resume_cause_r15_opts {
|
||||
enum options {
|
||||
emergency,
|
||||
high_prio_access,
|
||||
mt_access,
|
||||
mo_sig,
|
||||
mo_data,
|
||||
rna_upd,
|
||||
mo_voice_call,
|
||||
spare1,
|
||||
nulltype
|
||||
} value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<resume_cause_r15_opts> resume_cause_r15_e;
|
||||
|
||||
// RRCConnectionReestablishmentRequest-r8-IEs ::= SEQUENCE
|
||||
struct rrc_conn_reest_request_r8_ies_s {
|
||||
reestab_ue_id_s ue_id;
|
||||
reest_cause_e reest_cause;
|
||||
fixed_bitstring<2> spare;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionRequest-5GC-r15-IEs ::= SEQUENCE
|
||||
struct rrc_conn_request_minus5_gc_r15_ies_s {
|
||||
init_ue_id_minus5_gc_c ue_id;
|
||||
establishment_cause_minus5_gc_e establishment_cause;
|
||||
fixed_bitstring<1> spare;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionRequest-r8-IEs ::= SEQUENCE
|
||||
struct rrc_conn_request_r8_ies_s {
|
||||
init_ue_id_c ue_id;
|
||||
establishment_cause_e establishment_cause;
|
||||
fixed_bitstring<1> spare;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionResumeRequest-5GC-r15-IEs ::= SEQUENCE
|
||||
struct rrc_conn_resume_request_minus5_gc_r15_ies_s {
|
||||
struct resume_id_r15_c_ {
|
||||
struct types_opts {
|
||||
enum options { full_i_rnti_r15, short_i_rnti_r15, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
resume_id_r15_c_() = default;
|
||||
resume_id_r15_c_(const resume_id_r15_c_& other);
|
||||
resume_id_r15_c_& operator=(const resume_id_r15_c_& other);
|
||||
~resume_id_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;
|
||||
// getters
|
||||
fixed_bitstring<40>& full_i_rnti_r15()
|
||||
{
|
||||
assert_choice_type("fullI-RNTI-r15", type_.to_string(), "resumeIdentity-r15");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<24>& short_i_rnti_r15()
|
||||
{
|
||||
assert_choice_type("shortI-RNTI-r15", type_.to_string(), "resumeIdentity-r15");
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
const fixed_bitstring<40>& full_i_rnti_r15() const
|
||||
{
|
||||
assert_choice_type("fullI-RNTI-r15", type_.to_string(), "resumeIdentity-r15");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const fixed_bitstring<24>& short_i_rnti_r15() const
|
||||
{
|
||||
assert_choice_type("shortI-RNTI-r15", type_.to_string(), "resumeIdentity-r15");
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
fixed_bitstring<40>& set_full_i_rnti_r15()
|
||||
{
|
||||
set(types::full_i_rnti_r15);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<24>& set_short_i_rnti_r15()
|
||||
{
|
||||
set(types::short_i_rnti_r15);
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<40> > c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
resume_id_r15_c_ resume_id_r15;
|
||||
fixed_bitstring<16> short_resume_mac_i_r15;
|
||||
resume_cause_r15_e resume_cause_r15;
|
||||
fixed_bitstring<1> spare;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionResumeRequest-r13-IEs ::= SEQUENCE
|
||||
struct rrc_conn_resume_request_r13_ies_s {
|
||||
struct resume_id_r13_c_ {
|
||||
struct types_opts {
|
||||
enum options { resume_id_r13, truncated_resume_id_r13, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
resume_id_r13_c_() = default;
|
||||
resume_id_r13_c_(const resume_id_r13_c_& other);
|
||||
resume_id_r13_c_& operator=(const resume_id_r13_c_& other);
|
||||
~resume_id_r13_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
|
||||
fixed_bitstring<40>& resume_id_r13()
|
||||
{
|
||||
assert_choice_type("resumeID-r13", type_.to_string(), "resumeIdentity-r13");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<24>& truncated_resume_id_r13()
|
||||
{
|
||||
assert_choice_type("truncatedResumeID-r13", type_.to_string(), "resumeIdentity-r13");
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
const fixed_bitstring<40>& resume_id_r13() const
|
||||
{
|
||||
assert_choice_type("resumeID-r13", type_.to_string(), "resumeIdentity-r13");
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
const fixed_bitstring<24>& truncated_resume_id_r13() const
|
||||
{
|
||||
assert_choice_type("truncatedResumeID-r13", type_.to_string(), "resumeIdentity-r13");
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
fixed_bitstring<40>& set_resume_id_r13()
|
||||
{
|
||||
set(types::resume_id_r13);
|
||||
return c.get<fixed_bitstring<40> >();
|
||||
}
|
||||
fixed_bitstring<24>& set_truncated_resume_id_r13()
|
||||
{
|
||||
set(types::truncated_resume_id_r13);
|
||||
return c.get<fixed_bitstring<24> >();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<fixed_bitstring<40> > c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
resume_id_r13_c_ resume_id_r13;
|
||||
fixed_bitstring<16> short_resume_mac_i_r13;
|
||||
resume_cause_e resume_cause_r13;
|
||||
fixed_bitstring<1> spare;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// 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;
|
||||
|
||||
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;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionReestablishmentRequest ::= SEQUENCE
|
||||
struct rrc_conn_reest_request_s {
|
||||
struct crit_exts_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_conn_reest_request_r8, crit_exts_future, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8()
|
||||
{
|
||||
assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_reest_request_r8_ies_s>();
|
||||
}
|
||||
const rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_reest_request_r8_ies_s>();
|
||||
}
|
||||
rrc_conn_reest_request_r8_ies_s& set_rrc_conn_reest_request_r8()
|
||||
{
|
||||
set(types::rrc_conn_reest_request_r8);
|
||||
return c.get<rrc_conn_reest_request_r8_ies_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<rrc_conn_reest_request_r8_ies_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionRequest ::= SEQUENCE
|
||||
struct rrc_conn_request_s {
|
||||
struct crit_exts_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_conn_request_r8, rrc_conn_request_r15, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
rrc_conn_request_r8_ies_s& rrc_conn_request_r8()
|
||||
{
|
||||
assert_choice_type("rrcConnectionRequest-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_request_r8_ies_s>();
|
||||
}
|
||||
rrc_conn_request_minus5_gc_r15_ies_s& rrc_conn_request_r15()
|
||||
{
|
||||
assert_choice_type("rrcConnectionRequest-r15", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_request_minus5_gc_r15_ies_s>();
|
||||
}
|
||||
const rrc_conn_request_r8_ies_s& rrc_conn_request_r8() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionRequest-r8", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_request_r8_ies_s>();
|
||||
}
|
||||
const rrc_conn_request_minus5_gc_r15_ies_s& rrc_conn_request_r15() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionRequest-r15", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_request_minus5_gc_r15_ies_s>();
|
||||
}
|
||||
rrc_conn_request_r8_ies_s& set_rrc_conn_request_r8()
|
||||
{
|
||||
set(types::rrc_conn_request_r8);
|
||||
return c.get<rrc_conn_request_r8_ies_s>();
|
||||
}
|
||||
rrc_conn_request_minus5_gc_r15_ies_s& set_rrc_conn_request_r15()
|
||||
{
|
||||
set(types::rrc_conn_request_r15);
|
||||
return c.get<rrc_conn_request_minus5_gc_r15_ies_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<rrc_conn_request_minus5_gc_r15_ies_s, rrc_conn_request_r8_ies_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCConnectionResumeRequest-r13 ::= SEQUENCE
|
||||
struct rrc_conn_resume_request_r13_s {
|
||||
struct crit_exts_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_conn_resume_request_r13, rrc_conn_resume_request_r15, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
rrc_conn_resume_request_r13_ies_s& rrc_conn_resume_request_r13()
|
||||
{
|
||||
assert_choice_type("rrcConnectionResumeRequest-r13", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_resume_request_r13_ies_s>();
|
||||
}
|
||||
rrc_conn_resume_request_minus5_gc_r15_ies_s& rrc_conn_resume_request_r15()
|
||||
{
|
||||
assert_choice_type("rrcConnectionResumeRequest-r15", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_resume_request_minus5_gc_r15_ies_s>();
|
||||
}
|
||||
const rrc_conn_resume_request_r13_ies_s& rrc_conn_resume_request_r13() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionResumeRequest-r13", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_resume_request_r13_ies_s>();
|
||||
}
|
||||
const rrc_conn_resume_request_minus5_gc_r15_ies_s& rrc_conn_resume_request_r15() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionResumeRequest-r15", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_conn_resume_request_minus5_gc_r15_ies_s>();
|
||||
}
|
||||
rrc_conn_resume_request_r13_ies_s& set_rrc_conn_resume_request_r13()
|
||||
{
|
||||
set(types::rrc_conn_resume_request_r13);
|
||||
return c.get<rrc_conn_resume_request_r13_ies_s>();
|
||||
}
|
||||
rrc_conn_resume_request_minus5_gc_r15_ies_s& set_rrc_conn_resume_request_r15()
|
||||
{
|
||||
set(types::rrc_conn_resume_request_r15);
|
||||
return c.get<rrc_conn_resume_request_minus5_gc_r15_ies_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<rrc_conn_resume_request_minus5_gc_r15_ies_s, rrc_conn_resume_request_r13_ies_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// RRCEarlyDataRequest-r15 ::= SEQUENCE
|
||||
struct rrc_early_data_request_r15_s {
|
||||
struct crit_exts_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_early_data_request_r15, crit_exts_future, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
crit_exts_c_() = default;
|
||||
crit_exts_c_(const crit_exts_c_& other);
|
||||
crit_exts_c_& operator=(const crit_exts_c_& other);
|
||||
~crit_exts_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
|
||||
rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15()
|
||||
{
|
||||
assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_early_data_request_r15_ies_s>();
|
||||
}
|
||||
const rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15() const
|
||||
{
|
||||
assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions");
|
||||
return c.get<rrc_early_data_request_r15_ies_s>();
|
||||
}
|
||||
rrc_early_data_request_r15_ies_s& set_rrc_early_data_request_r15()
|
||||
{
|
||||
set(types::rrc_early_data_request_r15);
|
||||
return c.get<rrc_early_data_request_r15_ies_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<rrc_early_data_request_r15_ies_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// member variables
|
||||
crit_exts_c_ crit_exts;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
// UL-CCCH-MessageType ::= CHOICE
|
||||
struct ul_ccch_msg_type_c {
|
||||
struct c1_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_conn_reest_request, rrc_conn_request, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c1_c_() = default;
|
||||
c1_c_(const c1_c_& other);
|
||||
c1_c_& operator=(const c1_c_& other);
|
||||
~c1_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
|
||||
rrc_conn_reest_request_s& rrc_conn_reest_request()
|
||||
{
|
||||
assert_choice_type("rrcConnectionReestablishmentRequest", type_.to_string(), "c1");
|
||||
return c.get<rrc_conn_reest_request_s>();
|
||||
}
|
||||
rrc_conn_request_s& rrc_conn_request()
|
||||
{
|
||||
assert_choice_type("rrcConnectionRequest", type_.to_string(), "c1");
|
||||
return c.get<rrc_conn_request_s>();
|
||||
}
|
||||
const rrc_conn_reest_request_s& rrc_conn_reest_request() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionReestablishmentRequest", type_.to_string(), "c1");
|
||||
return c.get<rrc_conn_reest_request_s>();
|
||||
}
|
||||
const rrc_conn_request_s& rrc_conn_request() const
|
||||
{
|
||||
assert_choice_type("rrcConnectionRequest", type_.to_string(), "c1");
|
||||
return c.get<rrc_conn_request_s>();
|
||||
}
|
||||
rrc_conn_reest_request_s& set_rrc_conn_reest_request()
|
||||
{
|
||||
set(types::rrc_conn_reest_request);
|
||||
return c.get<rrc_conn_reest_request_s>();
|
||||
}
|
||||
rrc_conn_request_s& set_rrc_conn_request()
|
||||
{
|
||||
set(types::rrc_conn_request);
|
||||
return c.get<rrc_conn_request_s>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<rrc_conn_reest_request_s, rrc_conn_request_s> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
struct msg_class_ext_c_ {
|
||||
struct c2_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_conn_resume_request_r13, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
types type() const { return types::rrc_conn_resume_request_r13; }
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
// getters
|
||||
rrc_conn_resume_request_r13_s& rrc_conn_resume_request_r13() { return c; }
|
||||
const rrc_conn_resume_request_r13_s& rrc_conn_resume_request_r13() const { return c; }
|
||||
|
||||
private:
|
||||
rrc_conn_resume_request_r13_s c;
|
||||
};
|
||||
struct msg_class_ext_future_r13_c_ {
|
||||
struct c3_c_ {
|
||||
struct types_opts {
|
||||
enum options { rrc_early_data_request_r15, spare3, spare2, spare1, nulltype } value;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
c3_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
|
||||
rrc_early_data_request_r15_s& rrc_early_data_request_r15()
|
||||
{
|
||||
assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "c3");
|
||||
return c;
|
||||
}
|
||||
const rrc_early_data_request_r15_s& rrc_early_data_request_r15() const
|
||||
{
|
||||
assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "c3");
|
||||
return c;
|
||||
}
|
||||
rrc_early_data_request_r15_s& set_rrc_early_data_request_r15()
|
||||
{
|
||||
set(types::rrc_early_data_request_r15);
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
rrc_early_data_request_r15_s c;
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { c3, msg_class_ext_future_r15, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
msg_class_ext_future_r13_c_() = default;
|
||||
msg_class_ext_future_r13_c_(const msg_class_ext_future_r13_c_& other);
|
||||
msg_class_ext_future_r13_c_& operator=(const msg_class_ext_future_r13_c_& other);
|
||||
~msg_class_ext_future_r13_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
|
||||
c3_c_& c3()
|
||||
{
|
||||
assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13");
|
||||
return c.get<c3_c_>();
|
||||
}
|
||||
const c3_c_& c3() const
|
||||
{
|
||||
assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13");
|
||||
return c.get<c3_c_>();
|
||||
}
|
||||
c3_c_& set_c3()
|
||||
{
|
||||
set(types::c3);
|
||||
return c.get<c3_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c3_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { c2, msg_class_ext_future_r13, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
msg_class_ext_c_() = default;
|
||||
msg_class_ext_c_(const msg_class_ext_c_& other);
|
||||
msg_class_ext_c_& operator=(const msg_class_ext_c_& other);
|
||||
~msg_class_ext_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
|
||||
c2_c_& c2()
|
||||
{
|
||||
assert_choice_type("c2", type_.to_string(), "messageClassExtension");
|
||||
return c.get<c2_c_>();
|
||||
}
|
||||
msg_class_ext_future_r13_c_& msg_class_ext_future_r13()
|
||||
{
|
||||
assert_choice_type("messageClassExtensionFuture-r13", type_.to_string(), "messageClassExtension");
|
||||
return c.get<msg_class_ext_future_r13_c_>();
|
||||
}
|
||||
const c2_c_& c2() const
|
||||
{
|
||||
assert_choice_type("c2", type_.to_string(), "messageClassExtension");
|
||||
return c.get<c2_c_>();
|
||||
}
|
||||
const msg_class_ext_future_r13_c_& msg_class_ext_future_r13() const
|
||||
{
|
||||
assert_choice_type("messageClassExtensionFuture-r13", type_.to_string(), "messageClassExtension");
|
||||
return c.get<msg_class_ext_future_r13_c_>();
|
||||
}
|
||||
c2_c_& set_c2()
|
||||
{
|
||||
set(types::c2);
|
||||
return c.get<c2_c_>();
|
||||
}
|
||||
msg_class_ext_future_r13_c_& set_msg_class_ext_future_r13()
|
||||
{
|
||||
set(types::msg_class_ext_future_r13);
|
||||
return c.get<msg_class_ext_future_r13_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c2_c_, msg_class_ext_future_r13_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
struct types_opts {
|
||||
enum options { c1, msg_class_ext, nulltype } value;
|
||||
typedef uint8_t number_type;
|
||||
|
||||
std::string to_string() const;
|
||||
uint8_t to_number() const;
|
||||
};
|
||||
typedef enumerated<types_opts> types;
|
||||
|
||||
// choice methods
|
||||
ul_ccch_msg_type_c() = default;
|
||||
ul_ccch_msg_type_c(const ul_ccch_msg_type_c& other);
|
||||
ul_ccch_msg_type_c& operator=(const ul_ccch_msg_type_c& other);
|
||||
~ul_ccch_msg_type_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
|
||||
c1_c_& c1()
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
msg_class_ext_c_& msg_class_ext()
|
||||
{
|
||||
assert_choice_type("messageClassExtension", type_.to_string(), "UL-CCCH-MessageType");
|
||||
return c.get<msg_class_ext_c_>();
|
||||
}
|
||||
const c1_c_& c1() const
|
||||
{
|
||||
assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType");
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
const msg_class_ext_c_& msg_class_ext() const
|
||||
{
|
||||
assert_choice_type("messageClassExtension", type_.to_string(), "UL-CCCH-MessageType");
|
||||
return c.get<msg_class_ext_c_>();
|
||||
}
|
||||
c1_c_& set_c1()
|
||||
{
|
||||
set(types::c1);
|
||||
return c.get<c1_c_>();
|
||||
}
|
||||
msg_class_ext_c_& set_msg_class_ext()
|
||||
{
|
||||
set(types::msg_class_ext);
|
||||
return c.get<msg_class_ext_c_>();
|
||||
}
|
||||
|
||||
private:
|
||||
types type_;
|
||||
choice_buffer_t<c1_c_, msg_class_ext_c_> c;
|
||||
|
||||
void destroy_();
|
||||
};
|
||||
|
||||
// UL-CCCH-Message ::= SEQUENCE
|
||||
struct ul_ccch_msg_s {
|
||||
ul_ccch_msg_type_c msg;
|
||||
|
||||
// sequence methods
|
||||
SRSASN_CODE pack(bit_ref& bref) const;
|
||||
SRSASN_CODE unpack(cbit_ref& bref);
|
||||
void to_json(json_writer& j) const;
|
||||
};
|
||||
|
||||
} // namespace rrc
|
||||
} // namespace asn1
|
||||
|
||||
#endif // SRSASN1_RRC_ULCCCH_MSG_H
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,815 @@
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "srslte/asn1/rrc/common.h"
|
||||
#include <sstream>
|
||||
|
||||
using namespace asn1;
|
||||
using namespace asn1::rrc;
|
||||
|
||||
/*******************************************************************************
|
||||
* Struct Methods
|
||||
******************************************************************************/
|
||||
|
||||
// PLMN-Identity ::= SEQUENCE
|
||||
SRSASN_CODE plmn_id_s::pack(bit_ref& bref) const
|
||||
{
|
||||
HANDLE_CODE(bref.pack(mcc_present, 1));
|
||||
|
||||
if (mcc_present) {
|
||||
HANDLE_CODE(pack_fixed_seq_of(bref, &(mcc)[0], mcc.size(), integer_packer<uint8_t>(0, 9)));
|
||||
}
|
||||
HANDLE_CODE(pack_dyn_seq_of(bref, mnc, 2, 3, integer_packer<uint8_t>(0, 9)));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE plmn_id_s::unpack(cbit_ref& bref)
|
||||
{
|
||||
HANDLE_CODE(bref.unpack(mcc_present, 1));
|
||||
|
||||
if (mcc_present) {
|
||||
HANDLE_CODE(unpack_fixed_seq_of(&(mcc)[0], bref, mcc.size(), integer_packer<uint8_t>(0, 9)));
|
||||
}
|
||||
HANDLE_CODE(unpack_dyn_seq_of(mnc, bref, 2, 3, integer_packer<uint8_t>(0, 9)));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
void plmn_id_s::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
if (mcc_present) {
|
||||
j.start_array("mcc");
|
||||
for (const auto& e1 : mcc) {
|
||||
j.write_int(e1);
|
||||
}
|
||||
j.end_array();
|
||||
}
|
||||
j.start_array("mnc");
|
||||
for (const auto& e1 : mnc) {
|
||||
j.write_int(e1);
|
||||
}
|
||||
j.end_array();
|
||||
j.end_obj();
|
||||
}
|
||||
|
||||
// PLMN-IdentityInfo ::= SEQUENCE
|
||||
SRSASN_CODE plmn_id_info_s::pack(bit_ref& bref) const
|
||||
{
|
||||
HANDLE_CODE(plmn_id.pack(bref));
|
||||
HANDLE_CODE(cell_reserved_for_oper.pack(bref));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE plmn_id_info_s::unpack(cbit_ref& bref)
|
||||
{
|
||||
HANDLE_CODE(plmn_id.unpack(bref));
|
||||
HANDLE_CODE(cell_reserved_for_oper.unpack(bref));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
void plmn_id_info_s::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
j.write_fieldname("plmn-Identity");
|
||||
plmn_id.to_json(j);
|
||||
j.write_str("cellReservedForOperatorUse", cell_reserved_for_oper.to_string());
|
||||
j.end_obj();
|
||||
}
|
||||
|
||||
std::string plmn_id_info_s::cell_reserved_for_oper_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {"reserved", "notReserved"};
|
||||
return convert_enum_idx(options, 2, value, "plmn_id_info_s::cell_reserved_for_oper_e_");
|
||||
}
|
||||
|
||||
// Alpha-r12 ::= ENUMERATED
|
||||
std::string alpha_r12_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {"al0", "al04", "al05", "al06", "al07", "al08", "al09", "al1"};
|
||||
return convert_enum_idx(options, 8, value, "alpha_r12_e");
|
||||
}
|
||||
float alpha_r12_opts::to_number() const
|
||||
{
|
||||
static const float options[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0};
|
||||
return map_enum_number(options, 8, value, "alpha_r12_e");
|
||||
}
|
||||
std::string alpha_r12_opts::to_number_string() const
|
||||
{
|
||||
static const char* options[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"};
|
||||
return convert_enum_idx(options, 8, value, "alpha_r12_e");
|
||||
}
|
||||
|
||||
// BandclassCDMA2000 ::= ENUMERATED
|
||||
std::string bandclass_cdma2000_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {"bc0", "bc1", "bc2", "bc3", "bc4", "bc5", "bc6",
|
||||
"bc7", "bc8", "bc9", "bc10", "bc11", "bc12", "bc13",
|
||||
"bc14", "bc15", "bc16", "bc17", "bc18-v9a0", "bc19-v9a0", "bc20-v9a0",
|
||||
"bc21-v9a0", "spare10", "spare9", "spare8", "spare7", "spare6", "spare5",
|
||||
"spare4", "spare3", "spare2", "spare1"};
|
||||
return convert_enum_idx(options, 32, value, "bandclass_cdma2000_e");
|
||||
}
|
||||
uint8_t bandclass_cdma2000_opts::to_number() const
|
||||
{
|
||||
static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};
|
||||
return map_enum_number(options, 22, value, "bandclass_cdma2000_e");
|
||||
}
|
||||
|
||||
// FilterCoefficient ::= ENUMERATED
|
||||
std::string filt_coef_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {"fc0",
|
||||
"fc1",
|
||||
"fc2",
|
||||
"fc3",
|
||||
"fc4",
|
||||
"fc5",
|
||||
"fc6",
|
||||
"fc7",
|
||||
"fc8",
|
||||
"fc9",
|
||||
"fc11",
|
||||
"fc13",
|
||||
"fc15",
|
||||
"fc17",
|
||||
"fc19",
|
||||
"spare1"};
|
||||
return convert_enum_idx(options, 16, value, "filt_coef_e");
|
||||
}
|
||||
uint8_t filt_coef_opts::to_number() const
|
||||
{
|
||||
static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19};
|
||||
return map_enum_number(options, 15, value, "filt_coef_e");
|
||||
}
|
||||
|
||||
// MBSFN-SubframeConfig ::= SEQUENCE
|
||||
SRSASN_CODE mbsfn_sf_cfg_s::pack(bit_ref& bref) const
|
||||
{
|
||||
HANDLE_CODE(radioframe_alloc_period.pack(bref));
|
||||
HANDLE_CODE(pack_integer(bref, radioframe_alloc_offset, (uint8_t)0u, (uint8_t)7u));
|
||||
HANDLE_CODE(sf_alloc.pack(bref));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE mbsfn_sf_cfg_s::unpack(cbit_ref& bref)
|
||||
{
|
||||
HANDLE_CODE(radioframe_alloc_period.unpack(bref));
|
||||
HANDLE_CODE(unpack_integer(radioframe_alloc_offset, bref, (uint8_t)0u, (uint8_t)7u));
|
||||
HANDLE_CODE(sf_alloc.unpack(bref));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
void mbsfn_sf_cfg_s::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
j.write_str("radioframeAllocationPeriod", radioframe_alloc_period.to_string());
|
||||
j.write_int("radioframeAllocationOffset", radioframe_alloc_offset);
|
||||
j.write_fieldname("subframeAllocation");
|
||||
sf_alloc.to_json(j);
|
||||
j.end_obj();
|
||||
}
|
||||
bool mbsfn_sf_cfg_s::operator==(const mbsfn_sf_cfg_s& other) const
|
||||
{
|
||||
return radioframe_alloc_period == other.radioframe_alloc_period and
|
||||
radioframe_alloc_offset == other.radioframe_alloc_offset and sf_alloc == other.sf_alloc;
|
||||
}
|
||||
|
||||
std::string mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"};
|
||||
return convert_enum_idx(options, 6, value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_");
|
||||
}
|
||||
uint8_t mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_number() const
|
||||
{
|
||||
static const uint8_t options[] = {1, 2, 4, 8, 16, 32};
|
||||
return map_enum_number(options, 6, value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_");
|
||||
}
|
||||
|
||||
void mbsfn_sf_cfg_s::sf_alloc_c_::destroy_()
|
||||
{
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
c.destroy<fixed_bitstring<6> >();
|
||||
break;
|
||||
case types::four_frames:
|
||||
c.destroy<fixed_bitstring<24> >();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void mbsfn_sf_cfg_s::sf_alloc_c_::set(types::options e)
|
||||
{
|
||||
destroy_();
|
||||
type_ = e;
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
c.init<fixed_bitstring<6> >();
|
||||
break;
|
||||
case types::four_frames:
|
||||
c.init<fixed_bitstring<24> >();
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_s::sf_alloc_c_");
|
||||
}
|
||||
}
|
||||
mbsfn_sf_cfg_s::sf_alloc_c_::sf_alloc_c_(const mbsfn_sf_cfg_s::sf_alloc_c_& other)
|
||||
{
|
||||
type_ = other.type();
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
c.init(other.c.get<fixed_bitstring<6> >());
|
||||
break;
|
||||
case types::four_frames:
|
||||
c.init(other.c.get<fixed_bitstring<24> >());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_s::sf_alloc_c_");
|
||||
}
|
||||
}
|
||||
mbsfn_sf_cfg_s::sf_alloc_c_& mbsfn_sf_cfg_s::sf_alloc_c_::operator=(const mbsfn_sf_cfg_s::sf_alloc_c_& other)
|
||||
{
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
set(other.type());
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
c.set(other.c.get<fixed_bitstring<6> >());
|
||||
break;
|
||||
case types::four_frames:
|
||||
c.set(other.c.get<fixed_bitstring<24> >());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_s::sf_alloc_c_");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
void mbsfn_sf_cfg_s::sf_alloc_c_::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
j.write_str("oneFrame", c.get<fixed_bitstring<6> >().to_string());
|
||||
break;
|
||||
case types::four_frames:
|
||||
j.write_str("fourFrames", c.get<fixed_bitstring<24> >().to_string());
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_s::sf_alloc_c_");
|
||||
}
|
||||
j.end_obj();
|
||||
}
|
||||
SRSASN_CODE mbsfn_sf_cfg_s::sf_alloc_c_::pack(bit_ref& bref) const
|
||||
{
|
||||
type_.pack(bref);
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<6> >().pack(bref));
|
||||
break;
|
||||
case types::four_frames:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<24> >().pack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_s::sf_alloc_c_");
|
||||
return SRSASN_ERROR_ENCODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE mbsfn_sf_cfg_s::sf_alloc_c_::unpack(cbit_ref& bref)
|
||||
{
|
||||
types e;
|
||||
e.unpack(bref);
|
||||
set(e);
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<6> >().unpack(bref));
|
||||
break;
|
||||
case types::four_frames:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<24> >().unpack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_s::sf_alloc_c_");
|
||||
return SRSASN_ERROR_DECODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
bool mbsfn_sf_cfg_s::sf_alloc_c_::operator==(const sf_alloc_c_& other) const
|
||||
{
|
||||
if (type_ != other.type_) {
|
||||
return false;
|
||||
}
|
||||
switch (type_) {
|
||||
case types::one_frame:
|
||||
return c.get<fixed_bitstring<6> >() == other.c.get<fixed_bitstring<6> >();
|
||||
case types::four_frames:
|
||||
return c.get<fixed_bitstring<24> >() == other.c.get<fixed_bitstring<24> >();
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// MBSFN-SubframeConfig-v1430 ::= SEQUENCE
|
||||
SRSASN_CODE mbsfn_sf_cfg_v1430_s::pack(bit_ref& bref) const
|
||||
{
|
||||
HANDLE_CODE(sf_alloc_v1430.pack(bref));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE mbsfn_sf_cfg_v1430_s::unpack(cbit_ref& bref)
|
||||
{
|
||||
HANDLE_CODE(sf_alloc_v1430.unpack(bref));
|
||||
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
void mbsfn_sf_cfg_v1430_s::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
j.write_fieldname("subframeAllocation-v1430");
|
||||
sf_alloc_v1430.to_json(j);
|
||||
j.end_obj();
|
||||
}
|
||||
bool mbsfn_sf_cfg_v1430_s::operator==(const mbsfn_sf_cfg_v1430_s& other) const
|
||||
{
|
||||
return sf_alloc_v1430 == other.sf_alloc_v1430;
|
||||
}
|
||||
|
||||
void mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::destroy_()
|
||||
{
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
c.destroy<fixed_bitstring<2> >();
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
c.destroy<fixed_bitstring<8> >();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::set(types::options e)
|
||||
{
|
||||
destroy_();
|
||||
type_ = e;
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
c.init<fixed_bitstring<2> >();
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
c.init<fixed_bitstring<8> >();
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_");
|
||||
}
|
||||
}
|
||||
mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::sf_alloc_v1430_c_(const mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_& other)
|
||||
{
|
||||
type_ = other.type();
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
c.init(other.c.get<fixed_bitstring<2> >());
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
c.init(other.c.get<fixed_bitstring<8> >());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_");
|
||||
}
|
||||
}
|
||||
mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_&
|
||||
mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::operator=(const mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_& other)
|
||||
{
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
set(other.type());
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
c.set(other.c.get<fixed_bitstring<2> >());
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
c.set(other.c.get<fixed_bitstring<8> >());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
void mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
j.write_str("oneFrame-v1430", c.get<fixed_bitstring<2> >().to_string());
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
j.write_str("fourFrames-v1430", c.get<fixed_bitstring<8> >().to_string());
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_");
|
||||
}
|
||||
j.end_obj();
|
||||
}
|
||||
SRSASN_CODE mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::pack(bit_ref& bref) const
|
||||
{
|
||||
type_.pack(bref);
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<2> >().pack(bref));
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<8> >().pack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_");
|
||||
return SRSASN_ERROR_ENCODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::unpack(cbit_ref& bref)
|
||||
{
|
||||
types e;
|
||||
e.unpack(bref);
|
||||
set(e);
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<2> >().unpack(bref));
|
||||
break;
|
||||
case types::four_frames_v1430:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<8> >().unpack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_");
|
||||
return SRSASN_ERROR_DECODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
bool mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::operator==(const sf_alloc_v1430_c_& other) const
|
||||
{
|
||||
if (type_ != other.type_) {
|
||||
return false;
|
||||
}
|
||||
switch (type_) {
|
||||
case types::one_frame_v1430:
|
||||
return c.get<fixed_bitstring<2> >() == other.c.get<fixed_bitstring<2> >();
|
||||
case types::four_frames_v1430:
|
||||
return c.get<fixed_bitstring<8> >() == other.c.get<fixed_bitstring<8> >();
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// MeasSubframePattern-r10 ::= CHOICE
|
||||
void meas_sf_pattern_r10_c::destroy_()
|
||||
{
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
c.destroy<fixed_bitstring<40> >();
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
c.destroy<sf_pattern_tdd_r10_c_>();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void meas_sf_pattern_r10_c::set(types::options e)
|
||||
{
|
||||
destroy_();
|
||||
type_ = e;
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
c.init<fixed_bitstring<40> >();
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
c.init<sf_pattern_tdd_r10_c_>();
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c");
|
||||
}
|
||||
}
|
||||
meas_sf_pattern_r10_c::meas_sf_pattern_r10_c(const meas_sf_pattern_r10_c& other)
|
||||
{
|
||||
type_ = other.type();
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
c.init(other.c.get<fixed_bitstring<40> >());
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
c.init(other.c.get<sf_pattern_tdd_r10_c_>());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c");
|
||||
}
|
||||
}
|
||||
meas_sf_pattern_r10_c& meas_sf_pattern_r10_c::operator=(const meas_sf_pattern_r10_c& other)
|
||||
{
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
set(other.type());
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
c.set(other.c.get<fixed_bitstring<40> >());
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
c.set(other.c.get<sf_pattern_tdd_r10_c_>());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
void meas_sf_pattern_r10_c::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
j.write_str("subframePatternFDD-r10", c.get<fixed_bitstring<40> >().to_string());
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
j.write_fieldname("subframePatternTDD-r10");
|
||||
c.get<sf_pattern_tdd_r10_c_>().to_json(j);
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c");
|
||||
}
|
||||
j.end_obj();
|
||||
}
|
||||
SRSASN_CODE meas_sf_pattern_r10_c::pack(bit_ref& bref) const
|
||||
{
|
||||
type_.pack(bref);
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<40> >().pack(bref));
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
HANDLE_CODE(c.get<sf_pattern_tdd_r10_c_>().pack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c");
|
||||
return SRSASN_ERROR_ENCODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE meas_sf_pattern_r10_c::unpack(cbit_ref& bref)
|
||||
{
|
||||
types e;
|
||||
e.unpack(bref);
|
||||
set(e);
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<40> >().unpack(bref));
|
||||
break;
|
||||
case types::sf_pattern_tdd_r10:
|
||||
HANDLE_CODE(c.get<sf_pattern_tdd_r10_c_>().unpack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c");
|
||||
return SRSASN_ERROR_DECODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
bool meas_sf_pattern_r10_c::operator==(const meas_sf_pattern_r10_c& other) const
|
||||
{
|
||||
if (type_ != other.type_) {
|
||||
return false;
|
||||
}
|
||||
switch (type_) {
|
||||
case types::sf_pattern_fdd_r10:
|
||||
return c.get<fixed_bitstring<40> >() == other.c.get<fixed_bitstring<40> >();
|
||||
case types::sf_pattern_tdd_r10:
|
||||
return c.get<sf_pattern_tdd_r10_c_>() == other.c.get<sf_pattern_tdd_r10_c_>();
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::destroy_()
|
||||
{
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
c.destroy<fixed_bitstring<20> >();
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
c.destroy<fixed_bitstring<70> >();
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
c.destroy<fixed_bitstring<60> >();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::set(types::options e)
|
||||
{
|
||||
destroy_();
|
||||
type_ = e;
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
c.init<fixed_bitstring<20> >();
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
c.init<fixed_bitstring<70> >();
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
c.init<fixed_bitstring<60> >();
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_");
|
||||
}
|
||||
}
|
||||
meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::sf_pattern_tdd_r10_c_(
|
||||
const meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_& other)
|
||||
{
|
||||
type_ = other.type();
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
c.init(other.c.get<fixed_bitstring<20> >());
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
c.init(other.c.get<fixed_bitstring<70> >());
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
c.init(other.c.get<fixed_bitstring<60> >());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_");
|
||||
}
|
||||
}
|
||||
meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_&
|
||||
meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::operator=(const meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_& other)
|
||||
{
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
set(other.type());
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
c.set(other.c.get<fixed_bitstring<20> >());
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
c.set(other.c.get<fixed_bitstring<70> >());
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
c.set(other.c.get<fixed_bitstring<60> >());
|
||||
break;
|
||||
case types::nulltype:
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
void meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::to_json(json_writer& j) const
|
||||
{
|
||||
j.start_obj();
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
j.write_str("subframeConfig1-5-r10", c.get<fixed_bitstring<20> >().to_string());
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
j.write_str("subframeConfig0-r10", c.get<fixed_bitstring<70> >().to_string());
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
j.write_str("subframeConfig6-r10", c.get<fixed_bitstring<60> >().to_string());
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_");
|
||||
}
|
||||
j.end_obj();
|
||||
}
|
||||
SRSASN_CODE meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::pack(bit_ref& bref) const
|
||||
{
|
||||
type_.pack(bref);
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<20> >().pack(bref));
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<70> >().pack(bref));
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<60> >().pack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_");
|
||||
return SRSASN_ERROR_ENCODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
SRSASN_CODE meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::unpack(cbit_ref& bref)
|
||||
{
|
||||
types e;
|
||||
e.unpack(bref);
|
||||
set(e);
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<20> >().unpack(bref));
|
||||
break;
|
||||
case types::sf_cfg0_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<70> >().unpack(bref));
|
||||
break;
|
||||
case types::sf_cfg6_r10:
|
||||
HANDLE_CODE(c.get<fixed_bitstring<60> >().unpack(bref));
|
||||
break;
|
||||
default:
|
||||
log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_");
|
||||
return SRSASN_ERROR_DECODE_FAIL;
|
||||
}
|
||||
return SRSASN_SUCCESS;
|
||||
}
|
||||
bool meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::operator==(const sf_pattern_tdd_r10_c_& other) const
|
||||
{
|
||||
if (type_ != other.type_) {
|
||||
return false;
|
||||
}
|
||||
switch (type_) {
|
||||
case types::sf_cfg1_minus5_r10:
|
||||
return c.get<fixed_bitstring<20> >() == other.c.get<fixed_bitstring<20> >();
|
||||
case types::sf_cfg0_r10:
|
||||
return c.get<fixed_bitstring<70> >() == other.c.get<fixed_bitstring<70> >();
|
||||
case types::sf_cfg6_r10:
|
||||
return c.get<fixed_bitstring<60> >() == other.c.get<fixed_bitstring<60> >();
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// CipheringAlgorithm-r12 ::= ENUMERATED
|
||||
std::string ciphering_algorithm_r12_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {"eea0", "eea1", "eea2", "eea3-v1130", "spare4", "spare3", "spare2", "spare1"};
|
||||
return convert_enum_idx(options, 8, value, "ciphering_algorithm_r12_e");
|
||||
}
|
||||
uint8_t ciphering_algorithm_r12_opts::to_number() const
|
||||
{
|
||||
static const uint8_t options[] = {0, 1, 2, 3};
|
||||
return map_enum_number(options, 4, value, "ciphering_algorithm_r12_e");
|
||||
}
|
||||
|
||||
// WLAN-BandIndicator-r13 ::= ENUMERATED
|
||||
std::string wlan_band_ind_r13_opts::to_string() const
|
||||
{
|
||||
static const char* options[] = {
|
||||
"band2dot4", "band5", "band60-v1430", "spare5", "spare4", "spare3", "spare2", "spare1"};
|
||||
return convert_enum_idx(options, 8, value, "wlan_band_ind_r13_e");
|
||||
}
|
||||
float wlan_band_ind_r13_opts::to_number() const
|
||||
{
|
||||
static const float options[] = {2.4, 5.0, 60.0};
|
||||
return map_enum_number(options, 3, value, "wlan_band_ind_r13_e");
|
||||
}
|
||||
std::string wlan_band_ind_r13_opts::to_number_string() const
|
||||
{
|
||||
static const char* options[] = {"2.4", "5", "60"};
|
||||
return convert_enum_idx(options, 8, value, "wlan_band_ind_r13_e");
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,214 +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/.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "srslte/asn1/s1ap_asn1.h"
|
||||
#include "srslte/common/test_common.h"
|
||||
|
||||
using namespace asn1;
|
||||
using namespace asn1::s1ap;
|
||||
|
||||
/* TESTS */
|
||||
|
||||
int test_s1setup_request()
|
||||
{
|
||||
uint8_t ngap_msg[] = {0x00, 0x11, 0x00, 0x2d, 0x00, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x08, 0x00, 0x09,
|
||||
0xf1, 0x07, 0x00, 0x00, 0x19, 0xb0, 0x00, 0x3c, 0x40, 0x0a, 0x03, 0x80, 0x65,
|
||||
0x6e, 0x62, 0x30, 0x30, 0x31, 0x39, 0x62, 0x00, 0x40, 0x00, 0x07, 0x00, 0x00,
|
||||
0x01, 0xc0, 0x09, 0xf1, 0x07, 0x00, 0x89, 0x40, 0x01, 0x40};
|
||||
cbit_ref bref(&ngap_msg[0], sizeof(ngap_msg));
|
||||
// 0011002D000004003B00080009F107000019B0003C400A0380656E62303031396200400007000001C009F1070089400140
|
||||
|
||||
s1ap_pdu_c pdu;
|
||||
TESTASSERT(pdu.unpack(bref) == SRSASN_SUCCESS);
|
||||
|
||||
TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg);
|
||||
TESTASSERT(pdu.init_msg().proc_code == 17);
|
||||
TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject);
|
||||
s1ap_elem_procs_o::init_msg_c& init_choice = pdu.init_msg().value;
|
||||
TESTASSERT(init_choice.type().value == s1ap_elem_procs_o::init_msg_c::types_opts::s1_setup_request);
|
||||
s1_setup_request_s& s1req = init_choice.s1_setup_request();
|
||||
TESTASSERT(not s1req.ext);
|
||||
TESTASSERT(s1req.protocol_ies.global_enb_id.id == ASN1_S1AP_ID_GLOBAL_ENB_ID);
|
||||
TESTASSERT(s1req.protocol_ies.global_enb_id.crit.value == crit_opts::reject);
|
||||
TESTASSERT(s1req.protocol_ies.global_enb_id.value.enb_id.type().value == enb_id_c::types_opts::macro_enb_id);
|
||||
TESTASSERT(s1req.protocol_ies.global_enb_id.value.enb_id.macro_enb_id().to_number() == 0x0019B);
|
||||
//
|
||||
// // json_writer js;
|
||||
// // pdu.to_json(js);
|
||||
// // printf("PDU json: %s\n", js.to_string().c_str());
|
||||
|
||||
TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_init_ctxt_setup_req()
|
||||
{
|
||||
uint8_t s1ap_msg[] = {
|
||||
0x00, 0x09, 0x00, 0x80, 0xc6, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x64, 0x00, 0x08, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x42, 0x00, 0x0a, 0x18, 0x3b, 0x9a, 0xca, 0x00, 0x60, 0x3b, 0x9a, 0xca, 0x00, 0x00, 0x18, 0x00, 0x78,
|
||||
0x00, 0x00, 0x34, 0x00, 0x73, 0x45, 0x00, 0x09, 0x3c, 0x0f, 0x80, 0x0a, 0x00, 0x21, 0xf0, 0xb7, 0x36, 0x1c, 0x56,
|
||||
0x64, 0x27, 0x3e, 0x5b, 0x04, 0xb7, 0x02, 0x07, 0x42, 0x02, 0x3e, 0x06, 0x00, 0x09, 0xf1, 0x07, 0x00, 0x07, 0x00,
|
||||
0x37, 0x52, 0x66, 0xc1, 0x01, 0x09, 0x1b, 0x07, 0x74, 0x65, 0x73, 0x74, 0x31, 0x32, 0x33, 0x06, 0x6d, 0x6e, 0x63,
|
||||
0x30, 0x37, 0x30, 0x06, 0x6d, 0x63, 0x63, 0x39, 0x30, 0x31, 0x04, 0x67, 0x70, 0x72, 0x73, 0x05, 0x01, 0xc0, 0xa8,
|
||||
0x03, 0x02, 0x27, 0x0e, 0x80, 0x80, 0x21, 0x0a, 0x03, 0x00, 0x00, 0x0a, 0x81, 0x06, 0x08, 0x08, 0x08, 0x08, 0x50,
|
||||
0x0b, 0xf6, 0x09, 0xf1, 0x07, 0x80, 0x01, 0x01, 0xf6, 0x7e, 0x72, 0x69, 0x13, 0x09, 0xf1, 0x07, 0x00, 0x01, 0x23,
|
||||
0x05, 0xf4, 0xf6, 0x7e, 0x72, 0x69, 0x00, 0x6b, 0x00, 0x05, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x49, 0x00, 0x20,
|
||||
0x45, 0x25, 0xe4, 0x9a, 0x77, 0xc8, 0xd5, 0xcf, 0x26, 0x33, 0x63, 0xeb, 0x5b, 0xb9, 0xc3, 0x43, 0x9b, 0x9e, 0xb3,
|
||||
0x86, 0x1f, 0xa8, 0xa7, 0xcf, 0x43, 0x54, 0x07, 0xae, 0x42, 0x2b, 0x63, 0xb9};
|
||||
// 00090080c60000060000000200640008000200010042000a183b9aca00603b9aca000018007800003400734500093c0f800a0021f0b7361c5664273e5b04b7020742023e060009f107000700375266c101091b0774657374313233066d6e63303730066d636339303104677072730501c0a80302270e8080210a0300000a810608080808500bf609f107800101f67e72691309f10700012305f4f67e7269006b000518000c0000004900204525e49a77c8d5cf263363eb5bb9c3439b9eb3861fa8a7cf435407ae422b63b9
|
||||
|
||||
cbit_ref bref(&s1ap_msg[0], sizeof(s1ap_msg));
|
||||
s1ap_pdu_c pdu;
|
||||
TESTASSERT(pdu.unpack(bref) == SRSASN_SUCCESS);
|
||||
|
||||
TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg);
|
||||
TESTASSERT(pdu.init_msg().proc_code == 9);
|
||||
TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject);
|
||||
s1ap_elem_procs_o::init_msg_c& init_choice = pdu.init_msg().value;
|
||||
auto& ctxt_setup = init_choice.init_context_setup_request().protocol_ies;
|
||||
TESTASSERT(ctxt_setup.ue_security_cap.id == 107);
|
||||
TESTASSERT(ctxt_setup.ue_security_cap.value.encryption_algorithms.to_string() == "1100000000000000");
|
||||
TESTASSERT(ctxt_setup.ue_security_cap.value.integrity_protection_algorithms.to_string() == "1100000000000000");
|
||||
|
||||
TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS);
|
||||
|
||||
return SRSLTE_SUCCESS;
|
||||
}
|
||||
|
||||
int test_ue_ctxt_release_req()
|
||||
{
|
||||
uint8_t s1ap_msg[] = {0x00, 0x12, 0x40, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01,
|
||||
0x00, 0x08, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x40, 0x02, 0x02, 0x80};
|
||||
// 00124015000003000000020001000800020001000240020280
|
||||
|
||||
cbit_ref bref(&s1ap_msg[0], sizeof(s1ap_msg));
|
||||
s1ap_pdu_c pdu;
|
||||
TESTASSERT(pdu.unpack(bref) == SRSASN_SUCCESS);
|
||||
|
||||
TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg);
|
||||
TESTASSERT(pdu.init_msg().proc_code == ASN1_S1AP_ID_UE_CONTEXT_RELEASE_REQUEST);
|
||||
auto& req = pdu.init_msg().value.ue_context_release_request().protocol_ies;
|
||||
TESTASSERT(req.mme_ue_s1ap_id.value.value == 1);
|
||||
TESTASSERT(req.enb_ue_s1ap_id.value.value == 1);
|
||||
TESTASSERT(req.cause.value.type().value == cause_c::types_opts::radio_network);
|
||||
TESTASSERT(req.cause.value.radio_network().value == cause_radio_network_opts::user_inactivity);
|
||||
|
||||
TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS);
|
||||
|
||||
return SRSLTE_SUCCESS;
|
||||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
bool is_same_type(U& u)
|
||||
{
|
||||
return std::is_same<T, U>::value;
|
||||
}
|
||||
|
||||
int test_proc_id_consistency()
|
||||
{
|
||||
s1ap_pdu_c pdu;
|
||||
|
||||
/* Check IDs */
|
||||
TESTASSERT(ASN1_S1AP_ID_HO_PREP == 0);
|
||||
TESTASSERT(ASN1_S1AP_ID_HO_RES_ALLOC == 1);
|
||||
TESTASSERT(ASN1_S1AP_ID_ERAB_SETUP == 5);
|
||||
TESTASSERT(ASN1_S1AP_ID_INIT_CONTEXT_SETUP == 9);
|
||||
|
||||
/* Unsuccessful case */
|
||||
unsuccessful_outcome_s& unsuc = pdu.set_unsuccessful_outcome();
|
||||
// HandoverPreparation
|
||||
TESTASSERT(unsuc.load_info_obj(ASN1_S1AP_ID_HO_PREP));
|
||||
TESTASSERT(unsuc.proc_code == ASN1_S1AP_ID_HO_PREP);
|
||||
TESTASSERT(unsuc.crit.value == crit_opts::reject);
|
||||
TESTASSERT(unsuc.value.type().value == s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::ho_prep_fail);
|
||||
TESTASSERT(is_same_type<ho_prep_fail_s>(unsuc.value.ho_prep_fail()));
|
||||
// HandoverResourceAllocation
|
||||
TESTASSERT(unsuc.load_info_obj(ASN1_S1AP_ID_HO_RES_ALLOC));
|
||||
TESTASSERT(unsuc.proc_code == ASN1_S1AP_ID_HO_RES_ALLOC);
|
||||
TESTASSERT(unsuc.crit.value == crit_opts::reject);
|
||||
TESTASSERT(unsuc.value.type().value == s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::ho_fail);
|
||||
TESTASSERT(is_same_type<ho_fail_s>(unsuc.value.ho_fail()));
|
||||
// e-RABSetup (No Unsuccessful Outcome)
|
||||
{
|
||||
srslte::scoped_log<srslte::nullsink_log> sink("ASN1");
|
||||
TESTASSERT(not unsuc.load_info_obj(ASN1_S1AP_ID_ERAB_SETUP));
|
||||
TESTASSERT(sink->error_counter == 1);
|
||||
}
|
||||
// initialContextSetup
|
||||
TESTASSERT(unsuc.load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP));
|
||||
TESTASSERT(unsuc.proc_code == ASN1_S1AP_ID_INIT_CONTEXT_SETUP);
|
||||
TESTASSERT(unsuc.crit.value == crit_opts::reject);
|
||||
TESTASSERT(is_same_type<init_context_setup_fail_s>(unsuc.value.init_context_setup_fail()));
|
||||
|
||||
return SRSLTE_SUCCESS;
|
||||
}
|
||||
|
||||
int test_ho_request()
|
||||
{
|
||||
uint8_t s1ap_msg[] = {
|
||||
0x00, 0x01, 0x00, 0x80, 0xe6, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x64, 0x00, 0x01, 0x00, 0x01, 0x00,
|
||||
0x00, 0x02, 0x40, 0x02, 0x00, 0x00, 0x00, 0x42, 0x00, 0x0a, 0x18, 0x3b, 0x9a, 0xca, 0x00, 0x60, 0x3b, 0x9a, 0xca,
|
||||
0x00, 0x00, 0x35, 0x00, 0x19, 0x00, 0x00, 0x1b, 0x00, 0x14, 0x4a, 0x1f, 0x0a, 0x00, 0x21, 0xf0, 0xb7, 0x36, 0x1c,
|
||||
0x56, 0x00, 0x09, 0x3c, 0x00, 0x00, 0x00, 0x8f, 0x40, 0x01, 0x00, 0x00, 0x68, 0x00, 0x75, 0x74, 0x00, 0x5f, 0x0a,
|
||||
0x10, 0x0c, 0x81, 0xa0, 0x00, 0x00, 0x18, 0x00, 0x02, 0xe8, 0x7f, 0xe4, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x05,
|
||||
0x91, 0x00, 0x00, 0x02, 0x90, 0x09, 0x78, 0x00, 0x00, 0x00, 0x62, 0x7c, 0x1f, 0x50, 0x29, 0x8f, 0x00, 0xe9, 0xce,
|
||||
0x02, 0x13, 0x00, 0x00, 0x95, 0x01, 0x00, 0x46, 0x40, 0x00, 0x00, 0x01, 0x90, 0x13, 0x84, 0x00, 0x1c, 0x00, 0x67,
|
||||
0x00, 0xa0, 0x51, 0x80, 0x41, 0x40, 0x06, 0x70, 0xdf, 0xbc, 0x44, 0x00, 0x6b, 0x01, 0x40, 0x00, 0x80, 0x02, 0x08,
|
||||
0x00, 0xc1, 0x4c, 0xa2, 0xd5, 0x4e, 0x28, 0x03, 0x51, 0x72, 0x40, 0xe0, 0x59, 0x14, 0x01, 0x21, 0x7b, 0x00, 0x00,
|
||||
0x09, 0xf1, 0x07, 0x00, 0x19, 0xb0, 0x10, 0x00, 0x09, 0xf1, 0x07, 0x00, 0x19, 0xc0, 0x21, 0x00, 0x00, 0x1f, 0x00,
|
||||
0x6b, 0x00, 0x05, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x21, 0x10, 0x8b, 0x0d, 0xab, 0xd7, 0xe5, 0x98,
|
||||
0x34, 0xb3, 0xef, 0x6c, 0xc1, 0xaa, 0xa7, 0x27, 0xfb, 0xf4, 0x53, 0x08, 0xff, 0x74, 0x94, 0x7c, 0xa7, 0x1b, 0xd9,
|
||||
0xb4, 0x37, 0xb9, 0x02, 0x78, 0x62, 0x12};
|
||||
// 00010080E600000800000002006400010001000002400200000042000A183B9ACA00603B9ACA000035001900001B00144A1F0A0021F0B7361C5600093C0000008F4001000068007574005F0A100C81A00000180002E87FE40000150000000591000002900978000000627C1F50298F00E9CE021300009501004640000001901384001C006700A0518041400670DFBC44006B01400080020800C14CA2D54E2803517240E0591401217B000009F1070019B0100009F1070019C02100001F006B000518000C000000280021108B0DABD7E59834B3EF6CC1AAA727FBF45308FF74947CA71BD9B437B902786212
|
||||
|
||||
cbit_ref bref(&s1ap_msg[0], sizeof(s1ap_msg));
|
||||
s1ap_pdu_c pdu;
|
||||
TESTASSERT(pdu.unpack(bref) == SRSASN_SUCCESS);
|
||||
|
||||
TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg);
|
||||
TESTASSERT(pdu.init_msg().proc_code == ASN1_S1AP_ID_HO_RES_ALLOC);
|
||||
TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject);
|
||||
auto& horeq = pdu.init_msg().value.ho_request().protocol_ies;
|
||||
|
||||
auto& erab_item = horeq.erab_to_be_setup_list_ho_req.value[0].value.erab_to_be_setup_item_ho_req();
|
||||
TESTASSERT(erab_item.erab_id == 5);
|
||||
TESTASSERT(erab_item.gtp_teid.to_string() == "b7361c56");
|
||||
|
||||
TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS);
|
||||
|
||||
return SRSLTE_SUCCESS;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG);
|
||||
TESTASSERT(srslte::logmap::get("ASN1")->get_level() == srslte::LOG_LEVEL_DEBUG);
|
||||
|
||||
TESTASSERT(test_s1setup_request() == 0);
|
||||
TESTASSERT(test_init_ctxt_setup_req() == 0);
|
||||
TESTASSERT(test_ue_ctxt_release_req() == 0);
|
||||
TESTASSERT(test_proc_id_consistency() == 0);
|
||||
TESTASSERT(test_ho_request() == 0);
|
||||
|
||||
printf("Success\n");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue