update nr asn1 files, and asn1 tests

master
Francisco Paisana 4 years ago committed by Andre Puschmann
parent 082e002b67
commit 510959b50f

@ -20,7 +20,7 @@
*/
#include "npdsch_ue_helper.h"
#include "srslte/asn1/rrc_asn1_nbiot.h"
#include "srslte/asn1/rrc_nbiot.h"
#include "srslte/phy/utils/vector.h" // for SRSLTE_MIN
int get_sib2_params(const uint8_t* sib1_payload, const uint32_t len, srslte_nbiot_si_params_t* sib2_params)

@ -45,6 +45,20 @@ constexpr Integer ceil_frac(Integer n, Integer d)
return (n + (d - 1)) / d;
}
template <std::size_t arg1, std::size_t... others>
struct static_max;
template <std::size_t arg>
struct static_max<arg> {
static const std::size_t value = arg;
};
template <std::size_t arg1, std::size_t arg2, std::size_t... others>
struct static_max<arg1, arg2, others...> {
static const std::size_t value =
arg1 >= arg2 ? static_max<arg1, others...>::value : static_max<arg2, others...>::value;
};
/************************
logging
************************/
@ -54,6 +68,15 @@ void log_warning(const char* format, ...);
void log_info(const char* format, ...);
void log_debug(const char* format, ...);
void warn_assert(bool cond, const char* filename, int lineno);
void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id);
void log_invalid_choice_id(uint32_t val, const char* choice_type);
void invalid_enum_number(int value, const char* name);
void assert_choice_type(uint32_t val, uint32_t choice_id);
void assert_choice_type(const std::string& access_type,
const std::string& current_type,
const std::string& choice_type);
/************************
error handling
************************/
@ -71,6 +94,10 @@ void log_error_code(SRSASN_CODE code, const char* filename, int line);
} \
} while (0)
const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template <class ItemType>
ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
/************************
bit_ref
************************/
@ -672,6 +699,69 @@ SRSASN_CODE fixed_octstring<N, aligned>::unpack(cbit_ref& bref)
return SRSASN_SUCCESS;
}
/************************
constrained_octstring
************************/
template <uint32_t LB, uint32_t UB, bool aligned = false>
class bounded_octstring
{
public:
const uint8_t& operator[](uint32_t idx) const { return octets_[idx]; }
uint8_t& operator[](uint32_t idx) { return octets_[idx]; }
bool operator==(const bounded_octstring& other) const { return octets_ == other.octets_; }
uint8_t* data() { return &octets_[0]; }
const uint8_t* data() const { return &octets_[0]; }
void resize(uint32_t new_size) { octets_.resize(new_size); }
uint32_t size() const { return octets_.size(); }
std::string to_string() const { return octstring_to_string(data(), size()); }
bounded_octstring<LB, UB, aligned>& from_string(const std::string& hexstr)
{
if (hexstr.size() > 2 * UB) {
log_error("The provided hex string size is not valid (%zd>2*%zd).\n", hexstr.size(), (size_t)UB);
} else {
resize(hexstr.size() / 2);
string_to_octstring(&octets_[0], hexstr);
}
return *this;
}
uint64_t to_number() const { return octstring_to_number(&octets_[0], size()); }
bounded_octstring<LB, UB, aligned>& from_number(uint64_t val)
{
number_to_octstring(&octets_[0], val, size());
return *this;
}
SRSASN_CODE pack(bit_ref& bref) const
{
HANDLE_CODE(pack_length(bref, size(), LB, UB, aligned));
if (aligned) {
bref.align_bytes_zero();
}
for (uint32_t i = 0; i < size(); ++i) {
HANDLE_CODE(bref.pack(octets_[i], 8));
}
return SRSASN_SUCCESS;
}
SRSASN_CODE unpack(cbit_ref& bref)
{
uint32_t len;
HANDLE_CODE(unpack_length(len, bref, LB, UB, aligned));
resize(len);
if (aligned) {
bref.align_bytes();
}
for (uint32_t i = 0; i < size(); ++i) {
HANDLE_CODE(bref.unpack(octets_[i], 8));
}
return SRSASN_SUCCESS;
}
private:
ext_array<uint8_t, static_max<UB, 64u>::value> octets_;
};
/************************
dyn_octstring
************************/
@ -1031,9 +1121,8 @@ template <class T>
class copy_ptr
{
public:
explicit copy_ptr(T* ptr_ = nullptr) :
ptr(ptr_) {} // it takes hold of the pointer (including destruction). You should use make_copy_ptr() in most cases
// instead of this ctor
copy_ptr() : ptr(nullptr) {}
explicit copy_ptr(T* ptr_) : ptr(ptr_) {}
copy_ptr(const copy_ptr<T>& other) { ptr = (other.ptr == nullptr) ? nullptr : new T(*other.ptr); }
~copy_ptr() { destroy_(); }
copy_ptr<T>& operator=(const copy_ptr<T>& other)
@ -1082,9 +1171,10 @@ private:
};
template <class T>
copy_ptr<T> make_copy_ptr(const T& t)
copy_ptr<typename std::decay<T>::type> make_copy_ptr(T&& t)
{
return copy_ptr<T>(new T(t));
using T2 = typename std::decay<T>::type;
return copy_ptr<T2>(new T2(std::forward<T>(t)));
}
/*********************
@ -1101,20 +1191,6 @@ union alignment_t {
uint32_t* ptr;
};
template <std::size_t arg1, std::size_t... others>
struct static_max;
template <std::size_t arg>
struct static_max<arg> {
static const std::size_t value = arg;
};
template <std::size_t arg1, std::size_t arg2, std::size_t... others>
struct static_max<arg1, arg2, others...> {
static const std::size_t value =
arg1 >= arg2 ? static_max<arg1, others...>::value : static_max<arg2, others...>::value;
};
template <std::size_t Size, std::size_t Align>
struct choice_buffer_base_t {
static const std::size_t data_size = Size;

@ -35,23 +35,6 @@
namespace asn1 {
namespace ngap_nr {
/*******************************************************************************
* Functions for external logging
******************************************************************************/
void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id);
void assert_choice_type(uint32_t val, uint32_t choice_id);
void assert_choice_type(const std::string& access_type,
const std::string& current_type,
const std::string& choice_type);
const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template <class ItemType>
ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
/*******************************************************************************
* Constant Definitions
******************************************************************************/
@ -489,7 +472,7 @@ private:
// ProtocolExtensionContainer{NGAP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE (SIZE (1..65535)) OF
// ProtocolExtensionField
template <class ext_set_paramT_>
using protocol_ext_container_l = dyn_array<protocol_ext_field_s<ext_set_paramT_> >;
using protocol_ext_container_l = dyn_seq_of<protocol_ext_field_s<ext_set_paramT_>, 1, 65535, true>;
template <class extT_>
struct protocol_ext_container_item_s {
@ -796,7 +779,7 @@ struct amf_cfg_upd_ies_o {
// ProtocolIE-Container{NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE (SIZE (0..65535)) OF ProtocolIE-Field
template <class ies_set_paramT_>
using protocol_ie_container_l = dyn_array<protocol_ie_field_s<ies_set_paramT_> >;
using protocol_ie_container_l = dyn_seq_of<protocol_ie_field_s<ies_set_paramT_>, 0, 65535, true>;
template <class valueT_>
struct protocol_ie_container_item_s {
@ -1864,24 +1847,10 @@ struct amf_status_ind_ies_o {
static presence_e get_presence(const uint32_t& id);
};
struct amf_status_ind_ies_container {
template <class valueT_>
using ie_field_s = protocol_ie_container_item_s<valueT_>;
// member variables
ie_field_s<dyn_seq_of<unavailable_guami_item_s, 1, 256, true> > unavailable_guami_list;
// sequence methods
amf_status_ind_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// AMFStatusIndication ::= SEQUENCE
struct amf_status_ind_s {
bool ext = false;
amf_status_ind_ies_container protocol_ies;
bool ext = false;
protocol_ie_container_l<amf_status_ind_ies_o> protocol_ies;
// ...
// sequence methods
@ -4208,35 +4177,20 @@ using service_area_info_l = dyn_array<service_area_info_item_s>;
// UEAggregateMaximumBitRate-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION
typedef ngap_protocol_ext_empty_o ue_aggregate_maximum_bit_rate_ext_ies_o;
struct mob_restrict_list_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool last_eutran_plmn_id_present = false;
ie_field_s<fixed_octstring<3, true> > last_eutran_plmn_id;
// sequence methods
mob_restrict_list_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// MobilityRestrictionList ::= SEQUENCE
struct mob_restrict_list_s {
bool ext = false;
bool equivalent_plmns_present = false;
bool rat_restricts_present = false;
bool forbidden_area_info_present = false;
bool service_area_info_present = false;
bool ie_exts_present = false;
fixed_octstring<3, true> serving_plmn;
equivalent_plmns_l equivalent_plmns;
rat_restricts_l rat_restricts;
forbidden_area_info_l forbidden_area_info;
service_area_info_l service_area_info;
mob_restrict_list_ext_ies_container ie_exts;
bool ext = false;
bool equivalent_plmns_present = false;
bool rat_restricts_present = false;
bool forbidden_area_info_present = false;
bool service_area_info_present = false;
bool ie_exts_present = false;
fixed_octstring<3, true> serving_plmn;
equivalent_plmns_l equivalent_plmns;
rat_restricts_l rat_restricts;
forbidden_area_info_l forbidden_area_info;
service_area_info_l service_area_info;
protocol_ext_container_l<mob_restrict_list_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -5436,32 +5390,17 @@ typedef ngap_protocol_ext_empty_o ho_prep_unsuccessful_transfer_ext_ies_o;
// QosFlowToBeForwardedList ::= SEQUENCE (SIZE (1..64)) OF QosFlowToBeForwardedItem
using qos_flow_to_be_forwarded_list_l = dyn_array<qos_flow_to_be_forwarded_item_s>;
struct ho_cmd_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool add_dl_forwarding_uptnl_info_present = false;
ie_field_s<dyn_seq_of<qos_flow_per_tnl_info_item_s, 1, 3, true> > add_dl_forwarding_uptnl_info;
// sequence methods
ho_cmd_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverCommandTransfer ::= SEQUENCE
struct ho_cmd_transfer_s {
bool ext = false;
bool dlforwarding_up_tnl_info_present = false;
bool qos_flow_to_be_forwarded_list_present = false;
bool data_forwarding_resp_drb_list_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dlforwarding_up_tnl_info;
qos_flow_to_be_forwarded_list_l qos_flow_to_be_forwarded_list;
data_forwarding_resp_drb_list_l data_forwarding_resp_drb_list;
ho_cmd_transfer_ext_ies_container ie_exts;
bool ext = false;
bool dlforwarding_up_tnl_info_present = false;
bool qos_flow_to_be_forwarded_list_present = false;
bool data_forwarding_resp_drb_list_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dlforwarding_up_tnl_info;
qos_flow_to_be_forwarded_list_l qos_flow_to_be_forwarded_list;
data_forwarding_resp_drb_list_l data_forwarding_resp_drb_list;
protocol_ext_container_l<ho_cmd_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -6319,30 +6258,15 @@ typedef enumerated<pdu_session_type_opts, true> pdu_session_type_e;
// QosFlowSetupRequestList ::= SEQUENCE (SIZE (1..64)) OF QosFlowSetupRequestItem
using qos_flow_setup_request_list_l = dyn_array<qos_flow_setup_request_item_s>;
struct security_ind_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool maximum_integrity_protected_data_rate_dl_present = false;
ie_field_s<maximum_integrity_protected_data_rate_e> maximum_integrity_protected_data_rate_dl;
// sequence methods
security_ind_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// SecurityIndication ::= SEQUENCE
struct security_ind_s {
bool ext = false;
bool maximum_integrity_protected_data_rate_ul_present = false;
bool ie_exts_present = false;
integrity_protection_ind_e integrity_protection_ind;
confidentiality_protection_ind_e confidentiality_protection_ind;
maximum_integrity_protected_data_rate_e maximum_integrity_protected_data_rate_ul;
security_ind_ext_ies_container ie_exts;
bool ext = false;
bool maximum_integrity_protected_data_rate_ul_present = false;
bool ie_exts_present = false;
integrity_protection_ind_e integrity_protection_ind;
confidentiality_protection_ind_e confidentiality_protection_ind;
maximum_integrity_protected_data_rate_e maximum_integrity_protected_data_rate_ul;
protocol_ext_container_l<security_ind_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -6905,36 +6829,21 @@ struct security_result_s {
void to_json(json_writer& j) const;
};
struct ho_request_ack_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool add_dluptnl_info_for_ho_list_present = false;
ie_field_s<dyn_seq_of<add_dluptnl_info_for_ho_item_s, 1, 3, true> > add_dluptnl_info_for_ho_list;
// sequence methods
ho_request_ack_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// HandoverRequestAcknowledgeTransfer ::= SEQUENCE
struct ho_request_ack_transfer_s {
bool ext = false;
bool dlforwarding_up_tnl_info_present = false;
bool security_result_present = false;
bool qos_flow_failed_to_setup_list_present = false;
bool data_forwarding_resp_drb_list_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dl_ngu_up_tnl_info;
up_transport_layer_info_c dlforwarding_up_tnl_info;
security_result_s security_result;
qos_flow_list_with_data_forwarding_l qos_flow_setup_resp_list;
qos_flow_list_with_cause_l qos_flow_failed_to_setup_list;
data_forwarding_resp_drb_list_l data_forwarding_resp_drb_list;
ho_request_ack_transfer_ext_ies_container ie_exts;
bool ext = false;
bool dlforwarding_up_tnl_info_present = false;
bool security_result_present = false;
bool qos_flow_failed_to_setup_list_present = false;
bool data_forwarding_resp_drb_list_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dl_ngu_up_tnl_info;
up_transport_layer_info_c dlforwarding_up_tnl_info;
security_result_s security_result;
qos_flow_list_with_data_forwarding_l qos_flow_setup_resp_list;
qos_flow_list_with_cause_l qos_flow_failed_to_setup_list;
data_forwarding_resp_drb_list_l data_forwarding_resp_drb_list;
protocol_ext_container_l<ho_request_ack_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -8605,26 +8514,11 @@ struct pdu_session_res_notify_transfer_ext_ies_o {
// PDUSessionResourceReleaseCommandTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION
typedef ngap_protocol_ext_empty_o pdu_session_res_release_cmd_transfer_ext_ies_o;
struct pdu_session_res_release_resp_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool secondary_ratusage_info_present = false;
ie_field_s<secondary_ratusage_info_s> secondary_ratusage_info;
// sequence methods
pdu_session_res_release_resp_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PDUSessionResourceReleaseResponseTransfer ::= SEQUENCE
struct pdu_session_res_release_resp_transfer_s {
bool ext = false;
bool ie_exts_present = false;
pdu_session_res_release_resp_transfer_ext_ies_container ie_exts;
bool ext = false;
bool ie_exts_present = false;
protocol_ext_container_l<pdu_session_res_release_resp_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9010,36 +8904,21 @@ struct pdu_session_res_modify_request_transfer_s {
void to_json(json_writer& j) const;
};
struct pdu_session_res_modify_resp_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool add_ngu_up_tnl_info_present = false;
ie_field_s<dyn_seq_of<up_transport_layer_info_pair_item_s, 1, 3, true> > add_ngu_up_tnl_info;
// sequence methods
pdu_session_res_modify_resp_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PDUSessionResourceModifyResponseTransfer ::= SEQUENCE
struct pdu_session_res_modify_resp_transfer_s {
bool ext = false;
bool dl_ngu_up_tnl_info_present = false;
bool ul_ngu_up_tnl_info_present = false;
bool qos_flow_add_or_modify_resp_list_present = false;
bool add_dl_qos_flow_per_tnl_info_present = false;
bool qos_flow_failed_to_add_or_modify_list_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dl_ngu_up_tnl_info;
up_transport_layer_info_c ul_ngu_up_tnl_info;
qos_flow_add_or_modify_resp_list_l qos_flow_add_or_modify_resp_list;
qos_flow_per_tnl_info_list_l add_dl_qos_flow_per_tnl_info;
qos_flow_list_with_cause_l qos_flow_failed_to_add_or_modify_list;
pdu_session_res_modify_resp_transfer_ext_ies_container ie_exts;
bool ext = false;
bool dl_ngu_up_tnl_info_present = false;
bool ul_ngu_up_tnl_info_present = false;
bool qos_flow_add_or_modify_resp_list_present = false;
bool add_dl_qos_flow_per_tnl_info_present = false;
bool qos_flow_failed_to_add_or_modify_list_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dl_ngu_up_tnl_info;
up_transport_layer_info_c ul_ngu_up_tnl_info;
qos_flow_add_or_modify_resp_list_l qos_flow_add_or_modify_resp_list;
qos_flow_per_tnl_info_list_l add_dl_qos_flow_per_tnl_info;
qos_flow_list_with_cause_l qos_flow_failed_to_add_or_modify_list;
protocol_ext_container_l<pdu_session_res_modify_resp_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9069,27 +8948,12 @@ struct pdu_session_res_modify_unsuccessful_transfer_s {
// PDUSessionResourceNotifyItem-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION
typedef ngap_protocol_ext_empty_o pdu_session_res_notify_item_ext_ies_o;
struct pdu_session_res_notify_released_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool secondary_ratusage_info_present = false;
ie_field_s<secondary_ratusage_info_s> secondary_ratusage_info;
// sequence methods
pdu_session_res_notify_released_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PDUSessionResourceNotifyReleasedTransfer ::= SEQUENCE
struct pdu_session_res_notify_released_transfer_s {
bool ext = false;
bool ie_exts_present = false;
cause_c cause;
pdu_session_res_notify_released_transfer_ext_ies_container ie_exts;
bool ext = false;
bool ie_exts_present = false;
cause_c cause;
protocol_ext_container_l<pdu_session_res_notify_released_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9098,30 +8962,15 @@ struct pdu_session_res_notify_released_transfer_s {
void to_json(json_writer& j) const;
};
struct pdu_session_res_notify_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool secondary_ratusage_info_present = false;
ie_field_s<secondary_ratusage_info_s> secondary_ratusage_info;
// sequence methods
pdu_session_res_notify_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PDUSessionResourceNotifyTransfer ::= SEQUENCE
struct pdu_session_res_notify_transfer_s {
bool ext = false;
bool qos_flow_notify_list_present = false;
bool qos_flow_released_list_present = false;
bool ie_exts_present = false;
qos_flow_notify_list_l qos_flow_notify_list;
qos_flow_list_with_cause_l qos_flow_released_list;
pdu_session_res_notify_transfer_ext_ies_container ie_exts;
bool ext = false;
bool qos_flow_notify_list_present = false;
bool qos_flow_released_list_present = false;
bool ie_exts_present = false;
qos_flow_notify_list_l qos_flow_notify_list;
qos_flow_list_with_cause_l qos_flow_released_list;
protocol_ext_container_l<pdu_session_res_notify_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9176,30 +9025,15 @@ typedef ngap_protocol_ext_empty_o pdu_session_res_to_be_switched_dl_item_ext_ies
// PDUSessionResourceToReleaseItemRelCmd-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION
typedef ngap_protocol_ext_empty_o pdu_session_res_to_release_item_rel_cmd_ext_ies_o;
struct path_switch_request_ack_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool add_ngu_up_tnl_info_present = false;
ie_field_s<dyn_seq_of<up_transport_layer_info_pair_item_s, 1, 3, true> > add_ngu_up_tnl_info;
// sequence methods
path_switch_request_ack_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PathSwitchRequestAcknowledgeTransfer ::= SEQUENCE
struct path_switch_request_ack_transfer_s {
bool ext = false;
bool ul_ngu_up_tnl_info_present = false;
bool security_ind_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c ul_ngu_up_tnl_info;
security_ind_s security_ind;
path_switch_request_ack_transfer_ext_ies_container ie_exts;
bool ext = false;
bool ul_ngu_up_tnl_info_present = false;
bool security_ind_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c ul_ngu_up_tnl_info;
security_ind_s security_ind;
protocol_ext_container_l<path_switch_request_ack_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9224,32 +9058,17 @@ struct path_switch_request_setup_failed_transfer_s {
void to_json(json_writer& j) const;
};
struct path_switch_request_transfer_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool add_dl_qos_flow_per_tnl_info_present = false;
ie_field_s<dyn_seq_of<qos_flow_per_tnl_info_item_s, 1, 3, true> > add_dl_qos_flow_per_tnl_info;
// sequence methods
path_switch_request_transfer_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PathSwitchRequestTransfer ::= SEQUENCE
struct path_switch_request_transfer_s {
bool ext = false;
bool dl_ngu_tnl_info_reused_present = false;
bool user_plane_security_info_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dl_ngu_up_tnl_info;
dl_ngu_tnl_info_reused_e dl_ngu_tnl_info_reused;
user_plane_security_info_s user_plane_security_info;
qos_flow_accepted_list_l qos_flow_accepted_list;
path_switch_request_transfer_ext_ies_container ie_exts;
bool ext = false;
bool dl_ngu_tnl_info_reused_present = false;
bool user_plane_security_info_present = false;
bool ie_exts_present = false;
up_transport_layer_info_c dl_ngu_up_tnl_info;
dl_ngu_tnl_info_reused_e dl_ngu_tnl_info_reused;
user_plane_security_info_s user_plane_security_info;
qos_flow_accepted_list_l qos_flow_accepted_list;
protocol_ext_container_l<path_switch_request_transfer_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9467,27 +9286,12 @@ struct pdu_session_res_failed_to_setup_item_su_res_s {
void to_json(json_writer& j) const;
};
struct pdu_session_res_item_cxt_rel_cpl_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool pdu_session_res_release_resp_transfer_present = false;
ie_field_s<unbounded_octstring<true> > pdu_session_res_release_resp_transfer;
// sequence methods
pdu_session_res_item_cxt_rel_cpl_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PDUSessionResourceItemCxtRelCpl ::= SEQUENCE
struct pdu_session_res_item_cxt_rel_cpl_s {
bool ext = false;
bool ie_exts_present = false;
uint16_t pdu_session_id = 0;
pdu_session_res_item_cxt_rel_cpl_ext_ies_container ie_exts;
bool ext = false;
bool ie_exts_present = false;
uint16_t pdu_session_id = 0;
protocol_ext_container_l<pdu_session_res_item_cxt_rel_cpl_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -9546,30 +9350,15 @@ struct pdu_session_res_modify_item_mod_ind_s {
void to_json(json_writer& j) const;
};
struct pdu_session_res_modify_item_mod_req_ext_ies_container {
template <class extT_>
using ie_field_s = protocol_ext_container_item_s<extT_>;
// member variables
bool s_nssai_present = false;
ie_field_s<s_nssai_s> s_nssai;
// sequence methods
pdu_session_res_modify_item_mod_req_ext_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// PDUSessionResourceModifyItemModReq ::= SEQUENCE
struct pdu_session_res_modify_item_mod_req_s {
bool ext = false;
bool nas_pdu_present = false;
bool ie_exts_present = false;
uint16_t pdu_session_id = 0;
unbounded_octstring<true> nas_pdu;
unbounded_octstring<true> pdu_session_res_modify_request_transfer;
pdu_session_res_modify_item_mod_req_ext_ies_container ie_exts;
bool ext = false;
bool nas_pdu_present = false;
bool ie_exts_present = false;
uint16_t pdu_session_id = 0;
unbounded_octstring<true> nas_pdu;
unbounded_octstring<true> pdu_session_res_modify_request_transfer;
protocol_ext_container_l<pdu_session_res_modify_item_mod_req_ext_ies_o> ie_exts;
// ...
// sequence methods
@ -11881,7 +11670,7 @@ struct path_switch_request_ies_o {
// PrivateIE-Container{NGAP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE (SIZE (1..65535)) OF PrivateIE-Field
template <class ies_set_paramT_>
using private_ie_container_l = dyn_array<private_ie_field_s<ies_set_paramT_> >;
using private_ie_container_l = dyn_seq_of<private_ie_field_s<ies_set_paramT_>, 1, 65535, true>;
struct ngap_private_ies_empty_o {
// Value ::= OPEN TYPE
@ -14049,25 +13838,10 @@ struct ran_cfg_upd_s {
void to_json(json_writer& j) const;
};
struct ran_cfg_upd_ack_ies_container {
template <class valueT_>
using ie_field_s = protocol_ie_container_item_s<valueT_>;
// member variables
bool crit_diagnostics_present = false;
ie_field_s<crit_diagnostics_s> crit_diagnostics;
// sequence methods
ran_cfg_upd_ack_ies_container();
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
};
// RANConfigurationUpdateAcknowledge ::= SEQUENCE
struct ran_cfg_upd_ack_s {
bool ext = false;
ran_cfg_upd_ack_ies_container protocol_ies;
bool ext = false;
protocol_ie_container_l<ran_cfg_upd_ack_ies_o> protocol_ies;
// ...
// sequence methods
@ -15513,11 +15287,6 @@ struct pdu_session_res_info_item_s {
// PDUSessionResourceInformationList ::= SEQUENCE (SIZE (1..256)) OF PDUSessionResourceInformationItem
using pdu_session_res_info_list_l = dyn_array<pdu_session_res_info_item_s>;
// ProtocolIE-ContainerList{INTEGER : lowerBound, INTEGER : upperBound, NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE
// (SIZE (lowerBound..upperBound)) OF ProtocolIE-SingleContainer
template <class ies_set_paramT_>
using protocol_ie_container_list_l = dyn_array<protocol_ie_single_container_s<ies_set_paramT_> >;
// ProtocolIE-FieldPair{NGAP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE{{NGAP-PROTOCOL-IES-PAIR}}
template <class ies_set_paramT_>
struct protocol_ie_field_pair_s {
@ -15535,12 +15304,7 @@ struct protocol_ie_field_pair_s {
// ProtocolIE-ContainerPair{NGAP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE (SIZE (0..65535)) OF ProtocolIE-FieldPair
template <class ies_set_paramT_>
using protocol_ie_container_pair_l = dyn_array<protocol_ie_field_pair_s<ies_set_paramT_> >;
// ProtocolIE-ContainerPairList{INTEGER : lowerBound, INTEGER : upperBound, NGAP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
// SEQUENCE (SIZE (lowerBound..upperBound)) OF ProtocolIE-ContainerPair
template <class ies_set_paramT_>
using protocol_ie_container_pair_list_l = dyn_array<protocol_ie_container_pair_l<ies_set_paramT_> >;
using protocol_ie_container_pair_l = dyn_seq_of<protocol_ie_field_pair_s<ies_set_paramT_>, 0, 65535, true>;
// QosFlowSetupResponseItemSURes-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION
typedef ngap_protocol_ext_empty_o qos_flow_setup_resp_item_su_res_ext_ies_o;

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

@ -21,14 +21,14 @@
/*******************************************************************************
*
* 3GPP TS ASN1 RRC v15.4.0 (2018-12)
* 3GPP TS ASN1 RRC v15.11.0 (2020-09)
*
******************************************************************************/
#ifndef SRSASN1_RRC_NBIOT_H
#define SRSASN1_RRC_NBIOT_H
#include "rrc_asn1.h"
#include "rrc.h"
namespace asn1 {
namespace rrc {
@ -1354,6 +1354,8 @@ struct phys_cfg_ded_nb_r13_s {
bool interference_randomisation_cfg_r14_present = false;
// group 2
copy_ptr<npdcch_cfg_ded_nb_v1530_s> npdcch_cfg_ded_v1530;
// group 3
bool add_tx_sib1_cfg_v1540_present = false;
// sequence methods
SRSASN_CODE pack(bit_ref& bref) const;

@ -35,23 +35,6 @@
namespace asn1 {
namespace rrc_nr {
/*******************************************************************************
* Functions for external logging
******************************************************************************/
void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id);
void assert_choice_type(uint32_t val, uint32_t choice_id);
void assert_choice_type(const std::string& access_type,
const std::string& current_type,
const std::string& choice_type);
const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template <class ItemType>
ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
/*******************************************************************************
* Constant Definitions
******************************************************************************/

@ -19,8 +19,8 @@
*
*/
#ifndef SRSLTE_RRC_NR_ASN1_UTILS_H
#define SRSLTE_RRC_NR_ASN1_UTILS_H
#ifndef SRSLTE_RRC_NR_UTILS_H
#define SRSLTE_RRC_NR_UTILS_H
#include "srslte/interfaces/rrc_interface_types.h"
#include "srslte/interfaces/sched_interface.h"
@ -52,4 +52,4 @@ namespace srsenb {
int set_sched_cell_cfg_sib1(srsenb::sched_interface::cell_cfg_t* sched_cfg, const asn1::rrc_nr::sib1_s& sib1);
}
#endif // SRSLTE_RRC_NR_ASN1_UTILS_H
#endif // SRSLTE_RRC_NR_UTILS_H

@ -19,8 +19,8 @@
*
*/
#ifndef SRSLTE_RRC_ASN1_UTILS_H
#define SRSLTE_RRC_ASN1_UTILS_H
#ifndef SRSLTE_RRC_UTILS_H
#define SRSLTE_RRC_UTILS_H
#include "srslte/interfaces/mac_interface_types.h"
#include "srslte/interfaces/pdcp_interface_types.h"
@ -149,26 +149,6 @@ sib13_t make_sib13(const asn1::rrc::sib_type13_r9_s& asn1_type);
namespace asn1 {
namespace rrc {
/***************************
* MeasConfig
**************************/
bool operator==(const cells_to_add_mod_s& lhs, const cells_to_add_mod_s& rhs);
bool operator==(const meas_obj_to_add_mod_s& lhs, const meas_obj_to_add_mod_s& rhs);
bool operator==(const report_cfg_eutra_s& lhs, const report_cfg_eutra_s& rhs);
bool operator==(const report_cfg_to_add_mod_s& lhs, const report_cfg_to_add_mod_s& rhs);
bool operator==(const meas_id_to_add_mod_s& lhs, const meas_id_to_add_mod_s& rhs);
bool operator==(const quant_cfg_s& lhs, const quant_cfg_s& rhs);
/***************************
* SRBs/DRBs
**************************/
bool operator==(const drb_to_add_mod_s& lhs, const drb_to_add_mod_s& rhs);
/***************************
* SCells
**************************/
bool operator==(const scell_to_add_mod_r10_s& lhs, const scell_to_add_mod_r10_s& rhs);
/**************************
* RRC Obj Id
*************************/
@ -192,4 +172,4 @@ void set_rrc_obj_id(scell_to_add_mod_r10_s& obj, uint8_t id);
} // namespace rrc
} // namespace asn1
#endif // SRSLTE_RRC_ASN1_UTILS_H
#endif // SRSLTE_RRC_UTILS_H

@ -35,23 +35,6 @@
namespace asn1 {
namespace s1ap {
/*******************************************************************************
* Functions for external logging
******************************************************************************/
void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id);
void assert_choice_type(uint32_t val, uint32_t choice_id);
void assert_choice_type(const std::string& access_type,
const std::string& current_type,
const std::string& choice_type);
const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template <class ItemType>
ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
/*******************************************************************************
* Constant Definitions
******************************************************************************/
@ -7549,22 +7532,22 @@ struct ho_notify_ies_o {
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters
uint64_t& mme_ue_s1ap_id();
uint32_t& enb_ue_s1ap_id();
eutran_cgi_s& eutran_cgi();
tai_s& tai();
tunnel_info_s& tunnel_info_for_bbf();
unbounded_octstring<true>& lhn_id();
const uint64_t& mme_ue_s1ap_id() const;
const uint32_t& enb_ue_s1ap_id() const;
const eutran_cgi_s& eutran_cgi() const;
const tai_s& tai() const;
const tunnel_info_s& tunnel_info_for_bbf() const;
const unbounded_octstring<true>& lhn_id() const;
uint64_t& mme_ue_s1ap_id();
uint32_t& enb_ue_s1ap_id();
eutran_cgi_s& eutran_cgi();
tai_s& tai();
tunnel_info_s& tunnel_info_for_bbf();
bounded_octstring<32, 256, true>& lhn_id();
const uint64_t& mme_ue_s1ap_id() const;
const uint32_t& enb_ue_s1ap_id() const;
const eutran_cgi_s& eutran_cgi() const;
const tai_s& tai() const;
const tunnel_info_s& tunnel_info_for_bbf() const;
const bounded_octstring<32, 256, true>& lhn_id() const;
private:
types type_;
choice_buffer_t<eutran_cgi_s, tai_s, tunnel_info_s, unbounded_octstring<true> > c;
types type_;
choice_buffer_t<bounded_octstring<32, 256, true>, eutran_cgi_s, tai_s, tunnel_info_s> c;
void destroy_();
};
@ -7589,7 +7572,7 @@ struct ho_notify_ies_container {
ie_field_s<eutran_cgi_s> eutran_cgi;
ie_field_s<tai_s> tai;
ie_field_s<tunnel_info_s> tunnel_info_for_bbf;
ie_field_s<unbounded_octstring<true> > lhn_id;
ie_field_s<bounded_octstring<32, 256, true> > lhn_id;
// sequence methods
ho_notify_ies_container();
@ -9833,7 +9816,7 @@ struct init_ue_msg_ies_o {
gummei_type_e& gummei_type();
tunnel_info_s& tunnel_info_for_bbf();
bounded_bitstring<1, 160, true, true>& sipto_l_gw_transport_layer_address();
unbounded_octstring<true>& lhn_id();
bounded_octstring<32, 256, true>& lhn_id();
fixed_octstring<2, true>& mme_group_id();
uint16_t& ue_usage_type();
ce_mode_b_support_ind_e& ce_mode_b_support_ind();
@ -9853,7 +9836,7 @@ struct init_ue_msg_ies_o {
const gummei_type_e& gummei_type() const;
const tunnel_info_s& tunnel_info_for_bbf() const;
const bounded_bitstring<1, 160, true, true>& sipto_l_gw_transport_layer_address() const;
const unbounded_octstring<true>& lhn_id() const;
const bounded_octstring<32, 256, true>& lhn_id() const;
const fixed_octstring<2, true>& mme_group_id() const;
const uint16_t& ue_usage_type() const;
const ce_mode_b_support_ind_e& ce_mode_b_support_ind() const;
@ -9863,6 +9846,7 @@ struct init_ue_msg_ies_o {
private:
types type_;
choice_buffer_t<bounded_bitstring<1, 160, true, true>,
bounded_octstring<32, 256, true>,
eutran_cgi_s,
fixed_bitstring<27, false, true>,
fixed_octstring<2, true>,
@ -9918,7 +9902,7 @@ struct init_ue_msg_ies_container {
ie_field_s<gummei_type_e> gummei_type;
ie_field_s<tunnel_info_s> tunnel_info_for_bbf;
ie_field_s<bounded_bitstring<1, 160, true, true> > sipto_l_gw_transport_layer_address;
ie_field_s<unbounded_octstring<true> > lhn_id;
ie_field_s<bounded_octstring<32, 256, true> > lhn_id;
ie_field_s<fixed_octstring<2, true> > mme_group_id;
ie_field_s<integer<uint16_t, 0, 255, false, true> > ue_usage_type;
ie_field_s<ce_mode_b_support_ind_e> ce_mode_b_support_ind;
@ -10572,35 +10556,35 @@ struct ue_paging_id_c {
assert_choice_type("s-TMSI", type_.to_string(), "UEPagingID");
return c.get<s_tmsi_s>();
}
unbounded_octstring<true>& imsi()
bounded_octstring<3, 8, true>& imsi()
{
assert_choice_type("iMSI", type_.to_string(), "UEPagingID");
return c.get<unbounded_octstring<true> >();
return c.get<bounded_octstring<3, 8, true> >();
}
const s_tmsi_s& s_tmsi() const
{
assert_choice_type("s-TMSI", type_.to_string(), "UEPagingID");
return c.get<s_tmsi_s>();
}
const unbounded_octstring<true>& imsi() const
const bounded_octstring<3, 8, true>& imsi() const
{
assert_choice_type("iMSI", type_.to_string(), "UEPagingID");
return c.get<unbounded_octstring<true> >();
return c.get<bounded_octstring<3, 8, true> >();
}
s_tmsi_s& set_s_tmsi()
{
set(types::s_tmsi);
return c.get<s_tmsi_s>();
}
unbounded_octstring<true>& set_imsi()
bounded_octstring<3, 8, true>& set_imsi()
{
set(types::imsi);
return c.get<unbounded_octstring<true> >();
return c.get<bounded_octstring<3, 8, true> >();
}
private:
types type_;
choice_buffer_t<s_tmsi_s, unbounded_octstring<true> > c;
types type_;
choice_buffer_t<bounded_octstring<3, 8, true>, s_tmsi_s> c;
void destroy_();
};
@ -11735,7 +11719,7 @@ struct path_switch_request_ies_o {
gummei_s& source_mme_gummei();
csg_membership_status_e& csg_membership_status();
tunnel_info_s& tunnel_info_for_bbf();
unbounded_octstring<true>& lhn_id();
bounded_octstring<32, 256, true>& lhn_id();
rrc_establishment_cause_e& rrc_resume_cause();
const uint32_t& enb_ue_s1ap_id() const;
const erab_ie_container_list_l<erab_to_be_switched_dl_item_ies_o>& erab_to_be_switched_dl_list() const;
@ -11748,19 +11732,19 @@ struct path_switch_request_ies_o {
const gummei_s& source_mme_gummei() const;
const csg_membership_status_e& csg_membership_status() const;
const tunnel_info_s& tunnel_info_for_bbf() const;
const unbounded_octstring<true>& lhn_id() const;
const bounded_octstring<32, 256, true>& lhn_id() const;
const rrc_establishment_cause_e& rrc_resume_cause() const;
private:
types type_;
choice_buffer_t<erab_ie_container_list_l<erab_to_be_switched_dl_item_ies_o>,
choice_buffer_t<bounded_octstring<32, 256, true>,
erab_ie_container_list_l<erab_to_be_switched_dl_item_ies_o>,
eutran_cgi_s,
fixed_bitstring<27, false, true>,
gummei_s,
tai_s,
tunnel_info_s,
ue_security_cap_s,
unbounded_octstring<true> >
ue_security_cap_s>
c;
void destroy_();
@ -13124,7 +13108,7 @@ struct ul_nas_transport_ies_o {
tai_s& tai();
bounded_bitstring<1, 160, true, true>& gw_transport_layer_address();
bounded_bitstring<1, 160, true, true>& sipto_l_gw_transport_layer_address();
unbounded_octstring<true>& lhn_id();
bounded_octstring<32, 256, true>& lhn_id();
const uint64_t& mme_ue_s1ap_id() const;
const uint32_t& enb_ue_s1ap_id() const;
const unbounded_octstring<true>& nas_pdu() const;
@ -13132,11 +13116,16 @@ struct ul_nas_transport_ies_o {
const tai_s& tai() const;
const bounded_bitstring<1, 160, true, true>& gw_transport_layer_address() const;
const bounded_bitstring<1, 160, true, true>& sipto_l_gw_transport_layer_address() const;
const unbounded_octstring<true>& lhn_id() const;
const bounded_octstring<32, 256, true>& lhn_id() const;
private:
types type_;
choice_buffer_t<bounded_bitstring<1, 160, true, true>, eutran_cgi_s, tai_s, unbounded_octstring<true> > c;
types type_;
choice_buffer_t<bounded_bitstring<1, 160, true, true>,
bounded_octstring<32, 256, true>,
eutran_cgi_s,
tai_s,
unbounded_octstring<true> >
c;
void destroy_();
};
@ -13350,7 +13339,7 @@ struct write_replace_warning_request_ies_o {
fixed_octstring<2, true>& warning_type();
fixed_octstring<50, true>& warning_security_info();
fixed_bitstring<8, false, true>& data_coding_scheme();
unbounded_octstring<true>& warning_msg_contents();
bounded_octstring<1, 9600, true>& warning_msg_contents();
concurrent_warning_msg_ind_e& concurrent_warning_msg_ind();
const fixed_bitstring<16, false, true>& msg_id() const;
const fixed_bitstring<16, false, true>& serial_num() const;
@ -13361,15 +13350,15 @@ struct write_replace_warning_request_ies_o {
const fixed_octstring<2, true>& warning_type() const;
const fixed_octstring<50, true>& warning_security_info() const;
const fixed_bitstring<8, false, true>& data_coding_scheme() const;
const unbounded_octstring<true>& warning_msg_contents() const;
const bounded_octstring<1, 9600, true>& warning_msg_contents() const;
const concurrent_warning_msg_ind_e& concurrent_warning_msg_ind() const;
private:
types type_;
choice_buffer_t<fixed_bitstring<16, false, true>,
choice_buffer_t<bounded_octstring<1, 9600, true>,
fixed_bitstring<16, false, true>,
fixed_octstring<2, true>,
fixed_octstring<50, true>,
unbounded_octstring<true>,
warning_area_list_c>
c;
@ -13961,7 +13950,7 @@ struct path_switch_request_ies_container {
ie_field_s<gummei_s> source_mme_gummei;
ie_field_s<csg_membership_status_e> csg_membership_status;
ie_field_s<tunnel_info_s> tunnel_info_for_bbf;
ie_field_s<unbounded_octstring<true> > lhn_id;
ie_field_s<bounded_octstring<32, 256, true> > lhn_id;
ie_field_s<rrc_establishment_cause_e> rrc_resume_cause;
// sequence methods
@ -14926,7 +14915,7 @@ struct ul_nas_transport_ies_container {
ie_field_s<tai_s> tai;
ie_field_s<bounded_bitstring<1, 160, true, true> > gw_transport_layer_address;
ie_field_s<bounded_bitstring<1, 160, true, true> > sipto_l_gw_transport_layer_address;
ie_field_s<unbounded_octstring<true> > lhn_id;
ie_field_s<bounded_octstring<32, 256, true> > lhn_id;
// sequence methods
ul_nas_transport_ies_container();
@ -15062,7 +15051,7 @@ struct write_replace_warning_request_ies_container {
ie_field_s<fixed_octstring<2, true> > warning_type;
ie_field_s<fixed_octstring<50, true> > warning_security_info;
ie_field_s<fixed_bitstring<8, false, true> > data_coding_scheme;
ie_field_s<unbounded_octstring<true> > warning_msg_contents;
ie_field_s<bounded_octstring<1, 9600, true> > warning_msg_contents;
ie_field_s<concurrent_warning_msg_ind_e> concurrent_warning_msg_ind;
// sequence methods

@ -24,8 +24,8 @@
#include "pdcp_interface_types.h"
#include "rlc_interface_types.h"
#include "rrc_interface_types.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/common.h"
#include "srslte/common/interfaces_common.h"
#include "srslte/common/security.h"

@ -22,7 +22,7 @@
#ifndef SRSLTE_RRC_CFG_UTILS_H
#define SRSLTE_RRC_CFG_UTILS_H
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include <algorithm>
#include <cassert>

@ -30,32 +30,48 @@ add_library(asn1_utils STATIC asn1_utils.cc)
target_link_libraries(asn1_utils srslte_common)
INSTALL(TARGETS asn1_utils DESTINATION ${LIBRARY_DIR})
# RRC ASN1 lib
add_library(rrc_asn1 STATIC
rrc_asn1.cc
rrc_asn1_nbiot.cc
rrc_asn1_enum.cc
rrc_asn1_utils.cc
)
rrc.cc
rrc/bcch_msg.cc
rrc/common.cc
rrc/common_ext.cc
rrc/dl_ccch_msg.cc
rrc/dl_dcch_msg.cc
rrc/ho_cmd.cc
rrc/meascfg.cc
rrc/paging.cc
rrc/phy_ded.cc
rrc/rr_common.cc
rrc/rr_ded.cc
rrc/security.cc
rrc/si.cc
rrc/uecap.cc
rrc/ul_ccch_msg.cc
rrc/ul_dcch_msg.cc
rrc_nbiot.cc
rrc_utils.cc)
# Compile RRC ASN1 optimized for size
target_compile_options(rrc_asn1 PRIVATE "-Os")
target_link_libraries(rrc_asn1 asn1_utils srslte_common)
INSTALL(TARGETS rrc_asn1 DESTINATION ${LIBRARY_DIR})
# S1AP ASN1 lib
add_library(s1ap_asn1 STATIC
s1ap_asn1.cc)
s1ap.cc)
target_compile_options(s1ap_asn1 PRIVATE "-Os")
target_link_libraries(s1ap_asn1 asn1_utils srslte_common)
INSTALL(TARGETS s1ap_asn1 DESTINATION ${LIBRARY_DIR})
if (ENABLE_5GNR)
# RRC NR ASN1
add_library(rrc_nr_asn1 STATIC rrc_nr_asn1.cc rrc_nr_asn1_utils.cc)
add_library(rrc_nr_asn1 STATIC rrc_nr.cc rrc_nr_utils.cc)
target_compile_options(rrc_nr_asn1 PRIVATE "-Os")
target_link_libraries(rrc_nr_asn1 asn1_utils srslte_common)
INSTALL(TARGETS rrc_nr_asn1 DESTINATION ${LIBRARY_DIR})
# NGAP ASN1
add_library(ngap_nr_asn1 STATIC ngap_nr_asn1.cc)
add_library(ngap_nr_asn1 STATIC ngap.cc)
target_compile_options(ngap_nr_asn1 PRIVATE "-Os")
target_link_libraries(ngap_nr_asn1 asn1_utils srslte_common)
INSTALL(TARGETS ngap_nr_asn1 DESTINATION ${LIBRARY_DIR})

@ -84,6 +84,35 @@ void log_debug(const char* format, ...)
va_end(args);
}
void warn_assert(bool cond, const char* filename, int lineno)
{
if (cond) {
log_warning("Assertion in [%s][%d] failed.\n", filename, lineno);
}
}
void invalid_enum_number(int value, const char* name)
{
log_error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name);
}
void assert_choice_type(uint32_t val, uint32_t choice_id)
{
if (val != choice_id) {
log_invalid_access_choice_id(val, choice_id);
}
}
void assert_choice_type(const std::string& access_type, const std::string& current_type, const std::string& choice_type)
{
if (access_type != current_type) {
log_error("Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n",
choice_type.c_str(),
access_type.c_str(),
current_type.c_str());
}
}
/************************
error handling
************************/
@ -102,6 +131,51 @@ void log_error_code(SRSASN_CODE code, const char* filename, int line)
}
}
const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type)
{
if (enum_val >= nof_types) {
if (enum_val == nof_types) {
log_error("The enum of type %s was not initialized.\n", enum_type);
} else {
log_error("The enum value=%d of type %s is not valid.\n", enum_val, enum_type);
}
return "";
}
return array[enum_val];
}
template <class ItemType>
ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type)
{
if (enum_val >= nof_types) {
if (enum_val == nof_types) {
log_error("The enum of type %s is not initialized.\n", enum_type);
} else {
log_error("The enum value=%d of type %s cannot be converted to a number.\n", enum_val, enum_type);
}
return 0;
}
return array[enum_val];
}
template const uint8_t
map_enum_number<const uint8_t>(const uint8_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const uint16_t
map_enum_number<const uint16_t>(const uint16_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const uint32_t
map_enum_number<const uint32_t>(const uint32_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const uint64_t
map_enum_number<const uint64_t>(const uint64_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const int8_t
map_enum_number<const int8_t>(const int8_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const int16_t
map_enum_number<const int16_t>(const int16_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const int32_t
map_enum_number<const int32_t>(const int32_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const int64_t
map_enum_number<const int64_t>(const int64_t* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
template const float
map_enum_number<const float>(const float* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type);
/*********************
bit_ref
*********************/

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

@ -19,25 +19,12 @@
*
*/
#include "srslte/asn1/rrc_asn1_nbiot.h"
#include "srslte/asn1/rrc_nbiot.h"
#include <sstream>
using namespace asn1;
using namespace asn1::rrc;
/*******************************************************************************
* Logging Utilities
******************************************************************************/
static void log_invalid_choice_id(uint32_t val, const char* choice_type)
{
asn1::log_error("Invalid choice id=%d for choice type %s\n", val, choice_type);
}
static void invalid_enum_number(int value, const char* name)
{
asn1::log_error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name);
}
/*******************************************************************************
* Struct Methods
******************************************************************************/
@ -804,8 +791,8 @@ dl_carrier_cfg_ded_nb_r13_s::inband_carrier_info_r13_s_::same_pci_ind_r13_c_::sa
}
}
dl_carrier_cfg_ded_nb_r13_s::inband_carrier_info_r13_s_::same_pci_ind_r13_c_&
dl_carrier_cfg_ded_nb_r13_s::inband_carrier_info_r13_s_::same_pci_ind_r13_c_::
operator=(const dl_carrier_cfg_ded_nb_r13_s::inband_carrier_info_r13_s_::same_pci_ind_r13_c_& other)
dl_carrier_cfg_ded_nb_r13_s::inband_carrier_info_r13_s_::same_pci_ind_r13_c_::operator=(
const dl_carrier_cfg_ded_nb_r13_s::inband_carrier_info_r13_s_::same_pci_ind_r13_c_& other)
{
if (this == &other) {
return *this;
@ -1284,8 +1271,8 @@ sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_::nprach_sub_carrier_idx_r1
log_invalid_choice_id(type_, "sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_");
}
}
sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_& sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_::
operator=(const sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_& other)
sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_& sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_::operator=(
const sr_nprach_res_nb_r15_s::nprach_sub_carrier_idx_r15_c_& other)
{
if (this == &other) {
return *this;
@ -2613,6 +2600,7 @@ SRSASN_CODE phys_cfg_ded_nb_r13_s::pack(bit_ref& bref) const
group_flags[0] |= two_harq_processes_cfg_r14_present;
group_flags[1] |= interference_randomisation_cfg_r14_present;
group_flags[2] |= npdcch_cfg_ded_v1530.is_present();
group_flags[3] |= add_tx_sib1_cfg_v1540_present;
group_flags.pack(bref);
if (group_flags[0]) {
@ -2633,6 +2621,11 @@ SRSASN_CODE phys_cfg_ded_nb_r13_s::pack(bit_ref& bref) const
HANDLE_CODE(npdcch_cfg_ded_v1530->pack(bref));
}
}
if (group_flags[3]) {
varlength_field_pack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.pack(add_tx_sib1_cfg_v1540_present, 1));
}
}
return SRSASN_SUCCESS;
}
@ -2658,7 +2651,7 @@ SRSASN_CODE phys_cfg_ded_nb_r13_s::unpack(cbit_ref& bref)
}
if (ext) {
ext_groups_unpacker_guard group_flags(3);
ext_groups_unpacker_guard group_flags(4);
group_flags.unpack(bref);
if (group_flags[0]) {
@ -2681,6 +2674,11 @@ SRSASN_CODE phys_cfg_ded_nb_r13_s::unpack(cbit_ref& bref)
HANDLE_CODE(npdcch_cfg_ded_v1530->unpack(bref));
}
}
if (group_flags[3]) {
varlength_field_unpack_guard varlen_scope(bref, false);
HANDLE_CODE(bref.unpack(add_tx_sib1_cfg_v1540_present, 1));
}
}
return SRSASN_SUCCESS;
}
@ -2714,6 +2712,9 @@ void phys_cfg_ded_nb_r13_s::to_json(json_writer& j) const
j.write_fieldname("npdcch-ConfigDedicated-v1530");
npdcch_cfg_ded_v1530->to_json(j);
}
if (add_tx_sib1_cfg_v1540_present) {
j.write_str("additionalTxSIB1-Config-v1540", "true");
}
}
j.end_obj();
}
@ -3536,8 +3537,8 @@ mib_nb_s::operation_mode_info_r13_c_::operation_mode_info_r13_c_(const mib_nb_s:
log_invalid_choice_id(type_, "mib_nb_s::operation_mode_info_r13_c_");
}
}
mib_nb_s::operation_mode_info_r13_c_& mib_nb_s::operation_mode_info_r13_c_::
operator=(const mib_nb_s::operation_mode_info_r13_c_& other)
mib_nb_s::operation_mode_info_r13_c_&
mib_nb_s::operation_mode_info_r13_c_::operator=(const mib_nb_s::operation_mode_info_r13_c_& other)
{
if (this == &other) {
return *this;
@ -3873,8 +3874,8 @@ guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_::sib_guardband_info_r15_c_(
log_invalid_choice_id(type_, "guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_");
}
}
guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_& guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_::
operator=(const guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_& other)
guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_& guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_::operator=(
const guardband_tdd_nb_r15_s::sib_guardband_info_r15_c_& other)
{
if (this == &other) {
return *this;
@ -4207,8 +4208,8 @@ mib_tdd_nb_r15_s::operation_mode_info_r15_c_::operation_mode_info_r15_c_(
log_invalid_choice_id(type_, "mib_tdd_nb_r15_s::operation_mode_info_r15_c_");
}
}
mib_tdd_nb_r15_s::operation_mode_info_r15_c_& mib_tdd_nb_r15_s::operation_mode_info_r15_c_::
operator=(const mib_tdd_nb_r15_s::operation_mode_info_r15_c_& other)
mib_tdd_nb_r15_s::operation_mode_info_r15_c_&
mib_tdd_nb_r15_s::operation_mode_info_r15_c_::operator=(const mib_tdd_nb_r15_s::operation_mode_info_r15_c_& other)
{
if (this == &other) {
return *this;
@ -6119,8 +6120,8 @@ dl_carrier_cfg_common_nb_r14_s::inband_carrier_info_r14_s_::same_pci_ind_r14_c_:
}
}
dl_carrier_cfg_common_nb_r14_s::inband_carrier_info_r14_s_::same_pci_ind_r14_c_&
dl_carrier_cfg_common_nb_r14_s::inband_carrier_info_r14_s_::same_pci_ind_r14_c_::
operator=(const dl_carrier_cfg_common_nb_r14_s::inband_carrier_info_r14_s_::same_pci_ind_r14_c_& other)
dl_carrier_cfg_common_nb_r14_s::inband_carrier_info_r14_s_::same_pci_ind_r14_c_::operator=(
const dl_carrier_cfg_common_nb_r14_s::inband_carrier_info_r14_s_::same_pci_ind_r14_c_& other)
{
if (this == &other) {
return *this;
@ -8574,8 +8575,8 @@ sc_mcch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_::sched_perio
}
}
sc_mcch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_&
sc_mcch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_::
operator=(const sc_mcch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_& other)
sc_mcch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_::operator=(
const sc_mcch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_& other)
{
if (this == &other) {
return *this;
@ -9464,8 +9465,8 @@ sib_type14_nb_r13_s::ab_param_r13_c_::ab_param_r13_c_(const sib_type14_nb_r13_s:
log_invalid_choice_id(type_, "sib_type14_nb_r13_s::ab_param_r13_c_");
}
}
sib_type14_nb_r13_s::ab_param_r13_c_& sib_type14_nb_r13_s::ab_param_r13_c_::
operator=(const sib_type14_nb_r13_s::ab_param_r13_c_& other)
sib_type14_nb_r13_s::ab_param_r13_c_&
sib_type14_nb_r13_s::ab_param_r13_c_::operator=(const sib_type14_nb_r13_s::ab_param_r13_c_& other)
{
if (this == &other) {
return *this;
@ -9889,8 +9890,8 @@ sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_::sc_mcch_carrier_cfg_r14_c_(
log_invalid_choice_id(type_, "sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_");
}
}
sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_& sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_::
operator=(const sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_& other)
sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_&
sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_::operator=(const sib_type20_nb_r14_s::sc_mcch_carrier_cfg_r14_c_& other)
{
if (this == &other) {
return *this;
@ -10871,8 +10872,8 @@ sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_::sib_type_and_info_r13_item
log_invalid_choice_id(type_, "sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_");
}
}
sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_& sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_::
operator=(const sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_& other)
sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_& sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_::operator=(
const sys_info_nb_r13_ies_s::sib_type_and_info_r13_item_c_& other)
{
if (this == &other) {
return *this;
@ -11670,8 +11671,8 @@ bcch_dl_sch_msg_type_nb_c::c1_c_::c1_c_(const bcch_dl_sch_msg_type_nb_c::c1_c_&
log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_nb_c::c1_c_");
}
}
bcch_dl_sch_msg_type_nb_c::c1_c_& bcch_dl_sch_msg_type_nb_c::c1_c_::
operator=(const bcch_dl_sch_msg_type_nb_c::c1_c_& other)
bcch_dl_sch_msg_type_nb_c::c1_c_&
bcch_dl_sch_msg_type_nb_c::c1_c_::operator=(const bcch_dl_sch_msg_type_nb_c::c1_c_& other)
{
if (this == &other) {
return *this;
@ -12169,8 +12170,8 @@ rrc_conn_reest_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_nb_s::crit_
log_invalid_choice_id(type_, "rrc_conn_reest_nb_s::crit_exts_c_");
}
}
rrc_conn_reest_nb_s::crit_exts_c_& rrc_conn_reest_nb_s::crit_exts_c_::
operator=(const rrc_conn_reest_nb_s::crit_exts_c_& other)
rrc_conn_reest_nb_s::crit_exts_c_&
rrc_conn_reest_nb_s::crit_exts_c_::operator=(const rrc_conn_reest_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -12358,8 +12359,8 @@ rrc_conn_reject_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reject_nb_s::cri
log_invalid_choice_id(type_, "rrc_conn_reject_nb_s::crit_exts_c_");
}
}
rrc_conn_reject_nb_s::crit_exts_c_& rrc_conn_reject_nb_s::crit_exts_c_::
operator=(const rrc_conn_reject_nb_s::crit_exts_c_& other)
rrc_conn_reject_nb_s::crit_exts_c_&
rrc_conn_reject_nb_s::crit_exts_c_::operator=(const rrc_conn_reject_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -12550,8 +12551,8 @@ rrc_conn_setup_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_setup_nb_s::crit_
log_invalid_choice_id(type_, "rrc_conn_setup_nb_s::crit_exts_c_");
}
}
rrc_conn_setup_nb_s::crit_exts_c_& rrc_conn_setup_nb_s::crit_exts_c_::
operator=(const rrc_conn_setup_nb_s::crit_exts_c_& other)
rrc_conn_setup_nb_s::crit_exts_c_&
rrc_conn_setup_nb_s::crit_exts_c_::operator=(const rrc_conn_setup_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -12740,8 +12741,8 @@ rrc_early_data_complete_nb_r15_s::crit_exts_c_::crit_exts_c_(
log_invalid_choice_id(type_, "rrc_early_data_complete_nb_r15_s::crit_exts_c_");
}
}
rrc_early_data_complete_nb_r15_s::crit_exts_c_& rrc_early_data_complete_nb_r15_s::crit_exts_c_::
operator=(const rrc_early_data_complete_nb_r15_s::crit_exts_c_& other)
rrc_early_data_complete_nb_r15_s::crit_exts_c_&
rrc_early_data_complete_nb_r15_s::crit_exts_c_::operator=(const rrc_early_data_complete_nb_r15_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -13649,8 +13650,8 @@ dl_info_transfer_nb_s::crit_exts_c_::crit_exts_c_(const dl_info_transfer_nb_s::c
log_invalid_choice_id(type_, "dl_info_transfer_nb_s::crit_exts_c_");
}
}
dl_info_transfer_nb_s::crit_exts_c_& dl_info_transfer_nb_s::crit_exts_c_::
operator=(const dl_info_transfer_nb_s::crit_exts_c_& other)
dl_info_transfer_nb_s::crit_exts_c_&
dl_info_transfer_nb_s::crit_exts_c_::operator=(const dl_info_transfer_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -13841,8 +13842,8 @@ rrc_conn_recfg_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_recfg_nb_s::crit_
log_invalid_choice_id(type_, "rrc_conn_recfg_nb_s::crit_exts_c_");
}
}
rrc_conn_recfg_nb_s::crit_exts_c_& rrc_conn_recfg_nb_s::crit_exts_c_::
operator=(const rrc_conn_recfg_nb_s::crit_exts_c_& other)
rrc_conn_recfg_nb_s::crit_exts_c_&
rrc_conn_recfg_nb_s::crit_exts_c_::operator=(const rrc_conn_recfg_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -14033,8 +14034,8 @@ rrc_conn_release_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_release_nb_s::c
log_invalid_choice_id(type_, "rrc_conn_release_nb_s::crit_exts_c_");
}
}
rrc_conn_release_nb_s::crit_exts_c_& rrc_conn_release_nb_s::crit_exts_c_::
operator=(const rrc_conn_release_nb_s::crit_exts_c_& other)
rrc_conn_release_nb_s::crit_exts_c_&
rrc_conn_release_nb_s::crit_exts_c_::operator=(const rrc_conn_release_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -14225,8 +14226,8 @@ rrc_conn_resume_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_resume_nb_s::cri
log_invalid_choice_id(type_, "rrc_conn_resume_nb_s::crit_exts_c_");
}
}
rrc_conn_resume_nb_s::crit_exts_c_& rrc_conn_resume_nb_s::crit_exts_c_::
operator=(const rrc_conn_resume_nb_s::crit_exts_c_& other)
rrc_conn_resume_nb_s::crit_exts_c_&
rrc_conn_resume_nb_s::crit_exts_c_::operator=(const rrc_conn_resume_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -14417,8 +14418,8 @@ ue_cap_enquiry_nb_s::crit_exts_c_::crit_exts_c_(const ue_cap_enquiry_nb_s::crit_
log_invalid_choice_id(type_, "ue_cap_enquiry_nb_s::crit_exts_c_");
}
}
ue_cap_enquiry_nb_s::crit_exts_c_& ue_cap_enquiry_nb_s::crit_exts_c_::
operator=(const ue_cap_enquiry_nb_s::crit_exts_c_& other)
ue_cap_enquiry_nb_s::crit_exts_c_&
ue_cap_enquiry_nb_s::crit_exts_c_::operator=(const ue_cap_enquiry_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -15873,8 +15874,8 @@ ho_prep_info_nb_s::crit_exts_c_::crit_exts_c_(const ho_prep_info_nb_s::crit_exts
log_invalid_choice_id(type_, "ho_prep_info_nb_s::crit_exts_c_");
}
}
ho_prep_info_nb_s::crit_exts_c_& ho_prep_info_nb_s::crit_exts_c_::
operator=(const ho_prep_info_nb_s::crit_exts_c_& other)
ho_prep_info_nb_s::crit_exts_c_&
ho_prep_info_nb_s::crit_exts_c_::operator=(const ho_prep_info_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -16419,8 +16420,8 @@ rrc_conn_recfg_complete_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_recfg_co
log_invalid_choice_id(type_, "rrc_conn_recfg_complete_nb_s::crit_exts_c_");
}
}
rrc_conn_recfg_complete_nb_s::crit_exts_c_& rrc_conn_recfg_complete_nb_s::crit_exts_c_::
operator=(const rrc_conn_recfg_complete_nb_s::crit_exts_c_& other)
rrc_conn_recfg_complete_nb_s::crit_exts_c_&
rrc_conn_recfg_complete_nb_s::crit_exts_c_::operator=(const rrc_conn_recfg_complete_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -16639,8 +16640,8 @@ rrc_conn_reest_complete_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_co
log_invalid_choice_id(type_, "rrc_conn_reest_complete_nb_s::crit_exts_c_");
}
}
rrc_conn_reest_complete_nb_s::crit_exts_c_& rrc_conn_reest_complete_nb_s::crit_exts_c_::
operator=(const rrc_conn_reest_complete_nb_s::crit_exts_c_& other)
rrc_conn_reest_complete_nb_s::crit_exts_c_&
rrc_conn_reest_complete_nb_s::crit_exts_c_::operator=(const rrc_conn_reest_complete_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -16921,8 +16922,8 @@ rrc_conn_reest_request_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_req
log_invalid_choice_id(type_, "rrc_conn_reest_request_nb_s::crit_exts_c_");
}
}
rrc_conn_reest_request_nb_s::crit_exts_c_& rrc_conn_reest_request_nb_s::crit_exts_c_::
operator=(const rrc_conn_reest_request_nb_s::crit_exts_c_& other)
rrc_conn_reest_request_nb_s::crit_exts_c_&
rrc_conn_reest_request_nb_s::crit_exts_c_::operator=(const rrc_conn_reest_request_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -17037,8 +17038,8 @@ rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_::later_c_(
log_invalid_choice_id(type_, "rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_");
}
}
rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_& rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_::
operator=(const rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_& other)
rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_& rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_::operator=(
const rrc_conn_reest_request_nb_s::crit_exts_c_::later_c_& other)
{
if (this == &other) {
return *this;
@ -17239,8 +17240,8 @@ rrc_conn_request_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_request_nb_s::c
log_invalid_choice_id(type_, "rrc_conn_request_nb_s::crit_exts_c_");
}
}
rrc_conn_request_nb_s::crit_exts_c_& rrc_conn_request_nb_s::crit_exts_c_::
operator=(const rrc_conn_request_nb_s::crit_exts_c_& other)
rrc_conn_request_nb_s::crit_exts_c_&
rrc_conn_request_nb_s::crit_exts_c_::operator=(const rrc_conn_request_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -17481,8 +17482,8 @@ rrc_conn_resume_complete_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_resume_
log_invalid_choice_id(type_, "rrc_conn_resume_complete_nb_s::crit_exts_c_");
}
}
rrc_conn_resume_complete_nb_s::crit_exts_c_& rrc_conn_resume_complete_nb_s::crit_exts_c_::
operator=(const rrc_conn_resume_complete_nb_s::crit_exts_c_& other)
rrc_conn_resume_complete_nb_s::crit_exts_c_&
rrc_conn_resume_complete_nb_s::crit_exts_c_::operator=(const rrc_conn_resume_complete_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -17653,8 +17654,8 @@ rrc_conn_resume_request_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_resume_r
log_invalid_choice_id(type_, "rrc_conn_resume_request_nb_s::crit_exts_c_");
}
}
rrc_conn_resume_request_nb_s::crit_exts_c_& rrc_conn_resume_request_nb_s::crit_exts_c_::
operator=(const rrc_conn_resume_request_nb_s::crit_exts_c_& other)
rrc_conn_resume_request_nb_s::crit_exts_c_&
rrc_conn_resume_request_nb_s::crit_exts_c_::operator=(const rrc_conn_resume_request_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -17960,8 +17961,8 @@ rrc_conn_setup_complete_nb_s::crit_exts_c_::crit_exts_c_(const rrc_conn_setup_co
log_invalid_choice_id(type_, "rrc_conn_setup_complete_nb_s::crit_exts_c_");
}
}
rrc_conn_setup_complete_nb_s::crit_exts_c_& rrc_conn_setup_complete_nb_s::crit_exts_c_::
operator=(const rrc_conn_setup_complete_nb_s::crit_exts_c_& other)
rrc_conn_setup_complete_nb_s::crit_exts_c_&
rrc_conn_setup_complete_nb_s::crit_exts_c_::operator=(const rrc_conn_setup_complete_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -18150,8 +18151,8 @@ rrc_early_data_request_nb_r15_s::crit_exts_c_::crit_exts_c_(const rrc_early_data
log_invalid_choice_id(type_, "rrc_early_data_request_nb_r15_s::crit_exts_c_");
}
}
rrc_early_data_request_nb_r15_s::crit_exts_c_& rrc_early_data_request_nb_r15_s::crit_exts_c_::
operator=(const rrc_early_data_request_nb_r15_s::crit_exts_c_& other)
rrc_early_data_request_nb_r15_s::crit_exts_c_&
rrc_early_data_request_nb_r15_s::crit_exts_c_::operator=(const rrc_early_data_request_nb_r15_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -18342,8 +18343,8 @@ sc_mtch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_::sched_perio
}
}
sc_mtch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_&
sc_mtch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_::
operator=(const sc_mtch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_& other)
sc_mtch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_::operator=(
const sc_mtch_sched_info_nb_r14_s::sched_period_start_offset_scptm_r14_c_& other)
{
if (this == &other) {
return *this;
@ -18720,8 +18721,8 @@ sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_::sc_mtch_carrier_cfg_r14_c_(
log_invalid_choice_id(type_, "sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_");
}
}
sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_& sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_::
operator=(const sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_& other)
sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_& sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_::operator=(
const sc_mtch_info_nb_r14_s::sc_mtch_carrier_cfg_r14_c_& other)
{
if (this == &other) {
return *this;
@ -19518,8 +19519,8 @@ ue_paging_coverage_info_nb_s::crit_exts_c_::crit_exts_c_(const ue_paging_coverag
log_invalid_choice_id(type_, "ue_paging_coverage_info_nb_s::crit_exts_c_");
}
}
ue_paging_coverage_info_nb_s::crit_exts_c_& ue_paging_coverage_info_nb_s::crit_exts_c_::
operator=(const ue_paging_coverage_info_nb_s::crit_exts_c_& other)
ue_paging_coverage_info_nb_s::crit_exts_c_&
ue_paging_coverage_info_nb_s::crit_exts_c_::operator=(const ue_paging_coverage_info_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -19832,8 +19833,8 @@ ue_radio_access_cap_info_nb_s::crit_exts_c_::crit_exts_c_(const ue_radio_access_
log_invalid_choice_id(type_, "ue_radio_access_cap_info_nb_s::crit_exts_c_");
}
}
ue_radio_access_cap_info_nb_s::crit_exts_c_& ue_radio_access_cap_info_nb_s::crit_exts_c_::
operator=(const ue_radio_access_cap_info_nb_s::crit_exts_c_& other)
ue_radio_access_cap_info_nb_s::crit_exts_c_&
ue_radio_access_cap_info_nb_s::crit_exts_c_::operator=(const ue_radio_access_cap_info_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -20062,8 +20063,8 @@ ue_radio_paging_info_nb_s::crit_exts_c_::crit_exts_c_(const ue_radio_paging_info
log_invalid_choice_id(type_, "ue_radio_paging_info_nb_s::crit_exts_c_");
}
}
ue_radio_paging_info_nb_s::crit_exts_c_& ue_radio_paging_info_nb_s::crit_exts_c_::
operator=(const ue_radio_paging_info_nb_s::crit_exts_c_& other)
ue_radio_paging_info_nb_s::crit_exts_c_&
ue_radio_paging_info_nb_s::crit_exts_c_::operator=(const ue_radio_paging_info_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;
@ -20625,8 +20626,8 @@ ul_info_transfer_nb_s::crit_exts_c_::crit_exts_c_(const ul_info_transfer_nb_s::c
log_invalid_choice_id(type_, "ul_info_transfer_nb_s::crit_exts_c_");
}
}
ul_info_transfer_nb_s::crit_exts_c_& ul_info_transfer_nb_s::crit_exts_c_::
operator=(const ul_info_transfer_nb_s::crit_exts_c_& other)
ul_info_transfer_nb_s::crit_exts_c_&
ul_info_transfer_nb_s::crit_exts_c_::operator=(const ul_info_transfer_nb_s::crit_exts_c_& other)
{
if (this == &other) {
return *this;

@ -19,120 +19,12 @@
*
*/
#include "srslte/asn1/rrc_nr_asn1.h"
#include "srslte/asn1/rrc_nr.h"
#include <sstream>
using namespace asn1;
using namespace asn1::rrc_nr;
/*******************************************************************************
* Logging Utilities
******************************************************************************/
void asn1::rrc_nr::log_invalid_access_choice_id(uint32_t val, uint32_t choice_id)
{
asn1::log_error("The access choice id is invalid (%d!=%d)\n", val, choice_id);
}
void asn1::rrc_nr::assert_choice_type(uint32_t val, uint32_t choice_id)
{
if (val != choice_id) {
log_invalid_access_choice_id(val, choice_id);
}
}
void asn1::rrc_nr::assert_choice_type(const std::string& access_type,
const std::string& current_type,
const std::string& choice_type)
{
if (access_type != current_type) {
asn1::log_error("Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n",
choice_type.c_str(),
access_type.c_str(),
current_type.c_str());
}
}
const char*
asn1::rrc_nr::convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type)
{
if (enum_val >= nof_types) {
if (enum_val == nof_types) {
asn1::log_error("The enum of type %s was not initialized.\n", enum_type);
} else {
asn1::log_error("The enum value=%d of type %s is not valid.\n", enum_val, enum_type);
}
return "";
}
return array[enum_val];
}
template <class ItemType>
ItemType asn1::rrc_nr::map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type)
{
if (enum_val >= nof_types) {
if (enum_val == nof_types) {
asn1::log_error("The enum of type %s is not initialized.\n", enum_type);
} else {
asn1::log_error("The enum value=%d of type %s cannot be converted to a number.\n", enum_val, enum_type);
}
return 0;
}
return array[enum_val];
}
template const uint8_t asn1::rrc_nr::map_enum_number<const uint8_t>(const uint8_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const uint16_t asn1::rrc_nr::map_enum_number<const uint16_t>(const uint16_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const uint32_t asn1::rrc_nr::map_enum_number<const uint32_t>(const uint32_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const uint64_t asn1::rrc_nr::map_enum_number<const uint64_t>(const uint64_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const int8_t asn1::rrc_nr::map_enum_number<const int8_t>(const int8_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const int16_t asn1::rrc_nr::map_enum_number<const int16_t>(const int16_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const int32_t asn1::rrc_nr::map_enum_number<const int32_t>(const int32_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const int64_t asn1::rrc_nr::map_enum_number<const int64_t>(const int64_t* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
template const float asn1::rrc_nr::map_enum_number<const float>(const float* array,
uint32_t nof_types,
uint32_t enum_val,
const char* enum_type);
void rrc_nr_asn1_warn_assert(bool cond, const char* filename, int lineno)
{
if (cond) {
asn1::log_warning("Assertion in [%s][%d] failed.\n", filename, lineno);
}
}
static void log_invalid_choice_id(uint32_t val, const char* choice_type)
{
asn1::log_error("Invalid choice id=%d for choice type %s\n", val, choice_type);
}
static void invalid_enum_number(int value, const char* name)
{
asn1::log_error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name);
}
/*******************************************************************************
* Struct Methods
******************************************************************************/

@ -19,8 +19,8 @@
*
*/
#include "srslte/asn1/rrc_nr_asn1_utils.h"
#include "srslte/asn1/rrc_nr_asn1.h"
#include "srslte/asn1/rrc_nr_utils.h"
#include "srslte/asn1/rrc_nr.h"
#include "srslte/config.h"
#include <algorithm>

@ -19,8 +19,8 @@
*
*/
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/config.h"
#include <algorithm>
#include <srslte/common/interfaces_common.h>
@ -1003,191 +1003,6 @@ sib13_t make_sib13(const asn1::rrc::sib_type13_r9_s& asn1_type)
namespace asn1 {
namespace rrc {
/***************************
* MeasConfig
**************************/
bool operator==(const cells_to_add_mod_s& lhs, const cells_to_add_mod_s& rhs)
{
return lhs.cell_idx == rhs.cell_idx and lhs.pci == rhs.pci and
lhs.cell_individual_offset == rhs.cell_individual_offset;
}
bool operator==(const meas_obj_to_add_mod_s& lhs, const meas_obj_to_add_mod_s& rhs)
{
if (lhs.meas_obj_id != rhs.meas_obj_id or lhs.meas_obj.type() != lhs.meas_obj.type()) {
return false;
}
auto &lhs_eutra = lhs.meas_obj.meas_obj_eutra(), &rhs_eutra = rhs.meas_obj.meas_obj_eutra();
if (lhs_eutra.ext or rhs_eutra.ext) {
printf("[%d] extension of measObjToAddMod not supported\n", __LINE__);
return false;
}
if (lhs_eutra.offset_freq_present != rhs_eutra.offset_freq_present or
(lhs_eutra.offset_freq_present and lhs_eutra.offset_freq != rhs_eutra.offset_freq)) {
return false;
}
if (lhs_eutra.carrier_freq != rhs_eutra.carrier_freq or not(lhs_eutra.neigh_cell_cfg == rhs_eutra.neigh_cell_cfg) or
lhs_eutra.presence_ant_port1 != rhs_eutra.presence_ant_port1 or
lhs_eutra.allowed_meas_bw != rhs_eutra.allowed_meas_bw) {
return false;
}
if (lhs_eutra.cells_to_add_mod_list.size() != rhs_eutra.cells_to_add_mod_list.size()) {
return false;
}
auto cells_are_equal = [](const cells_to_add_mod_s& lhs, const cells_to_add_mod_s& rhs) { return lhs == rhs; };
return std::equal(lhs_eutra.cells_to_add_mod_list.begin(),
lhs_eutra.cells_to_add_mod_list.end(),
rhs_eutra.cells_to_add_mod_list.begin(),
cells_are_equal);
}
bool operator==(const report_cfg_eutra_s& lhs, const report_cfg_eutra_s& rhs)
{
if (lhs.ext or rhs.ext) {
printf("[%d] extension of reportCfgToAddMod not supported\n", __LINE__);
return false;
}
if (lhs.trigger_type.type() != rhs.trigger_type.type()) {
return false;
}
if (lhs.trigger_type.type().value == report_cfg_eutra_s::trigger_type_c_::types_opts::event) {
auto &lhs_ev = lhs.trigger_type.event(), &rhs_ev = rhs.trigger_type.event();
if (lhs_ev.hysteresis != rhs_ev.hysteresis or lhs_ev.time_to_trigger != rhs_ev.time_to_trigger or
lhs_ev.event_id.type() != rhs_ev.event_id.type()) {
return false;
}
if (lhs_ev.event_id.type().value != eutra_event_s::event_id_c_::types_opts::event_a3) {
printf("[%d] event type != A3 of reportCfgToAddMod not supported\n", __LINE__);
return false;
}
if (lhs_ev.event_id.event_a3().report_on_leave != rhs_ev.event_id.event_a3().report_on_leave or
lhs_ev.event_id.event_a3().a3_offset != rhs_ev.event_id.event_a3().a3_offset) {
return false;
}
} else {
if (lhs.trigger_type.periodical().purpose != rhs.trigger_type.periodical().purpose) {
return false;
}
}
return lhs.trigger_quant == rhs.trigger_quant and lhs.report_quant == rhs.report_quant and
lhs.max_report_cells == rhs.max_report_cells and lhs.report_interv == rhs.report_interv and
lhs.report_amount == rhs.report_amount;
}
bool operator==(const report_cfg_to_add_mod_s& lhs, const report_cfg_to_add_mod_s& rhs)
{
if (lhs.report_cfg_id != rhs.report_cfg_id or lhs.report_cfg.type() != rhs.report_cfg.type()) {
return false;
}
return lhs.report_cfg.report_cfg_eutra() == rhs.report_cfg.report_cfg_eutra();
}
bool operator==(const meas_id_to_add_mod_s& lhs, const meas_id_to_add_mod_s& rhs)
{
return lhs.meas_id == rhs.meas_id and lhs.meas_obj_id == rhs.meas_obj_id and lhs.report_cfg_id == rhs.report_cfg_id;
}
bool operator==(const asn1::rrc::quant_cfg_s& lhs, const asn1::rrc::quant_cfg_s& rhs)
{
if (lhs.ext or lhs.quant_cfg_geran_present or lhs.quant_cfg_utra_present or lhs.quant_cfg_cdma2000_present or
rhs.ext or rhs.quant_cfg_geran_present or rhs.quant_cfg_utra_present or rhs.quant_cfg_cdma2000_present) {
printf("[%d] quantCfg properties not supported\n", __LINE__);
return false;
}
return lhs.quant_cfg_eutra_present == rhs.quant_cfg_eutra_present and
lhs.quant_cfg_eutra.filt_coef_rsrp_present == rhs.quant_cfg_eutra.filt_coef_rsrp_present and
lhs.quant_cfg_eutra.filt_coef_rsrp == rhs.quant_cfg_eutra.filt_coef_rsrp and
lhs.quant_cfg_eutra.filt_coef_rsrq_present == rhs.quant_cfg_eutra.filt_coef_rsrq_present and
lhs.quant_cfg_eutra.filt_coef_rsrq == rhs.quant_cfg_eutra.filt_coef_rsrq;
}
/***************************
* SRBs/DRBs
**************************/
bool operator==(const lc_ch_cfg_s& lhs, const lc_ch_cfg_s& rhs)
{
if (not(lhs.ul_specific_params_present == rhs.ul_specific_params_present and lhs.ext == rhs.ext)) {
return false;
}
if (lhs.ul_specific_params_present and
not(lhs.ul_specific_params.bucket_size_dur == rhs.ul_specific_params.bucket_size_dur and
lhs.ul_specific_params.prio == rhs.ul_specific_params.prio and
lhs.ul_specific_params.prioritised_bit_rate == rhs.ul_specific_params.prioritised_bit_rate and
lhs.ul_specific_params.lc_ch_group_present == rhs.ul_specific_params.lc_ch_group_present and
(not lhs.ul_specific_params.lc_ch_group_present or
lhs.ul_specific_params.lc_ch_group == rhs.ul_specific_params.lc_ch_group))) {
return false;
}
// TODO: do remaining comparisons
return true;
}
bool operator==(const pdcp_cfg_s& lhs, const pdcp_cfg_s& rhs)
{
if (lhs.discard_timer_present == rhs.discard_timer_present and lhs.discard_timer == rhs.discard_timer and
lhs.ext == rhs.ext) {
return true;
}
// TODO: do remaining comparisons
return false;
}
bool operator==(const rlc_cfg_c& lhs, const rlc_cfg_c& rhs)
{
// TODO: do remaining comparisons
return !(lhs.type().value != rhs.type().value);
}
bool operator==(const drb_to_add_mod_s& lhs, const drb_to_add_mod_s& rhs)
{
if (lhs.drb_id != rhs.drb_id or lhs.ext != rhs.ext) {
return false;
}
if (lhs.eps_bearer_id_present != rhs.eps_bearer_id_present or
(lhs.eps_bearer_id_present and lhs.eps_bearer_id != rhs.eps_bearer_id)) {
return false;
}
if (not(lhs.pdcp_cfg_present == rhs.pdcp_cfg_present and
(not lhs.pdcp_cfg_present or lhs.pdcp_cfg == rhs.pdcp_cfg))) {
return false;
}
if (not(lhs.rlc_cfg_present == rhs.rlc_cfg_present and (not lhs.rlc_cfg_present or lhs.rlc_cfg == rhs.rlc_cfg))) {
return false;
}
if (lhs.lc_ch_id_present != rhs.lc_ch_id_present or (lhs.lc_ch_id_present and lhs.lc_ch_id != rhs.lc_ch_id)) {
return false;
}
if (not(lhs.lc_ch_cfg_present == rhs.lc_ch_cfg_present and
(not lhs.lc_ch_cfg_present or lhs.lc_ch_cfg == rhs.lc_ch_cfg))) {
return false;
}
// TODO: compare remaining fields
return true;
}
/***************************
* SCells
**************************/
bool operator==(const scell_to_add_mod_r10_s& lhs, const scell_to_add_mod_r10_s& rhs)
{
return lhs.scell_idx_r10 == rhs.scell_idx_r10 and lhs.ext == rhs.ext and
lhs.dl_carrier_freq_v1090_present == rhs.dl_carrier_freq_v1090_present and
(not lhs.dl_carrier_freq_v1090_present or lhs.dl_carrier_freq_v1090 == rhs.dl_carrier_freq_v1090) and
lhs.rr_cfg_ded_scell_r10_present == rhs.rr_cfg_ded_scell_r10_present and
lhs.cell_identif_r10_present == rhs.cell_identif_r10_present and
(not lhs.cell_identif_r10_present or
(lhs.cell_identif_r10.dl_carrier_freq_r10 == rhs.cell_identif_r10.dl_carrier_freq_r10 and
lhs.cell_identif_r10.pci_r10 == rhs.cell_identif_r10.pci_r10));
// TODO: compare remaining fields
}
/**************************
* RRC Obj Id
*************************/

File diff suppressed because it is too large Load Diff

@ -50,16 +50,12 @@ add_executable(asn1_utils_test asn1_utils_test.cc)
target_link_libraries(asn1_utils_test asn1_utils srslte_common)
add_test(asn1_utils_test asn1_utils_test)
add_executable(rrc_asn1_test rrc_asn1_test.cc)
add_executable(rrc_asn1_test rrc_test.cc)
target_link_libraries(rrc_asn1_test rrc_asn1 asn1_utils srslte_common)
add_test(rrc_asn1_test rrc_asn1_test)
add_executable(s1ap_asn1_test s1ap_asn1_test.cc)
target_link_libraries(s1ap_asn1_test s1ap_asn1 asn1_utils srslte_common)
add_test(s1ap_asn1_test s1ap_asn1_test)
if (ENABLE_5GNR)
add_executable(ngap_asn1_test ngap_asn1_test.cc)
add_executable(ngap_asn1_test ngap_test.cc)
target_link_libraries(ngap_asn1_test ngap_nr_asn1 srslte_common)
add_test(ngap_asn1_test ngap_asn1_test)
endif(ENABLE_5GNR)

@ -19,7 +19,7 @@
*
*/
#include "srslte/asn1/ngap_nr_asn1.h"
#include "srslte/asn1/ngap.h"
#include "srslte/common/test_common.h"
using namespace asn1;

@ -22,7 +22,7 @@
#include <iostream>
#include "srslte/asn1/asn1_utils.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
using namespace std;

@ -19,7 +19,7 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/test_common.h"
#include <cstdio>
@ -90,6 +90,52 @@ int test_json_printer()
return 0;
}
int test_compare_eq()
{
// TEST1: Compare pdcp configurations
pdcp_cfg_s pdcp1, pdcp2;
pdcp1.discard_timer_present = true;
pdcp1.discard_timer = pdcp_cfg_s::discard_timer_opts::ms1500;
pdcp1.rlc_um_present = true;
pdcp1.rlc_um.pdcp_sn_size.value = pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_opts::len7bits;
TESTASSERT(pdcp1 != pdcp2);
pdcp2 = pdcp1;
TESTASSERT(pdcp1 == pdcp2);
pdcp2.rlc_um.pdcp_sn_size.value = pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_opts::len12bits;
TESTASSERT(pdcp1 != pdcp2);
pdcp2 = pdcp1;
pdcp1.hdr_compress.set_rohc().profiles.profile0x0002 = true;
TESTASSERT(pdcp1 != pdcp2);
pdcp2.hdr_compress.set_rohc().profiles.profile0x0003 = true;
TESTASSERT(pdcp1 != pdcp2);
pdcp2.hdr_compress = pdcp1.hdr_compress;
TESTASSERT(pdcp1 == pdcp2);
// TEST1: Compare drb configurations
drb_to_add_mod_s drb1, drb2;
drb1.drb_id = 1;
drb1.eps_bearer_id_present = true;
drb1.eps_bearer_id = 5;
TESTASSERT(drb1 != drb2);
drb2 = drb1;
TESTASSERT(drb1 == drb2);
drb1.pdcp_cfg = pdcp1;
TESTASSERT(drb1 == drb2); // pdcp_cfg not yet flagged as present
drb1.pdcp_cfg_present = true;
TESTASSERT(drb1 != drb2);
drb2 = drb1;
drb1.rlc_cfg_present = true;
drb1.rlc_cfg.set_am().dl_am_rlc.t_reordering.value = t_reordering_opts::ms15;
drb1.lc_ch_id_present = true;
drb1.lc_ch_id = 3;
TESTASSERT(drb1 != drb2);
drb1 = drb2;
TESTASSERT(drb1 == drb2);
return SRSLTE_SUCCESS;
}
int test_mib_msg()
{
uint8_t rrc_msg[] = {0x94, 0x64, 0xC0};
@ -595,6 +641,25 @@ int test_rrc_conn_reconf_r15_2()
return SRSASN_SUCCESS;
}
int test_rrc_conn_reconf_v2()
{
uint8_t rrc_msg[] = {0x20, 0x16, 0x00, 0x82, 0x00, 0x4A, 0x27, 0x50, 0x89, 0x30, 0x3C, 0x02, 0x07, 0x42, 0x02, 0x3E,
0x06, 0x00, 0x02, 0xF8, 0x39, 0x00, 0x07, 0x00, 0x1D, 0x52, 0x36, 0xC1, 0x01, 0x07, 0x07, 0x06,
0x73, 0x72, 0x73, 0x61, 0x70, 0x6E, 0x05, 0x01, 0xAC, 0x10, 0x00, 0x02, 0x27, 0x08, 0x80, 0x00,
0x0D, 0x04, 0x08, 0x08, 0x08, 0x08, 0x50, 0x0B, 0xF6, 0x02, 0xF8, 0x39, 0x00, 0x01, 0x1A, 0x26,
0xB1, 0x8F, 0x01, 0x13, 0x02, 0xF8, 0x39, 0x00, 0x01, 0x23, 0x05, 0xF4, 0x26, 0xB1, 0x8F, 0x01,
0x62, 0x7C, 0x1F, 0x50, 0x29, 0x8E, 0x90, 0xF1, 0xCC, 0x82, 0xA2, 0x60, 0x00, 0x12, 0xA0, 0x00};
// 20160082004A275089303C020742023E060002F8390007001D5236C10107070673727361706E0501AC100002270880000D0408080808500BF602F83900011A26B18F011302F83900012305F426B18F01627C1F50298E90F1CC82A2600012A000
cbit_ref bref(rrc_msg, sizeof(rrc_msg));
dl_dcch_msg_s recfg_msg;
TESTASSERT(recfg_msg.unpack(bref) == SRSASN_SUCCESS);
TESTASSERT(test_pack_unpack_consistency(recfg_msg) == SRSASN_SUCCESS);
return SRSASN_SUCCESS;
}
int test_rrc_conn_reconf_r15_3()
{
uint8_t rrc_msg[] = {
@ -651,6 +716,7 @@ int main()
TESTASSERT(test_generic() == 0);
TESTASSERT(test_json_printer() == 0);
TESTASSERT(test_compare_eq() == 0);
TESTASSERT(test_mib_msg() == 0);
TESTASSERT(test_bcch_dl_sch_msg() == 0);
TESTASSERT(test_bcch_dl_sch_msg2() == 0);
@ -661,6 +727,7 @@ int main()
TESTASSERT(unrecognized_ext_group_test() == 0);
TESTASSERT(v2x_test() == 0);
TESTASSERT(test_rrc_conn_reconf_r15_2() == 0);
TESTASSERT(test_rrc_conn_reconf_v2() == 0);
TESTASSERT(test_rrc_conn_reconf_r15_3() == 0);
printf("Success\n");
return 0;

@ -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;
}

@ -19,13 +19,229 @@
*
*/
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/common/log_filter.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/test_common.h"
#include <assert.h>
#include <string.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 test_enb_status_transfer()
{
s1ap_pdu_c pdu;
TESTASSERT(pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ENB_STATUS_TRANSFER));
auto& enb_status_transfer = pdu.init_msg().value.enb_status_transfer().protocol_ies;
enb_status_transfer.mme_ue_s1ap_id.value.value = 1;
enb_status_transfer.enb_ue_s1ap_id.value.value = 1;
enb_status_transfer.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list.resize(1);
auto& bearer =
enb_status_transfer.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list[0];
TESTASSERT(bearer.load_info_obj(ASN1_S1AP_ID_BEARERS_SUBJECT_TO_STATUS_TRANSFER_ITEM));
auto& bearer_item = bearer.value.bearers_subject_to_status_transfer_item();
bearer_item.erab_id = 5;
bearer_item.dl_coun_tvalue.pdcp_sn = 5;
bearer_item.dl_coun_tvalue.hfn = 0;
bearer_item.ul_coun_tvalue.pdcp_sn = 4;
bearer_item.ul_coun_tvalue.hfn = 0;
uint8_t buffer[2048];
asn1::bit_ref bref{buffer, sizeof(buffer)};
TESTASSERT(pdu.pack(bref) == SRSASN_SUCCESS);
srslte::logmap::get("ASN1")->info_hex(
buffer, bref.distance_bytes(), "eNB Status Transfer (%d bytes)", (int)bref.distance_bytes());
asn1::cbit_ref bref2{buffer, sizeof(buffer)};
s1ap_pdu_c pdu2;
TESTASSERT(pdu2.unpack(bref2) == SRSASN_SUCCESS);
auto& bearer2 =
pdu2.init_msg()
.value.enb_status_transfer()
.protocol_ies.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list[0];
auto& bearer_item2 = bearer2.value.bearers_subject_to_status_transfer_item();
TESTASSERT(bearer_item2.dl_coun_tvalue.hfn == bearer_item.dl_coun_tvalue.hfn);
TESTASSERT(bearer_item2.dl_coun_tvalue.hfn == 0);
TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS);
return SRSLTE_SUCCESS;
}
int unpack_test_served_gummeis_with_multiple_plmns()
{
@ -49,7 +265,6 @@ int test_load_info_obj()
container.erab_failed_to_setup_list_ctxt_su_res.value[0].load_info_obj(ASN1_S1AP_ID_ERAB_ITEM);
TESTASSERT(container.erab_failed_to_setup_list_ctxt_su_res.value[0].id == ASN1_S1AP_ID_ERAB_ITEM);
TESTASSERT(container.erab_failed_to_setup_list_ctxt_su_res.value[0].crit.value == s1ap::crit_opts::reject);
return SRSLTE_SUCCESS;
}
@ -131,13 +346,40 @@ int test_eci_pack()
return SRSLTE_SUCCESS;
}
int test_paging()
{
uint8_t buffer[] = {0x00, 0x0a, 0x40, 0x2a, 0x00, 0x00, 0x04, 0x00, 0x50, 0x40, 0x02, 0xb4, 0xc0, 0x00, 0x2b, 0x40,
0x09, 0x68, 0x54, 0x02, 0x04, 0x30, 0x68, 0x74, 0x05, 0xf7, 0x00, 0x6d, 0x40, 0x01, 0x00, 0x00,
0x2e, 0x40, 0x0b, 0x00, 0x00, 0x2f, 0x40, 0x06, 0x00, 0x54, 0xf2, 0x40, 0x04, 0xd2};
// 000A402A00000400504002B4C0002B40096854020430687405F7006D400100002E400B00002F40060054F24004D2
asn1::cbit_ref bref(buffer, sizeof(buffer));
asn1::s1ap::s1ap_pdu_c input_pdu;
TESTASSERT(input_pdu.unpack(bref) == SRSASN_SUCCESS);
TESTASSERT(asn1::test_pack_unpack_consistency(input_pdu) == SRSASN_SUCCESS);
return SRSLTE_SUCCESS;
}
int main()
{
srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG);
srslte::logmap::set_default_hex_limit(1024);
srslte::logmap::set_default_hex_limit(4096);
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);
TESTASSERT(test_enb_status_transfer() == 0);
TESTASSERT(unpack_test_served_gummeis_with_multiple_plmns() == 0);
TESTASSERT(test_load_info_obj() == 0);
TESTASSERT(test_initial_ctxt_setup_response() == 0);
TESTASSERT(test_eci_pack() == 0);
TESTASSERT(test_paging() == 0);
TESTASSERT(unpack_test_served_gummeis_with_multiple_plmns() == SRSLTE_SUCCESS);
TESTASSERT(test_initial_ctxt_setup_response() == SRSLTE_SUCCESS);
TESTASSERT(test_eci_pack() == SRSLTE_SUCCESS);
printf("Success\n");
return 0;
}

@ -19,7 +19,7 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/log_filter.h"
#include <iostream>

@ -19,7 +19,7 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/log_filter.h"
#include <iostream>

@ -19,8 +19,8 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/log_filter.h"
#include "srslte/interfaces/rrc_interface_types.h"

@ -19,8 +19,8 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/log_filter.h"
#include "srslte/interfaces/rrc_interface_types.h"

@ -20,7 +20,7 @@
*/
#include "../../../srsue/hdr/stack/rrc/rrc.h" // for rrc_args_t
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/log_filter.h"
#include "srslte/common/mac_pcap.h"

@ -22,8 +22,8 @@
#ifndef SRSENB_PHY_INTERFACES_H_
#define SRSENB_PHY_INTERFACES_H_
#include "srslte/asn1/rrc.h"
#include <inttypes.h>
#include <srslte/asn1/rrc_asn1.h>
#include <srslte/common/interfaces_common.h>
#include <srslte/phy/channel/channel.h>
#include <vector>

@ -23,7 +23,7 @@
#define SRSLTE_RRC_CONFIG_H
#include "rrc_config_common.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/security.h"
#include "srslte/interfaces/enb_rrc_interface_types.h"
#include <array>

@ -25,7 +25,7 @@
#include "rrc_config_common.h"
#include "rrc_metrics.h"
#include "srsenb/hdr/stack/enb_stack_base.h"
#include "srslte/asn1/rrc_nr_asn1.h"
#include "srslte/asn1/rrc_nr.h"
#include "srslte/common/block_queue.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"

@ -43,7 +43,7 @@
#ifndef SRSENB_UE_RR_CFG_H
#define SRSENB_UE_RR_CFG_H
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/logmap.h"
#include "srslte/interfaces/rrc_interface_types.h"

@ -22,7 +22,7 @@
#include "enb_cfg_parser.h"
#include "srsenb/hdr/cfg_parser.h"
#include "srsenb/hdr/enb.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/multiqueue.h"
#include "srslte/phy/common/phy_common.h"
#include "srslte/srslte.h"

@ -20,7 +20,7 @@
*/
#include "srsenb/hdr/phy/txrx.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/log.h"
#include "srslte/common/threads.h"
#include "srslte/phy/channel/channel.h"

@ -20,7 +20,7 @@
*/
#include "srsenb/hdr/stack/rrc/mac_controller.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/interfaces/sched_interface.h"
namespace srsenb {

@ -23,7 +23,7 @@
#include "srsenb/hdr/stack/rrc/rrc_cell_cfg.h"
#include "srsenb/hdr/stack/rrc/rrc_mobility.h"
#include "srslte/asn1/asn1_utils.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/int_helpers.h"
#include "srslte/interfaces/sched_interface.h"

@ -21,7 +21,7 @@
#include "srsenb/hdr/stack/rrc/rrc_bearer_cfg.h"
#include "srsenb/hdr/stack/upper/common_enb.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/rrc/rrc_cfg_utils.h"
namespace srsenb {

@ -23,7 +23,7 @@
#include "srsenb/hdr/stack/rrc/mac_controller.h"
#include "srsenb/hdr/stack/rrc/rrc_cell_cfg.h"
#include "srsenb/hdr/stack/rrc/ue_rr_cfg.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/common.h"
#include "srslte/common/int_helpers.h"

@ -21,7 +21,7 @@
#include "srsenb/hdr/stack/rrc/rrc_nr.h"
#include "srsenb/hdr/stack/upper/common_enb.h"
#include "srslte/asn1/rrc_nr_asn1_utils.h"
#include "srslte/asn1/rrc_nr_utils.h"
#include "srslte/interfaces/nr_common_interface_types.h"
using namespace asn1::rrc_nr;

@ -23,7 +23,7 @@
#include "srsenb/hdr/stack/rrc/mac_controller.h"
#include "srsenb/hdr/stack/rrc/rrc_mobility.h"
#include "srsenb/hdr/stack/rrc/ue_rr_cfg.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/int_helpers.h"
using namespace asn1::rrc;

@ -23,7 +23,7 @@
#include "srsenb/hdr/stack/rrc/rrc_bearer_cfg.h"
#include "srsenb/hdr/stack/rrc/rrc_cell_cfg.h"
#include "srsenb/hdr/stack/rrc/rrc_config.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/rrc/rrc_cfg_utils.h"
#define SET_OPT_FIELD(fieldname, out, in) \

@ -21,7 +21,7 @@
#include "srsenb/hdr/enb.h"
#include "srsenb/src/enb_cfg_parser.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/test_common.h"
#include "test_helpers.h"
#include <iostream>

@ -20,8 +20,8 @@
*/
#include "srsenb/hdr/stack/upper/common_enb.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/interfaces/rrc_interface_types.h"
#include <arpa/inet.h> //for inet_ntop()

@ -23,7 +23,7 @@
#include "srsenb/hdr/stack/rrc/rrc_mobility.h"
#include "srsenb/src/enb_cfg_parser.h"
#include "srsenb/test/common/dummy_classes.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/test_common.h"
#include "test_helpers.h"
#include <iostream>

@ -30,7 +30,7 @@
#include "srsepc/hdr/hss/hss.h"
#include "srslte/asn1/gtpc.h"
#include "srslte/asn1/liblte_mme.h"
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/common/s1ap_pcap.h"

@ -24,7 +24,7 @@
#include "srslte/asn1/gtpc_ies.h"
#include "srslte/asn1/liblte_mme.h"
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/security.h"
#include <netinet/sctp.h>
#include <string.h>

@ -23,7 +23,7 @@
#include "mme_gtpc.h"
#include "s1ap_common.h"
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/common.h"
#include "srslte/common/log_filter.h"

@ -22,7 +22,7 @@
#define SRSEPC_S1AP_MNGMT_PROC_H
#include "s1ap_common.h"
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/common.h"
#include "srslte/common/log_filter.h"

@ -25,7 +25,7 @@
#include "s1ap_common.h"
#include "srsepc/hdr/hss/hss.h"
#include "srslte/asn1/gtpc.h"
#include "srslte/asn1/s1ap_asn1.h"
#include "srslte/asn1/s1ap.h"
#include "srslte/common/buffer_pool.h"
namespace srsepc {

@ -25,8 +25,7 @@
#include "rrc_cell.h"
#include "rrc_common.h"
#include "rrc_metrics.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/block_queue.h"
#include "srslte/common/buffer_pool.h"

@ -22,8 +22,8 @@
#ifndef SRSLTE_RRC_CELL_H
#define SRSLTE_RRC_CELL_H
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/interfaces/ue_interfaces.h"
namespace srsue {

@ -21,8 +21,8 @@
#ifndef SRSLTE_RRC_MEAS_H_
#define SRSLTE_RRC_MEAS_H_
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/interfaces/ue_interfaces.h"

@ -22,7 +22,7 @@
#ifndef SRSUE_RRC_NR_H
#define SRSUE_RRC_NR_H
#include "srslte/asn1/rrc_nr_asn1.h"
#include "srslte/asn1/rrc_nr.h"
#include "srslte/common/block_queue.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/interfaces/nr_common_interface_types.h"

@ -20,7 +20,7 @@
*/
#include "srsue/hdr/stack/rrc/rrc.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/bcd_helpers.h"
#include "srslte/common/security.h"
#include "srsue/hdr/stack/rrc/phy_controller.h"

@ -20,7 +20,7 @@
*/
#include "srsue/hdr/stack/rrc/rrc_meas.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srsue/hdr/stack/rrc/rrc.h"
/************************************************************************

@ -19,8 +19,8 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/log_filter.h"
#include "srslte/common/mac_pcap.h"
#include "srslte/common/test_common.h"

@ -22,7 +22,7 @@
#ifndef SRSUE_TTCN3_SYS_INTERFACE_H
#define SRSUE_TTCN3_SYS_INTERFACE_H
#include "srslte/asn1/rrc_asn1_utils.h"
#include "srslte/asn1/rrc_utils.h"
#include "srslte/common/buffer_pool.h"
#include "ttcn3_helpers.h"
#include "ttcn3_interfaces.h"

@ -19,7 +19,7 @@
*
*/
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/buffer_pool.h"
#include "srslte/common/log_filter.h"
#include "srslte/common/test_common.h"

@ -20,7 +20,7 @@
*/
#include "srslte/asn1/liblte_mme.h"
#include "srslte/asn1/rrc_asn1.h"
#include "srslte/asn1/rrc.h"
#include "srslte/common/log_filter.h"
#include <iostream>
#include <srslte/srslte.h>

Loading…
Cancel
Save