From e79fc9bf0853ecf696f63b7c94318e0255626c9e Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 4 May 2020 20:11:39 +0100 Subject: [PATCH] fixed generation of ie containers of one single ie object --- lib/include/srslte/asn1/s1ap_asn1.h | 1167 +++++++------------ lib/src/asn1/asn1_utils.cc | 2 +- lib/src/asn1/s1ap_asn1.cc | 1655 ++++----------------------- lib/test/asn1/s1ap_asn1_test.cc | 61 + 4 files changed, 683 insertions(+), 2202 deletions(-) diff --git a/lib/include/srslte/asn1/s1ap_asn1.h b/lib/include/srslte/asn1/s1ap_asn1.h index c315113ba..5df735d72 100644 --- a/lib/include/srslte/asn1/s1ap_asn1.h +++ b/lib/include/srslte/asn1/s1ap_asn1.h @@ -477,7 +477,7 @@ struct private_ie_field_s { // PrivateIE-Container{S1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE (SIZE (1..65535)) OF PrivateIE-Field template -using private_ie_container_l = dyn_array >; +using private_ie_container_l = dyn_seq_of, 1, 65535, true>; // ProtocolExtensionField{S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-EXTENSION}} template @@ -495,7 +495,7 @@ struct protocol_ext_field_s { // ProtocolExtensionContainer{S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE (SIZE (1..65535)) OF // ProtocolExtensionField template -using protocol_ext_container_l = dyn_array >; +using protocol_ext_container_l = dyn_seq_of, 1, 65535, true>; // ProtocolIE-Field{S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-IES}} template @@ -512,7 +512,7 @@ struct protocol_ie_field_s { // ProtocolIE-Container{S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE (SIZE (0..65535)) OF ProtocolIE-Field template -using protocol_ie_container_l = dyn_array >; +using protocol_ie_container_l = dyn_seq_of, 0, 65535, true>; // ProtocolIE-SingleContainer{S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-IES}} template @@ -527,11 +527,6 @@ struct protocol_ie_single_container_s { bool load_info_obj(const uint32_t& id_); }; -// ProtocolIE-ContainerList{INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE -// (SIZE (lowerBound..upperBound)) OF ProtocolIE-SingleContainer -template -using protocol_ie_container_list_l = dyn_array >; - // ProtocolIE-FieldPair{S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-IES-PAIR}} template struct protocol_ie_field_pair_s { @@ -549,12 +544,7 @@ struct protocol_ie_field_pair_s { // ProtocolIE-ContainerPair{S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE (SIZE (0..65535)) OF ProtocolIE-FieldPair template -using protocol_ie_container_pair_l = dyn_array >; - -// ProtocolIE-ContainerPairList{INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= -// SEQUENCE (SIZE (lowerBound..upperBound)) OF ProtocolIE-ContainerPair -template -using protocol_ie_container_pair_list_l = dyn_array >; +using protocol_ie_container_pair_l = dyn_seq_of, 0, 65535, true>; // ActivatedCellsList-Item ::= SEQUENCE struct activ_cells_list_item_s { @@ -3009,7 +2999,7 @@ using protocol_ie_single_container_item_s = protocol_ie_single_container_s -using erab_ie_container_list_l = dyn_array >; +using erab_ie_container_list_l = dyn_seq_of, 1, 256, true>; // E-RABDataForwardingItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct erab_data_forwarding_item_ies_o { @@ -3061,33 +3051,6 @@ struct cdma2000_rat_type_opts { }; typedef enumerated cdma2000_rat_type_e; -template -struct erab_ie_container_list_item_s { - uint32_t id = 0; - crit_e crit; - valueT_ value; - - // sequence methods - erab_ie_container_list_item_s(uint32_t id_, crit_e crit_); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -struct erab_data_forwarding_item_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_data_forwarding_item; - - // sequence methods - erab_data_forwarding_item_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // DownlinkS1cdma2000tunnellingIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES struct dl_s1cdma2000tunnelling_ies_o { // Value ::= OPEN TYPE @@ -3118,22 +3081,22 @@ struct dl_s1cdma2000tunnelling_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(); - erab_data_forwarding_item_ies_container& erab_subjectto_data_forwarding_list(); - cdma2000_ho_status_e& cdma2000_ho_status(); - cdma2000_rat_type_e& cdma2000_rat_type(); - unbounded_octstring& cdma2000_pdu(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_data_forwarding_item_ies_container& erab_subjectto_data_forwarding_list() const; - const cdma2000_ho_status_e& cdma2000_ho_status() const; - const cdma2000_rat_type_e& cdma2000_rat_type() const; - const unbounded_octstring& cdma2000_pdu() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_ie_container_list_l& erab_subjectto_data_forwarding_list(); + cdma2000_ho_status_e& cdma2000_ho_status(); + cdma2000_rat_type_e& cdma2000_rat_type(); + unbounded_octstring& cdma2000_pdu(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_ie_container_list_l& erab_subjectto_data_forwarding_list() const; + const cdma2000_ho_status_e& cdma2000_ho_status() const; + const cdma2000_rat_type_e& cdma2000_rat_type() const; + const unbounded_octstring& cdma2000_pdu() const; private: - types type_; - choice_buffer_t > c; + types type_; + choice_buffer_t, unbounded_octstring > c; void destroy_(); }; @@ -3155,10 +3118,10 @@ struct dl_s1cdma2000tunnelling_ies_container { bool cdma2000_ho_status_present = false; ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; - ie_field_s erab_subjectto_data_forwarding_list; - ie_field_s cdma2000_ho_status; - ie_field_s cdma2000_rat_type; - ie_field_s > cdma2000_pdu; + ie_field_s > erab_subjectto_data_forwarding_list; + ie_field_s cdma2000_ho_status; + ie_field_s cdma2000_rat_type; + ie_field_s > cdma2000_pdu; // sequence methods dl_s1cdma2000tunnelling_ies_container(); @@ -3261,7 +3224,8 @@ using protocol_ie_container_pair_item_l = protocol_ie_container_pair_l -using erab_ie_container_pair_list_l = dyn_array >; +using erab_ie_container_pair_list_l = + dyn_seq_of, 0, 65535, true>, 1, 256>; // E-RABAdmittedItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_admitted_item_ext_ies_o; @@ -3324,20 +3288,6 @@ struct erab_admitted_item_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct erab_admitted_item_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_admitted_item; - - // sequence methods - erab_admitted_item_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // E-RABFailedToResumeItemResumeReq-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_failed_to_resume_item_resume_req_ext_ies_o; @@ -3442,34 +3392,6 @@ struct erab_failed_to_resume_item_resume_res_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct erab_failed_to_resume_item_resume_req_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_failed_to_resume_item_resume_req; - - // sequence methods - erab_failed_to_resume_item_resume_req_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -struct erab_failed_to_resume_item_resume_res_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_failed_to_resume_item_resume_res; - - // sequence methods - erab_failed_to_resume_item_resume_res_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // E-RABFailedToSetupItemHOReqAckExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_failed_to_setup_item_ho_req_ack_ext_ies_o; @@ -3522,20 +3444,6 @@ struct erab_failedto_setup_item_ho_req_ack_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct erab_failedto_setup_item_ho_req_ack_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_failedto_setup_item_ho_req_ack; - - // sequence methods - erab_failedto_setup_item_ho_req_ack_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // DL-Forwarding ::= ENUMERATED struct dl_forwarding_opts { enum options { dl_forwarding_proposed, /*...*/ nulltype } value; @@ -3968,34 +3876,6 @@ struct erab_to_be_modified_item_bearer_mod_ind_ies_o { // Tunnel-Information-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o tunnel_info_ext_ies_o; -struct erab_not_to_be_modified_item_bearer_mod_ind_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_not_to_be_modified_item_bearer_mod_ind; - - // sequence methods - erab_not_to_be_modified_item_bearer_mod_ind_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -struct erab_to_be_modified_item_bearer_mod_ind_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_to_be_modified_item_bearer_mod_ind; - - // sequence methods - erab_to_be_modified_item_bearer_mod_ind_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - typedef protocol_ext_container_empty_l tunnel_info_ext_ies_container; // TunnelInformation ::= SEQUENCE @@ -4044,16 +3924,18 @@ struct erab_mod_ind_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(); - erab_to_be_modified_item_bearer_mod_ind_ies_container& erab_to_be_modified_list_bearer_mod_ind(); - erab_not_to_be_modified_item_bearer_mod_ind_ies_container& erab_not_to_be_modified_list_bearer_mod_ind(); - csg_membership_info_s& csg_membership_info(); - tunnel_info_s& tunnel_info_for_bbf(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_to_be_modified_item_bearer_mod_ind_ies_container& erab_to_be_modified_list_bearer_mod_ind() const; - const erab_not_to_be_modified_item_bearer_mod_ind_ies_container& + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_ie_container_list_l& erab_to_be_modified_list_bearer_mod_ind(); + erab_ie_container_list_l& + erab_not_to_be_modified_list_bearer_mod_ind(); + csg_membership_info_s& csg_membership_info(); + tunnel_info_s& tunnel_info_for_bbf(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_ie_container_list_l& + erab_to_be_modified_list_bearer_mod_ind() const; + const erab_ie_container_list_l& erab_not_to_be_modified_list_bearer_mod_ind() const; const csg_membership_info_s& csg_membership_info() const; const tunnel_info_s& tunnel_info_for_bbf() const; @@ -4061,8 +3943,8 @@ struct erab_mod_ind_ies_o { private: types type_; choice_buffer_t, + erab_ie_container_list_l, tunnel_info_s> c; @@ -4085,12 +3967,14 @@ struct erab_mod_ind_ies_container { bool erab_not_to_be_modified_list_bearer_mod_ind_present = false; bool csg_membership_info_present = false; bool tunnel_info_for_bbf_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s erab_to_be_modified_list_bearer_mod_ind; - ie_field_s erab_not_to_be_modified_list_bearer_mod_ind; - ie_field_s csg_membership_info; - ie_field_s tunnel_info_for_bbf; + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s > + erab_to_be_modified_list_bearer_mod_ind; + ie_field_s > + erab_not_to_be_modified_list_bearer_mod_ind; + ie_field_s csg_membership_info; + ie_field_s tunnel_info_for_bbf; // sequence methods erab_mod_ind_ies_container(); @@ -4212,29 +4096,14 @@ struct erab_to_be_modify_item_bearer_mod_req_ext_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct erab_to_be_modify_item_bearer_mod_req_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool transport_info_present = false; - ie_field_s transport_info; - - // sequence methods - erab_to_be_modify_item_bearer_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; -}; - // E-RABToBeModifiedItemBearerModReq ::= SEQUENCE struct erab_to_be_modified_item_bearer_mod_req_s { - bool ext = false; - bool ie_exts_present = false; - uint8_t erab_id = 0; - erab_level_qos_params_s erab_level_qos_params; - unbounded_octstring nas_pdu; - erab_to_be_modify_item_bearer_mod_req_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + uint8_t erab_id = 0; + erab_level_qos_params_s erab_level_qos_params; + unbounded_octstring nas_pdu; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -5451,20 +5320,6 @@ struct erab_to_be_setup_item_ho_req_ies_o { using erab_to_be_setup_list_ctxt_su_req_l = dyn_array >; -struct erab_to_be_setup_item_ho_req_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_to_be_setup_item_ho_req; - - // sequence methods - erab_to_be_setup_item_ho_req_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // E-RABToBeSwitchedDLItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_to_be_switched_dl_item_ext_ies_o; @@ -5518,20 +5373,6 @@ struct erab_to_be_switched_dl_item_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct erab_to_be_switched_dl_item_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_to_be_switched_dl_item; - - // sequence methods - erab_to_be_switched_dl_item_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // E-RABToBeSwitchedULItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION typedef s1ap_protocol_ext_empty_o erab_to_be_switched_ul_item_ext_ies_o; @@ -5585,20 +5426,6 @@ struct erab_to_be_switched_ul_item_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct erab_to_be_switched_ul_item_ies_container { - template - using ie_field_s = erab_ie_container_list_item_s; - - // member variables - ie_field_s erab_to_be_switched_ul_item; - - // sequence methods - erab_to_be_switched_ul_item_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // ECGI-List ::= SEQUENCE (SIZE (1..256)) OF EUTRAN-CGI using ecgi_list_l = dyn_array; @@ -5916,28 +5743,13 @@ private: rlf_report_info_s c; }; -struct time_synchronisation_info_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool muting_availability_ind_present = false; - ie_field_s muting_availability_ind; - - // sequence methods - time_synchronisation_info_ext_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // TimeSynchronisationInfo ::= SEQUENCE struct time_synchronisation_info_s { - bool ext = false; - bool ie_exts_present = false; - uint8_t stratum_level = 0; - synchronisation_status_e synchronisation_status; - time_synchronisation_info_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + uint8_t stratum_level = 0; + synchronisation_status_e synchronisation_status; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -6225,28 +6037,13 @@ struct global_enb_id_s { void to_json(json_writer& j) const; }; -struct son_info_reply_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool time_synchronisation_info_present = false; - ie_field_s time_synchronisation_info; - - // sequence methods - son_info_reply_ext_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // SONInformationReply ::= SEQUENCE struct son_info_reply_s { - bool ext = false; - bool x2_tnl_cfg_info_present = false; - bool ie_exts_present = false; - x2_tnl_cfg_info_s x2_tnl_cfg_info; - son_info_reply_ext_ies_container ie_exts; + bool ext = false; + bool x2_tnl_cfg_info_present = false; + bool ie_exts_present = false; + x2_tnl_cfg_info_s x2_tnl_cfg_info; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -6506,25 +6303,10 @@ struct enb_cfg_transfer_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct enb_cfg_transfer_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - bool son_cfg_transfer_ect_present = false; - ie_field_s son_cfg_transfer_ect; - - // sequence methods - enb_cfg_transfer_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // ENBConfigurationTransfer ::= SEQUENCE struct enb_cfg_transfer_s { - bool ext = false; - enb_cfg_transfer_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -6573,28 +6355,13 @@ struct supported_tas_item_ext_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct supported_tas_item_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool rat_type_present = false; - ie_field_s rat_type; - - // sequence methods - supported_tas_item_ext_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // SupportedTAs-Item ::= SEQUENCE struct supported_tas_item_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<2, true> tac; - bplmns_l broadcast_plmns; - supported_tas_item_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<2, true> tac; + bplmns_l broadcast_plmns; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -6748,25 +6515,10 @@ struct enb_cfg_upd_ack_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct enb_cfg_upd_ack_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - bool crit_diagnostics_present = false; - ie_field_s crit_diagnostics; - - // sequence methods - enb_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; -}; - // ENBConfigurationUpdateAcknowledge ::= SEQUENCE struct enb_cfg_upd_ack_s { - bool ext = false; - enb_cfg_upd_ack_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -7072,24 +6824,10 @@ struct enb_direct_info_transfer_ies_o { static presence_e get_presence(const uint32_t& id); }; -struct enb_direct_info_transfer_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - ie_field_s inter_sys_info_transfer_type_edt; - - // sequence methods - enb_direct_info_transfer_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // ENBDirectInformationTransfer ::= SEQUENCE struct enb_direct_info_transfer_s { - bool ext = false; - enb_direct_info_transfer_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -7637,29 +7375,29 @@ struct ho_cmd_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(); - handov_type_e& handov_type(); - unbounded_octstring& nas_security_paramsfrom_e_utran(); - erab_data_forwarding_item_ies_container& erab_subjectto_data_forwarding_list(); - erab_list_l& erab_to_release_list_ho_cmd(); - unbounded_octstring& target_to_source_transparent_container(); - unbounded_octstring& target_to_source_transparent_container_secondary(); - crit_diagnostics_s& crit_diagnostics(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const handov_type_e& handov_type() const; - const unbounded_octstring& nas_security_paramsfrom_e_utran() const; - const erab_data_forwarding_item_ies_container& erab_subjectto_data_forwarding_list() const; - const erab_list_l& erab_to_release_list_ho_cmd() const; - const unbounded_octstring& target_to_source_transparent_container() const; - const unbounded_octstring& target_to_source_transparent_container_secondary() const; - const crit_diagnostics_s& crit_diagnostics() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + handov_type_e& handov_type(); + unbounded_octstring& nas_security_paramsfrom_e_utran(); + erab_ie_container_list_l& erab_subjectto_data_forwarding_list(); + erab_list_l& erab_to_release_list_ho_cmd(); + unbounded_octstring& target_to_source_transparent_container(); + unbounded_octstring& target_to_source_transparent_container_secondary(); + crit_diagnostics_s& crit_diagnostics(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const handov_type_e& handov_type() const; + const unbounded_octstring& nas_security_paramsfrom_e_utran() const; + const erab_ie_container_list_l& erab_subjectto_data_forwarding_list() const; + const erab_list_l& erab_to_release_list_ho_cmd() const; + const unbounded_octstring& target_to_source_transparent_container() const; + const unbounded_octstring& target_to_source_transparent_container_secondary() const; + const crit_diagnostics_s& crit_diagnostics() const; private: types type_; choice_buffer_t, erab_list_l, unbounded_octstring > c; @@ -7685,11 +7423,11 @@ struct ho_cmd_ies_container { bool erab_to_release_list_ho_cmd_present = false; bool target_to_source_transparent_container_secondary_present = false; bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s handov_type; - ie_field_s > nas_security_paramsfrom_e_utran; - ie_field_s erab_subjectto_data_forwarding_list; + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s handov_type; + ie_field_s > nas_security_paramsfrom_e_utran; + ie_field_s > erab_subjectto_data_forwarding_list; ie_field_s, 1, 256, true> > erab_to_release_list_ho_cmd; ie_field_s > target_to_source_transparent_container; ie_field_s > target_to_source_transparent_container_secondary; @@ -8583,29 +8321,14 @@ private: void destroy_(); }; -struct mdt_cfg_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool sig_based_mdtplmn_list_present = false; - ie_field_s, 1, 16, true> > sig_based_mdtplmn_list; - - // sequence methods - mdt_cfg_ext_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MDT-Configuration ::= SEQUENCE struct mdt_cfg_s { - bool ext = false; - bool ie_exts_present = false; - mdt_activation_e mdt_activation; - area_scope_of_mdt_c area_scope_of_mdt; - mdt_mode_c mdt_mode; - mdt_cfg_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + mdt_activation_e mdt_activation; + area_scope_of_mdt_c area_scope_of_mdt; + mdt_mode_c mdt_mode; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -8776,30 +8499,15 @@ struct management_based_mdt_allowed_opts { }; typedef enumerated management_based_mdt_allowed_e; -struct pro_se_authorized_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool pro_se_ueto_network_relaying_present = false; - ie_field_s pro_se_ueto_network_relaying; - - // sequence methods - pro_se_authorized_ext_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // ProSeAuthorized ::= SEQUENCE struct pro_se_authorized_s { - bool ext = false; - bool pro_se_direct_discovery_present = false; - bool pro_se_direct_communication_present = false; - bool ie_exts_present = false; - pro_se_direct_discovery_e pro_se_direct_discovery; - pro_se_direct_communication_e pro_se_direct_communication; - pro_se_authorized_ext_ies_container ie_exts; + bool ext = false; + bool pro_se_direct_discovery_present = false; + bool pro_se_direct_communication_present = false; + bool ie_exts_present = false; + pro_se_direct_discovery_e pro_se_direct_discovery; + pro_se_direct_communication_e pro_se_direct_communication; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -8842,30 +8550,15 @@ struct security_context_s { void to_json(json_writer& j) const; }; -struct trace_activation_ext_ies_container { - template - using ie_field_s = protocol_ext_container_item_s; - - // member variables - bool mdt_cfg_present = false; - ie_field_s mdt_cfg; - - // sequence methods - trace_activation_ext_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // TraceActivation ::= SEQUENCE struct trace_activation_s { - bool ext = false; - bool ie_exts_present = false; - fixed_octstring<8, true> e_utran_trace_id; - fixed_bitstring<8, false, true> interfaces_to_trace; - trace_depth_e trace_depth; - bounded_bitstring<1, 160, true, true> trace_collection_entity_ip_address; - trace_activation_ext_ies_container ie_exts; + bool ext = false; + bool ie_exts_present = false; + fixed_octstring<8, true> e_utran_trace_id; + fixed_bitstring<8, false, true> interfaces_to_trace; + trace_depth_e trace_depth; + bounded_bitstring<1, 160, true, true> trace_collection_entity_ip_address; + protocol_ext_container_l ie_exts; // ... // sequence methods @@ -8986,67 +8679,67 @@ struct ho_request_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint64_t& mme_ue_s1ap_id(); - handov_type_e& handov_type(); - cause_c& cause(); - ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); - erab_to_be_setup_item_ho_req_ies_container& erab_to_be_setup_list_ho_req(); - unbounded_octstring& source_to_target_transparent_container(); - ue_security_cap_s& ue_security_cap(); - ho_restrict_list_s& ho_restrict_list(); - trace_activation_s& trace_activation(); - request_type_s& request_type(); - srvcc_operation_possible_e& srvcc_operation_possible(); - security_context_s& security_context(); - unbounded_octstring& nas_security_paramsto_e_utran(); - fixed_bitstring<27, false, true>& csg_id(); - csg_membership_status_e& csg_membership_status(); - gummei_s& gummei_id(); - uint64_t& mme_ue_s1ap_id_minus2(); - management_based_mdt_allowed_e& management_based_mdt_allowed(); - mdtplmn_list_l& management_based_mdtplmn_list(); - fixed_bitstring<64, false, true>& masked_imeisv(); - expected_ue_behaviour_s& expected_ue_behaviour(); - pro_se_authorized_s& pro_se_authorized(); - ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind(); - v2xservices_authorized_s& v2xservices_authorized(); - ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); - enhanced_coverage_restricted_e& enhanced_coverage_restricted(); - ce_mode_brestricted_e& ce_mode_brestricted(); - pending_data_ind_e& pending_data_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const handov_type_e& handov_type() const; - const cause_c& cause() const; - const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; - const erab_to_be_setup_item_ho_req_ies_container& erab_to_be_setup_list_ho_req() const; - const unbounded_octstring& source_to_target_transparent_container() const; - const ue_security_cap_s& ue_security_cap() const; - const ho_restrict_list_s& ho_restrict_list() const; - const trace_activation_s& trace_activation() const; - const request_type_s& request_type() const; - const srvcc_operation_possible_e& srvcc_operation_possible() const; - const security_context_s& security_context() const; - const unbounded_octstring& nas_security_paramsto_e_utran() const; - const fixed_bitstring<27, false, true>& csg_id() const; - const csg_membership_status_e& csg_membership_status() const; - const gummei_s& gummei_id() const; - const uint64_t& mme_ue_s1ap_id_minus2() const; - const management_based_mdt_allowed_e& management_based_mdt_allowed() const; - const mdtplmn_list_l& management_based_mdtplmn_list() const; - const fixed_bitstring<64, false, true>& masked_imeisv() const; - const expected_ue_behaviour_s& expected_ue_behaviour() const; - const pro_se_authorized_s& pro_se_authorized() const; - const ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind() const; - const v2xservices_authorized_s& v2xservices_authorized() const; - const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; - const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; - const ce_mode_brestricted_e& ce_mode_brestricted() const; - const pending_data_ind_e& pending_data_ind() const; + uint64_t& mme_ue_s1ap_id(); + handov_type_e& handov_type(); + cause_c& cause(); + ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); + erab_ie_container_list_l& erab_to_be_setup_list_ho_req(); + unbounded_octstring& source_to_target_transparent_container(); + ue_security_cap_s& ue_security_cap(); + ho_restrict_list_s& ho_restrict_list(); + trace_activation_s& trace_activation(); + request_type_s& request_type(); + srvcc_operation_possible_e& srvcc_operation_possible(); + security_context_s& security_context(); + unbounded_octstring& nas_security_paramsto_e_utran(); + fixed_bitstring<27, false, true>& csg_id(); + csg_membership_status_e& csg_membership_status(); + gummei_s& gummei_id(); + uint64_t& mme_ue_s1ap_id_minus2(); + management_based_mdt_allowed_e& management_based_mdt_allowed(); + mdtplmn_list_l& management_based_mdtplmn_list(); + fixed_bitstring<64, false, true>& masked_imeisv(); + expected_ue_behaviour_s& expected_ue_behaviour(); + pro_se_authorized_s& pro_se_authorized(); + ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind(); + v2xservices_authorized_s& v2xservices_authorized(); + ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); + enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + ce_mode_brestricted_e& ce_mode_brestricted(); + pending_data_ind_e& pending_data_ind(); + const uint64_t& mme_ue_s1ap_id() const; + const handov_type_e& handov_type() const; + const cause_c& cause() const; + const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; + const erab_ie_container_list_l& erab_to_be_setup_list_ho_req() const; + const unbounded_octstring& source_to_target_transparent_container() const; + const ue_security_cap_s& ue_security_cap() const; + const ho_restrict_list_s& ho_restrict_list() const; + const trace_activation_s& trace_activation() const; + const request_type_s& request_type() const; + const srvcc_operation_possible_e& srvcc_operation_possible() const; + const security_context_s& security_context() const; + const unbounded_octstring& nas_security_paramsto_e_utran() const; + const fixed_bitstring<27, false, true>& csg_id() const; + const csg_membership_status_e& csg_membership_status() const; + const gummei_s& gummei_id() const; + const uint64_t& mme_ue_s1ap_id_minus2() const; + const management_based_mdt_allowed_e& management_based_mdt_allowed() const; + const mdtplmn_list_l& management_based_mdtplmn_list() const; + const fixed_bitstring<64, false, true>& masked_imeisv() const; + const expected_ue_behaviour_s& expected_ue_behaviour() const; + const pro_se_authorized_s& pro_se_authorized() const; + const ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind() const; + const v2xservices_authorized_s& v2xservices_authorized() const; + const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; + const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const ce_mode_brestricted_e& ce_mode_brestricted() const; + const pending_data_ind_e& pending_data_ind() const; private: types type_; choice_buffer_t, expected_ue_behaviour_s, fixed_bitstring<64, false, true>, gummei_s, @@ -9079,54 +8772,54 @@ struct ho_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_restrict_list_present = false; - bool trace_activation_present = false; - bool request_type_present = false; - bool srvcc_operation_possible_present = false; - bool nas_security_paramsto_e_utran_present = false; - bool csg_id_present = false; - bool csg_membership_status_present = false; - bool gummei_id_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool management_based_mdt_allowed_present = false; - bool management_based_mdtplmn_list_present = false; - bool masked_imeisv_present = false; - bool expected_ue_behaviour_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool ce_mode_brestricted_present = false; - bool pending_data_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s handov_type; - ie_field_s cause; - ie_field_s ueaggregate_maximum_bitrate; - ie_field_s erab_to_be_setup_list_ho_req; - ie_field_s > source_to_target_transparent_container; - ie_field_s ue_security_cap; - ie_field_s ho_restrict_list; - ie_field_s trace_activation; - ie_field_s request_type; - ie_field_s srvcc_operation_possible; - ie_field_s security_context; - ie_field_s > nas_security_paramsto_e_utran; - ie_field_s > csg_id; - ie_field_s csg_membership_status; - ie_field_s gummei_id; - ie_field_s > mme_ue_s1ap_id_minus2; - ie_field_s management_based_mdt_allowed; - ie_field_s, 1, 16, true> > management_based_mdtplmn_list; - ie_field_s > masked_imeisv; - ie_field_s expected_ue_behaviour; - ie_field_s pro_se_authorized; - ie_field_s ueuser_plane_cio_tsupport_ind; - ie_field_s v2xservices_authorized; - ie_field_s ue_sidelink_aggregate_maximum_bitrate; - ie_field_s enhanced_coverage_restricted; - ie_field_s ce_mode_brestricted; - ie_field_s pending_data_ind; + bool ho_restrict_list_present = false; + bool trace_activation_present = false; + bool request_type_present = false; + bool srvcc_operation_possible_present = false; + bool nas_security_paramsto_e_utran_present = false; + bool csg_id_present = false; + bool csg_membership_status_present = false; + bool gummei_id_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool management_based_mdt_allowed_present = false; + bool management_based_mdtplmn_list_present = false; + bool masked_imeisv_present = false; + bool expected_ue_behaviour_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool ce_mode_brestricted_present = false; + bool pending_data_ind_present = false; + ie_field_s > mme_ue_s1ap_id; + ie_field_s handov_type; + ie_field_s cause; + ie_field_s ueaggregate_maximum_bitrate; + ie_field_s > erab_to_be_setup_list_ho_req; + ie_field_s > source_to_target_transparent_container; + ie_field_s ue_security_cap; + ie_field_s ho_restrict_list; + ie_field_s trace_activation; + ie_field_s request_type; + ie_field_s srvcc_operation_possible; + ie_field_s security_context; + ie_field_s > nas_security_paramsto_e_utran; + ie_field_s > csg_id; + ie_field_s csg_membership_status; + ie_field_s gummei_id; + ie_field_s > mme_ue_s1ap_id_minus2; + ie_field_s management_based_mdt_allowed; + ie_field_s, 1, 16, true> > management_based_mdtplmn_list; + ie_field_s > masked_imeisv; + ie_field_s expected_ue_behaviour; + ie_field_s pro_se_authorized; + ie_field_s ueuser_plane_cio_tsupport_ind; + ie_field_s v2xservices_authorized; + ie_field_s ue_sidelink_aggregate_maximum_bitrate; + ie_field_s enhanced_coverage_restricted; + ie_field_s ce_mode_brestricted; + ie_field_s pending_data_ind; // sequence methods ho_request_ies_container(); @@ -9188,30 +8881,31 @@ struct ho_request_ack_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(); - erab_admitted_item_ies_container& erab_admitted_list(); - erab_failedto_setup_item_ho_req_ack_ies_container& erab_failed_to_setup_list_ho_req_ack(); - unbounded_octstring& target_to_source_transparent_container(); - fixed_bitstring<27, false, true>& csg_id(); - crit_diagnostics_s& crit_diagnostics(); - cell_access_mode_e& cell_access_mode(); - ce_mode_b_support_ind_e& ce_mode_b_support_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_admitted_item_ies_container& erab_admitted_list() const; - const erab_failedto_setup_item_ho_req_ack_ies_container& erab_failed_to_setup_list_ho_req_ack() const; - const unbounded_octstring& target_to_source_transparent_container() const; - const fixed_bitstring<27, false, true>& csg_id() const; - const crit_diagnostics_s& crit_diagnostics() const; - const cell_access_mode_e& cell_access_mode() const; - const ce_mode_b_support_ind_e& ce_mode_b_support_ind() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_ie_container_list_l& erab_admitted_list(); + erab_ie_container_list_l& erab_failed_to_setup_list_ho_req_ack(); + unbounded_octstring& target_to_source_transparent_container(); + fixed_bitstring<27, false, true>& csg_id(); + crit_diagnostics_s& crit_diagnostics(); + cell_access_mode_e& cell_access_mode(); + ce_mode_b_support_ind_e& ce_mode_b_support_ind(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_ie_container_list_l& erab_admitted_list() const; + const erab_ie_container_list_l& + erab_failed_to_setup_list_ho_req_ack() const; + const unbounded_octstring& target_to_source_transparent_container() const; + const fixed_bitstring<27, false, true>& csg_id() const; + const crit_diagnostics_s& crit_diagnostics() const; + const cell_access_mode_e& cell_access_mode() const; + const ce_mode_b_support_ind_e& ce_mode_b_support_ind() const; private: types type_; choice_buffer_t, + erab_ie_container_list_l, fixed_bitstring<27, false, true>, unbounded_octstring > c; @@ -9232,20 +8926,20 @@ struct ho_request_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_failed_to_setup_list_ho_req_ack_present = false; - bool csg_id_present = false; - bool crit_diagnostics_present = false; - bool cell_access_mode_present = false; - bool ce_mode_b_support_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s erab_admitted_list; - ie_field_s erab_failed_to_setup_list_ho_req_ack; - ie_field_s > target_to_source_transparent_container; - ie_field_s > csg_id; - ie_field_s crit_diagnostics; - ie_field_s cell_access_mode; - ie_field_s ce_mode_b_support_ind; + bool erab_failed_to_setup_list_ho_req_ack_present = false; + bool csg_id_present = false; + bool crit_diagnostics_present = false; + bool cell_access_mode_present = false; + bool ce_mode_b_support_ind_present = false; + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s > erab_admitted_list; + ie_field_s > erab_failed_to_setup_list_ho_req_ack; + ie_field_s > target_to_source_transparent_container; + ie_field_s > csg_id; + ie_field_s crit_diagnostics; + ie_field_s cell_access_mode; + ie_field_s ce_mode_b_support_ind; // sequence methods ho_request_ack_ies_container(); @@ -11891,44 +11585,44 @@ struct path_switch_request_ack_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(); - ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); - erab_to_be_switched_ul_item_ies_container& erab_to_be_switched_ul_list(); - erab_list_l& erab_to_be_released_list(); - security_context_s& security_context(); - crit_diagnostics_s& crit_diagnostics(); - uint64_t& mme_ue_s1ap_id_minus2(); - csg_membership_status_e& csg_membership_status(); - pro_se_authorized_s& pro_se_authorized(); - ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind(); - v2xservices_authorized_s& v2xservices_authorized(); - ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); - enhanced_coverage_restricted_e& enhanced_coverage_restricted(); - ce_mode_brestricted_e& ce_mode_brestricted(); - pending_data_ind_e& pending_data_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; - const erab_to_be_switched_ul_item_ies_container& erab_to_be_switched_ul_list() const; - const erab_list_l& erab_to_be_released_list() const; - const security_context_s& security_context() const; - const crit_diagnostics_s& crit_diagnostics() const; - const uint64_t& mme_ue_s1ap_id_minus2() const; - const csg_membership_status_e& csg_membership_status() const; - const pro_se_authorized_s& pro_se_authorized() const; - const ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind() const; - const v2xservices_authorized_s& v2xservices_authorized() const; - const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; - const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; - const ce_mode_brestricted_e& ce_mode_brestricted() const; - const pending_data_ind_e& pending_data_ind() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate(); + erab_ie_container_list_l& erab_to_be_switched_ul_list(); + erab_list_l& erab_to_be_released_list(); + security_context_s& security_context(); + crit_diagnostics_s& crit_diagnostics(); + uint64_t& mme_ue_s1ap_id_minus2(); + csg_membership_status_e& csg_membership_status(); + pro_se_authorized_s& pro_se_authorized(); + ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind(); + v2xservices_authorized_s& v2xservices_authorized(); + ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate(); + enhanced_coverage_restricted_e& enhanced_coverage_restricted(); + ce_mode_brestricted_e& ce_mode_brestricted(); + pending_data_ind_e& pending_data_ind(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const ue_aggregate_maximum_bitrate_s& ueaggregate_maximum_bitrate() const; + const erab_ie_container_list_l& erab_to_be_switched_ul_list() const; + const erab_list_l& erab_to_be_released_list() const; + const security_context_s& security_context() const; + const crit_diagnostics_s& crit_diagnostics() const; + const uint64_t& mme_ue_s1ap_id_minus2() const; + const csg_membership_status_e& csg_membership_status() const; + const pro_se_authorized_s& pro_se_authorized() const; + const ueuser_plane_cio_tsupport_ind_e& ueuser_plane_cio_tsupport_ind() const; + const v2xservices_authorized_s& v2xservices_authorized() const; + const ue_sidelink_aggregate_maximum_bitrate_s& ue_sidelink_aggregate_maximum_bitrate() const; + const enhanced_coverage_restricted_e& enhanced_coverage_restricted() const; + const ce_mode_brestricted_e& ce_mode_brestricted() const; + const pending_data_ind_e& pending_data_ind() const; private: types type_; choice_buffer_t, erab_list_l, - erab_to_be_switched_ul_item_ies_container, pro_se_authorized_s, security_context_s, ue_aggregate_maximum_bitrate_s, @@ -12030,36 +11724,36 @@ struct path_switch_request_ies_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - uint32_t& enb_ue_s1ap_id(); - erab_to_be_switched_dl_item_ies_container& erab_to_be_switched_dl_list(); - uint64_t& source_mme_ue_s1ap_id(); - eutran_cgi_s& eutran_cgi(); - tai_s& tai(); - ue_security_cap_s& ue_security_cap(); - fixed_bitstring<27, false, true>& csg_id(); - cell_access_mode_e& cell_access_mode(); - gummei_s& source_mme_gummei(); - csg_membership_status_e& csg_membership_status(); - tunnel_info_s& tunnel_info_for_bbf(); - unbounded_octstring& lhn_id(); - rrc_establishment_cause_e& rrc_resume_cause(); - const uint32_t& enb_ue_s1ap_id() const; - const erab_to_be_switched_dl_item_ies_container& erab_to_be_switched_dl_list() const; - const uint64_t& source_mme_ue_s1ap_id() const; - const eutran_cgi_s& eutran_cgi() const; - const tai_s& tai() const; - const ue_security_cap_s& ue_security_cap() const; - const fixed_bitstring<27, false, true>& csg_id() const; - const cell_access_mode_e& cell_access_mode() const; - 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& lhn_id() const; - const rrc_establishment_cause_e& rrc_resume_cause() const; + uint32_t& enb_ue_s1ap_id(); + erab_ie_container_list_l& erab_to_be_switched_dl_list(); + uint64_t& source_mme_ue_s1ap_id(); + eutran_cgi_s& eutran_cgi(); + tai_s& tai(); + ue_security_cap_s& ue_security_cap(); + fixed_bitstring<27, false, true>& csg_id(); + cell_access_mode_e& cell_access_mode(); + gummei_s& source_mme_gummei(); + csg_membership_status_e& csg_membership_status(); + tunnel_info_s& tunnel_info_for_bbf(); + unbounded_octstring& 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_list() const; + const uint64_t& source_mme_ue_s1ap_id() const; + const eutran_cgi_s& eutran_cgi() const; + const tai_s& tai() const; + const ue_security_cap_s& ue_security_cap() const; + const fixed_bitstring<27, false, true>& csg_id() const; + const cell_access_mode_e& cell_access_mode() const; + 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& lhn_id() const; + const rrc_establishment_cause_e& rrc_resume_cause() const; private: types type_; - choice_buffer_t, eutran_cgi_s, fixed_bitstring<27, false, true>, gummei_s, @@ -13070,18 +12764,19 @@ struct ue_context_resume_request_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(); - erab_failed_to_resume_item_resume_req_ies_container& erab_failed_to_resume_list_resume_req(); - rrc_establishment_cause_e& rrc_resume_cause(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_failed_to_resume_item_resume_req_ies_container& erab_failed_to_resume_list_resume_req() const; - const rrc_establishment_cause_e& rrc_resume_cause() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_ie_container_list_l& erab_failed_to_resume_list_resume_req(); + rrc_establishment_cause_e& rrc_resume_cause(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_ie_container_list_l& + erab_failed_to_resume_list_resume_req() const; + const rrc_establishment_cause_e& rrc_resume_cause() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t > c; void destroy_(); }; @@ -13124,22 +12819,26 @@ struct ue_context_resume_resp_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(); - erab_failed_to_resume_item_resume_res_ies_container& erab_failed_to_resume_list_resume_res(); - crit_diagnostics_s& crit_diagnostics(); - security_context_s& security_context(); - pending_data_ind_e& pending_data_ind(); - const uint64_t& mme_ue_s1ap_id() const; - const uint32_t& enb_ue_s1ap_id() const; - const erab_failed_to_resume_item_resume_res_ies_container& erab_failed_to_resume_list_resume_res() const; - const crit_diagnostics_s& crit_diagnostics() const; - const security_context_s& security_context() const; - const pending_data_ind_e& pending_data_ind() const; + uint64_t& mme_ue_s1ap_id(); + uint32_t& enb_ue_s1ap_id(); + erab_ie_container_list_l& erab_failed_to_resume_list_resume_res(); + crit_diagnostics_s& crit_diagnostics(); + security_context_s& security_context(); + pending_data_ind_e& pending_data_ind(); + const uint64_t& mme_ue_s1ap_id() const; + const uint32_t& enb_ue_s1ap_id() const; + const erab_ie_container_list_l& + erab_failed_to_resume_list_resume_res() const; + const crit_diagnostics_s& crit_diagnostics() const; + const security_context_s& security_context() const; + const pending_data_ind_e& pending_data_ind() const; private: - types type_; - choice_buffer_t c; + types type_; + choice_buffer_t, + security_context_s> + c; void destroy_(); }; @@ -13906,25 +13605,10 @@ struct mmecp_relocation_ind_s { void to_json(json_writer& j) const; }; -struct mme_cfg_transfer_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - bool son_cfg_transfer_mct_present = false; - ie_field_s son_cfg_transfer_mct; - - // sequence methods - mme_cfg_transfer_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MMEConfigurationTransfer ::= SEQUENCE struct mme_cfg_transfer_s { - bool ext = false; - mme_cfg_transfer_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -13966,25 +13650,10 @@ struct mme_cfg_upd_s { void to_json(json_writer& j) const; }; -struct mme_cfg_upd_ack_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - bool crit_diagnostics_present = false; - ie_field_s crit_diagnostics; - - // sequence methods - mme_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; -}; - // MMEConfigurationUpdateAcknowledge ::= SEQUENCE struct mme_cfg_upd_ack_s { - bool ext = false; - mme_cfg_upd_ack_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -14023,24 +13692,10 @@ struct mme_cfg_upd_fail_s { void to_json(json_writer& j) const; }; -struct mme_direct_info_transfer_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - ie_field_s inter_sys_info_transfer_type_mdt; - - // sequence methods - mme_direct_info_transfer_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MMEDirectInformationTransfer ::= SEQUENCE struct mme_direct_info_transfer_s { - bool ext = false; - mme_direct_info_transfer_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -14163,25 +13818,10 @@ struct overload_start_s { void to_json(json_writer& j) const; }; -struct overload_stop_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - bool gummei_list_present = false; - ie_field_s > gummei_list; - - // sequence methods - overload_stop_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // OverloadStop ::= SEQUENCE struct overload_stop_s { - bool ext = false; - overload_stop_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -14303,26 +13943,26 @@ struct path_switch_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool csg_id_present = false; - bool cell_access_mode_present = false; - bool source_mme_gummei_present = false; - bool csg_membership_status_present = false; - bool tunnel_info_for_bbf_present = false; - bool lhn_id_present = false; - bool rrc_resume_cause_present = false; - ie_field_s > enb_ue_s1ap_id; - ie_field_s erab_to_be_switched_dl_list; - ie_field_s > source_mme_ue_s1ap_id; - ie_field_s eutran_cgi; - ie_field_s tai; - ie_field_s ue_security_cap; - ie_field_s > csg_id; - ie_field_s cell_access_mode; - ie_field_s source_mme_gummei; - ie_field_s csg_membership_status; - ie_field_s tunnel_info_for_bbf; - ie_field_s > lhn_id; - ie_field_s rrc_resume_cause; + bool csg_id_present = false; + bool cell_access_mode_present = false; + bool source_mme_gummei_present = false; + bool csg_membership_status_present = false; + bool tunnel_info_for_bbf_present = false; + bool lhn_id_present = false; + bool rrc_resume_cause_present = false; + ie_field_s > enb_ue_s1ap_id; + ie_field_s > erab_to_be_switched_dl_list; + ie_field_s > source_mme_ue_s1ap_id; + ie_field_s eutran_cgi; + ie_field_s tai; + ie_field_s ue_security_cap; + ie_field_s > csg_id; + ie_field_s cell_access_mode; + ie_field_s source_mme_gummei; + ie_field_s csg_membership_status; + ie_field_s tunnel_info_for_bbf; + ie_field_s > lhn_id; + ie_field_s rrc_resume_cause; // sequence methods path_switch_request_ies_container(); @@ -14364,7 +14004,7 @@ struct path_switch_request_ack_ies_container { ie_field_s > mme_ue_s1ap_id; ie_field_s > enb_ue_s1ap_id; ie_field_s ueaggregate_maximum_bitrate; - ie_field_s erab_to_be_switched_ul_list; + ie_field_s > erab_to_be_switched_ul_list; ie_field_s, 1, 256, true> > erab_to_be_released_list; ie_field_s security_context; ie_field_s crit_diagnostics; @@ -14554,24 +14194,10 @@ struct reset_ack_s { void to_json(json_writer& j) const; }; -struct retrieve_ue_info_ies_container { - template - using ie_field_s = protocol_ie_container_item_s; - - // member variables - ie_field_s s_tmsi; - - // sequence methods - retrieve_ue_info_ies_container(); - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // RetrieveUEInformation ::= SEQUENCE struct retrieve_ue_info_s { - bool ext = false; - retrieve_ue_info_ies_container protocol_ies; + bool ext = false; + protocol_ie_container_l protocol_ies; // ... // sequence methods @@ -15069,12 +14695,13 @@ struct ue_context_resume_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_failed_to_resume_list_resume_req_present = false; - bool rrc_resume_cause_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s erab_failed_to_resume_list_resume_req; - ie_field_s rrc_resume_cause; + bool erab_failed_to_resume_list_resume_req_present = false; + bool rrc_resume_cause_present = false; + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s > + erab_failed_to_resume_list_resume_req; + ie_field_s rrc_resume_cause; // sequence methods ue_context_resume_request_ies_container(); @@ -15100,16 +14727,17 @@ struct ue_context_resume_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_failed_to_resume_list_resume_res_present = false; - bool crit_diagnostics_present = false; - bool security_context_present = false; - bool pending_data_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s erab_failed_to_resume_list_resume_res; - ie_field_s crit_diagnostics; - ie_field_s security_context; - ie_field_s pending_data_ind; + bool erab_failed_to_resume_list_resume_res_present = false; + bool crit_diagnostics_present = false; + bool security_context_present = false; + bool pending_data_ind_present = false; + ie_field_s > mme_ue_s1ap_id; + ie_field_s > enb_ue_s1ap_id; + ie_field_s > + erab_failed_to_resume_list_resume_res; + ie_field_s crit_diagnostics; + ie_field_s security_context; + ie_field_s pending_data_ind; // sequence methods ue_context_resume_resp_ies_container(); @@ -16149,7 +15777,8 @@ using multi_cell_load_report_resp_l = dyn_array -using protocol_error_ie_container_list_l = dyn_array >; +using protocol_error_ie_container_list_l = + dyn_seq_of, 1, 256, true>; // ReportingCellList-Item ::= SEQUENCE struct report_cell_list_item_s { diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index f3fe6ed2e..38ab5290c 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -1173,7 +1173,7 @@ SRSASN_CODE unpack_bitfield(uint8_t* buf, cbit_ref& bref, uint32_t n, uint32_t l void from_number(uint8_t* ptr, uint64_t number, uint32_t nbits) { - if (nbits > 64) { + if (nbits > 64u) { log_error("bitstring of size=%d does not fit in an uint64_t\n", nbits); return; } diff --git a/lib/src/asn1/s1ap_asn1.cc b/lib/src/asn1/s1ap_asn1.cc index b86d42070..f886f8ef5 100644 --- a/lib/src/asn1/s1ap_asn1.cc +++ b/lib/src/asn1/s1ap_asn1.cc @@ -6891,90 +6891,6 @@ uint8_t cdma2000_rat_type_opts::to_number() const return 0; } -template -erab_ie_container_list_item_s::erab_ie_container_list_item_s(uint32_t id_, crit_e crit_) : id(id_), crit(crit_) - -{ -} -template -SRSASN_CODE erab_ie_container_list_item_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, id, (uint32_t)0u, (uint32_t)65535u, false, true)); - HANDLE_CODE(crit.pack(bref)); - { - varlength_field_pack_guard varlen_scope(bref, true); - HANDLE_CODE(value.pack(bref)); - } - return SRSASN_SUCCESS; -} -template -SRSASN_CODE erab_ie_container_list_item_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(id, bref, (uint32_t)0u, (uint32_t)65535u, false, true)); - HANDLE_CODE(crit.unpack(bref)); - { - varlength_field_unpack_guard varlen_scope(bref, true); - HANDLE_CODE(value.unpack(bref)); - } - return SRSASN_SUCCESS; -} -template -void erab_ie_container_list_item_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("id", id); - j.write_str("criticality", crit.to_string()); - j.end_obj(); -} - -erab_data_forwarding_item_ies_container::erab_data_forwarding_item_ies_container() : - erab_data_forwarding_item(14, crit_e::ignore) -{ -} -SRSASN_CODE erab_data_forwarding_item_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_data_forwarding_item.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_data_forwarding_item_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 14) { - nof_mandatory_ies--; - erab_data_forwarding_item.id = c.id; - erab_data_forwarding_item.crit = c.crit; - erab_data_forwarding_item.value = c.value.erab_data_forwarding_item(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_data_forwarding_item_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_data_forwarding_item.to_json(j); - j.end_obj(); -} - // DownlinkS1cdma2000tunnellingIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t dl_s1cdma2000tunnelling_ies_o::idx_to_id(uint32_t idx) { @@ -7070,10 +6986,11 @@ uint32_t& dl_s1cdma2000tunnelling_ies_o::value_c::enb_ue_s1ap_id() assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -erab_data_forwarding_item_ies_container& dl_s1cdma2000tunnelling_ies_o::value_c::erab_subjectto_data_forwarding_list() +erab_ie_container_list_l& +dl_s1cdma2000tunnelling_ies_o::value_c::erab_subjectto_data_forwarding_list() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } cdma2000_ho_status_e& dl_s1cdma2000tunnelling_ies_o::value_c::cdma2000_ho_status() { @@ -7100,11 +7017,11 @@ const uint32_t& dl_s1cdma2000tunnelling_ies_o::value_c::enb_ue_s1ap_id() const assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const erab_data_forwarding_item_ies_container& +const erab_ie_container_list_l& dl_s1cdma2000tunnelling_ies_o::value_c::erab_subjectto_data_forwarding_list() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } const cdma2000_ho_status_e& dl_s1cdma2000tunnelling_ies_o::value_c::cdma2000_ho_status() const { @@ -7125,7 +7042,7 @@ void dl_s1cdma2000tunnelling_ies_o::value_c::destroy_() { switch (type_) { case types::erab_subjectto_data_forwarding_list: - c.destroy(); + c.destroy >(); break; case types::cdma2000_pdu: c.destroy >(); @@ -7144,7 +7061,7 @@ void dl_s1cdma2000tunnelling_ies_o::value_c::set(types::options e) case types::enb_ue_s1ap_id: break; case types::erab_subjectto_data_forwarding_list: - c.init(); + c.init >(); break; case types::cdma2000_ho_status: break; @@ -7170,7 +7087,7 @@ dl_s1cdma2000tunnelling_ies_o::value_c::value_c(const dl_s1cdma2000tunnelling_ie c.init(other.c.get()); break; case types::erab_subjectto_data_forwarding_list: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::cdma2000_ho_status: c.init(other.c.get()); @@ -7202,7 +7119,7 @@ dl_s1cdma2000tunnelling_ies_o::value_c& dl_s1cdma2000tunnelling_ies_o::value_c:: c.set(other.c.get()); break; case types::erab_subjectto_data_forwarding_list: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::cdma2000_ho_status: c.set(other.c.get()); @@ -7232,8 +7149,7 @@ void dl_s1cdma2000tunnelling_ies_o::value_c::to_json(json_writer& j) const j.write_int("INTEGER (0..16777215)", c.get()); break; case types::erab_subjectto_data_forwarding_list: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}"); break; case types::cdma2000_ho_status: j.write_str("Cdma2000HOStatus", c.get().to_string()); @@ -7260,7 +7176,8 @@ SRSASN_CODE dl_s1cdma2000tunnelling_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_subjectto_data_forwarding_list: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get >(), 1, 256, true)); break; case types::cdma2000_ho_status: HANDLE_CODE(c.get().pack(bref)); @@ -7288,7 +7205,8 @@ SRSASN_CODE dl_s1cdma2000tunnelling_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_subjectto_data_forwarding_list: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE( + unpack_dyn_seq_of(c.get >(), bref, 1, 256, true)); break; case types::cdma2000_ho_status: HANDLE_CODE(c.get().unpack(bref)); @@ -7308,8 +7226,12 @@ SRSASN_CODE dl_s1cdma2000tunnelling_ies_o::value_c::unpack(cbit_ref& bref) std::string dl_s1cdma2000tunnelling_ies_o::value_c::types_opts::to_string() const { - static const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "Cdma2000HOStatus", "Cdma2000RATType", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}", + "Cdma2000HOStatus", + "Cdma2000RATType", + "OCTET STRING"}; return convert_enum_idx(options, 6, value, "dl_s1cdma2000tunnelling_ies_o::value_c::types"); } @@ -7965,51 +7887,6 @@ std::string erab_admitted_item_ies_o::value_c::types_opts::to_string() const return convert_enum_idx(options, 1, value, "erab_admitted_item_ies_o::value_c::types"); } -erab_admitted_item_ies_container::erab_admitted_item_ies_container() : erab_admitted_item(20, crit_e::ignore) {} -SRSASN_CODE erab_admitted_item_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_admitted_item.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_admitted_item_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 20) { - nof_mandatory_ies--; - erab_admitted_item.id = c.id; - erab_admitted_item.crit = c.crit; - erab_admitted_item.value = c.value.erab_admitted_item(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_admitted_item_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_admitted_item.to_json(j); - j.end_obj(); -} - // E-RABFailedToResumeItemResumeReq ::= SEQUENCE SRSASN_CODE erab_failed_to_resume_item_resume_req_s::pack(bit_ref& bref) const { @@ -8216,102 +8093,6 @@ std::string erab_failed_to_resume_item_resume_res_ies_o::value_c::types_opts::to return convert_enum_idx(options, 1, value, "erab_failed_to_resume_item_resume_res_ies_o::value_c::types"); } -erab_failed_to_resume_item_resume_req_ies_container::erab_failed_to_resume_item_resume_req_ies_container() : - erab_failed_to_resume_item_resume_req(236, crit_e::reject) -{ -} -SRSASN_CODE erab_failed_to_resume_item_resume_req_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_failed_to_resume_item_resume_req.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_failed_to_resume_item_resume_req_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 236) { - nof_mandatory_ies--; - erab_failed_to_resume_item_resume_req.id = c.id; - erab_failed_to_resume_item_resume_req.crit = c.crit; - erab_failed_to_resume_item_resume_req.value = c.value.erab_failed_to_resume_item_resume_req(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_failed_to_resume_item_resume_req_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_failed_to_resume_item_resume_req.to_json(j); - j.end_obj(); -} - -erab_failed_to_resume_item_resume_res_ies_container::erab_failed_to_resume_item_resume_res_ies_container() : - erab_failed_to_resume_item_resume_res(238, crit_e::reject) -{ -} -SRSASN_CODE erab_failed_to_resume_item_resume_res_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_failed_to_resume_item_resume_res.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_failed_to_resume_item_resume_res_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 238) { - nof_mandatory_ies--; - erab_failed_to_resume_item_resume_res.id = c.id; - erab_failed_to_resume_item_resume_res.crit = c.crit; - erab_failed_to_resume_item_resume_res.value = c.value.erab_failed_to_resume_item_resume_res(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_failed_to_resume_item_resume_res_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_failed_to_resume_item_resume_res.to_json(j); - j.end_obj(); -} - // E-RABFailedToSetupItemHOReqAck ::= SEQUENCE SRSASN_CODE erab_failed_to_setup_item_ho_req_ack_s::pack(bit_ref& bref) const { @@ -8415,54 +8196,6 @@ std::string erab_failedto_setup_item_ho_req_ack_ies_o::value_c::types_opts::to_s return convert_enum_idx(options, 1, value, "erab_failedto_setup_item_ho_req_ack_ies_o::value_c::types"); } -erab_failedto_setup_item_ho_req_ack_ies_container::erab_failedto_setup_item_ho_req_ack_ies_container() : - erab_failedto_setup_item_ho_req_ack(21, crit_e::ignore) -{ -} -SRSASN_CODE erab_failedto_setup_item_ho_req_ack_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_failedto_setup_item_ho_req_ack.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_failedto_setup_item_ho_req_ack_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 21) { - nof_mandatory_ies--; - erab_failedto_setup_item_ho_req_ack.id = c.id; - erab_failedto_setup_item_ho_req_ack.crit = c.crit; - erab_failedto_setup_item_ho_req_ack.value = c.value.erab_failedto_setup_item_ho_req_ack(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_failedto_setup_item_ho_req_ack_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_failedto_setup_item_ho_req_ack.to_json(j); - j.end_obj(); -} - // DL-Forwarding ::= ENUMERATED std::string dl_forwarding_opts::to_string() const { @@ -9648,102 +9381,6 @@ std::string erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types_opts:: return convert_enum_idx(options, 1, value, "erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types"); } -erab_not_to_be_modified_item_bearer_mod_ind_ies_container::erab_not_to_be_modified_item_bearer_mod_ind_ies_container() : - erab_not_to_be_modified_item_bearer_mod_ind(202, crit_e::reject) -{ -} -SRSASN_CODE erab_not_to_be_modified_item_bearer_mod_ind_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_not_to_be_modified_item_bearer_mod_ind.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_not_to_be_modified_item_bearer_mod_ind_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 202) { - nof_mandatory_ies--; - erab_not_to_be_modified_item_bearer_mod_ind.id = c.id; - erab_not_to_be_modified_item_bearer_mod_ind.crit = c.crit; - erab_not_to_be_modified_item_bearer_mod_ind.value = c.value.erab_not_to_be_modified_item_bearer_mod_ind(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_not_to_be_modified_item_bearer_mod_ind_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_not_to_be_modified_item_bearer_mod_ind.to_json(j); - j.end_obj(); -} - -erab_to_be_modified_item_bearer_mod_ind_ies_container::erab_to_be_modified_item_bearer_mod_ind_ies_container() : - erab_to_be_modified_item_bearer_mod_ind(200, crit_e::reject) -{ -} -SRSASN_CODE erab_to_be_modified_item_bearer_mod_ind_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_to_be_modified_item_bearer_mod_ind.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_to_be_modified_item_bearer_mod_ind_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 200) { - nof_mandatory_ies--; - erab_to_be_modified_item_bearer_mod_ind.id = c.id; - erab_to_be_modified_item_bearer_mod_ind.crit = c.crit; - erab_to_be_modified_item_bearer_mod_ind.value = c.value.erab_to_be_modified_item_bearer_mod_ind(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_to_be_modified_item_bearer_mod_ind_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_to_be_modified_item_bearer_mod_ind.to_json(j); - j.end_obj(); -} - // TunnelInformation ::= SEQUENCE SRSASN_CODE tunnel_info_s::pack(bit_ref& bref) const { @@ -9886,17 +9523,17 @@ uint32_t& erab_mod_ind_ies_o::value_c::enb_ue_s1ap_id() assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -erab_to_be_modified_item_bearer_mod_ind_ies_container& +erab_ie_container_list_l& erab_mod_ind_ies_o::value_c::erab_to_be_modified_list_bearer_mod_ind() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeModifiedItemBearerModIndIEs}}", type_.to_string(), "Value"); + return c.get >(); } -erab_not_to_be_modified_item_bearer_mod_ind_ies_container& +erab_ie_container_list_l& erab_mod_ind_ies_o::value_c::erab_not_to_be_modified_list_bearer_mod_ind() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABNotToBeModifiedItemBearerModIndIEs}}", type_.to_string(), "Value"); + return c.get >(); } csg_membership_info_s& erab_mod_ind_ies_o::value_c::csg_membership_info() { @@ -9918,17 +9555,17 @@ const uint32_t& erab_mod_ind_ies_o::value_c::enb_ue_s1ap_id() const assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const erab_to_be_modified_item_bearer_mod_ind_ies_container& +const erab_ie_container_list_l& erab_mod_ind_ies_o::value_c::erab_to_be_modified_list_bearer_mod_ind() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeModifiedItemBearerModIndIEs}}", type_.to_string(), "Value"); + return c.get >(); } -const erab_not_to_be_modified_item_bearer_mod_ind_ies_container& +const erab_ie_container_list_l& erab_mod_ind_ies_o::value_c::erab_not_to_be_modified_list_bearer_mod_ind() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABNotToBeModifiedItemBearerModIndIEs}}", type_.to_string(), "Value"); + return c.get >(); } const csg_membership_info_s& erab_mod_ind_ies_o::value_c::csg_membership_info() const { @@ -9944,10 +9581,10 @@ void erab_mod_ind_ies_o::value_c::destroy_() { switch (type_) { case types::erab_to_be_modified_list_bearer_mod_ind: - c.destroy(); + c.destroy >(); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - c.destroy(); + c.destroy >(); break; case types::csg_membership_info: c.destroy(); @@ -9969,10 +9606,10 @@ void erab_mod_ind_ies_o::value_c::set(types::options e) case types::enb_ue_s1ap_id: break; case types::erab_to_be_modified_list_bearer_mod_ind: - c.init(); + c.init >(); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - c.init(); + c.init >(); break; case types::csg_membership_info: c.init(); @@ -9997,10 +9634,10 @@ erab_mod_ind_ies_o::value_c::value_c(const erab_mod_ind_ies_o::value_c& other) c.init(other.c.get()); break; case types::erab_to_be_modified_list_bearer_mod_ind: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::csg_membership_info: c.init(other.c.get()); @@ -10028,10 +9665,10 @@ erab_mod_ind_ies_o::value_c& erab_mod_ind_ies_o::value_c::operator=(const erab_m c.set(other.c.get()); break; case types::erab_to_be_modified_list_bearer_mod_ind: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::csg_membership_info: c.set(other.c.get()); @@ -10058,12 +9695,10 @@ void erab_mod_ind_ies_o::value_c::to_json(json_writer& j) const j.write_int("INTEGER (0..16777215)", c.get()); break; case types::erab_to_be_modified_list_bearer_mod_ind: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABToBeModifiedItemBearerModIndIEs}}"); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABNotToBeModifiedItemBearerModIndIEs}}"); break; case types::csg_membership_info: j.write_fieldname("CSGMembershipInfo"); @@ -10089,10 +9724,12 @@ SRSASN_CODE erab_mod_ind_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_to_be_modified_list_bearer_mod_ind: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get >(), 1, 256, true)); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get >(), 1, 256, true)); break; case types::csg_membership_info: HANDLE_CODE(c.get().pack(bref)); @@ -10117,10 +9754,12 @@ SRSASN_CODE erab_mod_ind_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_to_be_modified_list_bearer_mod_ind: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get >(), bref, 1, 256, true)); break; case types::erab_not_to_be_modified_list_bearer_mod_ind: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get >(), bref, 1, 256, true)); break; case types::csg_membership_info: HANDLE_CODE(c.get().unpack(bref)); @@ -10137,8 +9776,12 @@ SRSASN_CODE erab_mod_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_mod_ind_ies_o::value_c::types_opts::to_string() const { - static const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "", "CSGMembershipInfo", "TunnelInformation"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RAB-IE-ContainerList{{E-RABToBeModifiedItemBearerModIndIEs}}", + "E-RAB-IE-ContainerList{{E-RABNotToBeModifiedItemBearerModIndIEs}}", + "CSGMembershipInfo", + "TunnelInformation"}; return convert_enum_idx(options, 6, value, "erab_mod_ind_ies_o::value_c::types"); } @@ -10470,55 +10113,6 @@ std::string erab_to_be_modify_item_bearer_mod_req_ext_ies_o::ext_c::types_opts:: return convert_enum_idx(options, 1, value, "erab_to_be_modify_item_bearer_mod_req_ext_ies_o::ext_c::types"); } -template struct asn1::s1ap::protocol_ext_field_s; - -erab_to_be_modify_item_bearer_mod_req_ext_ies_container::erab_to_be_modify_item_bearer_mod_req_ext_ies_container() : - transport_info(185, crit_e::reject) -{ -} -SRSASN_CODE erab_to_be_modify_item_bearer_mod_req_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += transport_info_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (transport_info_present) { - HANDLE_CODE(transport_info.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_to_be_modify_item_bearer_mod_req_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 185) { - transport_info_present = true; - transport_info.id = c.id; - transport_info.crit = c.crit; - transport_info.ext = c.ext_value.transport_info(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void erab_to_be_modify_item_bearer_mod_req_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (transport_info_present) { - j.write_fieldname(""); - transport_info.to_json(j); - } - j.end_obj(); -} - // E-RABToBeModifiedItemBearerModReq ::= SEQUENCE SRSASN_CODE erab_to_be_modified_item_bearer_mod_req_s::pack(bit_ref& bref) const { @@ -10529,7 +10123,7 @@ SRSASN_CODE erab_to_be_modified_item_bearer_mod_req_s::pack(bit_ref& bref) const HANDLE_CODE(erab_level_qos_params.pack(bref)); HANDLE_CODE(nas_pdu.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -10543,7 +10137,7 @@ SRSASN_CODE erab_to_be_modified_item_bearer_mod_req_s::unpack(cbit_ref& bref) HANDLE_CODE(erab_level_qos_params.unpack(bref)); HANDLE_CODE(nas_pdu.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -10557,7 +10151,6 @@ void erab_to_be_modified_item_bearer_mod_req_s::to_json(json_writer& j) const j.write_str("nAS-PDU", nas_pdu.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -15237,54 +14830,6 @@ std::string erab_to_be_setup_item_ho_req_ies_o::value_c::types_opts::to_string() template struct asn1::s1ap::protocol_ie_single_container_s; -erab_to_be_setup_item_ho_req_ies_container::erab_to_be_setup_item_ho_req_ies_container() : - erab_to_be_setup_item_ho_req(27, crit_e::reject) -{ -} -SRSASN_CODE erab_to_be_setup_item_ho_req_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_to_be_setup_item_ho_req.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_to_be_setup_item_ho_req_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 27) { - nof_mandatory_ies--; - erab_to_be_setup_item_ho_req.id = c.id; - erab_to_be_setup_item_ho_req.crit = c.crit; - erab_to_be_setup_item_ho_req.value = c.value.erab_to_be_setup_item_ho_req(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_to_be_setup_item_ho_req_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_to_be_setup_item_ho_req.to_json(j); - j.end_obj(); -} - // E-RABToBeSwitchedDLItem ::= SEQUENCE SRSASN_CODE erab_to_be_switched_dl_item_s::pack(bit_ref& bref) const { @@ -15389,54 +14934,6 @@ std::string erab_to_be_switched_dl_item_ies_o::value_c::types_opts::to_string() return convert_enum_idx(options, 1, value, "erab_to_be_switched_dl_item_ies_o::value_c::types"); } -erab_to_be_switched_dl_item_ies_container::erab_to_be_switched_dl_item_ies_container() : - erab_to_be_switched_dl_item(23, crit_e::reject) -{ -} -SRSASN_CODE erab_to_be_switched_dl_item_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_to_be_switched_dl_item.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_to_be_switched_dl_item_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 23) { - nof_mandatory_ies--; - erab_to_be_switched_dl_item.id = c.id; - erab_to_be_switched_dl_item.crit = c.crit; - erab_to_be_switched_dl_item.value = c.value.erab_to_be_switched_dl_item(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_to_be_switched_dl_item_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_to_be_switched_dl_item.to_json(j); - j.end_obj(); -} - // E-RABToBeSwitchedULItem ::= SEQUENCE SRSASN_CODE erab_to_be_switched_ul_item_s::pack(bit_ref& bref) const { @@ -15541,54 +15038,6 @@ std::string erab_to_be_switched_ul_item_ies_o::value_c::types_opts::to_string() return convert_enum_idx(options, 1, value, "erab_to_be_switched_ul_item_ies_o::value_c::types"); } -erab_to_be_switched_ul_item_ies_container::erab_to_be_switched_ul_item_ies_container() : - erab_to_be_switched_ul_item(94, crit_e::ignore) -{ -} -SRSASN_CODE erab_to_be_switched_ul_item_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 1u, 256u, true); - - HANDLE_CODE(erab_to_be_switched_ul_item.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE erab_to_be_switched_ul_item_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 256u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_single_container_item_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 94) { - nof_mandatory_ies--; - erab_to_be_switched_ul_item.id = c.id; - erab_to_be_switched_ul_item.crit = c.crit; - erab_to_be_switched_ul_item.value = c.value.erab_to_be_switched_ul_item(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void erab_to_be_switched_ul_item_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - erab_to_be_switched_ul_item.to_json(j); - j.end_obj(); -} - // EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE SRSASN_CODE ehrpd_multi_sector_load_report_resp_item_s::pack(bit_ref& bref) const { @@ -16437,55 +15886,6 @@ std::string son_info_report_c::types_opts::to_string() const return convert_enum_idx(options, 1, value, "son_info_report_c::types"); } -template struct asn1::s1ap::protocol_ext_field_s; - -time_synchronisation_info_ext_ies_container::time_synchronisation_info_ext_ies_container() : - muting_availability_ind(207, crit_e::ignore) -{ -} -SRSASN_CODE time_synchronisation_info_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += muting_availability_ind_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (muting_availability_ind_present) { - HANDLE_CODE(muting_availability_ind.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE time_synchronisation_info_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 207) { - muting_availability_ind_present = true; - muting_availability_ind.id = c.id; - muting_availability_ind.crit = c.crit; - muting_availability_ind.ext = c.ext_value.muting_availability_ind(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void time_synchronisation_info_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (muting_availability_ind_present) { - j.write_fieldname(""); - muting_availability_ind.to_json(j); - } - j.end_obj(); -} - // TimeSynchronisationInfo ::= SEQUENCE SRSASN_CODE time_synchronisation_info_s::pack(bit_ref& bref) const { @@ -16495,7 +15895,7 @@ SRSASN_CODE time_synchronisation_info_s::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, stratum_level, (uint8_t)0u, (uint8_t)3u, true, true)); HANDLE_CODE(synchronisation_status.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -16508,7 +15908,7 @@ SRSASN_CODE time_synchronisation_info_s::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(stratum_level, bref, (uint8_t)0u, (uint8_t)3u, true, true)); HANDLE_CODE(synchronisation_status.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -16520,7 +15920,6 @@ void time_synchronisation_info_s::to_json(json_writer& j) const j.write_str("synchronisationStatus", synchronisation_status.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -17226,52 +16625,6 @@ void global_enb_id_s::to_json(json_writer& j) const template struct asn1::s1ap::protocol_ie_single_container_s; -template struct asn1::s1ap::protocol_ext_field_s; - -son_info_reply_ext_ies_container::son_info_reply_ext_ies_container() : time_synchronisation_info(149, crit_e::ignore) {} -SRSASN_CODE son_info_reply_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += time_synchronisation_info_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (time_synchronisation_info_present) { - HANDLE_CODE(time_synchronisation_info.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE son_info_reply_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 149) { - time_synchronisation_info_present = true; - time_synchronisation_info.id = c.id; - time_synchronisation_info.crit = c.crit; - time_synchronisation_info.ext = c.ext_value.time_synchronisation_info(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void son_info_reply_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (time_synchronisation_info_present) { - j.write_fieldname(""); - time_synchronisation_info.to_json(j); - } - j.end_obj(); -} - // SONInformationReply ::= SEQUENCE SRSASN_CODE son_info_reply_s::pack(bit_ref& bref) const { @@ -17283,7 +16636,7 @@ SRSASN_CODE son_info_reply_s::pack(bit_ref& bref) const HANDLE_CODE(x2_tnl_cfg_info.pack(bref)); } if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -17298,7 +16651,7 @@ SRSASN_CODE son_info_reply_s::unpack(cbit_ref& bref) HANDLE_CODE(x2_tnl_cfg_info.unpack(bref)); } if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -17312,7 +16665,6 @@ void son_info_reply_s::to_json(json_writer& j) const } if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -18005,64 +17357,18 @@ std::string enb_cfg_transfer_ies_o::value_c::types_opts::to_string() const return convert_enum_idx(options, 1, value, "enb_cfg_transfer_ies_o::value_c::types"); } -template struct asn1::s1ap::protocol_ie_field_s; - -enb_cfg_transfer_ies_container::enb_cfg_transfer_ies_container() : son_cfg_transfer_ect(129, crit_e::ignore) {} -SRSASN_CODE enb_cfg_transfer_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += son_cfg_transfer_ect_present ? 1 : 0; - pack_length(bref, nof_ies, 0u, 65535u, true); - - if (son_cfg_transfer_ect_present) { - HANDLE_CODE(son_cfg_transfer_ect.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE enb_cfg_transfer_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 129) { - son_cfg_transfer_ect_present = true; - son_cfg_transfer_ect.id = c.id; - son_cfg_transfer_ect.crit = c.crit; - son_cfg_transfer_ect.value = c.value.son_cfg_transfer_ect(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void enb_cfg_transfer_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (son_cfg_transfer_ect_present) { - j.write_fieldname(""); - son_cfg_transfer_ect.to_json(j); - } - j.end_obj(); -} - // ENBConfigurationTransfer ::= SEQUENCE SRSASN_CODE enb_cfg_transfer_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE enb_cfg_transfer_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -18070,7 +17376,6 @@ void enb_cfg_transfer_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -18142,52 +17447,6 @@ std::string supported_tas_item_ext_ies_o::ext_c::types_opts::to_string() const return convert_enum_idx(options, 1, value, "supported_tas_item_ext_ies_o::ext_c::types"); } -template struct asn1::s1ap::protocol_ext_field_s; - -supported_tas_item_ext_ies_container::supported_tas_item_ext_ies_container() : rat_type(232, crit_e::reject) {} -SRSASN_CODE supported_tas_item_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += rat_type_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (rat_type_present) { - HANDLE_CODE(rat_type.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE supported_tas_item_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 232) { - rat_type_present = true; - rat_type.id = c.id; - rat_type.crit = c.crit; - rat_type.ext = c.ext_value.rat_type(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void supported_tas_item_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (rat_type_present) { - j.write_fieldname(""); - rat_type.to_json(j); - } - j.end_obj(); -} - // SupportedTAs-Item ::= SEQUENCE SRSASN_CODE supported_tas_item_s::pack(bit_ref& bref) const { @@ -18197,7 +17456,7 @@ SRSASN_CODE supported_tas_item_s::pack(bit_ref& bref) const HANDLE_CODE(tac.pack(bref)); HANDLE_CODE(pack_dyn_seq_of(bref, broadcast_plmns, 1, 6, true)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -18210,7 +17469,7 @@ SRSASN_CODE supported_tas_item_s::unpack(cbit_ref& bref) HANDLE_CODE(tac.unpack(bref)); HANDLE_CODE(unpack_dyn_seq_of(broadcast_plmns, bref, 1, 6, true)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -18226,7 +17485,6 @@ void supported_tas_item_s::to_json(json_writer& j) const j.end_array(); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -18764,64 +18022,18 @@ std::string enb_cfg_upd_ack_ies_o::value_c::types_opts::to_string() const return convert_enum_idx(options, 1, value, "enb_cfg_upd_ack_ies_o::value_c::types"); } -template struct asn1::s1ap::protocol_ie_field_s; - -enb_cfg_upd_ack_ies_container::enb_cfg_upd_ack_ies_container() : crit_diagnostics(58, crit_e::ignore) {} -SRSASN_CODE enb_cfg_upd_ack_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += crit_diagnostics_present ? 1 : 0; - pack_length(bref, nof_ies, 0u, 65535u, true); - - if (crit_diagnostics_present) { - HANDLE_CODE(crit_diagnostics.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE enb_cfg_upd_ack_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 58) { - crit_diagnostics_present = true; - crit_diagnostics.id = c.id; - crit_diagnostics.crit = c.crit; - crit_diagnostics.value = c.value.crit_diagnostics(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void enb_cfg_upd_ack_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (crit_diagnostics_present) { - j.write_fieldname(""); - crit_diagnostics.to_json(j); - } - j.end_obj(); -} - // ENBConfigurationUpdateAcknowledge ::= SEQUENCE SRSASN_CODE enb_cfg_upd_ack_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE enb_cfg_upd_ack_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -18829,7 +18041,6 @@ void enb_cfg_upd_ack_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -19622,68 +18833,18 @@ std::string enb_direct_info_transfer_ies_o::value_c::types_opts::to_string() con return convert_enum_idx(options, 1, value, "enb_direct_info_transfer_ies_o::value_c::types"); } -template struct asn1::s1ap::protocol_ie_field_s; - -enb_direct_info_transfer_ies_container::enb_direct_info_transfer_ies_container() : - inter_sys_info_transfer_type_edt(121, crit_e::reject) -{ -} -SRSASN_CODE enb_direct_info_transfer_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 0u, 65535u, true); - - HANDLE_CODE(inter_sys_info_transfer_type_edt.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE enb_direct_info_transfer_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 121) { - nof_mandatory_ies--; - inter_sys_info_transfer_type_edt.id = c.id; - inter_sys_info_transfer_type_edt.crit = c.crit; - inter_sys_info_transfer_type_edt.value = c.value.inter_sys_info_transfer_type_edt(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void enb_direct_info_transfer_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - inter_sys_info_transfer_type_edt.to_json(j); - j.end_obj(); -} - // ENBDirectInformationTransfer ::= SEQUENCE SRSASN_CODE enb_direct_info_transfer_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE enb_direct_info_transfer_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -19691,7 +18852,6 @@ void enb_direct_info_transfer_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -21587,10 +20747,10 @@ unbounded_octstring& ho_cmd_ies_o::value_c::nas_security_paramsfrom_e_utra assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } -erab_data_forwarding_item_ies_container& ho_cmd_ies_o::value_c::erab_subjectto_data_forwarding_list() +erab_ie_container_list_l& ho_cmd_ies_o::value_c::erab_subjectto_data_forwarding_list() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } erab_list_l& ho_cmd_ies_o::value_c::erab_to_release_list_ho_cmd() { @@ -21632,10 +20792,11 @@ const unbounded_octstring& ho_cmd_ies_o::value_c::nas_security_paramsfrom_ assert_choice_type("OCTET STRING", type_.to_string(), "Value"); return c.get >(); } -const erab_data_forwarding_item_ies_container& ho_cmd_ies_o::value_c::erab_subjectto_data_forwarding_list() const +const erab_ie_container_list_l& +ho_cmd_ies_o::value_c::erab_subjectto_data_forwarding_list() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } const erab_list_l& ho_cmd_ies_o::value_c::erab_to_release_list_ho_cmd() const { @@ -21664,7 +20825,7 @@ void ho_cmd_ies_o::value_c::destroy_() c.destroy >(); break; case types::erab_subjectto_data_forwarding_list: - c.destroy(); + c.destroy >(); break; case types::erab_to_release_list_ho_cmd: c.destroy(); @@ -21697,7 +20858,7 @@ void ho_cmd_ies_o::value_c::set(types::options e) c.init >(); break; case types::erab_subjectto_data_forwarding_list: - c.init(); + c.init >(); break; case types::erab_to_release_list_ho_cmd: c.init(); @@ -21734,7 +20895,7 @@ ho_cmd_ies_o::value_c::value_c(const ho_cmd_ies_o::value_c& other) c.init(other.c.get >()); break; case types::erab_subjectto_data_forwarding_list: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::erab_to_release_list_ho_cmd: c.init(other.c.get()); @@ -21774,7 +20935,7 @@ ho_cmd_ies_o::value_c& ho_cmd_ies_o::value_c::operator=(const ho_cmd_ies_o::valu c.set(other.c.get >()); break; case types::erab_subjectto_data_forwarding_list: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::erab_to_release_list_ho_cmd: c.set(other.c.get()); @@ -21813,8 +20974,7 @@ void ho_cmd_ies_o::value_c::to_json(json_writer& j) const j.write_str("OCTET STRING", c.get >().to_string()); break; case types::erab_subjectto_data_forwarding_list: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}"); break; case types::erab_to_release_list_ho_cmd: j.start_array("E-RABList"); @@ -21855,7 +21015,8 @@ SRSASN_CODE ho_cmd_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(c.get >().pack(bref)); break; case types::erab_subjectto_data_forwarding_list: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get >(), 1, 256, true)); break; case types::erab_to_release_list_ho_cmd: HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); @@ -21892,7 +21053,8 @@ SRSASN_CODE ho_cmd_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(c.get >().unpack(bref)); break; case types::erab_subjectto_data_forwarding_list: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE( + unpack_dyn_seq_of(c.get >(), bref, 1, 256, true)); break; case types::erab_to_release_list_ho_cmd: HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); @@ -21919,7 +21081,7 @@ std::string ho_cmd_ies_o::value_c::types_opts::to_string() const "INTEGER (0..16777215)", "HandoverType", "OCTET STRING", - "", + "E-RAB-IE-ContainerList{{E-RABDataForwardingItemIEs}}", "E-RABList", "OCTET STRING", "OCTET STRING", @@ -24811,52 +23973,6 @@ std::string mdt_mode_c::types_opts::to_string() const return convert_enum_idx(options, 3, value, "mdt_mode_c::types"); } -template struct asn1::s1ap::protocol_ext_field_s; - -mdt_cfg_ext_ies_container::mdt_cfg_ext_ies_container() : sig_based_mdtplmn_list(178, crit_e::ignore) {} -SRSASN_CODE mdt_cfg_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += sig_based_mdtplmn_list_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (sig_based_mdtplmn_list_present) { - HANDLE_CODE(sig_based_mdtplmn_list.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mdt_cfg_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 178) { - sig_based_mdtplmn_list_present = true; - sig_based_mdtplmn_list.id = c.id; - sig_based_mdtplmn_list.crit = c.crit; - sig_based_mdtplmn_list.ext = c.ext_value.sig_based_mdtplmn_list(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void mdt_cfg_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (sig_based_mdtplmn_list_present) { - j.write_fieldname(""); - sig_based_mdtplmn_list.to_json(j); - } - j.end_obj(); -} - // MDT-Configuration ::= SEQUENCE SRSASN_CODE mdt_cfg_s::pack(bit_ref& bref) const { @@ -24867,7 +23983,7 @@ SRSASN_CODE mdt_cfg_s::pack(bit_ref& bref) const HANDLE_CODE(area_scope_of_mdt.pack(bref)); HANDLE_CODE(mdt_mode.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -24881,7 +23997,7 @@ SRSASN_CODE mdt_cfg_s::unpack(cbit_ref& bref) HANDLE_CODE(area_scope_of_mdt.unpack(bref)); HANDLE_CODE(mdt_mode.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -24896,7 +24012,6 @@ void mdt_cfg_s::to_json(json_writer& j) const mdt_mode.to_json(j); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -25097,55 +24212,6 @@ std::string management_based_mdt_allowed_opts::to_string() const return convert_enum_idx(options, 1, value, "management_based_mdt_allowed_e"); } -template struct asn1::s1ap::protocol_ext_field_s; - -pro_se_authorized_ext_ies_container::pro_se_authorized_ext_ies_container() : - pro_se_ueto_network_relaying(216, crit_e::ignore) -{ -} -SRSASN_CODE pro_se_authorized_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += pro_se_ueto_network_relaying_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (pro_se_ueto_network_relaying_present) { - HANDLE_CODE(pro_se_ueto_network_relaying.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pro_se_authorized_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 216) { - pro_se_ueto_network_relaying_present = true; - pro_se_ueto_network_relaying.id = c.id; - pro_se_ueto_network_relaying.crit = c.crit; - pro_se_ueto_network_relaying.ext = c.ext_value.pro_se_ueto_network_relaying(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void pro_se_authorized_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (pro_se_ueto_network_relaying_present) { - j.write_fieldname(""); - pro_se_ueto_network_relaying.to_json(j); - } - j.end_obj(); -} - // ProSeAuthorized ::= SEQUENCE SRSASN_CODE pro_se_authorized_s::pack(bit_ref& bref) const { @@ -25161,7 +24227,7 @@ SRSASN_CODE pro_se_authorized_s::pack(bit_ref& bref) const HANDLE_CODE(pro_se_direct_communication.pack(bref)); } if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -25180,7 +24246,7 @@ SRSASN_CODE pro_se_authorized_s::unpack(cbit_ref& bref) HANDLE_CODE(pro_se_direct_communication.unpack(bref)); } if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -25196,7 +24262,6 @@ void pro_se_authorized_s::to_json(json_writer& j) const } if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -25279,52 +24344,6 @@ void security_context_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ext_field_s; - -trace_activation_ext_ies_container::trace_activation_ext_ies_container() : mdt_cfg(162, crit_e::ignore) {} -SRSASN_CODE trace_activation_ext_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += mdt_cfg_present ? 1 : 0; - pack_length(bref, nof_ies, 1u, 65535u, true); - - if (mdt_cfg_present) { - HANDLE_CODE(mdt_cfg.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE trace_activation_ext_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 1u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ext_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 162) { - mdt_cfg_present = true; - mdt_cfg.id = c.id; - mdt_cfg.crit = c.crit; - mdt_cfg.ext = c.ext_value.mdt_cfg(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void trace_activation_ext_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (mdt_cfg_present) { - j.write_fieldname(""); - mdt_cfg.to_json(j); - } - j.end_obj(); -} - // TraceActivation ::= SEQUENCE SRSASN_CODE trace_activation_s::pack(bit_ref& bref) const { @@ -25336,7 +24355,7 @@ SRSASN_CODE trace_activation_s::pack(bit_ref& bref) const HANDLE_CODE(trace_depth.pack(bref)); HANDLE_CODE(trace_collection_entity_ip_address.pack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, ie_exts, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -25351,7 +24370,7 @@ SRSASN_CODE trace_activation_s::unpack(cbit_ref& bref) HANDLE_CODE(trace_depth.unpack(bref)); HANDLE_CODE(trace_collection_entity_ip_address.unpack(bref)); if (ie_exts_present) { - HANDLE_CODE(ie_exts.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(ie_exts, bref, 1, 65535, true)); } return SRSASN_SUCCESS; @@ -25365,7 +24384,6 @@ void trace_activation_s::to_json(json_writer& j) const j.write_str("traceCollectionEntityIPAddress", trace_collection_entity_ip_address.to_string()); if (ie_exts_present) { j.write_fieldname("iE-Extensions"); - ie_exts.to_json(j); } j.end_obj(); } @@ -25770,10 +24788,10 @@ ue_aggregate_maximum_bitrate_s& ho_request_ies_o::value_c::ueaggregate_maximum_b assert_choice_type("UEAggregateMaximumBitrate", type_.to_string(), "Value"); return c.get(); } -erab_to_be_setup_item_ho_req_ies_container& ho_request_ies_o::value_c::erab_to_be_setup_list_ho_req() +erab_ie_container_list_l& ho_request_ies_o::value_c::erab_to_be_setup_list_ho_req() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeSetupItemHOReqIEs}}", type_.to_string(), "Value"); + return c.get >(); } unbounded_octstring& ho_request_ies_o::value_c::source_to_target_transparent_container() { @@ -25910,10 +24928,11 @@ const ue_aggregate_maximum_bitrate_s& ho_request_ies_o::value_c::ueaggregate_max assert_choice_type("UEAggregateMaximumBitrate", type_.to_string(), "Value"); return c.get(); } -const erab_to_be_setup_item_ho_req_ies_container& ho_request_ies_o::value_c::erab_to_be_setup_list_ho_req() const +const erab_ie_container_list_l& +ho_request_ies_o::value_c::erab_to_be_setup_list_ho_req() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeSetupItemHOReqIEs}}", type_.to_string(), "Value"); + return c.get >(); } const unbounded_octstring& ho_request_ies_o::value_c::source_to_target_transparent_container() const { @@ -26040,7 +25059,7 @@ void ho_request_ies_o::value_c::destroy_() c.destroy(); break; case types::erab_to_be_setup_list_ho_req: - c.destroy(); + c.destroy >(); break; case types::source_to_target_transparent_container: c.destroy >(); @@ -26107,7 +25126,7 @@ void ho_request_ies_o::value_c::set(types::options e) c.init(); break; case types::erab_to_be_setup_list_ho_req: - c.init(); + c.init >(); break; case types::source_to_target_transparent_container: c.init >(); @@ -26193,7 +25212,7 @@ ho_request_ies_o::value_c::value_c(const ho_request_ies_o::value_c& other) c.init(other.c.get()); break; case types::erab_to_be_setup_list_ho_req: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::source_to_target_transparent_container: c.init(other.c.get >()); @@ -26290,7 +25309,7 @@ ho_request_ies_o::value_c& ho_request_ies_o::value_c::operator=(const ho_request c.set(other.c.get()); break; case types::erab_to_be_setup_list_ho_req: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::source_to_target_transparent_container: c.set(other.c.get >()); @@ -26388,8 +25407,7 @@ void ho_request_ies_o::value_c::to_json(json_writer& j) const c.get().to_json(j); break; case types::erab_to_be_setup_list_ho_req: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABToBeSetupItemHOReqIEs}}"); break; case types::source_to_target_transparent_container: j.write_str("OCTET STRING", c.get >().to_string()); @@ -26496,7 +25514,8 @@ SRSASN_CODE ho_request_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(c.get().pack(bref)); break; case types::erab_to_be_setup_list_ho_req: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get >(), 1, 256, true)); break; case types::source_to_target_transparent_container: HANDLE_CODE(c.get >().pack(bref)); @@ -26590,7 +25609,8 @@ SRSASN_CODE ho_request_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(c.get().unpack(bref)); break; case types::erab_to_be_setup_list_ho_req: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get >(), bref, 1, 256, true)); break; case types::source_to_target_transparent_container: HANDLE_CODE(c.get >().unpack(bref)); @@ -26674,7 +25694,7 @@ std::string ho_request_ies_o::value_c::types_opts::to_string() const "HandoverType", "Cause", "UEAggregateMaximumBitrate", - "", + "E-RAB-IE-ContainerList{{E-RABToBeSetupItemHOReqIEs}}", "OCTET STRING", "UESecurityCapabilities", "HandoverRestrictionList", @@ -27269,15 +26289,16 @@ uint32_t& ho_request_ack_ies_o::value_c::enb_ue_s1ap_id() assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -erab_admitted_item_ies_container& ho_request_ack_ies_o::value_c::erab_admitted_list() +erab_ie_container_list_l& ho_request_ack_ies_o::value_c::erab_admitted_list() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABAdmittedItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } -erab_failedto_setup_item_ho_req_ack_ies_container& ho_request_ack_ies_o::value_c::erab_failed_to_setup_list_ho_req_ack() +erab_ie_container_list_l& +ho_request_ack_ies_o::value_c::erab_failed_to_setup_list_ho_req_ack() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABFailedtoSetupItemHOReqAckIEs}}", type_.to_string(), "Value"); + return c.get >(); } unbounded_octstring& ho_request_ack_ies_o::value_c::target_to_source_transparent_container() { @@ -27314,16 +26335,16 @@ const uint32_t& ho_request_ack_ies_o::value_c::enb_ue_s1ap_id() const assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const erab_admitted_item_ies_container& ho_request_ack_ies_o::value_c::erab_admitted_list() const +const erab_ie_container_list_l& ho_request_ack_ies_o::value_c::erab_admitted_list() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABAdmittedItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } -const erab_failedto_setup_item_ho_req_ack_ies_container& +const erab_ie_container_list_l& ho_request_ack_ies_o::value_c::erab_failed_to_setup_list_ho_req_ack() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABFailedtoSetupItemHOReqAckIEs}}", type_.to_string(), "Value"); + return c.get >(); } const unbounded_octstring& ho_request_ack_ies_o::value_c::target_to_source_transparent_container() const { @@ -27354,10 +26375,10 @@ void ho_request_ack_ies_o::value_c::destroy_() { switch (type_) { case types::erab_admitted_list: - c.destroy(); + c.destroy >(); break; case types::erab_failed_to_setup_list_ho_req_ack: - c.destroy(); + c.destroy >(); break; case types::target_to_source_transparent_container: c.destroy >(); @@ -27382,10 +26403,10 @@ void ho_request_ack_ies_o::value_c::set(types::options e) case types::enb_ue_s1ap_id: break; case types::erab_admitted_list: - c.init(); + c.init >(); break; case types::erab_failed_to_setup_list_ho_req_ack: - c.init(); + c.init >(); break; case types::target_to_source_transparent_container: c.init >(); @@ -27417,10 +26438,10 @@ ho_request_ack_ies_o::value_c::value_c(const ho_request_ack_ies_o::value_c& othe c.init(other.c.get()); break; case types::erab_admitted_list: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::erab_failed_to_setup_list_ho_req_ack: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::target_to_source_transparent_container: c.init(other.c.get >()); @@ -27457,10 +26478,10 @@ ho_request_ack_ies_o::value_c& ho_request_ack_ies_o::value_c::operator=(const ho c.set(other.c.get()); break; case types::erab_admitted_list: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::erab_failed_to_setup_list_ho_req_ack: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::target_to_source_transparent_container: c.set(other.c.get >()); @@ -27496,12 +26517,10 @@ void ho_request_ack_ies_o::value_c::to_json(json_writer& j) const j.write_int("INTEGER (0..16777215)", c.get()); break; case types::erab_admitted_list: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABAdmittedItemIEs}}"); break; case types::erab_failed_to_setup_list_ho_req_ack: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABFailedtoSetupItemHOReqAckIEs}}"); break; case types::target_to_source_transparent_container: j.write_str("OCTET STRING", c.get >().to_string()); @@ -27535,10 +26554,11 @@ SRSASN_CODE ho_request_ack_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_admitted_list: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get >(), 1, 256, true)); break; case types::erab_failed_to_setup_list_ho_req_ack: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get >(), 1, 256, true)); break; case types::target_to_source_transparent_container: HANDLE_CODE(c.get >().pack(bref)); @@ -27572,10 +26592,11 @@ SRSASN_CODE ho_request_ack_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_admitted_list: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(c.get >(), bref, 1, 256, true)); break; case types::erab_failed_to_setup_list_ho_req_ack: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get >(), bref, 1, 256, true)); break; case types::target_to_source_transparent_container: HANDLE_CODE(c.get >().unpack(bref)); @@ -27603,8 +26624,8 @@ std::string ho_request_ack_ies_o::value_c::types_opts::to_string() const { static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", - "", - "", + "E-RAB-IE-ContainerList{{E-RABAdmittedItemIEs}}", + "E-RAB-IE-ContainerList{{E-RABFailedtoSetupItemHOReqAckIEs}}", "OCTET STRING", "BIT STRING", "CriticalityDiagnostics", @@ -38663,10 +37684,11 @@ ue_aggregate_maximum_bitrate_s& path_switch_request_ack_ies_o::value_c::ueaggreg assert_choice_type("UEAggregateMaximumBitrate", type_.to_string(), "Value"); return c.get(); } -erab_to_be_switched_ul_item_ies_container& path_switch_request_ack_ies_o::value_c::erab_to_be_switched_ul_list() +erab_ie_container_list_l& +path_switch_request_ack_ies_o::value_c::erab_to_be_switched_ul_list() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeSwitchedULItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } erab_list_l& path_switch_request_ack_ies_o::value_c::erab_to_be_released_list() { @@ -38743,11 +37765,11 @@ const ue_aggregate_maximum_bitrate_s& path_switch_request_ack_ies_o::value_c::ue assert_choice_type("UEAggregateMaximumBitrate", type_.to_string(), "Value"); return c.get(); } -const erab_to_be_switched_ul_item_ies_container& +const erab_ie_container_list_l& path_switch_request_ack_ies_o::value_c::erab_to_be_switched_ul_list() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeSwitchedULItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } const erab_list_l& path_switch_request_ack_ies_o::value_c::erab_to_be_released_list() const { @@ -38817,7 +37839,7 @@ void path_switch_request_ack_ies_o::value_c::destroy_() c.destroy(); break; case types::erab_to_be_switched_ul_list: - c.destroy(); + c.destroy >(); break; case types::erab_to_be_released_list: c.destroy(); @@ -38854,7 +37876,7 @@ void path_switch_request_ack_ies_o::value_c::set(types::options e) c.init(); break; case types::erab_to_be_switched_ul_list: - c.init(); + c.init >(); break; case types::erab_to_be_released_list: c.init(); @@ -38906,7 +37928,7 @@ path_switch_request_ack_ies_o::value_c::value_c(const path_switch_request_ack_ie c.init(other.c.get()); break; case types::erab_to_be_switched_ul_list: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::erab_to_be_released_list: c.init(other.c.get()); @@ -38968,7 +37990,7 @@ path_switch_request_ack_ies_o::value_c& path_switch_request_ack_ies_o::value_c:: c.set(other.c.get()); break; case types::erab_to_be_switched_ul_list: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::erab_to_be_released_list: c.set(other.c.get()); @@ -39029,8 +38051,7 @@ void path_switch_request_ack_ies_o::value_c::to_json(json_writer& j) const c.get().to_json(j); break; case types::erab_to_be_switched_ul_list: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABToBeSwitchedULItemIEs}}"); break; case types::erab_to_be_released_list: j.start_array("E-RABList"); @@ -39096,7 +38117,8 @@ SRSASN_CODE path_switch_request_ack_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(c.get().pack(bref)); break; case types::erab_to_be_switched_ul_list: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get >(), 1, 256, true)); break; case types::erab_to_be_released_list: HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 256, true)); @@ -39154,7 +38176,8 @@ SRSASN_CODE path_switch_request_ack_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(c.get().unpack(bref)); break; case types::erab_to_be_switched_ul_list: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE( + unpack_dyn_seq_of(c.get >(), bref, 1, 256, true)); break; case types::erab_to_be_released_list: HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 256, true)); @@ -39204,7 +38227,7 @@ std::string path_switch_request_ack_ies_o::value_c::types_opts::to_string() cons static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "UEAggregateMaximumBitrate", - "", + "E-RAB-IE-ContainerList{{E-RABToBeSwitchedULItemIEs}}", "E-RABList", "SecurityContext", "CriticalityDiagnostics", @@ -39629,10 +38652,11 @@ uint32_t& path_switch_request_ies_o::value_c::enb_ue_s1ap_id() assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -erab_to_be_switched_dl_item_ies_container& path_switch_request_ies_o::value_c::erab_to_be_switched_dl_list() +erab_ie_container_list_l& +path_switch_request_ies_o::value_c::erab_to_be_switched_dl_list() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeSwitchedDLItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } uint64_t& path_switch_request_ies_o::value_c::source_mme_ue_s1ap_id() { @@ -39694,10 +38718,11 @@ const uint32_t& path_switch_request_ies_o::value_c::enb_ue_s1ap_id() const assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const erab_to_be_switched_dl_item_ies_container& path_switch_request_ies_o::value_c::erab_to_be_switched_dl_list() const +const erab_ie_container_list_l& +path_switch_request_ies_o::value_c::erab_to_be_switched_dl_list() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABToBeSwitchedDLItemIEs}}", type_.to_string(), "Value"); + return c.get >(); } const uint64_t& path_switch_request_ies_o::value_c::source_mme_ue_s1ap_id() const { @@ -39758,7 +38783,7 @@ void path_switch_request_ies_o::value_c::destroy_() { switch (type_) { case types::erab_to_be_switched_dl_list: - c.destroy(); + c.destroy >(); break; case types::eutran_cgi: c.destroy(); @@ -39793,7 +38818,7 @@ void path_switch_request_ies_o::value_c::set(types::options e) case types::enb_ue_s1ap_id: break; case types::erab_to_be_switched_dl_list: - c.init(); + c.init >(); break; case types::source_mme_ue_s1ap_id: break; @@ -39838,7 +38863,7 @@ path_switch_request_ies_o::value_c::value_c(const path_switch_request_ies_o::val c.init(other.c.get()); break; case types::erab_to_be_switched_dl_list: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::source_mme_ue_s1ap_id: c.init(other.c.get()); @@ -39891,7 +38916,7 @@ path_switch_request_ies_o::value_c& path_switch_request_ies_o::value_c:: c.set(other.c.get()); break; case types::erab_to_be_switched_dl_list: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::source_mme_ue_s1ap_id: c.set(other.c.get()); @@ -39942,8 +38967,7 @@ void path_switch_request_ies_o::value_c::to_json(json_writer& j) const j.write_int("INTEGER (0..16777215)", c.get()); break; case types::erab_to_be_switched_dl_list: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABToBeSwitchedDLItemIEs}}"); break; case types::source_mme_ue_s1ap_id: j.write_int("INTEGER (0..4294967295)", c.get()); @@ -39996,7 +39020,8 @@ SRSASN_CODE path_switch_request_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_to_be_switched_dl_list: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get >(), 1, 256, true)); break; case types::source_mme_ue_s1ap_id: HANDLE_CODE(pack_integer(bref, c.get(), (uint64_t)0u, (uint64_t)4294967295u, false, true)); @@ -40045,7 +39070,8 @@ SRSASN_CODE path_switch_request_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_to_be_switched_dl_list: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE( + unpack_dyn_seq_of(c.get >(), bref, 1, 256, true)); break; case types::source_mme_ue_s1ap_id: HANDLE_CODE(unpack_integer(c.get(), bref, (uint64_t)0u, (uint64_t)4294967295u, false, true)); @@ -40090,7 +39116,7 @@ SRSASN_CODE path_switch_request_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_ies_o::value_c::types_opts::to_string() const { static const char* options[] = {"INTEGER (0..16777215)", - "", + "E-RAB-IE-ContainerList{{E-RABToBeSwitchedDLItemIEs}}", "INTEGER (0..4294967295)", "EUTRAN-CGI", "TAI", @@ -45585,11 +44611,11 @@ uint32_t& ue_context_resume_request_ies_o::value_c::enb_ue_s1ap_id() assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -erab_failed_to_resume_item_resume_req_ies_container& +erab_ie_container_list_l& ue_context_resume_request_ies_o::value_c::erab_failed_to_resume_list_resume_req() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeReqIEs}}", type_.to_string(), "Value"); + return c.get >(); } rrc_establishment_cause_e& ue_context_resume_request_ies_o::value_c::rrc_resume_cause() { @@ -45606,11 +44632,11 @@ const uint32_t& ue_context_resume_request_ies_o::value_c::enb_ue_s1ap_id() const assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const erab_failed_to_resume_item_resume_req_ies_container& +const erab_ie_container_list_l& ue_context_resume_request_ies_o::value_c::erab_failed_to_resume_list_resume_req() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeReqIEs}}", type_.to_string(), "Value"); + return c.get >(); } const rrc_establishment_cause_e& ue_context_resume_request_ies_o::value_c::rrc_resume_cause() const { @@ -45621,7 +44647,7 @@ void ue_context_resume_request_ies_o::value_c::destroy_() { switch (type_) { case types::erab_failed_to_resume_list_resume_req: - c.destroy(); + c.destroy >(); break; default: break; @@ -45637,7 +44663,7 @@ void ue_context_resume_request_ies_o::value_c::set(types::options e) case types::enb_ue_s1ap_id: break; case types::erab_failed_to_resume_list_resume_req: - c.init(); + c.init >(); break; case types::rrc_resume_cause: break; @@ -45658,7 +44684,7 @@ ue_context_resume_request_ies_o::value_c::value_c(const ue_context_resume_reques c.init(other.c.get()); break; case types::erab_failed_to_resume_list_resume_req: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::rrc_resume_cause: c.init(other.c.get()); @@ -45684,7 +44710,7 @@ ue_context_resume_request_ies_o::value_c& ue_context_resume_request_ies_o::value c.set(other.c.get()); break; case types::erab_failed_to_resume_list_resume_req: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::rrc_resume_cause: c.set(other.c.get()); @@ -45708,8 +44734,7 @@ void ue_context_resume_request_ies_o::value_c::to_json(json_writer& j) const j.write_int("INTEGER (0..16777215)", c.get()); break; case types::erab_failed_to_resume_list_resume_req: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeReqIEs}}"); break; case types::rrc_resume_cause: j.write_str("RRC-Establishment-Cause", c.get().to_string()); @@ -45730,7 +44755,8 @@ SRSASN_CODE ue_context_resume_request_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_failed_to_resume_list_resume_req: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get >(), 1, 256, true)); break; case types::rrc_resume_cause: HANDLE_CODE(c.get().pack(bref)); @@ -45752,7 +44778,8 @@ SRSASN_CODE ue_context_resume_request_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_failed_to_resume_list_resume_req: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get >(), bref, 1, 256, true)); break; case types::rrc_resume_cause: HANDLE_CODE(c.get().unpack(bref)); @@ -45766,7 +44793,10 @@ SRSASN_CODE ue_context_resume_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_resume_request_ies_o::value_c::types_opts::to_string() const { - static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "RRC-Establishment-Cause"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeReqIEs}}", + "RRC-Establishment-Cause"}; return convert_enum_idx(options, 4, value, "ue_context_resume_request_ies_o::value_c::types"); } @@ -45865,11 +44895,11 @@ uint32_t& ue_context_resume_resp_ies_o::value_c::enb_ue_s1ap_id() assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -erab_failed_to_resume_item_resume_res_ies_container& +erab_ie_container_list_l& ue_context_resume_resp_ies_o::value_c::erab_failed_to_resume_list_resume_res() { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeResIEs}}", type_.to_string(), "Value"); + return c.get >(); } crit_diagnostics_s& ue_context_resume_resp_ies_o::value_c::crit_diagnostics() { @@ -45896,11 +44926,11 @@ const uint32_t& ue_context_resume_resp_ies_o::value_c::enb_ue_s1ap_id() const assert_choice_type("INTEGER (0..16777215)", type_.to_string(), "Value"); return c.get(); } -const erab_failed_to_resume_item_resume_res_ies_container& +const erab_ie_container_list_l& ue_context_resume_resp_ies_o::value_c::erab_failed_to_resume_list_resume_res() const { - assert_choice_type("", type_.to_string(), "Value"); - return c.get(); + assert_choice_type("E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeResIEs}}", type_.to_string(), "Value"); + return c.get >(); } const crit_diagnostics_s& ue_context_resume_resp_ies_o::value_c::crit_diagnostics() const { @@ -45921,7 +44951,7 @@ void ue_context_resume_resp_ies_o::value_c::destroy_() { switch (type_) { case types::erab_failed_to_resume_list_resume_res: - c.destroy(); + c.destroy >(); break; case types::crit_diagnostics: c.destroy(); @@ -45943,7 +44973,7 @@ void ue_context_resume_resp_ies_o::value_c::set(types::options e) case types::enb_ue_s1ap_id: break; case types::erab_failed_to_resume_list_resume_res: - c.init(); + c.init >(); break; case types::crit_diagnostics: c.init(); @@ -45970,7 +45000,7 @@ ue_context_resume_resp_ies_o::value_c::value_c(const ue_context_resume_resp_ies_ c.init(other.c.get()); break; case types::erab_failed_to_resume_list_resume_res: - c.init(other.c.get()); + c.init(other.c.get >()); break; case types::crit_diagnostics: c.init(other.c.get()); @@ -46002,7 +45032,7 @@ ue_context_resume_resp_ies_o::value_c& ue_context_resume_resp_ies_o::value_c:: c.set(other.c.get()); break; case types::erab_failed_to_resume_list_resume_res: - c.set(other.c.get()); + c.set(other.c.get >()); break; case types::crit_diagnostics: c.set(other.c.get()); @@ -46032,8 +45062,7 @@ void ue_context_resume_resp_ies_o::value_c::to_json(json_writer& j) const j.write_int("INTEGER (0..16777215)", c.get()); break; case types::erab_failed_to_resume_list_resume_res: - j.write_fieldname(""); - c.get().to_json(j); + j.write_fieldname("E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeResIEs}}"); break; case types::crit_diagnostics: j.write_fieldname("CriticalityDiagnostics"); @@ -46062,7 +45091,8 @@ SRSASN_CODE ue_context_resume_resp_ies_o::value_c::pack(bit_ref& bref) const HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_failed_to_resume_list_resume_res: - HANDLE_CODE(c.get().pack(bref)); + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get >(), 1, 256, true)); break; case types::crit_diagnostics: HANDLE_CODE(c.get().pack(bref)); @@ -46090,7 +45120,8 @@ SRSASN_CODE ue_context_resume_resp_ies_o::value_c::unpack(cbit_ref& bref) HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)16777215u, false, true)); break; case types::erab_failed_to_resume_list_resume_res: - HANDLE_CODE(c.get().unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of( + c.get >(), bref, 1, 256, true)); break; case types::crit_diagnostics: HANDLE_CODE(c.get().unpack(bref)); @@ -46112,7 +45143,7 @@ std::string ue_context_resume_resp_ies_o::value_c::types_opts::to_string() const { static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", - "", + "E-RAB-IE-ContainerList{{E-RABFailedToResumeItemResumeResIEs}}", "CriticalityDiagnostics", "SecurityContext", "PendingDataIndication"}; @@ -50213,64 +49244,18 @@ void mmecp_relocation_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ie_field_s; - -mme_cfg_transfer_ies_container::mme_cfg_transfer_ies_container() : son_cfg_transfer_mct(130, crit_e::ignore) {} -SRSASN_CODE mme_cfg_transfer_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += son_cfg_transfer_mct_present ? 1 : 0; - pack_length(bref, nof_ies, 0u, 65535u, true); - - if (son_cfg_transfer_mct_present) { - HANDLE_CODE(son_cfg_transfer_mct.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mme_cfg_transfer_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 130) { - son_cfg_transfer_mct_present = true; - son_cfg_transfer_mct.id = c.id; - son_cfg_transfer_mct.crit = c.crit; - son_cfg_transfer_mct.value = c.value.son_cfg_transfer_mct(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void mme_cfg_transfer_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (son_cfg_transfer_mct_present) { - j.write_fieldname(""); - son_cfg_transfer_mct.to_json(j); - } - j.end_obj(); -} - // MMEConfigurationTransfer ::= SEQUENCE SRSASN_CODE mme_cfg_transfer_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE mme_cfg_transfer_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -50278,7 +49263,6 @@ void mme_cfg_transfer_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -50401,64 +49385,18 @@ void mme_cfg_upd_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ie_field_s; - -mme_cfg_upd_ack_ies_container::mme_cfg_upd_ack_ies_container() : crit_diagnostics(58, crit_e::ignore) {} -SRSASN_CODE mme_cfg_upd_ack_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += crit_diagnostics_present ? 1 : 0; - pack_length(bref, nof_ies, 0u, 65535u, true); - - if (crit_diagnostics_present) { - HANDLE_CODE(crit_diagnostics.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mme_cfg_upd_ack_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 58) { - crit_diagnostics_present = true; - crit_diagnostics.id = c.id; - crit_diagnostics.crit = c.crit; - crit_diagnostics.value = c.value.crit_diagnostics(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void mme_cfg_upd_ack_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (crit_diagnostics_present) { - j.write_fieldname(""); - crit_diagnostics.to_json(j); - } - j.end_obj(); -} - // MMEConfigurationUpdateAcknowledge ::= SEQUENCE SRSASN_CODE mme_cfg_upd_ack_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE mme_cfg_upd_ack_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -50466,7 +49404,6 @@ void mme_cfg_upd_ack_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -50575,68 +49512,18 @@ void mme_cfg_upd_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ie_field_s; - -mme_direct_info_transfer_ies_container::mme_direct_info_transfer_ies_container() : - inter_sys_info_transfer_type_mdt(122, crit_e::reject) -{ -} -SRSASN_CODE mme_direct_info_transfer_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 0u, 65535u, true); - - HANDLE_CODE(inter_sys_info_transfer_type_mdt.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mme_direct_info_transfer_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 122) { - nof_mandatory_ies--; - inter_sys_info_transfer_type_mdt.id = c.id; - inter_sys_info_transfer_type_mdt.crit = c.crit; - inter_sys_info_transfer_type_mdt.value = c.value.inter_sys_info_transfer_type_mdt(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void mme_direct_info_transfer_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - inter_sys_info_transfer_type_mdt.to_json(j); - j.end_obj(); -} - // MMEDirectInformationTransfer ::= SEQUENCE SRSASN_CODE mme_direct_info_transfer_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE mme_direct_info_transfer_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -50644,7 +49531,6 @@ void mme_direct_info_transfer_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -51038,64 +49924,18 @@ void overload_start_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ie_field_s; - -overload_stop_ies_container::overload_stop_ies_container() : gummei_list(154, crit_e::ignore) {} -SRSASN_CODE overload_stop_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 0; - nof_ies += gummei_list_present ? 1 : 0; - pack_length(bref, nof_ies, 0u, 65535u, true); - - if (gummei_list_present) { - HANDLE_CODE(gummei_list.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE overload_stop_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 154) { - gummei_list_present = true; - gummei_list.id = c.id; - gummei_list.crit = c.crit; - gummei_list.value = c.value.gummei_list(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - - return SRSASN_SUCCESS; -} -void overload_stop_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - if (gummei_list_present) { - j.write_fieldname(""); - gummei_list.to_json(j); - } - j.end_obj(); -} - // OverloadStop ::= SEQUENCE SRSASN_CODE overload_stop_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE overload_stop_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -51103,7 +49943,6 @@ void overload_stop_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } @@ -52604,65 +51443,18 @@ void reset_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct asn1::s1ap::protocol_ie_field_s; - -retrieve_ue_info_ies_container::retrieve_ue_info_ies_container() : s_tmsi(96, crit_e::reject) {} -SRSASN_CODE retrieve_ue_info_ies_container::pack(bit_ref& bref) const -{ - uint32_t nof_ies = 1; - pack_length(bref, nof_ies, 0u, 65535u, true); - - HANDLE_CODE(s_tmsi.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE retrieve_ue_info_ies_container::unpack(cbit_ref& bref) -{ - uint32_t nof_ies = 0; - unpack_length(nof_ies, bref, 0u, 65535u, true); - - uint32_t nof_mandatory_ies = 1; - - for (; nof_ies > 0; --nof_ies) { - protocol_ie_field_s c; - HANDLE_CODE(c.unpack(bref)); - if (c.id == 96) { - nof_mandatory_ies--; - s_tmsi.id = c.id; - s_tmsi.crit = c.crit; - s_tmsi.value = c.value.s_tmsi(); - } else { - asn1::log_error("Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; - } - } - if (nof_mandatory_ies > 0) { - asn1::log_error("Mandatory fields are missing\n"); - - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void retrieve_ue_info_ies_container::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname(""); - s_tmsi.to_json(j); - j.end_obj(); -} - // RetrieveUEInformation ::= SEQUENCE SRSASN_CODE retrieve_ue_info_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(protocol_ies.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, protocol_ies, 0, 65535, true)); return SRSASN_SUCCESS; } SRSASN_CODE retrieve_ue_info_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(protocol_ies.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(protocol_ies, bref, 0, 65535, true)); return SRSASN_SUCCESS; } @@ -52670,7 +51462,6 @@ void retrieve_ue_info_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("protocolIEs"); - protocol_ies.to_json(j); j.end_obj(); } diff --git a/lib/test/asn1/s1ap_asn1_test.cc b/lib/test/asn1/s1ap_asn1_test.cc index bd08b4268..536e534a1 100644 --- a/lib/test/asn1/s1ap_asn1_test.cc +++ b/lib/test/asn1/s1ap_asn1_test.cc @@ -94,6 +94,29 @@ int test_init_ctxt_setup_req() 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 bool is_same_type(U& u) { @@ -139,6 +162,42 @@ int test_proc_id_consistency() 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); @@ -146,7 +205,9 @@ int main() 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;