From b57063d875ff4f1f554c2f00122f2a4c21824b6f Mon Sep 17 00:00:00 2001 From: Ron Shacham Date: Mon, 6 Jul 2020 16:12:24 -0400 Subject: [PATCH] Add User-level metrics Issue-ID: SIM-18 Signed-off-by: Ron Shacham Change-Id: Ifcf571d8dfd23cafd2299464c0fadf65e7d25fe4 --- e2sim/e2apv1sim/ASN1c/C-RNTI.c | 65 + e2sim/e2apv1sim/ASN1c/C-RNTI.h | 46 + .../CU-CP-Usage-Report-CellResourceReportItem.c | 139 ++ .../CU-CP-Usage-Report-CellResourceReportItem.h | 58 + e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.c | 129 ++ e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.h | 56 + .../CU-CP-Usage-Report-UeResourceReportItem.c | 72 + .../CU-CP-Usage-Report-UeResourceReportItem.h | 47 + .../CU-UP-Usage-Report-CellResourceReportItem.c | 139 ++ .../CU-UP-Usage-Report-CellResourceReportItem.h | 58 + e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.c | 129 ++ e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.h | 56 + .../CU-UP-Usage-Report-UeResourceReportItem.c | 150 ++ .../CU-UP-Usage-Report-UeResourceReportItem.h | 47 + e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.c | 2 +- e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.h | 2 +- e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.c | 2 +- e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.h | 2 +- .../ASN1c/DU-Usage-Report-CellResourceReportItem.c | 139 ++ .../ASN1c/DU-Usage-Report-CellResourceReportItem.h | 58 + e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.c | 129 ++ e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.h | 56 + .../ASN1c/DU-Usage-Report-UeResourceReportItem.c | 138 ++ .../ASN1c/DU-Usage-Report-UeResourceReportItem.h | 47 + e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.c | 2 +- e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.h | 2 +- .../E2SM-KPM-EventTriggerDefinition-Format1.c | 2 +- .../E2SM-KPM-EventTriggerDefinition-Format1.h | 2 +- .../ASN1c/E2SM-KPM-EventTriggerDefinition.c | 2 +- .../ASN1c/E2SM-KPM-EventTriggerDefinition.h | 2 +- .../ASN1c/E2SM-KPM-IndicationHeader-Format1.c | 66 +- .../ASN1c/E2SM-KPM-IndicationHeader-Format1.h | 14 +- e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.c | 2 +- e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.h | 2 +- .../ASN1c/E2SM-KPM-IndicationMessage-Format1.c | 12 +- .../ASN1c/E2SM-KPM-IndicationMessage-Format1.h | 2 +- e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.c | 84 +- e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.h | 39 +- .../ASN1c/E2SM-KPM-RANfunction-Description.c | 2 +- .../ASN1c/E2SM-KPM-RANfunction-Description.h | 2 +- e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.c | 2 +- e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.h | 2 +- e2sim/e2apv1sim/ASN1c/ENB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/ENB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/ENGNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/ENGNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.c | 2 +- e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.h | 2 +- e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.c | 2 +- e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.h | 2 +- e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.c | 2 +- e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.h | 2 +- e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.c | 2 +- e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.h | 2 +- .../e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.c | 2 +- .../e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.h | 2 +- .../ASN1c/FQIPERSlicesPerPlmnPerCellListItem.c | 2 +- .../ASN1c/FQIPERSlicesPerPlmnPerCellListItem.h | 2 +- e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.c | 2 +- e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.h | 2 +- e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.c | 2 +- e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.h | 2 +- e2sim/e2apv1sim/ASN1c/GNB-DU-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GNB-DU-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GNB-DU-Name.c | 4 +- e2sim/e2apv1sim/ASN1c/GNB-DU-Name.h | 3 +- e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.c | 2 +- e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.h | 2 +- e2sim/e2apv1sim/ASN1c/GNB-Name.c | 75 + e2sim/e2apv1sim/ASN1c/GNB-Name.h | 62 + e2sim/e2apv1sim/ASN1c/GlobalENB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalENB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.c | 2 +- e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.h | 2 +- e2sim/e2apv1sim/ASN1c/Makefile.am.asn1convert | 2 +- e2sim/e2apv1sim/ASN1c/Makefile.am.libasncodec | 30 +- e2sim/e2apv1sim/ASN1c/NI-Type.c | 2 +- e2sim/e2apv1sim/ASN1c/NI-Type.h | 2 +- e2sim/e2apv1sim/ASN1c/NRCGI.c | 2 +- e2sim/e2apv1sim/ASN1c/NRCGI.h | 2 +- e2sim/e2apv1sim/ASN1c/NRCellIdentity.c | 2 +- e2sim/e2apv1sim/ASN1c/NRCellIdentity.h | 2 +- e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.c | 2 +- e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.h | 2 +- e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.c | 2 +- e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.h | 2 +- e2sim/e2apv1sim/ASN1c/ODU-PF-Container.c | 2 +- e2sim/e2apv1sim/ASN1c/ODU-PF-Container.h | 2 +- e2sim/e2apv1sim/ASN1c/PF-Container.c | 6 +- e2sim/e2apv1sim/ASN1c/PF-Container.h | 8 +- e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.c | 2 +- e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.h | 2 +- e2sim/e2apv1sim/ASN1c/PLMN-Identity.c | 2 +- e2sim/e2apv1sim/ASN1c/PLMN-Identity.h | 2 +- e2sim/e2apv1sim/ASN1c/PM-Containers-List.c | 2 +- e2sim/e2apv1sim/ASN1c/PM-Containers-List.h | 7 +- e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.c | 2 +- e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.h | 2 +- e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.c | 2 +- e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.h | 2 +- e2sim/e2apv1sim/ASN1c/PlmnID-List.c | 2 +- e2sim/e2apv1sim/ASN1c/PlmnID-List.h | 2 +- e2sim/e2apv1sim/ASN1c/RAN-Container.c | 116 +- e2sim/e2apv1sim/ASN1c/RAN-Container.h | 60 +- e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.c | 2 +- e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.h | 2 +- e2sim/e2apv1sim/ASN1c/RANfunction-Name.c | 2 +- e2sim/e2apv1sim/ASN1c/RANfunction-Name.h | 2 +- e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.c | 2 +- e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.h | 2 +- e2sim/e2apv1sim/ASN1c/RIC-Format-Type.c | 2 +- e2sim/e2apv1sim/ASN1c/RIC-Format-Type.h | 2 +- e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.c | 2 +- e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.h | 2 +- e2sim/e2apv1sim/ASN1c/RIC-Style-Name.c | 2 +- e2sim/e2apv1sim/ASN1c/RIC-Style-Name.h | 2 +- e2sim/e2apv1sim/ASN1c/RIC-Style-Type.c | 2 +- e2sim/e2apv1sim/ASN1c/RIC-Style-Type.h | 2 +- e2sim/e2apv1sim/ASN1c/RT-Period-IE.c | 2 +- e2sim/e2apv1sim/ASN1c/RT-Period-IE.h | 2 +- e2sim/e2apv1sim/ASN1c/SNSSAI.c | 2 +- e2sim/e2apv1sim/ASN1c/SNSSAI.h | 2 +- e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.c | 2 +- e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.h | 2 +- .../e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.c | 2 +- .../e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.h | 2 +- e2sim/e2apv1sim/ASN1c/SliceToReportListItem.c | 2 +- e2sim/e2apv1sim/ASN1c/SliceToReportListItem.h | 2 +- e2sim/e2apv1sim/ASN1c/Timestamp.c | 31 + e2sim/e2apv1sim/ASN1c/Timestamp.h | 45 + e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.c | 2 +- e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.h | 2 +- e2sim/e2apv1sim/ASN1c/UE-Report-Type.c | 60 + e2sim/e2apv1sim/ASN1c/UE-Report-Type.h | 57 + e2sim/e2apv1sim/ASN1c/asn_constant.h | 3 + e2sim/e2apv1sim/ASN1c/converter-example.mk | 2 +- e2sim/e2apv1sim/ASN1c/pdu_collection.c | 4 +- e2sim/e2apv1sim/CMakeLists.txt | 31 +- e2sim/e2apv1sim/Dockerfile | 55 + e2sim/e2apv1sim/e2sim.cpp | 79 +- e2sim/e2apv1sim/e2sim.hpp | 5 + e2sim/e2apv1sim/encode_e2apv1.cpp | 354 ++++- e2sim/e2apv1sim/encode_e2apv1.hpp | 9 +- e2sim/e2apv1sim/encode_e2apv1_back.cpp | 370 ----- e2sim/e2apv1sim/encode_kpm.cpp | 1432 +++++++++++++++++++- e2sim/e2apv1sim/encode_kpm.hpp | 28 + e2sim/e2apv1sim/kpm_callbacks.cpp | 326 +++++ e2sim/e2apv1sim/kpm_callbacks.hpp | 4 + e2sim/e2apv1sim/ricsim.cpp | 16 +- e2sim/e2apv1sim/ricsim.hpp | 5 + e2sim/e2apv1sim/simulation.txt | 3 + e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.cpp | 18 +- e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.hpp | 2 + 169 files changed, 4877 insertions(+), 628 deletions(-) create mode 100644 e2sim/e2apv1sim/ASN1c/C-RNTI.c create mode 100644 e2sim/e2apv1sim/ASN1c/C-RNTI.h create mode 100644 e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.c create mode 100644 e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.h create mode 100644 e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.c create mode 100644 e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.h create mode 100644 e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.c create mode 100644 e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.h create mode 100644 e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.c create mode 100644 e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.h create mode 100644 e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.c create mode 100644 e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.h create mode 100644 e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.c create mode 100644 e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.h create mode 100644 e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.c create mode 100644 e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.h create mode 100644 e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.c create mode 100644 e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.h create mode 100644 e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.c create mode 100644 e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.h create mode 100644 e2sim/e2apv1sim/ASN1c/GNB-Name.c create mode 100644 e2sim/e2apv1sim/ASN1c/GNB-Name.h create mode 100644 e2sim/e2apv1sim/ASN1c/Timestamp.c create mode 100644 e2sim/e2apv1sim/ASN1c/Timestamp.h create mode 100644 e2sim/e2apv1sim/ASN1c/UE-Report-Type.c create mode 100644 e2sim/e2apv1sim/ASN1c/UE-Report-Type.h create mode 100644 e2sim/e2apv1sim/Dockerfile create mode 100644 e2sim/e2apv1sim/e2sim.hpp delete mode 100644 e2sim/e2apv1sim/encode_e2apv1_back.cpp create mode 100644 e2sim/e2apv1sim/kpm_callbacks.cpp create mode 100644 e2sim/e2apv1sim/kpm_callbacks.hpp create mode 100644 e2sim/e2apv1sim/ricsim.hpp create mode 100644 e2sim/e2apv1sim/simulation.txt diff --git a/e2sim/e2apv1sim/ASN1c/C-RNTI.c b/e2sim/e2apv1sim/ASN1c/C-RNTI.c new file mode 100644 index 0000000..e626083 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/C-RNTI.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "C-RNTI.h" + +int +C_RNTI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 2)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_C_RNTI_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +asn_per_constraints_t asn_PER_type_C_RNTI_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_C_RNTI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_C_RNTI = { + "C-RNTI", + "C-RNTI", + &asn_OP_OCTET_STRING, + asn_DEF_C_RNTI_tags_1, + sizeof(asn_DEF_C_RNTI_tags_1) + /sizeof(asn_DEF_C_RNTI_tags_1[0]), /* 1 */ + asn_DEF_C_RNTI_tags_1, /* Same as above */ + sizeof(asn_DEF_C_RNTI_tags_1) + /sizeof(asn_DEF_C_RNTI_tags_1[0]), /* 1 */ + { &asn_OER_type_C_RNTI_constr_1, &asn_PER_type_C_RNTI_constr_1, C_RNTI_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/C-RNTI.h b/e2sim/e2apv1sim/ASN1c/C-RNTI.h new file mode 100644 index 0000000..7366109 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/C-RNTI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _C_RNTI_H_ +#define _C_RNTI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* C-RNTI */ +typedef OCTET_STRING_t C_RNTI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_C_RNTI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_C_RNTI; +asn_struct_free_f C_RNTI_free; +asn_struct_print_f C_RNTI_print; +asn_constr_check_f C_RNTI_constraint; +ber_type_decoder_f C_RNTI_decode_ber; +der_type_encoder_f C_RNTI_encode_der; +xer_type_decoder_f C_RNTI_decode_xer; +xer_type_encoder_f C_RNTI_encode_xer; +oer_type_decoder_f C_RNTI_decode_oer; +oer_type_encoder_f C_RNTI_encode_oer; +per_type_decoder_f C_RNTI_decode_uper; +per_type_encoder_f C_RNTI_encode_uper; +per_type_decoder_f C_RNTI_decode_aper; +per_type_encoder_f C_RNTI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _C_RNTI_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.c b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.c new file mode 100644 index 0000000..c0b6775 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.c @@ -0,0 +1,139 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "CU-CP-Usage-Report-CellResourceReportItem.h" + +static int +memb_ueResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 32)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueResourceReportList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_CP_Usage_Report_UeResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueResourceReportList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueResourceReportList_specs_3 = { + sizeof(struct CU_CP_Usage_Report_CellResourceReportItem__ueResourceReportList), + offsetof(struct CU_CP_Usage_Report_CellResourceReportItem__ueResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueResourceReportList_3 = { + "ueResourceReportList", + "ueResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueResourceReportList_tags_3, + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]) - 1, /* 1 */ + asn_DEF_ueResourceReportList_tags_3, /* Same as above */ + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]), /* 2 */ + { &asn_OER_type_ueResourceReportList_constr_3, &asn_PER_type_ueResourceReportList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ueResourceReportList_3, + 1, /* Single element */ + &asn_SPC_ueResourceReportList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_CellResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_CellResourceReportItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_CellResourceReportItem, ueResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ueResourceReportList_3, + 0, + { &asn_OER_memb_ueResourceReportList_constr_3, &asn_PER_memb_ueResourceReportList_constr_3, memb_ueResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "ueResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_CP_Usage_Report_CellResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_CellResourceReportItem_specs_1 = { + sizeof(struct CU_CP_Usage_Report_CellResourceReportItem), + offsetof(struct CU_CP_Usage_Report_CellResourceReportItem, _asn_ctx), + asn_MAP_CU_CP_Usage_Report_CellResourceReportItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_CellResourceReportItem = { + "CU-CP-Usage-Report-CellResourceReportItem", + "CU-CP-Usage-Report-CellResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1, + sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_CP_Usage_Report_CellResourceReportItem_1, + 2, /* Elements count */ + &asn_SPC_CU_CP_Usage_Report_CellResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.h b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.h new file mode 100644 index 0000000..9fb9dd9 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-CellResourceReportItem.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _CU_CP_Usage_Report_CellResourceReportItem_H_ +#define _CU_CP_Usage_Report_CellResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_CP_Usage_Report_UeResourceReportItem; + +/* CU-CP-Usage-Report-CellResourceReportItem */ +typedef struct CU_CP_Usage_Report_CellResourceReportItem { + NRCGI_t nRCGI; + struct CU_CP_Usage_Report_CellResourceReportItem__ueResourceReportList { + A_SEQUENCE_OF(struct CU_CP_Usage_Report_UeResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_CP_Usage_Report_CellResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_CellResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_CellResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_CellResourceReportItem_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CU-CP-Usage-Report-UeResourceReportItem.h" + +#endif /* _CU_CP_Usage_Report_CellResourceReportItem_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.c b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.c new file mode 100644 index 0000000..22055b3 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "CU-CP-Usage-Report-Per-UE.h" + +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 16384)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..16384)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 14, 14, 1, 16384 } /* (SIZE(1..16384)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..16384)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 14, 14, 1, 16384 } /* (SIZE(1..16384)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_CP_Usage_Report_CellResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct CU_CP_Usage_Report_Per_UE__cellResourceReportList), + offsetof(struct CU_CP_Usage_Report_Per_UE__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_Per_UE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_Per_UE, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_CP_Usage_Report_Per_UE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_Per_UE_specs_1 = { + sizeof(struct CU_CP_Usage_Report_Per_UE), + offsetof(struct CU_CP_Usage_Report_Per_UE, _asn_ctx), + asn_MAP_CU_CP_Usage_Report_Per_UE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_Per_UE = { + "CU-CP-Usage-Report-Per-UE", + "CU-CP-Usage-Report-Per-UE", + &asn_OP_SEQUENCE, + asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1, + sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_CP_Usage_Report_Per_UE_1, + 1, /* Elements count */ + &asn_SPC_CU_CP_Usage_Report_Per_UE_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.h b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.h new file mode 100644 index 0000000..dad74ca --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-Per-UE.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _CU_CP_Usage_Report_Per_UE_H_ +#define _CU_CP_Usage_Report_Per_UE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_CP_Usage_Report_CellResourceReportItem; + +/* CU-CP-Usage-Report-Per-UE */ +typedef struct CU_CP_Usage_Report_Per_UE { + struct CU_CP_Usage_Report_Per_UE__cellResourceReportList { + A_SEQUENCE_OF(struct CU_CP_Usage_Report_CellResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_CP_Usage_Report_Per_UE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_Per_UE; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_Per_UE_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_Per_UE_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CU-CP-Usage-Report-CellResourceReportItem.h" + +#endif /* _CU_CP_Usage_Report_Per_UE_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.c b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.c new file mode 100644 index 0000000..de4d8de --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "CU-CP-Usage-Report-UeResourceReportItem.h" + +asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_UeResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, c_RNTI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_C_RNTI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "c-RNTI" + }, + { ATF_POINTER, 2, offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, serving_Cell_RF_Type), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "serving-Cell-RF-Type" + }, + { ATF_POINTER, 1, offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, neighbor_Cell_RF), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "neighbor-Cell-RF" + }, +}; +static const int asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* c-RNTI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* serving-Cell-RF-Type */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* neighbor-Cell-RF */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_UeResourceReportItem_specs_1 = { + sizeof(struct CU_CP_Usage_Report_UeResourceReportItem), + offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, _asn_ctx), + asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_UeResourceReportItem = { + "CU-CP-Usage-Report-UeResourceReportItem", + "CU-CP-Usage-Report-UeResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1, + sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_CP_Usage_Report_UeResourceReportItem_1, + 3, /* Elements count */ + &asn_SPC_CU_CP_Usage_Report_UeResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.h b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.h new file mode 100644 index 0000000..11edd99 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-CP-Usage-Report-UeResourceReportItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _CU_CP_Usage_Report_UeResourceReportItem_H_ +#define _CU_CP_Usage_Report_UeResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "C-RNTI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* CU-CP-Usage-Report-UeResourceReportItem */ +typedef struct CU_CP_Usage_Report_UeResourceReportItem { + C_RNTI_t c_RNTI; + OCTET_STRING_t *serving_Cell_RF_Type; /* OPTIONAL */ + OCTET_STRING_t *neighbor_Cell_RF; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_CP_Usage_Report_UeResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_UeResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_UeResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_UeResourceReportItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_CP_Usage_Report_UeResourceReportItem_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.c b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.c new file mode 100644 index 0000000..4781c55 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.c @@ -0,0 +1,139 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "CU-UP-Usage-Report-CellResourceReportItem.h" + +static int +memb_ueResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 32)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueResourceReportList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_UP_Usage_Report_UeResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueResourceReportList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueResourceReportList_specs_3 = { + sizeof(struct CU_UP_Usage_Report_CellResourceReportItem__ueResourceReportList), + offsetof(struct CU_UP_Usage_Report_CellResourceReportItem__ueResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueResourceReportList_3 = { + "ueResourceReportList", + "ueResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueResourceReportList_tags_3, + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]) - 1, /* 1 */ + asn_DEF_ueResourceReportList_tags_3, /* Same as above */ + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]), /* 2 */ + { &asn_OER_type_ueResourceReportList_constr_3, &asn_PER_type_ueResourceReportList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ueResourceReportList_3, + 1, /* Single element */ + &asn_SPC_ueResourceReportList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_CellResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_CellResourceReportItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_CellResourceReportItem, ueResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ueResourceReportList_3, + 0, + { &asn_OER_memb_ueResourceReportList_constr_3, &asn_PER_memb_ueResourceReportList_constr_3, memb_ueResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "ueResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_UP_Usage_Report_CellResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_CellResourceReportItem_specs_1 = { + sizeof(struct CU_UP_Usage_Report_CellResourceReportItem), + offsetof(struct CU_UP_Usage_Report_CellResourceReportItem, _asn_ctx), + asn_MAP_CU_UP_Usage_Report_CellResourceReportItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_CellResourceReportItem = { + "CU-UP-Usage-Report-CellResourceReportItem", + "CU-UP-Usage-Report-CellResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1, + sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_UP_Usage_Report_CellResourceReportItem_1, + 2, /* Elements count */ + &asn_SPC_CU_UP_Usage_Report_CellResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.h b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.h new file mode 100644 index 0000000..f313f40 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-CellResourceReportItem.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _CU_UP_Usage_Report_CellResourceReportItem_H_ +#define _CU_UP_Usage_Report_CellResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_UP_Usage_Report_UeResourceReportItem; + +/* CU-UP-Usage-Report-CellResourceReportItem */ +typedef struct CU_UP_Usage_Report_CellResourceReportItem { + NRCGI_t nRCGI; + struct CU_UP_Usage_Report_CellResourceReportItem__ueResourceReportList { + A_SEQUENCE_OF(struct CU_UP_Usage_Report_UeResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_UP_Usage_Report_CellResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_CellResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_CellResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_CellResourceReportItem_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CU-UP-Usage-Report-UeResourceReportItem.h" + +#endif /* _CU_UP_Usage_Report_CellResourceReportItem_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.c b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.c new file mode 100644 index 0000000..5213281 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "CU-UP-Usage-Report-Per-UE.h" + +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 512)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_UP_Usage_Report_CellResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct CU_UP_Usage_Report_Per_UE__cellResourceReportList), + offsetof(struct CU_UP_Usage_Report_Per_UE__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_Per_UE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_Per_UE, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_UP_Usage_Report_Per_UE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_Per_UE_specs_1 = { + sizeof(struct CU_UP_Usage_Report_Per_UE), + offsetof(struct CU_UP_Usage_Report_Per_UE, _asn_ctx), + asn_MAP_CU_UP_Usage_Report_Per_UE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_Per_UE = { + "CU-UP-Usage-Report-Per-UE", + "CU-UP-Usage-Report-Per-UE", + &asn_OP_SEQUENCE, + asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1, + sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_UP_Usage_Report_Per_UE_1, + 1, /* Elements count */ + &asn_SPC_CU_UP_Usage_Report_Per_UE_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.h b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.h new file mode 100644 index 0000000..71e6ed9 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-Per-UE.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _CU_UP_Usage_Report_Per_UE_H_ +#define _CU_UP_Usage_Report_Per_UE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_UP_Usage_Report_CellResourceReportItem; + +/* CU-UP-Usage-Report-Per-UE */ +typedef struct CU_UP_Usage_Report_Per_UE { + struct CU_UP_Usage_Report_Per_UE__cellResourceReportList { + A_SEQUENCE_OF(struct CU_UP_Usage_Report_CellResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_UP_Usage_Report_Per_UE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_Per_UE; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_Per_UE_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_Per_UE_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CU-UP-Usage-Report-CellResourceReportItem.h" + +#endif /* _CU_UP_Usage_Report_Per_UE_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.c b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.c new file mode 100644 index 0000000..1867379 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.c @@ -0,0 +1,150 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "CU-UP-Usage-Report-UeResourceReportItem.h" + +static int +memb_pDCPBytesDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_pDCPBytesUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_UeResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, c_RNTI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_C_RNTI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "c-RNTI" + }, + { ATF_POINTER, 2, offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, pDCPBytesDL), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesDL_constr_3, &asn_PER_memb_pDCPBytesDL_constr_3, memb_pDCPBytesDL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesDL" + }, + { ATF_POINTER, 1, offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, pDCPBytesUL), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesUL_constr_4, &asn_PER_memb_pDCPBytesUL_constr_4, memb_pDCPBytesUL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesUL" + }, +}; +static const int asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* c-RNTI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pDCPBytesDL */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* pDCPBytesUL */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_UeResourceReportItem_specs_1 = { + sizeof(struct CU_UP_Usage_Report_UeResourceReportItem), + offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, _asn_ctx), + asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_UeResourceReportItem = { + "CU-UP-Usage-Report-UeResourceReportItem", + "CU-UP-Usage-Report-UeResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1, + sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_UP_Usage_Report_UeResourceReportItem_1, + 3, /* Elements count */ + &asn_SPC_CU_UP_Usage_Report_UeResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.h b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.h new file mode 100644 index 0000000..3a3dec7 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/CU-UP-Usage-Report-UeResourceReportItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _CU_UP_Usage_Report_UeResourceReportItem_H_ +#define _CU_UP_Usage_Report_UeResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "C-RNTI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* CU-UP-Usage-Report-UeResourceReportItem */ +typedef struct CU_UP_Usage_Report_UeResourceReportItem { + C_RNTI_t c_RNTI; + INTEGER_t *pDCPBytesDL; /* OPTIONAL */ + INTEGER_t *pDCPBytesUL; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_UP_Usage_Report_UeResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_UeResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_UeResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_UeResourceReportItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_UP_Usage_Report_UeResourceReportItem_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.c b/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.c index 56dd593..bd27283 100644 --- a/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.c +++ b/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.h b/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.h index 8105467..14aafc3 100644 --- a/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.h +++ b/e2sim/e2apv1sim/ASN1c/CUUPMeasurement-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.c b/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.c index 03a9d30..670d42a 100644 --- a/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.c +++ b/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.h b/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.h index d314460..91bbf71 100644 --- a/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.h +++ b/e2sim/e2apv1sim/ASN1c/CellResourceReportListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.c b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.c new file mode 100644 index 0000000..eee9621 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.c @@ -0,0 +1,139 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "DU-Usage-Report-CellResourceReportItem.h" + +static int +memb_ueResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 32)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueResourceReportList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_DU_Usage_Report_UeResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueResourceReportList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueResourceReportList_specs_3 = { + sizeof(struct DU_Usage_Report_CellResourceReportItem__ueResourceReportList), + offsetof(struct DU_Usage_Report_CellResourceReportItem__ueResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueResourceReportList_3 = { + "ueResourceReportList", + "ueResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueResourceReportList_tags_3, + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]) - 1, /* 1 */ + asn_DEF_ueResourceReportList_tags_3, /* Same as above */ + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]), /* 2 */ + { &asn_OER_type_ueResourceReportList_constr_3, &asn_PER_type_ueResourceReportList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ueResourceReportList_3, + 1, /* Single element */ + &asn_SPC_ueResourceReportList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_DU_Usage_Report_CellResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_CellResourceReportItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_CellResourceReportItem, ueResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ueResourceReportList_3, + 0, + { &asn_OER_memb_ueResourceReportList_constr_3, &asn_PER_memb_ueResourceReportList_constr_3, memb_ueResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "ueResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DU_Usage_Report_CellResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_CellResourceReportItem_specs_1 = { + sizeof(struct DU_Usage_Report_CellResourceReportItem), + offsetof(struct DU_Usage_Report_CellResourceReportItem, _asn_ctx), + asn_MAP_DU_Usage_Report_CellResourceReportItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_CellResourceReportItem = { + "DU-Usage-Report-CellResourceReportItem", + "DU-Usage-Report-CellResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1, + sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DU_Usage_Report_CellResourceReportItem_1, + 2, /* Elements count */ + &asn_SPC_DU_Usage_Report_CellResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.h b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.h new file mode 100644 index 0000000..4a72572 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-CellResourceReportItem.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _DU_Usage_Report_CellResourceReportItem_H_ +#define _DU_Usage_Report_CellResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct DU_Usage_Report_UeResourceReportItem; + +/* DU-Usage-Report-CellResourceReportItem */ +typedef struct DU_Usage_Report_CellResourceReportItem { + NRCGI_t nRCGI; + struct DU_Usage_Report_CellResourceReportItem__ueResourceReportList { + A_SEQUENCE_OF(struct DU_Usage_Report_UeResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DU_Usage_Report_CellResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_CellResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_CellResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_DU_Usage_Report_CellResourceReportItem_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "DU-Usage-Report-UeResourceReportItem.h" + +#endif /* _DU_Usage_Report_CellResourceReportItem_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.c b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.c new file mode 100644 index 0000000..9ba13af --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.c @@ -0,0 +1,129 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "DU-Usage-Report-Per-UE.h" + +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 512)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_DU_Usage_Report_CellResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct DU_Usage_Report_Per_UE__cellResourceReportList), + offsetof(struct DU_Usage_Report_Per_UE__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_DU_Usage_Report_Per_UE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_Per_UE, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_DU_Usage_Report_Per_UE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DU_Usage_Report_Per_UE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_Per_UE_specs_1 = { + sizeof(struct DU_Usage_Report_Per_UE), + offsetof(struct DU_Usage_Report_Per_UE, _asn_ctx), + asn_MAP_DU_Usage_Report_Per_UE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_Per_UE = { + "DU-Usage-Report-Per-UE", + "DU-Usage-Report-Per-UE", + &asn_OP_SEQUENCE, + asn_DEF_DU_Usage_Report_Per_UE_tags_1, + sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + asn_DEF_DU_Usage_Report_Per_UE_tags_1, /* Same as above */ + sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DU_Usage_Report_Per_UE_1, + 1, /* Elements count */ + &asn_SPC_DU_Usage_Report_Per_UE_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.h b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.h new file mode 100644 index 0000000..2fc44d1 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-Per-UE.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _DU_Usage_Report_Per_UE_H_ +#define _DU_Usage_Report_Per_UE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct DU_Usage_Report_CellResourceReportItem; + +/* DU-Usage-Report-Per-UE */ +typedef struct DU_Usage_Report_Per_UE { + struct DU_Usage_Report_Per_UE__cellResourceReportList { + A_SEQUENCE_OF(struct DU_Usage_Report_CellResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DU_Usage_Report_Per_UE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_Per_UE; +extern asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_Per_UE_specs_1; +extern asn_TYPE_member_t asn_MBR_DU_Usage_Report_Per_UE_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "DU-Usage-Report-CellResourceReportItem.h" + +#endif /* _DU_Usage_Report_Per_UE_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.c b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.c new file mode 100644 index 0000000..0bcafbe --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.c @@ -0,0 +1,138 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "DU-Usage-Report-UeResourceReportItem.h" + +static int +memb_dl_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 1000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ul_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 1000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 30, -1, 0, 1000000000 } /* (0..1000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 30, -1, 0, 1000000000 } /* (0..1000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_DU_Usage_Report_UeResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_UeResourceReportItem, c_RNTI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_C_RNTI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "c-RNTI" + }, + { ATF_POINTER, 2, offsetof(struct DU_Usage_Report_UeResourceReportItem, dl_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_dl_PRBUsage_constr_3, &asn_PER_memb_dl_PRBUsage_constr_3, memb_dl_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "dl-PRBUsage" + }, + { ATF_POINTER, 1, offsetof(struct DU_Usage_Report_UeResourceReportItem, ul_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ul_PRBUsage_constr_4, &asn_PER_memb_ul_PRBUsage_constr_4, memb_ul_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "ul-PRBUsage" + }, +}; +static const int asn_MAP_DU_Usage_Report_UeResourceReportItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DU_Usage_Report_UeResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* c-RNTI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-PRBUsage */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ul-PRBUsage */ +}; +asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_UeResourceReportItem_specs_1 = { + sizeof(struct DU_Usage_Report_UeResourceReportItem), + offsetof(struct DU_Usage_Report_UeResourceReportItem, _asn_ctx), + asn_MAP_DU_Usage_Report_UeResourceReportItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_DU_Usage_Report_UeResourceReportItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_UeResourceReportItem = { + "DU-Usage-Report-UeResourceReportItem", + "DU-Usage-Report-UeResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1, + sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DU_Usage_Report_UeResourceReportItem_1, + 3, /* Elements count */ + &asn_SPC_DU_Usage_Report_UeResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.h b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.h new file mode 100644 index 0000000..e860272 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/DU-Usage-Report-UeResourceReportItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _DU_Usage_Report_UeResourceReportItem_H_ +#define _DU_Usage_Report_UeResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "C-RNTI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* DU-Usage-Report-UeResourceReportItem */ +typedef struct DU_Usage_Report_UeResourceReportItem { + C_RNTI_t c_RNTI; + long *dl_PRBUsage; /* OPTIONAL */ + long *ul_PRBUsage; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DU_Usage_Report_UeResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_UeResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_UeResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_DU_Usage_Report_UeResourceReportItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _DU_Usage_Report_UeResourceReportItem_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.c index c538745..abdf25d 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.h index 06715f0..70b81dd 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-ActionDefinition.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.c index ef0bccc..e0b48f2 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.h index 2044c67..44cbd92 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition-Format1.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.c index 840d5ff..482e42c 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.h index 2770a69..e96e600 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-EventTriggerDefinition.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.c index 345bf8d..2cccf8b 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -74,7 +74,7 @@ static asn_per_constraints_t asn_PER_memb_qci_constr_7 CC_NOTUSED = { 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { - { ATF_POINTER, 6, offsetof(struct E2SM_KPM_IndicationHeader_Format1, id_GlobalKPMnode_ID), + { ATF_POINTER, 10, offsetof(struct E2SM_KPM_IndicationHeader_Format1, id_GlobalKPMnode_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_GlobalKPMnode_ID, @@ -83,7 +83,7 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { 0, 0, /* No default value */ "id-GlobalKPMnode-ID" }, - { ATF_POINTER, 5, offsetof(struct E2SM_KPM_IndicationHeader_Format1, nRCGI), + { ATF_POINTER, 9, offsetof(struct E2SM_KPM_IndicationHeader_Format1, nRCGI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NRCGI, @@ -92,7 +92,7 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { 0, 0, /* No default value */ "nRCGI" }, - { ATF_POINTER, 4, offsetof(struct E2SM_KPM_IndicationHeader_Format1, pLMN_Identity), + { ATF_POINTER, 8, offsetof(struct E2SM_KPM_IndicationHeader_Format1, pLMN_Identity), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMN_Identity, @@ -101,7 +101,7 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { 0, 0, /* No default value */ "pLMN-Identity" }, - { ATF_POINTER, 3, offsetof(struct E2SM_KPM_IndicationHeader_Format1, sliceID), + { ATF_POINTER, 7, offsetof(struct E2SM_KPM_IndicationHeader_Format1, sliceID), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SNSSAI, @@ -110,7 +110,7 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { 0, 0, /* No default value */ "sliceID" }, - { ATF_POINTER, 2, offsetof(struct E2SM_KPM_IndicationHeader_Format1, fiveQI), + { ATF_POINTER, 6, offsetof(struct E2SM_KPM_IndicationHeader_Format1, fiveQI), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -119,7 +119,7 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { 0, 0, /* No default value */ "fiveQI" }, - { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationHeader_Format1, qci), + { ATF_POINTER, 5, offsetof(struct E2SM_KPM_IndicationHeader_Format1, qci), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -128,8 +128,44 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { 0, 0, /* No default value */ "qci" }, + { ATF_POINTER, 4, offsetof(struct E2SM_KPM_IndicationHeader_Format1, message_Type), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UE_Report_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "message-Type" + }, + { ATF_POINTER, 3, offsetof(struct E2SM_KPM_IndicationHeader_Format1, gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-ID" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_KPM_IndicationHeader_Format1, gNB_Name), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GNB_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-Name" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationHeader_Format1, global_GNB_ID), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalgNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-GNB-ID" + }, }; -static const int asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1[] = { 0, 1, 2, 3, 4, 5 }; +static const int asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; @@ -139,16 +175,20 @@ static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pLMN-Identity */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sliceID */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* fiveQI */ - { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* qci */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* qci */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* message-Type */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* gNB-DU-ID */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* gNB-Name */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* global-GNB-ID */ }; asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1 = { sizeof(struct E2SM_KPM_IndicationHeader_Format1), offsetof(struct E2SM_KPM_IndicationHeader_Format1, _asn_ctx), asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1, - 6, /* Count of tags in the map */ + 10, /* Count of tags in the map */ asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1, /* Optional members */ - 6, 0, /* Root/Additions */ - 6, /* First extension addition */ + 10, 0, /* Root/Additions */ + 10, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1 = { "E2SM-KPM-IndicationHeader-Format1", @@ -162,7 +202,7 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1 = { /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_E2SM_KPM_IndicationHeader_Format1_1, - 6, /* Elements count */ + 10, /* Elements count */ &asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1 /* Additional specs */ }; diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.h index e7cb6cf..c46b715 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader-Format1.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -14,6 +14,8 @@ /* Including external dependencies */ #include "PLMN-Identity.h" #include +#include "UE-Report-Type.h" +#include "GNB-DU-ID.h" #include #ifdef __cplusplus @@ -24,6 +26,8 @@ extern "C" { struct GlobalKPMnode_ID; struct NRCGI; struct SNSSAI; +struct GNB_Name; +struct GlobalgNB_ID; /* E2SM-KPM-IndicationHeader-Format1 */ typedef struct E2SM_KPM_IndicationHeader_Format1 { @@ -33,6 +37,10 @@ typedef struct E2SM_KPM_IndicationHeader_Format1 { struct SNSSAI *sliceID; /* OPTIONAL */ long *fiveQI; /* OPTIONAL */ long *qci; /* OPTIONAL */ + UE_Report_Type_t *message_Type; /* OPTIONAL */ + GNB_DU_ID_t *gNB_DU_ID; /* OPTIONAL */ + struct GNB_Name *gNB_Name; /* OPTIONAL */ + struct GlobalgNB_ID *global_GNB_ID; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. @@ -45,7 +53,7 @@ typedef struct E2SM_KPM_IndicationHeader_Format1 { /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1; extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[6]; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[10]; #ifdef __cplusplus } @@ -55,6 +63,8 @@ extern asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[6]; #include "GlobalKPMnode-ID.h" #include "NRCGI.h" #include "SNSSAI.h" +#include "GNB-Name.h" +#include "GlobalgNB-ID.h" #endif /* _E2SM_KPM_IndicationHeader_Format1_H_ */ #include diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.c index 4a51497..c4fe730 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.h index b6c74807..67dc86d 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationHeader.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.c index e75aec4..7bdebb0 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -22,7 +22,7 @@ memb_pm_Containers_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; - if((size >= 1 && size <= 512)) { + if((size >= 1 && size <= 8)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { @@ -35,18 +35,18 @@ memb_pm_Containers_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt static asn_oer_constraints_t asn_OER_type_pm_Containers_constr_2 CC_NOTUSED = { { 0, 0 }, - -1 /* (SIZE(1..512)) */}; + -1 /* (SIZE(1..8)) */}; static asn_per_constraints_t asn_PER_type_pm_Containers_constr_2 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_pm_Containers_constr_2 CC_NOTUSED = { { 0, 0 }, - -1 /* (SIZE(1..512)) */}; + -1 /* (SIZE(1..8)) */}; static asn_per_constraints_t asn_PER_memb_pm_Containers_constr_2 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_pm_Containers_2[] = { diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.h index cd75722..a05b652 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage-Format1.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.c index de1738f..2eb4018 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.c @@ -1,22 +1,61 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ #include "E2SM-KPM-IndicationMessage.h" -static asn_oer_constraints_t asn_OER_type_E2SM_KPM_IndicationMessage_constr_1 CC_NOTUSED = { +static asn_oer_constraints_t asn_OER_type_indicationMessage_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; -static asn_per_constraints_t asn_PER_type_E2SM_KPM_IndicationMessage_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, +static asn_per_constraints_t asn_PER_type_indicationMessage_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; +static asn_TYPE_member_t asn_MBR_indicationMessage_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage, choice.indicationMessage_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_IndicationMessage_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_indicationMessage_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationMessage-Format1 */ +}; +static asn_CHOICE_specifics_t asn_SPC_indicationMessage_specs_3 = { + sizeof(struct E2SM_KPM_IndicationMessage__indicationMessage), + offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage, _asn_ctx), + offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage, present), + sizeof(((struct E2SM_KPM_IndicationMessage__indicationMessage *)0)->present), + asn_MAP_indicationMessage_tag2el_3, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_indicationMessage_3 = { + "indicationMessage", + "indicationMessage", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_indicationMessage_constr_3, &asn_PER_type_indicationMessage_constr_3, CHOICE_constraint }, + asn_MBR_indicationMessage_3, + 1, /* Elements count */ + &asn_SPC_indicationMessage_specs_3 /* Additional specs */ +}; + static asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage, choice.ric_Style_Type), + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage, ric_Style_Type), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Style_Type, @@ -25,39 +64,42 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_1[] = { 0, 0, /* No default value */ "ric-Style-Type" }, - { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage, choice.indicationMessage_Format1), + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage, indicationMessage), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_KPM_IndicationMessage_Format1, + +1, /* EXPLICIT tag at current level */ + &asn_DEF_indicationMessage_3, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "indicationMessage-Format1" + "indicationMessage" }, }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationMessage_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-Style-Type */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* indicationMessage-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* indicationMessage */ }; -static asn_CHOICE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_specs_1 = { +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_specs_1 = { sizeof(struct E2SM_KPM_IndicationMessage), offsetof(struct E2SM_KPM_IndicationMessage, _asn_ctx), - offsetof(struct E2SM_KPM_IndicationMessage, present), - sizeof(((struct E2SM_KPM_IndicationMessage *)0)->present), asn_MAP_E2SM_KPM_IndicationMessage_tag2el_1, 2, /* Count of tags in the map */ - 0, 0, - 2 /* Extensions start */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage = { "E2SM-KPM-IndicationMessage", "E2SM-KPM-IndicationMessage", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { &asn_OER_type_E2SM_KPM_IndicationMessage_constr_1, &asn_PER_type_E2SM_KPM_IndicationMessage_constr_1, CHOICE_constraint }, + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_IndicationMessage_tags_1, + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_IndicationMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, asn_MBR_E2SM_KPM_IndicationMessage_1, 2, /* Elements count */ &asn_SPC_E2SM_KPM_IndicationMessage_specs_1 /* Additional specs */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.h index b0bbd4e..77d4e3b 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-IndicationMessage.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -15,31 +15,40 @@ #include "RIC-Style-Type.h" #include "E2SM-KPM-IndicationMessage-Format1.h" #include +#include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ -typedef enum E2SM_KPM_IndicationMessage_PR { - E2SM_KPM_IndicationMessage_PR_NOTHING, /* No components present */ - E2SM_KPM_IndicationMessage_PR_ric_Style_Type, - E2SM_KPM_IndicationMessage_PR_indicationMessage_Format1 +typedef enum E2SM_KPM_IndicationMessage__indicationMessage_PR { + E2SM_KPM_IndicationMessage__indicationMessage_PR_NOTHING, /* No components present */ + E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1 /* Extensions may appear below */ -} E2SM_KPM_IndicationMessage_PR; +} E2SM_KPM_IndicationMessage__indicationMessage_PR; /* E2SM-KPM-IndicationMessage */ typedef struct E2SM_KPM_IndicationMessage { - E2SM_KPM_IndicationMessage_PR present; - union E2SM_KPM_IndicationMessage_u { - RIC_Style_Type_t ric_Style_Type; - E2SM_KPM_IndicationMessage_Format1_t indicationMessage_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; + RIC_Style_Type_t ric_Style_Type; + struct E2SM_KPM_IndicationMessage__indicationMessage { + E2SM_KPM_IndicationMessage__indicationMessage_PR present; + union E2SM_KPM_IndicationMessage__indicationMessage_u { + E2SM_KPM_IndicationMessage_Format1_t indicationMessage_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } indicationMessage; + /* + * This type is extensible, + * possible extensions are below. + */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.c b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.c index 192d919..226d0fb 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.c +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.h b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.h index 19b2075..79d2dcf 100644 --- a/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.h +++ b/e2sim/e2apv1sim/ASN1c/E2SM-KPM-RANfunction-Description.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.c b/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.c index bff5c7c..824871d 100644 --- a/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.c +++ b/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.h b/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.h index 5c1c59f..7e142ae 100644 --- a/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.h +++ b/e2sim/e2apv1sim/ASN1c/ENB-ID-Choice.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ENB-ID.c b/e2sim/e2apv1sim/ASN1c/ENB-ID.c index 2175859..212c6fc 100644 --- a/e2sim/e2apv1sim/ASN1c/ENB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/ENB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ENB-ID.h b/e2sim/e2apv1sim/ASN1c/ENB-ID.h index d51f786..8af6b41 100644 --- a/e2sim/e2apv1sim/ASN1c/ENB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/ENB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ENGNB-ID.c b/e2sim/e2apv1sim/ASN1c/ENGNB-ID.c index eb2d0d4..e8fc32f 100644 --- a/e2sim/e2apv1sim/ASN1c/ENGNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/ENGNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ENGNB-ID.h b/e2sim/e2apv1sim/ASN1c/ENGNB-ID.h index cd9037f..f97a53c 100644 --- a/e2sim/e2apv1sim/ASN1c/ENGNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/ENGNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.c b/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.c index 297633b..d8902f8 100644 --- a/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.c +++ b/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.h b/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.h index 9a510e0..b07125d 100644 --- a/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.h +++ b/e2sim/e2apv1sim/ASN1c/EPC-CUUP-PM-Format.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.c b/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.c index 0cca548..2ba5440 100644 --- a/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.c +++ b/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.h b/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.h index 9607e7f..198982e 100644 --- a/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.h +++ b/e2sim/e2apv1sim/ASN1c/EPC-DU-PM-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.c b/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.c index b956c0d..d8f7e44 100644 --- a/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.c +++ b/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.h b/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.h index b393fa4..a6e4aa8 100644 --- a/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.h +++ b/e2sim/e2apv1sim/ASN1c/FGC-CUUP-PM-Format.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.c b/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.c index de02a38..c0429ab 100644 --- a/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.c +++ b/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.h b/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.h index 8249373..96debbb 100644 --- a/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.h +++ b/e2sim/e2apv1sim/ASN1c/FGC-DU-PM-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.c b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.c index 108e85e..84d1741 100644 --- a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.c +++ b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.h b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.h index a30f72b..a87a0d7 100644 --- a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.h +++ b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.c b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.c index 71b255b..d73d0db 100644 --- a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.c +++ b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.h b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.h index 8c3829a..1b22e34 100644 --- a/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.h +++ b/e2sim/e2apv1sim/ASN1c/FQIPERSlicesPerPlmnPerCellListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.c b/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.c index d1eca63..029ca92 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.c +++ b/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.h b/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.h index 8952afc..1eb3404 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.h +++ b/e2sim/e2apv1sim/ASN1c/GNB-CU-CP-Name.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.c b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.c index 4800691..737a4f3 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.h b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.h index 595c40b..e6b9c43 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.c b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.c index b32b198..b64d5b1 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.c +++ b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.h b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.h index 5706221..c1b9d7e 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.h +++ b/e2sim/e2apv1sim/ASN1c/GNB-CU-UP-Name.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.c b/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.c index 15b3227..b43653e 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.h b/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.h index 6e6ab24..65e23da 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GNB-DU-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.c b/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.c index de7e741..8ac789d 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.c +++ b/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -83,7 +83,7 @@ static int asn_PER_MAP_GNB_DU_Name_1_c2v(unsigned int code) { static asn_oer_constraints_t asn_OER_type_GNB_DU_Name_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; -static asn_per_constraints_t asn_PER_type_GNB_DU_Name_constr_1 CC_NOTUSED = { +asn_per_constraints_t asn_PER_type_GNB_DU_Name_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, asn_PER_MAP_GNB_DU_Name_1_v2c, /* Value to PER code map */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.h b/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.h index 82d3bcb..e4994e6 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.h +++ b/e2sim/e2apv1sim/ASN1c/GNB-DU-Name.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -22,6 +22,7 @@ extern "C" { typedef PrintableString_t GNB_DU_Name_t; /* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_DU_Name_constr_1; extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_Name; asn_struct_free_f GNB_DU_Name_free; asn_struct_print_f GNB_DU_Name_print; diff --git a/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.c b/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.c index 6c40d27..81bc2b0 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.c +++ b/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.h b/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.h index b280214..cf5438c 100644 --- a/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.h +++ b/e2sim/e2apv1sim/ASN1c/GNB-ID-Choice.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GNB-Name.c b/e2sim/e2apv1sim/ASN1c/GNB-Name.c new file mode 100644 index 0000000..aeee9d8 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/GNB-Name.c @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "GNB-Name.h" + +static asn_oer_constraints_t asn_OER_type_GNB_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GNB_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GNB_Name_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GNB_Name, choice.gNB_DU_Name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct GNB_Name, choice.gNB_CU_CP_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct GNB_Name, choice.gNB_CU_UP_Name), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-Name" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GNB_Name_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-DU-Name */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-CU-CP-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gNB-CU-UP-Name */ +}; +asn_CHOICE_specifics_t asn_SPC_GNB_Name_specs_1 = { + sizeof(struct GNB_Name), + offsetof(struct GNB_Name, _asn_ctx), + offsetof(struct GNB_Name, present), + sizeof(((struct GNB_Name *)0)->present), + asn_MAP_GNB_Name_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GNB_Name = { + "GNB-Name", + "GNB-Name", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GNB_Name_constr_1, &asn_PER_type_GNB_Name_constr_1, CHOICE_constraint }, + asn_MBR_GNB_Name_1, + 3, /* Elements count */ + &asn_SPC_GNB_Name_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/GNB-Name.h b/e2sim/e2apv1sim/ASN1c/GNB-Name.h new file mode 100644 index 0000000..3c69172 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/GNB-Name.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _GNB_Name_H_ +#define _GNB_Name_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-DU-Name.h" +#include "GNB-CU-CP-Name.h" +#include "GNB-CU-UP-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GNB_Name_PR { + GNB_Name_PR_NOTHING, /* No components present */ + GNB_Name_PR_gNB_DU_Name, + GNB_Name_PR_gNB_CU_CP_Name, + GNB_Name_PR_gNB_CU_UP_Name + /* Extensions may appear below */ + +} GNB_Name_PR; + +/* GNB-Name */ +typedef struct GNB_Name { + GNB_Name_PR present; + union GNB_Name_u { + GNB_DU_Name_t gNB_DU_Name; + GNB_CU_CP_Name_t gNB_CU_CP_Name; + GNB_CU_UP_Name_t gNB_CU_UP_Name; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GNB_Name_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GNB_Name; +extern asn_CHOICE_specifics_t asn_SPC_GNB_Name_specs_1; +extern asn_TYPE_member_t asn_MBR_GNB_Name_1[3]; +extern asn_per_constraints_t asn_PER_type_GNB_Name_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_Name_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.c index 195eb3a..58f3724 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.h index c043608..bd653ae 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalENB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.c index b877b69..5202400 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.h index 78a6414..a93e881 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.c index 0f8e91d..e4039b9 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.h index b111f69..9941095 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-eNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.c index 591391b..68e34d7 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.h index 8f3fc2f..7994b62 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-en-gNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.c index 5ba6fde..49e21ba 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.h index ecef59f..facef92 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-gNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.c index 4d1888b..299fb25 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.h index 64f413a..9ad8057 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalKPMnode-ng-eNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.c index 15462ab..07f8116 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.h index e6816f2..1e254a7 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalenGNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.c index 66c78af..bfcc098 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.h index 390c3ff..e31846d 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalgNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.c b/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.c index a5da7c5..d220e9a 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.c +++ b/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.h b/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.h index bc9e254..e8246ca 100644 --- a/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.h +++ b/e2sim/e2apv1sim/ASN1c/GlobalngeNB-ID.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/Makefile.am.asn1convert b/e2sim/e2apv1sim/ASN1c/Makefile.am.asn1convert index d2fffdf..c1bec19 100644 --- a/e2sim/e2apv1sim/ASN1c/Makefile.am.asn1convert +++ b/e2sim/e2apv1sim/ASN1c/Makefile.am.asn1convert @@ -10,5 +10,5 @@ asn1convert_SOURCES = \ regen: regenerate-from-asn1-source regenerate-from-asn1-source: - asn1c -fcompound-names /home/rshacham/e2sm_kpm_approved.asn + asn1c -fcompound-names /home/rshacham/e2sm-kpm-v01.02.asn diff --git a/e2sim/e2apv1sim/ASN1c/Makefile.am.libasncodec b/e2sim/e2apv1sim/ASN1c/Makefile.am.libasncodec index 8d083ba..8abd4f1 100644 --- a/e2sim/e2apv1sim/ASN1c/Makefile.am.libasncodec +++ b/e2sim/e2apv1sim/ASN1c/Makefile.am.libasncodec @@ -18,6 +18,7 @@ ASN_MODULE_SRCS= \ PLMN-Identity.c \ NRCellIdentity.c \ SNSSAI.c \ + C-RNTI.c \ RIC-Style-Type.c \ RIC-Style-Name.c \ RIC-Format-Type.c \ @@ -32,6 +33,7 @@ ASN_MODULE_SRCS= \ E2SM-KPM-RANfunction-Description.c \ NI-Type.c \ RAN-Container.c \ + Timestamp.c \ Trigger-ConditionIE-Item.c \ RT-Period-IE.c \ RANcallProcess-ID-string.c \ @@ -39,9 +41,11 @@ ASN_MODULE_SRCS= \ RIC-EventTriggerStyle-List.c \ RIC-ReportStyle-List.c \ PF-Container.c \ + GNB-Name.c \ GNB-CU-CP-Name.c \ GNB-DU-Name.c \ GNB-CU-UP-Name.c \ + UE-Report-Type.c \ ODU-PF-Container.c \ CellResourceReportListItem.c \ ServedPlmnPerCellListItem.c \ @@ -50,7 +54,13 @@ ASN_MODULE_SRCS= \ FQIPERSlicesPerPlmnPerCellListItem.c \ EPC-DU-PM-Container.c \ PerQCIReportListItem.c \ + DU-Usage-Report-Per-UE.c \ + DU-Usage-Report-CellResourceReportItem.c \ + DU-Usage-Report-UeResourceReportItem.c \ OCUCP-PF-Container.c \ + CU-CP-Usage-Report-Per-UE.c \ + CU-CP-Usage-Report-CellResourceReportItem.c \ + CU-CP-Usage-Report-UeResourceReportItem.c \ OCUUP-PF-Container.c \ PF-ContainerListItem.c \ CUUPMeasurement-Container.c \ @@ -59,7 +69,10 @@ ASN_MODULE_SRCS= \ SliceToReportListItem.c \ FQIPERSlicesPerPlmnListItem.c \ EPC-CUUP-PM-Format.c \ - PerQCIReportListItemFormat.c + PerQCIReportListItemFormat.c \ + CU-UP-Usage-Report-Per-UE.c \ + CU-UP-Usage-Report-CellResourceReportItem.c \ + CU-UP-Usage-Report-UeResourceReportItem.c ASN_MODULE_HDRS= \ GlobalKPMnode-ID.h \ @@ -81,6 +94,7 @@ ASN_MODULE_HDRS= \ PLMN-Identity.h \ NRCellIdentity.h \ SNSSAI.h \ + C-RNTI.h \ RIC-Style-Type.h \ RIC-Style-Name.h \ RIC-Format-Type.h \ @@ -95,6 +109,7 @@ ASN_MODULE_HDRS= \ E2SM-KPM-RANfunction-Description.h \ NI-Type.h \ RAN-Container.h \ + Timestamp.h \ Trigger-ConditionIE-Item.h \ RT-Period-IE.h \ RANcallProcess-ID-string.h \ @@ -102,9 +117,11 @@ ASN_MODULE_HDRS= \ RIC-EventTriggerStyle-List.h \ RIC-ReportStyle-List.h \ PF-Container.h \ + GNB-Name.h \ GNB-CU-CP-Name.h \ GNB-DU-Name.h \ GNB-CU-UP-Name.h \ + UE-Report-Type.h \ ODU-PF-Container.h \ CellResourceReportListItem.h \ ServedPlmnPerCellListItem.h \ @@ -113,7 +130,13 @@ ASN_MODULE_HDRS= \ FQIPERSlicesPerPlmnPerCellListItem.h \ EPC-DU-PM-Container.h \ PerQCIReportListItem.h \ + DU-Usage-Report-Per-UE.h \ + DU-Usage-Report-CellResourceReportItem.h \ + DU-Usage-Report-UeResourceReportItem.h \ OCUCP-PF-Container.h \ + CU-CP-Usage-Report-Per-UE.h \ + CU-CP-Usage-Report-CellResourceReportItem.h \ + CU-CP-Usage-Report-UeResourceReportItem.h \ OCUUP-PF-Container.h \ PF-ContainerListItem.h \ CUUPMeasurement-Container.h \ @@ -122,7 +145,10 @@ ASN_MODULE_HDRS= \ SliceToReportListItem.h \ FQIPERSlicesPerPlmnListItem.h \ EPC-CUUP-PM-Format.h \ - PerQCIReportListItemFormat.h + PerQCIReportListItemFormat.h \ + CU-UP-Usage-Report-Per-UE.h \ + CU-UP-Usage-Report-CellResourceReportItem.h \ + CU-UP-Usage-Report-UeResourceReportItem.h ASN_MODULE_HDRS+=OPEN_TYPE.h ASN_MODULE_SRCS+=OPEN_TYPE.c diff --git a/e2sim/e2apv1sim/ASN1c/NI-Type.c b/e2sim/e2apv1sim/ASN1c/NI-Type.c index 27955c8..1162fd8 100644 --- a/e2sim/e2apv1sim/ASN1c/NI-Type.c +++ b/e2sim/e2apv1sim/ASN1c/NI-Type.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/NI-Type.h b/e2sim/e2apv1sim/ASN1c/NI-Type.h index 79d25b9..c696a44 100644 --- a/e2sim/e2apv1sim/ASN1c/NI-Type.h +++ b/e2sim/e2apv1sim/ASN1c/NI-Type.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/NRCGI.c b/e2sim/e2apv1sim/ASN1c/NRCGI.c index 2febe27..94d8d4b 100644 --- a/e2sim/e2apv1sim/ASN1c/NRCGI.c +++ b/e2sim/e2apv1sim/ASN1c/NRCGI.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/NRCGI.h b/e2sim/e2apv1sim/ASN1c/NRCGI.h index a53d46d..b4938d0 100644 --- a/e2sim/e2apv1sim/ASN1c/NRCGI.h +++ b/e2sim/e2apv1sim/ASN1c/NRCGI.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/NRCellIdentity.c b/e2sim/e2apv1sim/ASN1c/NRCellIdentity.c index db73410..8e0310e 100644 --- a/e2sim/e2apv1sim/ASN1c/NRCellIdentity.c +++ b/e2sim/e2apv1sim/ASN1c/NRCellIdentity.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/NRCellIdentity.h b/e2sim/e2apv1sim/ASN1c/NRCellIdentity.h index b2c5f5b..701f381 100644 --- a/e2sim/e2apv1sim/ASN1c/NRCellIdentity.h +++ b/e2sim/e2apv1sim/ASN1c/NRCellIdentity.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.c b/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.c index 446f231..121932b 100644 --- a/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.c +++ b/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.h b/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.h index 5f7586e..aee0f21 100644 --- a/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.h +++ b/e2sim/e2apv1sim/ASN1c/OCUCP-PF-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.c b/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.c index b64b227..e1f754e 100644 --- a/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.c +++ b/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.h b/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.h index 549fb98..9f19985 100644 --- a/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.h +++ b/e2sim/e2apv1sim/ASN1c/OCUUP-PF-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.c b/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.c index 290e478..a28d59a 100644 --- a/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.c +++ b/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.h b/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.h index 8819e58..4da50a3 100644 --- a/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.h +++ b/e2sim/e2apv1sim/ASN1c/ODU-PF-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PF-Container.c b/e2sim/e2apv1sim/ASN1c/PF-Container.c index 4eb6dbc..ce46255 100644 --- a/e2sim/e2apv1sim/ASN1c/PF-Container.c +++ b/e2sim/e2apv1sim/ASN1c/PF-Container.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -11,7 +11,7 @@ static asn_oer_constraints_t asn_OER_type_PF_Container_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_PF_Container_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; @@ -57,7 +57,7 @@ asn_CHOICE_specifics_t asn_SPC_PF_Container_specs_1 = { asn_MAP_PF_Container_tag2el_1, 3, /* Count of tags in the map */ 0, 0, - -1 /* Extensions start */ + 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_PF_Container = { "PF-Container", diff --git a/e2sim/e2apv1sim/ASN1c/PF-Container.h b/e2sim/e2apv1sim/ASN1c/PF-Container.h index 076e29f..853642a 100644 --- a/e2sim/e2apv1sim/ASN1c/PF-Container.h +++ b/e2sim/e2apv1sim/ASN1c/PF-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -27,6 +27,8 @@ typedef enum PF_Container_PR { PF_Container_PR_oDU, PF_Container_PR_oCU_CP, PF_Container_PR_oCU_UP + /* Extensions may appear below */ + } PF_Container_PR; /* PF-Container */ @@ -36,6 +38,10 @@ typedef struct PF_Container { ODU_PF_Container_t oDU; OCUCP_PF_Container_t oCU_CP; OCUUP_PF_Container_t oCU_UP; + /* + * This type is extensible, + * possible extensions are below. + */ } choice; /* Context for parsing across buffer boundaries */ diff --git a/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.c b/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.c index 98a4dbd..e3aad2c 100644 --- a/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.c +++ b/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.h b/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.h index 3c33c36..bc4495e 100644 --- a/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.h +++ b/e2sim/e2apv1sim/ASN1c/PF-ContainerListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PLMN-Identity.c b/e2sim/e2apv1sim/ASN1c/PLMN-Identity.c index 503b912..e3754f8 100644 --- a/e2sim/e2apv1sim/ASN1c/PLMN-Identity.c +++ b/e2sim/e2apv1sim/ASN1c/PLMN-Identity.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PLMN-Identity.h b/e2sim/e2apv1sim/ASN1c/PLMN-Identity.h index daed11a..6835400 100644 --- a/e2sim/e2apv1sim/ASN1c/PLMN-Identity.h +++ b/e2sim/e2apv1sim/ASN1c/PLMN-Identity.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PM-Containers-List.c b/e2sim/e2apv1sim/ASN1c/PM-Containers-List.c index 13c6352..326ec75 100644 --- a/e2sim/e2apv1sim/ASN1c/PM-Containers-List.c +++ b/e2sim/e2apv1sim/ASN1c/PM-Containers-List.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PM-Containers-List.h b/e2sim/e2apv1sim/ASN1c/PM-Containers-List.h index 2f5be5c..0a99c3b 100644 --- a/e2sim/e2apv1sim/ASN1c/PM-Containers-List.h +++ b/e2sim/e2apv1sim/ASN1c/PM-Containers-List.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -12,7 +12,6 @@ #include /* Including external dependencies */ -#include "RAN-Container.h" #include #ifdef __cplusplus @@ -21,11 +20,12 @@ extern "C" { /* Forward declarations */ struct PF_Container; +struct RAN_Container; /* PM-Containers-List */ typedef struct PM_Containers_List { struct PF_Container *performanceContainer; /* OPTIONAL */ - RAN_Container_t *theRANContainer; /* OPTIONAL */ + struct RAN_Container *theRANContainer; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. @@ -46,6 +46,7 @@ extern asn_TYPE_member_t asn_MBR_PM_Containers_List_1[2]; /* Referred external types */ #include "PF-Container.h" +#include "RAN-Container.h" #endif /* _PM_Containers_List_H_ */ #include diff --git a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.c b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.c index f92ed0b..1c57dfd 100644 --- a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.c +++ b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.h b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.h index dd07574..32508ea 100644 --- a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.h +++ b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.c b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.c index 20be1e2..239cbd8 100644 --- a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.c +++ b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.h b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.h index 30fa1b9..7fb1ecf 100644 --- a/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.h +++ b/e2sim/e2apv1sim/ASN1c/PerQCIReportListItemFormat.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PlmnID-List.c b/e2sim/e2apv1sim/ASN1c/PlmnID-List.c index 78ddddf..2126cf5 100644 --- a/e2sim/e2apv1sim/ASN1c/PlmnID-List.c +++ b/e2sim/e2apv1sim/ASN1c/PlmnID-List.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/PlmnID-List.h b/e2sim/e2apv1sim/ASN1c/PlmnID-List.h index a30b2e4..79d1dd5 100644 --- a/e2sim/e2apv1sim/ASN1c/PlmnID-List.h +++ b/e2sim/e2apv1sim/ASN1c/PlmnID-List.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RAN-Container.c b/e2sim/e2apv1sim/ASN1c/RAN-Container.c index df842e1..373508b 100644 --- a/e2sim/e2apv1sim/ASN1c/RAN-Container.c +++ b/e2sim/e2apv1sim/ASN1c/RAN-Container.c @@ -1,31 +1,127 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ #include "RAN-Container.h" -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ +static asn_oer_constraints_t asn_OER_type_reportContainer_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_reportContainer_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_reportContainer_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container__reportContainer, choice.oDU_UE), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_DU_Usage_Report_Per_UE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oDU-UE" + }, + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container__reportContainer, choice.oCU_CP_UE), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CU_CP_Usage_Report_Per_UE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oCU-CP-UE" + }, + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container__reportContainer, choice.oCU_UP_UE), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CU_UP_Usage_Report_Per_UE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oCU-UP-UE" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_reportContainer_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* oDU-UE */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* oCU-CP-UE */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* oCU-UP-UE */ +}; +static asn_CHOICE_specifics_t asn_SPC_reportContainer_specs_3 = { + sizeof(struct RAN_Container__reportContainer), + offsetof(struct RAN_Container__reportContainer, _asn_ctx), + offsetof(struct RAN_Container__reportContainer, present), + sizeof(((struct RAN_Container__reportContainer *)0)->present), + asn_MAP_reportContainer_tag2el_3, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_reportContainer_3 = { + "reportContainer", + "reportContainer", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_reportContainer_constr_3, &asn_PER_type_reportContainer_constr_3, CHOICE_constraint }, + asn_MBR_reportContainer_3, + 3, /* Elements count */ + &asn_SPC_reportContainer_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RAN_Container_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container, timestamp), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Timestamp, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "timestamp" + }, + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container, reportContainer), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_reportContainer_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "reportContainer" + }, +}; static const ber_tlv_tag_t asn_DEF_RAN_Container_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RAN_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* timestamp */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* reportContainer */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RAN_Container_specs_1 = { + sizeof(struct RAN_Container), + offsetof(struct RAN_Container, _asn_ctx), + asn_MAP_RAN_Container_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_RAN_Container = { "RAN-Container", "RAN-Container", - &asn_OP_OCTET_STRING, + &asn_OP_SEQUENCE, asn_DEF_RAN_Container_tags_1, sizeof(asn_DEF_RAN_Container_tags_1) /sizeof(asn_DEF_RAN_Container_tags_1[0]), /* 1 */ asn_DEF_RAN_Container_tags_1, /* Same as above */ sizeof(asn_DEF_RAN_Container_tags_1) /sizeof(asn_DEF_RAN_Container_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RAN_Container_1, + 2, /* Elements count */ + &asn_SPC_RAN_Container_specs_1 /* Additional specs */ }; diff --git a/e2sim/e2apv1sim/ASN1c/RAN-Container.h b/e2sim/e2apv1sim/ASN1c/RAN-Container.h index f2b97a5..8184460 100644 --- a/e2sim/e2apv1sim/ASN1c/RAN-Container.h +++ b/e2sim/e2apv1sim/ASN1c/RAN-Container.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ @@ -12,30 +12,58 @@ #include /* Including external dependencies */ -#include +#include "Timestamp.h" +#include "DU-Usage-Report-Per-UE.h" +#include "CU-CP-Usage-Report-Per-UE.h" +#include "CU-UP-Usage-Report-Per-UE.h" +#include +#include #ifdef __cplusplus extern "C" { #endif +/* Dependencies */ +typedef enum RAN_Container__reportContainer_PR { + RAN_Container__reportContainer_PR_NOTHING, /* No components present */ + RAN_Container__reportContainer_PR_oDU_UE, + RAN_Container__reportContainer_PR_oCU_CP_UE, + RAN_Container__reportContainer_PR_oCU_UP_UE + /* Extensions may appear below */ + +} RAN_Container__reportContainer_PR; + /* RAN-Container */ -typedef OCTET_STRING_t RAN_Container_t; +typedef struct RAN_Container { + Timestamp_t timestamp; + struct RAN_Container__reportContainer { + RAN_Container__reportContainer_PR present; + union RAN_Container__reportContainer_u { + DU_Usage_Report_Per_UE_t oDU_UE; + CU_CP_Usage_Report_Per_UE_t oCU_CP_UE; + CU_UP_Usage_Report_Per_UE_t oCU_UP_UE; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } reportContainer; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RAN_Container_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_RAN_Container; -asn_struct_free_f RAN_Container_free; -asn_struct_print_f RAN_Container_print; -asn_constr_check_f RAN_Container_constraint; -ber_type_decoder_f RAN_Container_decode_ber; -der_type_encoder_f RAN_Container_encode_der; -xer_type_decoder_f RAN_Container_decode_xer; -xer_type_encoder_f RAN_Container_encode_xer; -oer_type_decoder_f RAN_Container_decode_oer; -oer_type_encoder_f RAN_Container_encode_oer; -per_type_decoder_f RAN_Container_decode_uper; -per_type_encoder_f RAN_Container_encode_uper; -per_type_decoder_f RAN_Container_decode_aper; -per_type_encoder_f RAN_Container_encode_aper; +extern asn_SEQUENCE_specifics_t asn_SPC_RAN_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_RAN_Container_1[2]; #ifdef __cplusplus } diff --git a/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.c b/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.c index 7d68640..4cd1b70 100644 --- a/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.c +++ b/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.h b/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.h index 004bdbf..087cdc0 100644 --- a/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.h +++ b/e2sim/e2apv1sim/ASN1c/RANcallProcess-ID-string.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RANfunction-Name.c b/e2sim/e2apv1sim/ASN1c/RANfunction-Name.c index 5fc3d93..72a90a9 100644 --- a/e2sim/e2apv1sim/ASN1c/RANfunction-Name.c +++ b/e2sim/e2apv1sim/ASN1c/RANfunction-Name.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RANfunction-Name.h b/e2sim/e2apv1sim/ASN1c/RANfunction-Name.h index 43b83c5..0fe182b 100644 --- a/e2sim/e2apv1sim/ASN1c/RANfunction-Name.h +++ b/e2sim/e2apv1sim/ASN1c/RANfunction-Name.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.c b/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.c index 71b539d..246322a 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.c +++ b/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.h b/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.h index 3f41aae..18a6a8a 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.h +++ b/e2sim/e2apv1sim/ASN1c/RIC-EventTriggerStyle-List.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.c b/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.c index 379ec0c..53f0624 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.c +++ b/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.h b/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.h index c7aa093..81cec85 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.h +++ b/e2sim/e2apv1sim/ASN1c/RIC-Format-Type.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.c b/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.c index 90aac3d..93d4a15 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.c +++ b/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.h b/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.h index 0582a68..af886aa 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.h +++ b/e2sim/e2apv1sim/ASN1c/RIC-ReportStyle-List.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.c b/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.c index 98830e5..2c4a054 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.c +++ b/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.h b/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.h index 06bcfbe..bb02b2c 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.h +++ b/e2sim/e2apv1sim/ASN1c/RIC-Style-Name.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.c b/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.c index ba86785..5324c4a 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.c +++ b/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.h b/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.h index a310841..9948bb0 100644 --- a/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.h +++ b/e2sim/e2apv1sim/ASN1c/RIC-Style-Type.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RT-Period-IE.c b/e2sim/e2apv1sim/ASN1c/RT-Period-IE.c index e9fc944..5f99297 100644 --- a/e2sim/e2apv1sim/ASN1c/RT-Period-IE.c +++ b/e2sim/e2apv1sim/ASN1c/RT-Period-IE.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/RT-Period-IE.h b/e2sim/e2apv1sim/ASN1c/RT-Period-IE.h index 7f614fc..30d2843 100644 --- a/e2sim/e2apv1sim/ASN1c/RT-Period-IE.h +++ b/e2sim/e2apv1sim/ASN1c/RT-Period-IE.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/SNSSAI.c b/e2sim/e2apv1sim/ASN1c/SNSSAI.c index 25b9a37..39afcad 100644 --- a/e2sim/e2apv1sim/ASN1c/SNSSAI.c +++ b/e2sim/e2apv1sim/ASN1c/SNSSAI.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/SNSSAI.h b/e2sim/e2apv1sim/ASN1c/SNSSAI.h index ad5d11f..b854e6f 100644 --- a/e2sim/e2apv1sim/ASN1c/SNSSAI.h +++ b/e2sim/e2apv1sim/ASN1c/SNSSAI.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.c b/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.c index 9364c6a..52fbaf5 100644 --- a/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.c +++ b/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.h b/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.h index 191dba7..be5ecd6 100644 --- a/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.h +++ b/e2sim/e2apv1sim/ASN1c/ServedPlmnPerCellListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.c b/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.c index 8a8d9ed..a463803 100644 --- a/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.c +++ b/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.h b/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.h index dd21f50..1d704d5 100644 --- a/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.h +++ b/e2sim/e2apv1sim/ASN1c/SlicePerPlmnPerCellListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.c b/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.c index ac73513..ae32ba9 100644 --- a/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.c +++ b/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.h b/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.h index 9cc6f48..c25b20a 100644 --- a/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.h +++ b/e2sim/e2apv1sim/ASN1c/SliceToReportListItem.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/Timestamp.c b/e2sim/e2apv1sim/ASN1c/Timestamp.c new file mode 100644 index 0000000..4087751 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/Timestamp.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "Timestamp.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Timestamp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Timestamp = { + "Timestamp", + "Timestamp", + &asn_OP_OCTET_STRING, + asn_DEF_Timestamp_tags_1, + sizeof(asn_DEF_Timestamp_tags_1) + /sizeof(asn_DEF_Timestamp_tags_1[0]), /* 1 */ + asn_DEF_Timestamp_tags_1, /* Same as above */ + sizeof(asn_DEF_Timestamp_tags_1) + /sizeof(asn_DEF_Timestamp_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/Timestamp.h b/e2sim/e2apv1sim/ASN1c/Timestamp.h new file mode 100644 index 0000000..f77ac4a --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/Timestamp.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Timestamp_H_ +#define _Timestamp_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Timestamp */ +typedef OCTET_STRING_t Timestamp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Timestamp; +asn_struct_free_f Timestamp_free; +asn_struct_print_f Timestamp_print; +asn_constr_check_f Timestamp_constraint; +ber_type_decoder_f Timestamp_decode_ber; +der_type_encoder_f Timestamp_encode_der; +xer_type_decoder_f Timestamp_decode_xer; +xer_type_encoder_f Timestamp_encode_xer; +oer_type_decoder_f Timestamp_decode_oer; +oer_type_encoder_f Timestamp_encode_oer; +per_type_decoder_f Timestamp_decode_uper; +per_type_encoder_f Timestamp_encode_uper; +per_type_decoder_f Timestamp_decode_aper; +per_type_encoder_f Timestamp_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Timestamp_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.c b/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.c index 2bf2421..069fd1d 100644 --- a/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.c +++ b/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.c @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.h b/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.h index 15ef033..173b46a 100644 --- a/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.h +++ b/e2sim/e2apv1sim/ASN1c/Trigger-ConditionIE-Item.h @@ -1,7 +1,7 @@ /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-KPM-IEs" - * found in "/home/rshacham/e2sm_kpm_approved.asn" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" * `asn1c -fcompound-names` */ diff --git a/e2sim/e2apv1sim/ASN1c/UE-Report-Type.c b/e2sim/e2apv1sim/ASN1c/UE-Report-Type.c new file mode 100644 index 0000000..1966c27 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/UE-Report-Type.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#include "UE-Report-Type.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_UE_Report_Type_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_UE_Report_Type_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_UE_Report_Type_value2enum_1[] = { + { 0, 17, "oDU-Report-Per-UE" }, + { 1, 20, "oCU-CP-Report-Per-UE" }, + { 2, 20, "oCU-UP-Report-Per-UE" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_UE_Report_Type_enum2value_1[] = { + 1, /* oCU-CP-Report-Per-UE(1) */ + 2, /* oCU-UP-Report-Per-UE(2) */ + 0 /* oDU-Report-Per-UE(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_UE_Report_Type_specs_1 = { + asn_MAP_UE_Report_Type_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_UE_Report_Type_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_UE_Report_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_UE_Report_Type = { + "UE-Report-Type", + "UE-Report-Type", + &asn_OP_NativeEnumerated, + asn_DEF_UE_Report_Type_tags_1, + sizeof(asn_DEF_UE_Report_Type_tags_1) + /sizeof(asn_DEF_UE_Report_Type_tags_1[0]), /* 1 */ + asn_DEF_UE_Report_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_UE_Report_Type_tags_1) + /sizeof(asn_DEF_UE_Report_Type_tags_1[0]), /* 1 */ + { &asn_OER_type_UE_Report_Type_constr_1, &asn_PER_type_UE_Report_Type_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_UE_Report_Type_specs_1 /* Additional specs */ +}; + diff --git a/e2sim/e2apv1sim/ASN1c/UE-Report-Type.h b/e2sim/e2apv1sim/ASN1c/UE-Report-Type.h new file mode 100644 index 0000000..02e7cb5 --- /dev/null +++ b/e2sim/e2apv1sim/ASN1c/UE-Report-Type.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "/home/rshacham/e2sm-kpm-v01.02.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _UE_Report_Type_H_ +#define _UE_Report_Type_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UE_Report_Type { + UE_Report_Type_oDU_Report_Per_UE = 0, + UE_Report_Type_oCU_CP_Report_Per_UE = 1, + UE_Report_Type_oCU_UP_Report_Per_UE = 2 + /* + * Enumeration is extensible + */ +} e_UE_Report_Type; + +/* UE-Report-Type */ +typedef long UE_Report_Type_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_UE_Report_Type_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_UE_Report_Type; +extern const asn_INTEGER_specifics_t asn_SPC_UE_Report_Type_specs_1; +asn_struct_free_f UE_Report_Type_free; +asn_struct_print_f UE_Report_Type_print; +asn_constr_check_f UE_Report_Type_constraint; +ber_type_decoder_f UE_Report_Type_decode_ber; +der_type_encoder_f UE_Report_Type_encode_der; +xer_type_decoder_f UE_Report_Type_decode_xer; +xer_type_encoder_f UE_Report_Type_encode_xer; +oer_type_decoder_f UE_Report_Type_decode_oer; +oer_type_encoder_f UE_Report_Type_encode_oer; +per_type_decoder_f UE_Report_Type_decode_uper; +per_type_encoder_f UE_Report_Type_encode_uper; +per_type_decoder_f UE_Report_Type_decode_aper; +per_type_encoder_f UE_Report_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _UE_Report_Type_H_ */ +#include diff --git a/e2sim/e2apv1sim/ASN1c/asn_constant.h b/e2sim/e2apv1sim/ASN1c/asn_constant.h index cc80b45..af5a0fd 100644 --- a/e2sim/e2apv1sim/ASN1c/asn_constant.h +++ b/e2sim/e2apv1sim/ASN1c/asn_constant.h @@ -18,6 +18,9 @@ extern "C" { #define maxCellingNBDU (512) #define maxofContainers (8) #define maxPLMN (12) +#define maxofRANparamters (65536) +#define maxUeReport (32) +#define maxCellingNB (16384) #ifdef __cplusplus diff --git a/e2sim/e2apv1sim/ASN1c/converter-example.mk b/e2sim/e2apv1sim/ASN1c/converter-example.mk index aac9161..0109476 100644 --- a/e2sim/e2apv1sim/ASN1c/converter-example.mk +++ b/e2sim/e2apv1sim/ASN1c/converter-example.mk @@ -29,5 +29,5 @@ clean: regen: regenerate-from-asn1-source regenerate-from-asn1-source: - asn1c -fcompound-names /home/rshacham/e2sm_kpm_approved.asn + asn1c -fcompound-names /home/rshacham/e2sm-kpm-v01.02.asn diff --git a/e2sim/e2apv1sim/ASN1c/pdu_collection.c b/e2sim/e2apv1sim/ASN1c/pdu_collection.c index 1cc98ca..0d559a4 100644 --- a/e2sim/e2apv1sim/ASN1c/pdu_collection.c +++ b/e2sim/e2apv1sim/ASN1c/pdu_collection.c @@ -10,18 +10,16 @@ extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_KPM_IndicationHeader; extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_KPM_IndicationMessage; extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_KPM_RANfunction_Description; extern struct asn_TYPE_descriptor_s asn_DEF_RANcallProcess_ID_string; -extern struct asn_TYPE_descriptor_s asn_DEF_GNB_DU_Name; struct asn_TYPE_descriptor_s *asn_pdu_collection[] = { - /* From module E2SM-KPM-IEs in /home/rshacham/e2sm_kpm_approved.asn */ + /* From module E2SM-KPM-IEs in /home/rshacham/e2sm-kpm-v01.02.asn */ &asn_DEF_E2SM_KPM_EventTriggerDefinition, &asn_DEF_E2SM_KPM_ActionDefinition, &asn_DEF_E2SM_KPM_IndicationHeader, &asn_DEF_E2SM_KPM_IndicationMessage, &asn_DEF_E2SM_KPM_RANfunction_Description, &asn_DEF_RANcallProcess_ID_string, - &asn_DEF_GNB_DU_Name, 0 }; diff --git a/e2sim/e2apv1sim/CMakeLists.txt b/e2sim/e2apv1sim/CMakeLists.txt index 0e1db77..ab5778a 100644 --- a/e2sim/e2apv1sim/CMakeLists.txt +++ b/e2sim/e2apv1sim/CMakeLists.txt @@ -37,14 +37,18 @@ include_directories("${E2SIM_ROOT}/src/E2AP/E2SM") include_directories("${E2SIM_ROOT}/ASN1c") +#set(CMAKE_THREAD_PREFER_PTHREAD TRUE) +set(THREADS_PREFER_PTHREAD_FLAG ON) -find_library( SCTP_STD_LIB sctp ) #needed for sctp_sendmsg +find_library( SCTP_STD_LIB sctp ) #needed for sctp_sendmsgf +find_package( Threads REQUIRED ) #---------------------------------------------- file(GLOB E2SIM_SOURCES "${E2SIM_ROOT}/e2sim.cpp" "${E2SIM_ROOT}/encode_kpm.cpp" - "${E2SIM_ROOT}/encode_e2apv1.cpp" + "${E2SIM_ROOT}/kpm_callbacks.cpp" + "${E2SIM_ROOT}/encode_e2apv1.cpp" "${E2SIM_ROOT}/src/DEF/*.cpp" "${E2SIM_ROOT}/src/SCTP/*.cpp" "${E2SIM_ROOT}/src/E2AP/*.c" @@ -52,21 +56,24 @@ file(GLOB E2SIM_SOURCES "${E2SIM_ROOT}/ASN1c/*.c" ) + add_executable(e2sim ${E2SIM_SOURCES}) target_link_libraries( e2sim ${SCTP_STD_LIB} ) +target_link_libraries( e2sim Threads::Threads ) #---------------------------------------------- file(GLOB RICSIM_SOURCES "${E2SIM_ROOT}/ricsim.cpp" - "${E2SIM_ROOT}/encode_kpm.cpp" - "${E2SIM_ROOT}/encode_e2apv1.cpp" - "${E2SIM_ROOT}/src/DEF/*.cpp" - "${E2SIM_ROOT}/src/SCTP/*.cpp" - "${E2SIM_ROOT}/src/E2AP/*.c" - "${E2SIM_ROOT}/src/E2AP/*.cpp" - "${E2SIM_ROOT}/ASN1c/*.c" - - ) + "${E2SIM_ROOT}/encode_kpm.cpp" + "${E2SIM_ROOT}/encode_e2apv1.cpp" + "${E2SIM_ROOT}/kpm_callbacks.cpp" + "${E2SIM_ROOT}/src/DEF/*.cpp" + "${E2SIM_ROOT}/src/SCTP/*.cpp" + "${E2SIM_ROOT}/src/E2AP/*.c" + "${E2SIM_ROOT}/src/E2AP/*.cpp" + "${E2SIM_ROOT}/ASN1c/*.c" + ) add_executable(ricsim ${RICSIM_SOURCES}) -target_link_libraries( ricsim ${SCTP_STD_LIB} ) +target_link_libraries( ricsim ${SCTP_STD_LIB} ) +target_link_libraries( e2sim Threads::Threads ) diff --git a/e2sim/e2apv1sim/Dockerfile b/e2sim/e2apv1sim/Dockerfile new file mode 100644 index 0000000..348fe48 --- /dev/null +++ b/e2sim/e2apv1sim/Dockerfile @@ -0,0 +1,55 @@ +#/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +#******************************************************************************/ + +FROM ubuntu:16.04 + +# location in the container +ENV E2SIM_DIR /home/e2sim + +# Install necessary packages +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + git \ + cmake \ + libsctp-dev \ + lksctp-tools \ + autoconf \ + automake \ + libtool \ + bison \ + flex \ + libboost-all-dev \ + iputils-ping \ + net-tools \ + nano \ + vim \ + tcpdump \ + net-tools \ + nmap \ + && apt-get clean + +# Copy E2Sim sources into the container +COPY ./ ${E2SIM_DIR} +WORKDIR ${E2SIM_DIR} + +#------------- Build E2SIM ----------------------- +RUN ./build_e2sim --clean +RUN ./build_e2sim +CMD ./build/e2sim 10.107.70.168 36422 \ No newline at end of file diff --git a/e2sim/e2apv1sim/e2sim.cpp b/e2sim/e2apv1sim/e2sim.cpp index 6f768b0..72785b7 100644 --- a/e2sim/e2apv1sim/e2sim.cpp +++ b/e2sim/e2apv1sim/e2sim.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "e2sim_defs.h" @@ -30,18 +31,40 @@ using namespace std; +int client_fd = 0; + +void encode_and_send_sctp_data(E2AP_PDU_t* pdu) +{ + uint8_t *buf; + sctp_buffer_t data; + + data.len = e2ap_asn1c_encode_pdu(pdu, &buf); + memcpy(data.buffer, buf, min(data.len, MAX_SCTP_BUFFER)); + + sctp_send_data(client_fd, data); +} + void encode_and_send_sctp_data(E2AP_PDU_t* pdu, int client_fd) { uint8_t *buf; sctp_buffer_t data; + printf("Calling encode_and_send_sctp_data\n"); + + printf("client_fd is %d\n", client_fd); + data.len = e2ap_asn1c_encode_pdu(pdu, &buf); + + printf("after encoding pdu\n"); + memcpy(data.buffer, buf, min(data.len, MAX_SCTP_BUFFER)); + printf("calling sctp_send_data\n"); + sctp_send_data(client_fd, data); } -void wait_for_sctp_data(int client_fd) +void wait_for_sctp_data() { sctp_buffer_t recv_buf; if(sctp_receive_data(client_fd, recv_buf) > 0) @@ -53,29 +76,73 @@ void wait_for_sctp_data(int client_fd) int main(int argc, char* argv[]){ - LOG_I("Start E2 Agent (E2 Simulator)"); - bool xmlenc = true; + printf("Start E2 Agent (E2 Simulator\n"); + + ifstream simfile; + string line; + + simfile.open("simulation.txt", ios::in); + + if (simfile.is_open()) { + + while (getline(simfile, line)) { + cout << line << "\n"; + } + + simfile.close(); + + } + + + printf("encoding now the user level - DU\n"); + + E2SM_KPM_IndicationMessage_t *indMsg = + (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t)); + + //encode_kpm_report_rancontainer_du(indMsg); + encode_kpm_report_style1(indMsg); + + + + bool xmlenc = false; options_t ops = read_input_options(argc, argv); + printf("After reading input options\n"); + //E2 Agent will automatically restart upon sctp disconnection // int server_fd = sctp_start_server(ops.server_ip, ops.server_port); - int client_fd = sctp_start_client(ops.server_ip, ops.server_port); + + client_fd = sctp_start_client(ops.server_ip, ops.server_port); E2AP_PDU_t* pdu_setup = (E2AP_PDU_t*)calloc(1,sizeof(E2AP_PDU)); + printf("After starting client\n"); + printf("client_fd value is %d\n", client_fd); + // generate_e2apv1_subscription_request(pdu_setup); generate_e2apv1_setup_request(pdu_setup); + printf("After generating e2setup req\n"); + xer_fprint(stderr, &asn_DEF_E2AP_PDU, pdu_setup); + printf("After XER Encoding\n"); + auto buffer_size = MAX_SCTP_BUFFER; unsigned char buffer[MAX_SCTP_BUFFER]; sctp_buffer_t data; - // auto er = asn_encode_to_buffer(nullptr, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, pdu_setup, buffer, buffer_size); - auto er = asn_encode_to_buffer(nullptr, ATS_BASIC_XER, &asn_DEF_E2AP_PDU, pdu_setup, buffer, buffer_size); + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2AP_PDU, pdu_setup, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + auto er = asn_encode_to_buffer(nullptr, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, pdu_setup, buffer, buffer_size); + //auto er = asn_encode_to_buffer(nullptr, ATS_BASIC_XER, &asn_DEF_E2AP_PDU, pdu_setup, buffer, buffer_size); data.len = er.encoded; fprintf(stderr, "er encded is %d\n", er.encoded); diff --git a/e2sim/e2apv1sim/e2sim.hpp b/e2sim/e2apv1sim/e2sim.hpp new file mode 100644 index 0000000..9af2552 --- /dev/null +++ b/e2sim/e2apv1sim/e2sim.hpp @@ -0,0 +1,5 @@ +#include "E2AP-PDU.h" + +void encode_and_send_sctp_data(E2AP_PDU_t* pdu); + +void encode_and_send_sctp_data(E2AP_PDU_t* pdu, int socket_fd); diff --git a/e2sim/e2apv1sim/encode_e2apv1.cpp b/e2sim/e2apv1sim/encode_e2apv1.cpp index b782e1f..59c59d6 100644 --- a/e2sim/e2apv1sim/encode_e2apv1.cpp +++ b/e2sim/e2apv1sim/encode_e2apv1.cpp @@ -2,15 +2,18 @@ #include #include #include + +#include #include #include "encode_e2apv1.hpp" +#include "E2SM-KPM-RANfunction-Description.h" void generate_e2apv1_setup_request(E2AP_PDU_t *e2ap_pdu) { - // uint8_t *buf = (uint8_t *)"gnb1"; + // uint8_t *buf = (uint8_t *)"gnb1" BIT_STRING_t *gnb_bstring = (BIT_STRING_t*)calloc(1, sizeof(BIT_STRING_t));; gnb_bstring->buf = (uint8_t*)calloc(1,4); @@ -20,13 +23,13 @@ void generate_e2apv1_setup_request(E2AP_PDU_t *e2ap_pdu) { gnb_bstring->buf[2] = 0x77; gnb_bstring->buf[3] = 0x88; - gnb_bstring->bits_unused = 0; + gnb_bstring->bits_unused = 3; - uint8_t *buf2 = (uint8_t *)"plmn3"; + uint8_t *buf2 = (uint8_t *)"747"; OCTET_STRING_t *plmn = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); - plmn->buf = (uint8_t*)calloc(1,5); - memcpy(plmn->buf, buf2, 5);; - plmn->size = 5; + plmn->buf = (uint8_t*)calloc(1,3); + memcpy(plmn->buf, buf2, 3); + plmn->size = 3; GNB_ID_Choice_t *gnbchoice = (GNB_ID_Choice_t*)calloc(1,sizeof(GNB_ID_Choice_t)); GNB_ID_Choice_PR pres2 = GNB_ID_Choice_PR_gnb_ID; @@ -46,15 +49,15 @@ void generate_e2apv1_setup_request(E2AP_PDU_t *e2ap_pdu) { globale2nodeid->present = pres; globale2nodeid->choice.gNB = e2gnb; - E2setupRequestIEs_t *e2setuprid = (E2setupRequestIEs_t*)calloc(1, sizeof(E2setupRequestIEs_t));; + E2setupRequestIEs_t *e2setuprid = (E2setupRequestIEs_t*)calloc(1, sizeof(E2setupRequestIEs_t)); E2setupRequestIEs__value_PR pres3; pres3 = E2setupRequestIEs__value_PR_GlobalE2node_ID; - e2setuprid->id = 4; + e2setuprid->id = 3; e2setuprid->criticality = 0; e2setuprid->value.choice.GlobalE2node_ID = *globale2nodeid; e2setuprid->value.present = pres3; - /* + auto *ranFlistIEs = (E2setupRequestIEs_t *)calloc(1, sizeof(E2setupRequestIEs_t)); ASN_STRUCT_RESET(asn_DEF_E2setupRequestIEs, ranFlistIEs); ranFlistIEs->criticality = 0; @@ -67,16 +70,43 @@ void generate_e2apv1_setup_request(E2AP_PDU_t *e2ap_pdu) { itemIes->value.present = RANfunction_ItemIEs__value_PR_RANfunction_Item; itemIes->value.choice.RANfunction_Item.ranFunctionID = 1; - ASN_SEQUENCE_ADD(&ranFlistIEs->value.choice.RANfunctions_List.list, itemIes); - */ + E2SM_KPM_RANfunction_Description_t *ranfunc_desc = + (E2SM_KPM_RANfunction_Description_t*)calloc(1,sizeof(E2SM_KPM_RANfunction_Description_t)); + encode_kpm_function_description(ranfunc_desc); + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + asn_codec_ctx_t *opt_cod; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_RANfunction_Description, + ranfunc_desc, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + OCTET_STRING_t *ranfuncdesc_str = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + ranfuncdesc_str->buf = (uint8_t*)calloc(1,er.encoded); + ranfuncdesc_str->size = er.encoded; + memcpy(ranfuncdesc_str->buf, e2smbuffer, er.encoded); + + + itemIes->value.choice.RANfunction_Item.ranFunctionDefinition = *ranfuncdesc_str; + itemIes->value.choice.RANfunction_Item.ranFunctionRevision = (long)2; + + ASN_SEQUENCE_ADD(&ranFlistIEs->value.choice.RANfunctions_List.list, itemIes); + E2setupRequest_t *e2setupreq = (E2setupRequest_t*)calloc(1, sizeof(E2setupRequest_t)); ASN_SEQUENCE_ADD(&e2setupreq->protocolIEs.list, e2setuprid); - // ASN_SEQUENCE_ADD(&e2setupreq->protocolIEs.list, ranFlistIEs); + ASN_SEQUENCE_ADD(&e2setupreq->protocolIEs.list, ranFlistIEs); InitiatingMessage__value_PR pres4; pres4 = InitiatingMessage__value_PR_E2setupRequest; InitiatingMessage_t *initmsg = (InitiatingMessage_t*)calloc(1, sizeof(InitiatingMessage_t)); - // initmsg->procedureCode = 1; + initmsg->procedureCode = ProcedureCode_id_E2setup; initmsg->criticality = Criticality_reject; initmsg->value.present = pres4; @@ -272,6 +302,109 @@ void generate_e2apv1_subscription_request(E2AP_PDU *e2ap_pdu) { } +void generate_e2apv1_subscription_response_success(E2AP_PDU *e2ap_pdu, long reqActionIdsAccepted[], + long reqActionIdsRejected[], int accept_size, int reject_size, + long reqRequestorId, long reqInstanceId) { + + RICsubscriptionResponse_IEs_t *respricreqid = + (RICsubscriptionResponse_IEs_t*)calloc(1, sizeof(RICsubscriptionResponse_IEs_t)); + + respricreqid->id = ProtocolIE_ID_id_RICrequestID; + respricreqid->criticality = 0; + respricreqid->value.present = RICsubscriptionResponse_IEs__value_PR_RICrequestID; + respricreqid->value.choice.RICrequestID.ricRequestorID = reqRequestorId; + + respricreqid->value.choice.RICrequestID.ricInstanceID = reqInstanceId; + + + RICsubscriptionResponse_IEs_t *ricactionadmitted = + (RICsubscriptionResponse_IEs_t*)calloc(1, sizeof(RICsubscriptionResponse_IEs_t)); + ricactionadmitted->id = ProtocolIE_ID_id_RICactions_Admitted; + ricactionadmitted->criticality = 0; + ricactionadmitted->value.present = RICsubscriptionResponse_IEs__value_PR_RICaction_Admitted_List; + + RICaction_Admitted_List_t* admlist = + (RICaction_Admitted_List_t*)calloc(1,sizeof(RICaction_Admitted_List_t)); + ricactionadmitted->value.choice.RICaction_Admitted_List = *admlist; + + // int numAccept = sizeof(reqActionIdsAccepted); + int numAccept = accept_size; + int numReject = reject_size; + // int numReject = sizeof(reqActionIdsRejected); + + + for (int i=0; i < numAccept ; i++) { + fprintf(stderr, "in for loop i = %d\n", i); + + long aid = reqActionIdsAccepted[i]; + + RICaction_Admitted_ItemIEs_t *admitie = (RICaction_Admitted_ItemIEs_t*)calloc(1,sizeof(RICaction_Admitted_ItemIEs_t)); + admitie->id = ProtocolIE_ID_id_RICaction_Admitted_Item; + admitie->criticality = 0; + admitie->value.present = RICaction_Admitted_ItemIEs__value_PR_RICaction_Admitted_Item; + admitie->value.choice.RICaction_Admitted_Item.ricActionID = aid; + + ASN_SEQUENCE_ADD(&ricactionadmitted->value.choice.RICaction_Admitted_List.list, admitie); + + } + + RICsubscriptionResponse_t *ricsubresp = (RICsubscriptionResponse_t*)calloc(1,sizeof(RICsubscriptionResponse_t)); + ASN_SEQUENCE_ADD(&ricsubresp->protocolIEs.list, respricreqid); + ASN_SEQUENCE_ADD(&ricsubresp->protocolIEs.list, ricactionadmitted); + + + if (numReject > 0) { + + RICsubscriptionResponse_IEs_t *ricactionrejected = + (RICsubscriptionResponse_IEs_t*)calloc(1, sizeof(RICsubscriptionResponse_IEs_t)); + ricactionrejected->id = ProtocolIE_ID_id_RICactions_NotAdmitted; + ricactionrejected->criticality = 0; + ricactionrejected->value.present = RICsubscriptionResponse_IEs__value_PR_RICaction_NotAdmitted_List; + + RICaction_NotAdmitted_List_t* rejectlist = + (RICaction_NotAdmitted_List_t*)calloc(1,sizeof(RICaction_NotAdmitted_List_t)); + ricactionadmitted->value.choice.RICaction_NotAdmitted_List = *rejectlist; + + for (int i=0; i < numReject; i++) { + fprintf(stderr, "in for loop i = %d\n", i); + + long aid = reqActionIdsRejected[i]; + + RICaction_NotAdmitted_ItemIEs_t *noadmitie = (RICaction_NotAdmitted_ItemIEs_t*)calloc(1,sizeof(RICaction_NotAdmitted_ItemIEs_t)); + noadmitie->id = ProtocolIE_ID_id_RICaction_NotAdmitted_Item; + noadmitie->criticality = 0; + noadmitie->value.present = RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item; + noadmitie->value.choice.RICaction_NotAdmitted_Item.ricActionID = aid; + + ASN_SEQUENCE_ADD(&ricactionrejected->value.choice.RICaction_NotAdmitted_List.list, noadmitie); + ASN_SEQUENCE_ADD(&ricsubresp->protocolIEs.list, ricactionrejected); + } + } + + + SuccessfulOutcome__value_PR pres2; + pres2 = SuccessfulOutcome__value_PR_RICsubscriptionResponse; + SuccessfulOutcome_t *successoutcome = (SuccessfulOutcome_t*)calloc(1, sizeof(SuccessfulOutcome_t)); + successoutcome->procedureCode = ProcedureCode_id_RICsubscription; + successoutcome->criticality = 0; + successoutcome->value.present = pres2; + successoutcome->value.choice.RICsubscriptionResponse = *ricsubresp; + + E2AP_PDU_PR pres5 = E2AP_PDU_PR_successfulOutcome; + + e2ap_pdu->present = pres5; + e2ap_pdu->choice.successfulOutcome = successoutcome; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2AP_PDU, e2ap_pdu, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + +} + void generate_e2apv1_subscription_response(E2AP_PDU *e2ap_pdu, E2AP_PDU *sub_req_pdu) { //Gather details of the request @@ -422,7 +555,181 @@ void generate_e2apv1_subscription_response(E2AP_PDU *e2ap_pdu, E2AP_PDU *sub_req } +void generate_e2apv1_indication_request_parameterized(E2AP_PDU *e2ap_pdu, + long requestorId, + long instanceId, + long ranFunctionId, + long actionId, + long seqNum, + uint8_t *ind_header_buf, + int header_length, + uint8_t *ind_message_buf, + int message_length) { + + fprintf(stderr, "ind1\n"); + RICindication_IEs_t *ricind_ies = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies2 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies3 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies4 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies5 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies6 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies7 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + RICindication_IEs_t *ricind_ies8 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); + + RICindication_IEs__value_PR pres3; + + pres3 = RICindication_IEs__value_PR_RICrequestID; + ricind_ies->id = ProtocolIE_ID_id_RICrequestID; + ricind_ies->criticality = 0; + ricind_ies->value.present = pres3; + ricind_ies->value.choice.RICrequestID.ricRequestorID = requestorId; + ricind_ies->value.choice.RICrequestID.ricInstanceID = instanceId; + + fprintf(stderr, "ind2\n"); + + pres3 = RICindication_IEs__value_PR_RANfunctionID; + ricind_ies2->id = ProtocolIE_ID_id_RANfunctionID; + ricind_ies2->criticality = 0; + ricind_ies2->value.present = pres3; + ricind_ies2->value.choice.RANfunctionID = ranFunctionId; + + + ricind_ies3->id = ProtocolIE_ID_id_RICactionID; + ricind_ies3->criticality = 0; + pres3 = RICindication_IEs__value_PR_RICactionID; + ricind_ies3->value.present = pres3; + ricind_ies3->value.choice.RICactionID = actionId; + + + pres3 = RICindication_IEs__value_PR_RICindicationSN; + ricind_ies4->id = ProtocolIE_ID_id_RICindicationSN; + ricind_ies4->criticality = 0; + ricind_ies4->value.present = pres3; + ricind_ies4->value.choice.RICindicationSN = seqNum; + + //Indication type is REPORT + pres3 = RICindication_IEs__value_PR_RICindicationType; + ricind_ies5->id = ProtocolIE_ID_id_RICindicationType; + ricind_ies5->criticality = 0; + ricind_ies5->value.present = pres3; + ricind_ies5->value.choice.RICindicationType = 0; + + + uint8_t *buf2 = (uint8_t *)"reportheader"; + OCTET_STRING_t *hdr_str = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + + hdr_str->buf = (uint8_t*)calloc(1,header_length); + hdr_str->size = header_length; + memcpy(hdr_str->buf, ind_header_buf, header_length); + + fprintf(stderr, "ind3\n"); + + ricind_ies6->value.choice.RICindicationHeader.buf = (uint8_t*)calloc(1,header_length); + + pres3 = RICindication_IEs__value_PR_RICindicationHeader; + ricind_ies6->id = ProtocolIE_ID_id_RICindicationHeader; + ricind_ies6->criticality = 0; + ricind_ies6->value.present = pres3; + ricind_ies6->value.choice.RICindicationHeader.size = header_length; + memcpy(ricind_ies6->value.choice.RICindicationHeader.buf, ind_header_buf, header_length); + + ricind_ies7->value.choice.RICindicationMessage.buf = (uint8_t*)calloc(1,8192); + + + + + pres3 = RICindication_IEs__value_PR_RICindicationMessage; + ricind_ies7->id = ProtocolIE_ID_id_RICindicationMessage; + fprintf(stderr, "after encoding message 1\n"); + + ricind_ies7->criticality = 0; + ricind_ies7->value.present = pres3; + + fprintf(stderr, "after encoding message 2\n"); + + fprintf(stderr, "after encoding message 3\n"); + ricind_ies7->value.choice.RICindicationMessage.size = message_length; + + fprintf(stderr, "after encoding message 4\n"); + memcpy(ricind_ies7->value.choice.RICindicationMessage.buf, ind_message_buf, message_length); + + fprintf(stderr, "after encoding message 5\n"); + + uint8_t *cpid_buf = (uint8_t *)"cpid"; + OCTET_STRING_t cpid_str; + + printf("5.1\n"); + + int cpid_buf_len = strlen((char*)cpid_buf); + pres3 = RICindication_IEs__value_PR_RICcallProcessID; + ricind_ies8->id = ProtocolIE_ID_id_RICcallProcessID; + + ricind_ies8->criticality = 0; + ricind_ies8->value.present = pres3; + + ricind_ies8->value.choice.RICcallProcessID.buf = (uint8_t*)calloc(1,cpid_buf_len); + ricind_ies8->value.choice.RICcallProcessID.size = cpid_buf_len; + + memcpy(ricind_ies8->value.choice.RICcallProcessID.buf, cpid_buf, cpid_buf_len); + + printf("5.2\n"); + + RICindication_t *ricindication = (RICindication_t*)calloc(1, sizeof(RICindication_t)); + + + int ret; + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies); + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies2); + + printf("5.3\n"); + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies3); + + printf("5.35\n"); + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies4); + + printf("5.36\n"); + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies5); + + printf("5.4\n"); + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies6); + + printf("5.5\n"); + + ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies7); + + // ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies8); + + + InitiatingMessage__value_PR pres4; + pres4 = InitiatingMessage__value_PR_RICindication; + InitiatingMessage_t *initmsg = (InitiatingMessage_t*)calloc(1, sizeof(InitiatingMessage_t)); + initmsg->procedureCode = 5; + initmsg->criticality = 1; + initmsg->value.present = pres4; + initmsg->value.choice.RICindication = *ricindication; + + E2AP_PDU_PR pres5; + pres5 = E2AP_PDU_PR_initiatingMessage; + + e2ap_pdu->present = pres5; + e2ap_pdu->choice.initiatingMessage = initmsg; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2AP_PDU, e2ap_pdu, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + xer_fprint(stderr, &asn_DEF_E2AP_PDU, e2ap_pdu); + +} void generate_e2apv1_indication_request(E2AP_PDU *e2ap_pdu) { fprintf(stderr, "ind1\n"); @@ -493,23 +800,40 @@ void generate_e2apv1_indication_request(E2AP_PDU *e2ap_pdu) { ricind_ies7->value.choice.RICindicationMessage.buf = (uint8_t*)calloc(1,8192); // uint8_t *buf9 = (uint8_t *)"reportmsg"; - + /* E2SM_KPM_IndicationMessage_t *e2sm_ind_msg = (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t)); encode_kpm(e2sm_ind_msg); + */ + + E2SM_KPM_RANfunction_Description_t *e2sm_desc = + (E2SM_KPM_RANfunction_Description_t*)calloc(1,sizeof(E2SM_KPM_RANfunction_Description_t)); + encode_kpm_function_description(e2sm_desc); + + uint8_t e2smbuffer[8192]; size_t e2smbuffer_size = 8192; asn_codec_ctx_t *opt_cod; + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_RANfunction_Description, + e2sm_desc, e2smbuffer, e2smbuffer_size); + + /* asn_encode_to_buffer(opt_cod, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_KPM_IndicationMessage, - e2sm_ind_msg, e2smbuffer, e2smbuffer_size); + e2sm_ind_msg, e2smbuffer, e2smbuffer_size); + */ + + fprintf(stderr, "er encded is %d\n", er.encoded); fprintf(stderr, "after encoding message\n"); diff --git a/e2sim/e2apv1sim/encode_e2apv1.hpp b/e2sim/e2apv1sim/encode_e2apv1.hpp index 9f544a4..29f8d20 100644 --- a/e2sim/e2apv1sim/encode_e2apv1.hpp +++ b/e2sim/e2apv1sim/encode_e2apv1.hpp @@ -1,7 +1,10 @@ + + #include #include #include + #include "e2sim_sctp.hpp" #include "e2ap_message_handler.hpp" #include "encode_kpm.hpp" @@ -29,7 +32,7 @@ extern "C" { #include "RICindication.h" #include "RICsubsequentActionType.h" #include "RICsubsequentAction.h" -#include "RICtimeToWait.h" +#include "RICtimeToWait.h" } @@ -44,3 +47,7 @@ void generate_e2apv1_subscription_request(E2AP_PDU_t *sub_req_pdu); void generate_e2apv1_subscription_response(E2AP_PDU_t *sub_resp_pdu, E2AP_PDU_t *sub_req_pdu); void generate_e2apv1_indication_request(E2AP_PDU_t *ind_req_pdu); + +void generate_e2apv1_subscription_response_success(E2AP_PDU *e2ap_pdu, long reqActionIdsAccepted[], long reqActionIdsRejected[], int accept_size, int reject_size, long reqRequestorId, long reqInstanceId); + +void generate_e2apv1_indication_request_parameterized(E2AP_PDU *e2ap_pdu, long requestorId, long instanceId, long ranFunctionId, long actionId, long seqNum, uint8_t *ind_header_buf, int header_length, uint8_t *ind_message_buf, int message_length); diff --git a/e2sim/e2apv1sim/encode_e2apv1_back.cpp b/e2sim/e2apv1sim/encode_e2apv1_back.cpp deleted file mode 100644 index 61400f7..0000000 --- a/e2sim/e2apv1sim/encode_e2apv1_back.cpp +++ /dev/null @@ -1,370 +0,0 @@ - -#include "encode_e2apv1.hpp" - -void generate_e2apv1_setup_request(E2AP_PDU_t *e2ap_pdu) { - - uint8_t *buf = (uint8_t *)"gnb1"; - - BIT_STRING_t *gnb_bstring = (BIT_STRING_t*)calloc(1, sizeof(BIT_STRING_t));; - gnb_bstring->buf = buf; - gnb_bstring->size = 4; - gnb_bstring->bits_unused = 0; - - uint8_t *buf2 = (uint8_t *)"plmn3"; - OCTET_STRING_t *plmn = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); - plmn->buf = buf2; - plmn->size = 5; - - GNB_ID_Choice_t *gnbchoice = (GNB_ID_Choice_t*)calloc(1,sizeof(GNB_ID_Choice_t)); - GNB_ID_Choice_PR pres2 = GNB_ID_Choice_PR_gnb_ID; - gnbchoice->present = pres2; - gnbchoice->choice.gnb_ID = *gnb_bstring; - - GlobalgNB_ID_t *gnb = (GlobalgNB_ID_t*)calloc(1, sizeof(GlobalgNB_ID_t)); - gnb->plmn_id = *plmn; - gnb->gnb_id = *gnbchoice; - - GlobalE2node_gNB_ID_t *e2gnb = (GlobalE2node_gNB_ID_t*)calloc(1, sizeof(GlobalE2node_gNB_ID_t)); - e2gnb->global_gNB_ID = *gnb; - - GlobalE2node_ID_t *globale2nodeid = (GlobalE2node_ID_t*)calloc(1, sizeof(GlobalE2node_ID_t)); - GlobalE2node_ID_PR pres; - pres = GlobalE2node_ID_PR_gNB; - globale2nodeid->present = pres; - globale2nodeid->choice.gNB = e2gnb; - - E2setupRequestIEs_t *e2setuprid = (E2setupRequestIEs_t*)calloc(1, sizeof(E2setupRequestIEs_t));; - E2setupRequestIEs__value_PR pres3; - pres3 = E2setupRequestIEs__value_PR_GlobalE2node_ID; - e2setuprid->id = 4; - e2setuprid->criticality = 0; - e2setuprid->value.choice.GlobalE2node_ID = *globale2nodeid; - e2setuprid->value.present = pres3; - - auto *ranFlistIEs = (E2setupRequestIEs_t *)calloc(1, sizeof(E2setupRequestIEs_t)); - ASN_STRUCT_RESET(asn_DEF_E2setupRequestIEs, ranFlistIEs); - ranFlistIEs->criticality = 0; - ranFlistIEs->id = ProtocolIE_ID_id_RANfunctionsAdded; - ranFlistIEs->value.present = E2setupRequestIEs__value_PR_RANfunctions_List; - - auto *itemIes = (RANfunction_ItemIEs_t *)calloc(1, sizeof(RANfunction_ItemIEs_t)); - itemIes->id = ProtocolIE_ID_id_RANfunction_Item; - itemIes->criticality = Criticality_reject; - itemIes->value.present = RANfunction_ItemIEs__value_PR_RANfunction_Item; - itemIes->value.choice.RANfunction_Item.ranFunctionID = 1; - - ASN_SEQUENCE_ADD(&ranFlistIEs->value.choice.RANfunctions_List.list, itemIes); - - E2setupRequest_t *e2setupreq = (E2setupRequest_t*)calloc(1, sizeof(E2setupRequest_t)); - e2setupreq->protocolIEs.list.size = sizeof(E2setupRequestIEs); - e2setupreq->protocolIEs.list.count = 1; - e2setupreq->protocolIEs.list.array = &e2setuprid; - - InitiatingMessage__value_PR pres4; - pres4 = InitiatingMessage__value_PR_E2setupRequest; - InitiatingMessage_t *initmsg = (InitiatingMessage_t*)calloc(1, sizeof(InitiatingMessage_t)); - initmsg->procedureCode = 1; - initmsg->criticality = 0; - initmsg->value.present = pres4; - initmsg->value.choice.E2setupRequest = *e2setupreq; - - E2AP_PDU_PR pres5; - pres5 = E2AP_PDU_PR_initiatingMessage; - - - e2ap_pdu->present = pres5; - e2ap_pdu->choice.initiatingMessage = initmsg; - -} - - -void generate_e2apv1_setup_response(E2AP_PDU_t *e2ap_pdu) { - - E2setupResponseIEs *resp_ies1 = (E2setupResponseIEs_t*)calloc(1, sizeof(E2setupResponseIEs_t)); - E2setupResponseIEs *resp_ies2 = (E2setupResponseIEs_t*)calloc(1, sizeof(E2setupResponseIEs_t)); - E2setupResponseIEs *resp_ies3 = (E2setupResponseIEs_t*)calloc(1, sizeof(E2setupResponseIEs_t)); - - uint8_t *buf = (uint8_t *)"gnb1"; - - BIT_STRING_t *ricid_bstring = (BIT_STRING_t*)calloc(1,sizeof(BIT_STRING_t)); - ricid_bstring->buf = buf; - ricid_bstring->size = 4; - ricid_bstring->bits_unused = 0; - - uint8_t *buf2 = (uint8_t *)"plmn3"; - OCTET_STRING_t *plmn = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); - plmn->buf = buf2; - plmn->size = 5; - - GlobalRIC_ID_t *globalricid = (GlobalRIC_ID_t*)calloc(1,sizeof(GlobalRIC_ID_t)); - globalricid->pLMN_Identity = *plmn; - globalricid->ric_ID = *ricid_bstring; - - E2setupResponseIEs__value_PR pres1; - pres1 = E2setupResponseIEs__value_PR_GlobalRIC_ID; - - resp_ies1->id = ProtocolIE_ID_id_GlobalRIC_ID; - resp_ies1->criticality = 0; - resp_ies1->value.present = pres1; - resp_ies1->value.choice.GlobalRIC_ID = *globalricid; - - E2setupResponse_t *e2setupresp = (E2setupResponse_t*)calloc(1,sizeof(E2setupResponse_t)); - int ret = ASN_SEQUENCE_ADD(&e2setupresp->protocolIEs.list, resp_ies1); - - - SuccessfulOutcome__value_PR pres; - pres = SuccessfulOutcome__value_PR_E2setupResponse; - SuccessfulOutcome_t *successoutcome = (SuccessfulOutcome_t*)calloc(1, sizeof(SuccessfulOutcome_t)); - successoutcome->procedureCode = 1; - successoutcome->criticality = 0; - successoutcome->value.present = pres; - successoutcome->value.choice.E2setupResponse = *e2setupresp; - - E2AP_PDU_PR pres5 = E2AP_PDU_PR_successfulOutcome; - - e2ap_pdu->present = pres5; - e2ap_pdu->choice.successfulOutcome = successoutcome; - -} - - -void generate_e2apv1_subscription_request(E2AP_PDU *e2ap_pdu) { - - fprintf(stderr, "in generate sub\n"); - uint8_t *buf2 = (uint8_t *)"SubscriptionTriggers"; - fprintf(stderr, "in gen sub 1\n"); - OCTET_STRING_t *triggerdef = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); - triggerdef->buf = buf2; - triggerdef->size = 20; - - /* - ProtocolIE_SingleContainer_1547P0_t *action_item = - (ProtocolIE_SingleContainer_1547P0_t *)calloc(1, sizeof(ProtocolIE_SingleContainer_1547P0_t)); - action_item->ricActionID = 19; - action_item->ricActionType = 1; - - // RICactions_ToBeSetup_List_t actionslist = asn_DEF_RICactions_ToBeSetup_List; - - - // actionslist.list.size = sizeof(RICaction_ToBeSetup_Item_t); - - actionslist.list.size = sizeof(ProtocolIE_SingleContainer); - actionslist.list.count = 1; - actionslist.list.array = &action_item; - */ - - fprintf(stderr, "sub1\n"); - ProtocolIE_ID_t proto_id= ProtocolIE_ID_id_RICaction_ToBeSetup_Item; - - RICaction_ToBeSetup_ItemIEs__value_PR pres6; - pres6 = RICaction_ToBeSetup_ItemIEs__value_PR_RICaction_ToBeSetup_Item; - - printf("sub2\n"); - - RICaction_ToBeSetup_Item_t action_item; - action_item.ricActionID = 5; - action_item.ricActionType = 9; - - printf("sub3\n"); - - RICaction_ToBeSetup_ItemIEs_t *action_item_ies = (RICaction_ToBeSetup_ItemIEs_t *)calloc(1, sizeof(RICaction_ToBeSetup_Item_t)); - action_item_ies->id = proto_id; - action_item_ies->criticality = 0; - action_item_ies->value.choice.RICaction_ToBeSetup_Item = action_item; - action_item_ies->value.present = pres6; - - printf("sub4\n"); - - RICactions_ToBeSetup_List_t actionslist; - - // actionslist.list.size = sizeof(ProtocolIE_SingleContainer); - actionslist.list.size = sizeof(RICaction_ToBeSetup_ItemIEs_t); - actionslist.list.count = 1; - actionslist.list.array = (ProtocolIE_SingleContainer**)&action_item_ies; - - printf("sub5\n"); - - RICsubscriptionDetails_t ricsubdetails; - - ricsubdetails.ricAction_ToBeSetup_List = actionslist; - ricsubdetails.ricEventTriggerDefinition = *trigger; - - printf("sub5.5\n"); - - RANfunctions_List_t *rflist = (RANfunctions_List_t*)calloc(1,sizeof(RANfunctions_List_t)); - - printf("sub6\n"); - - RICsubscriptionRequest_IEs_t *ricsubrid = (RICsubscriptionRequest_IEs_t*)calloc(1, sizeof(RICsubscriptionRequest_IEs_t));; - RICsubscriptionRequest_IEs__value_PR pres3; - printf("sub6.1\n"); - pres3 = RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails; - ricsubrid->id = ProtocolIE_ID_id_RICsubscriptionDetails; - printf("sub6.2\n"); - - ricsubrid->criticality = 0; - ricsubrid->value.present = pres3; - printf("sub6.3\n"); - // ricsubrid->value.choice.RICrequestID.ricRequestorID = 25; - // ricsubrid->value.choice.RICrequestID.ricInstanceID = 3; - printf("sub6.4\n"); - // ricsubrid->value.choice.RANfunctionID = 17; - ricsubrid->value.choice.RICsubscriptionDetails = ricsubdetails; - - printf("sub7\n"); - - RICsubscriptionRequest_t *ricsubreq; - ricsubreq->protocolIEs.list.size = sizeof(RICsubscriptionRequest_IEs_t); - ricsubreq->protocolIEs.list.count = 1; - ricsubreq->protocolIEs.list.array = &ricsubrid; - - InitiatingMessage__value_PR pres4; - pres4 = InitiatingMessage__value_PR_RICsubscriptionRequest; - InitiatingMessage_t *initmsg = (InitiatingMessage_t*)calloc(1, sizeof(InitiatingMessage_t)); - initmsg->procedureCode = 8; - initmsg->criticality = 0; - initmsg->value.present = pres4; - initmsg->value.choice.RICsubscriptionRequest = *ricsubreq; - - E2AP_PDU_PR pres5; - pres5 = E2AP_PDU_PR_initiatingMessage; - - - e2ap_pdu->present = pres5; - e2ap_pdu->choice.initiatingMessage = initmsg; - - char *error_buf = (char*)calloc(300, sizeof(char));; - size_t errlen; - - asn_check_constraints(&asn_DEF_E2AP_PDU, e2ap_pdu, error_buf, &errlen); - printf("error length %d\n", errlen); - printf("error buf %s\n", error_buf); - - xer_fprint(stderr, &asn_DEF_E2AP_PDU, e2ap_pdu); - -} - - - -void generate_e2apv1_indication_request(E2AP_PDU *e2ap_pdu) { - - RICindication_IEs_t *ricind_ies = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies2 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies3 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies4 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies5 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies6 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies7 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - RICindication_IEs_t *ricind_ies8 = (RICindication_IEs_t*)calloc(1, sizeof(RICindication_IEs_t)); - - RICindication_IEs__value_PR pres3; - - pres3 = RICindication_IEs__value_PR_RICrequestID; - ricind_ies->id = ProtocolIE_ID_id_RICrequestID; - ricind_ies->criticality = 0; - ricind_ies->value.present = pres3; - ricind_ies->value.choice.RICrequestID.ricRequestorID = 25; - ricind_ies->value.choice.RICrequestID.ricInstanceID = 3; - - pres3 = RICindication_IEs__value_PR_RANfunctionID; - ricind_ies2->id = ProtocolIE_ID_id_RANfunctionID; - ricind_ies2->criticality = 0; - ricind_ies2->value.present = pres3; - ricind_ies2->value.choice.RANfunctionID = 70; - - - ricind_ies3->id = ProtocolIE_ID_id_RICactionID; - ricind_ies3->criticality = 0; - pres3 = RICindication_IEs__value_PR_RICactionID; - ricind_ies3->value.present = pres3; - ricind_ies3->value.choice.RICactionID = 80; - - - pres3 = RICindication_IEs__value_PR_RICindicationSN; - ricind_ies4->id = ProtocolIE_ID_id_RICindicationSN; - ricind_ies4->criticality = 0; - ricind_ies4->value.present = pres3; - ricind_ies4->value.choice.RICindicationSN = 45; - - pres3 = RICindication_IEs__value_PR_RICindicationType; - ricind_ies5->id = ProtocolIE_ID_id_RICindicationType; - ricind_ies5->criticality = 0; - ricind_ies5->value.present = pres3; - ricind_ies5->value.choice.RICindicationType = 0; - - uint8_t *buf2 = (uint8_t *)"reportheader"; - OCTET_STRING_t hdr_str; - hdr_str.buf = buf2; - hdr_str.size = 12; - - pres3 = RICindication_IEs__value_PR_RICindicationHeader; - ricind_ies6->id = ProtocolIE_ID_id_RICindicationHeader; - ricind_ies6->criticality = 0; - ricind_ies6->value.present = pres3; - ricind_ies6->value.choice.RICindicationHeader = hdr_str; - - uint8_t *buf3 = (uint8_t *)"reportmessage"; - OCTET_STRING_t msg_str; - msg_str.buf = buf3; - msg_str.size = 13; - - pres3 = RICindication_IEs__value_PR_RICindicationMessage; - ricind_ies7->id = ProtocolIE_ID_id_RICindicationMessage; - - ricind_ies7->criticality = 0; - ricind_ies7->value.present = pres3; - - ricind_ies7->value.choice.RICindicationMessage = msg_str; - - uint8_t *buf4 = (uint8_t *)"cpid"; - OCTET_STRING_t cpid_str; - cpid_str.buf = buf4; - cpid_str.size = 4; - - pres3 = RICindication_IEs__value_PR_RICcallProcessID; - ricind_ies8->id = ProtocolIE_ID_id_RICrequestID; - - ricind_ies8->criticality = 0; - ricind_ies8->value.present = pres3; - - ricind_ies8->value.choice.RICcallProcessID = cpid_str; - - - RICindication_t *ricindication = (RICindication_t*)calloc(1, sizeof(RICindication_t)); - - int ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies); - - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies2); - - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies3); - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies4); - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies5); - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies6); - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies7); - ret = ASN_SEQUENCE_ADD(&ricindication->protocolIEs.list, ricind_ies8); - - - InitiatingMessage__value_PR pres4; - pres4 = InitiatingMessage__value_PR_RICindication; - InitiatingMessage_t *initmsg = (InitiatingMessage_t*)calloc(1, sizeof(InitiatingMessage_t)); - initmsg->procedureCode = 5; - initmsg->criticality = 1; - initmsg->value.present = pres4; - initmsg->value.choice.RICindication = *ricindication; - - E2AP_PDU_PR pres5; - pres5 = E2AP_PDU_PR_initiatingMessage; - - e2ap_pdu = (E2AP_PDU_t*)calloc(1, sizeof(E2AP_PDU_t)); - e2ap_pdu->present = pres5; - e2ap_pdu->choice.initiatingMessage = initmsg; - - char *error_buf = (char*)calloc(300, sizeof(char));; - size_t errlen; - - asn_check_constraints(&asn_DEF_E2AP_PDU, e2ap_pdu, error_buf, &errlen); - printf("error length %d\n", errlen); - printf("error buf %s\n", error_buf); - - -} diff --git a/e2sim/e2apv1sim/encode_kpm.cpp b/e2sim/e2apv1sim/encode_kpm.cpp index 9a3e389..371f455 100644 --- a/e2sim/e2apv1sim/encode_kpm.cpp +++ b/e2sim/e2apv1sim/encode_kpm.cpp @@ -4,12 +4,1432 @@ #include #include -#include "encode_kpm.hpp"; +#include "encode_kpm.hpp" using namespace std; +void encode_kpm_function_description(E2SM_KPM_RANfunction_Description_t* ranfunc_desc) { + + printf("kpm0\n"); + + uint8_t *buf = (uint8_t*)"ORAN-E2SM-KPM"; + uint8_t *buf2 = (uint8_t*)"KPM monitor"; + uint8_t *buf3 = (uint8_t*)"OID123"; + + OCTET_STRING_t *sname = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sname->buf = (uint8_t*)calloc(1,13); + + memcpy(sname->buf, buf, 13); + sname->size = strlen((char*)buf); + ranfunc_desc->ranFunction_Name.ranFunction_ShortName = *sname; + + long inst = 1; + + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_RANfunction_Description, ranfunc_desc); + + // ranfunc_desc->ranFunction_Name.ranFunction_Description = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + ranfunc_desc->ranFunction_Name.ranFunction_Description.buf = (uint8_t*)calloc(1,strlen((char*)buf2)); + memcpy(ranfunc_desc->ranFunction_Name.ranFunction_Description.buf, buf2, strlen((char*)buf2)); + ranfunc_desc->ranFunction_Name.ranFunction_Description.size = strlen((char*)buf2); + ranfunc_desc->ranFunction_Name.ranFunction_Instance = &inst; + + printf("kpm0.9\n"); + + // ranfunc_desc->ranFunction_Name.ranFunction_E2SM_OID = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + ranfunc_desc->ranFunction_Name.ranFunction_E2SM_OID.buf = (uint8_t*)calloc(1,strlen((char*)buf3)); + memcpy(ranfunc_desc->ranFunction_Name.ranFunction_E2SM_OID.buf, buf3, strlen((char*)buf3)); + ranfunc_desc->ranFunction_Name.ranFunction_E2SM_OID.size = strlen((char*)buf3); + + printf("kpm2\n"); + + + RIC_EventTriggerStyle_List_t *trigger_style = + (RIC_EventTriggerStyle_List_t*)calloc(1, sizeof(RIC_EventTriggerStyle_List_t)); + trigger_style->ric_EventTriggerStyle_Type = 1; + uint8_t *buf4 = (uint8_t*)"Periodic report"; + // trigger_style->ric_EventTriggerStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + trigger_style->ric_EventTriggerStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf4)); + memcpy(trigger_style->ric_EventTriggerStyle_Name.buf, buf4, strlen((char*)buf4)); + trigger_style->ric_EventTriggerStyle_Name.size = strlen((char*)buf4); + trigger_style->ric_EventTriggerFormat_Type = 5; + + printf("kpm3\n"); + + ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_EventTriggerStyle_List = + (E2SM_KPM_RANfunction_Description::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item__ric_EventTriggerStyle_List*)calloc(1,sizeof(E2SM_KPM_RANfunction_Description::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item__ric_EventTriggerStyle_List)); + + int ret = ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_EventTriggerStyle_List->list , trigger_style); + printf("ret is %d\n", ret); + + RIC_ReportStyle_List_t *report_style1 = (RIC_ReportStyle_List_t*)calloc(1, sizeof(RIC_ReportStyle_List_t)); + report_style1->ric_ReportStyle_Type = 1; + + uint8_t *buf5 = (uint8_t*)"O-DU Measurement Container for the 5GC connected deployment"; + + printf("kpm4\n"); + + // report_style1->ric_ReportStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + report_style1->ric_ReportStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf5)); + memcpy(report_style1->ric_ReportStyle_Name.buf, buf5, strlen((char*)buf5)); + report_style1->ric_ReportStyle_Name.size = strlen((char*)buf5); + report_style1->ric_IndicationHeaderFormat_Type = 1; + report_style1->ric_IndicationMessageFormat_Type = 1; + + printf("kpm5\n"); + + RIC_ReportStyle_List_t *report_style2 = (RIC_ReportStyle_List_t*)calloc(1, sizeof(RIC_ReportStyle_List_t)); + report_style2->ric_ReportStyle_Type = 2; + + uint8_t *buf6 = (uint8_t*)"O-DU Measurement Container for the EPC connected deployment"; + + // report_style2->ric_ReportStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + + + report_style2->ric_ReportStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf6)); + memcpy(report_style2->ric_ReportStyle_Name.buf, buf6, strlen((char*)buf6)); + report_style2->ric_ReportStyle_Name.size = strlen((char*)buf6); + report_style2->ric_IndicationHeaderFormat_Type = 1; + report_style2->ric_IndicationMessageFormat_Type = 1; + + printf("kpm6\n"); + + RIC_ReportStyle_List_t *report_style3 = (RIC_ReportStyle_List_t*)calloc(1, sizeof(RIC_ReportStyle_List_t)); + report_style3->ric_ReportStyle_Type = 3; + + uint8_t *buf7 = (uint8_t*)"O-CU-CP Measurement Container for the 5GC connected deployment"; + + // report_style3->ric_ReportStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + report_style3->ric_ReportStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf7)); + memcpy(report_style3->ric_ReportStyle_Name.buf, buf7, strlen((char*)buf7)); + report_style3->ric_ReportStyle_Name.size = strlen((char*)buf7); + report_style3->ric_IndicationHeaderFormat_Type = 1; + report_style3->ric_IndicationMessageFormat_Type = 1; + + RIC_ReportStyle_List_t *report_style4 = (RIC_ReportStyle_List_t*)calloc(1, sizeof(RIC_ReportStyle_List_t)); + report_style4->ric_ReportStyle_Type = 4; + + uint8_t *buf8 = (uint8_t*)"O-CU-CP Measurement Container for the EPC connected deployment"; + + // report_style3->ric_ReportStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + report_style4->ric_ReportStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf8)); + memcpy(report_style4->ric_ReportStyle_Name.buf, buf8, strlen((char*)buf8)); + report_style4->ric_ReportStyle_Name.size = strlen((char*)buf8); + report_style4->ric_IndicationHeaderFormat_Type = 1; + report_style4->ric_IndicationMessageFormat_Type = 1; + + RIC_ReportStyle_List_t *report_style5 = (RIC_ReportStyle_List_t*)calloc(1, sizeof(RIC_ReportStyle_List_t)); + report_style5->ric_ReportStyle_Type = 5; + + uint8_t *buf9 = (uint8_t*)"O-CU-UP Measurement Container for the 5GC connected deployment"; + + // report_style3->ric_ReportStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + report_style5->ric_ReportStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf9)); + memcpy(report_style5->ric_ReportStyle_Name.buf, buf9, strlen((char*)buf9)); + report_style5->ric_ReportStyle_Name.size = strlen((char*)buf9); + report_style5->ric_IndicationHeaderFormat_Type = 1; + report_style5->ric_IndicationMessageFormat_Type = 1; + + + RIC_ReportStyle_List_t *report_style6 = (RIC_ReportStyle_List_t*)calloc(1, sizeof(RIC_ReportStyle_List_t)); + report_style6->ric_ReportStyle_Type = 6; + + uint8_t *buf10 = (uint8_t*)"O-CU-UP Measurement Container for the EPC connected deployment"; + + // report_style3->ric_ReportStyle_Name = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + report_style6->ric_ReportStyle_Name.buf = (uint8_t*)calloc(1,strlen((char*)buf10)); + memcpy(report_style6->ric_ReportStyle_Name.buf, buf10, strlen((char*)buf10)); + report_style6->ric_ReportStyle_Name.size = strlen((char*)buf10); + report_style6->ric_IndicationHeaderFormat_Type = 1; + report_style6->ric_IndicationMessageFormat_Type = 1; + + + ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List = + (E2SM_KPM_RANfunction_Description::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item__ric_ReportStyle_List*)calloc(1,sizeof(E2SM_KPM_RANfunction_Description::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item::E2SM_KPM_RANfunction_Description__e2SM_KPM_RANfunction_Item__ric_ReportStyle_List)); + + ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List->list, report_style1); + ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List->list, report_style2); + ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List->list, report_style3); + ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List->list, report_style4); + ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List->list, report_style5); + ASN_SEQUENCE_ADD(&ranfunc_desc->e2SM_KPM_RANfunction_Item.ric_ReportStyle_List->list, report_style6); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_RANfunction_Description, ranfunc_desc); +} + +void encode_kpm_ocuup_user_level(RAN_Container_t *ranco) { + + uint8_t *buf = (uint8_t*)"2020.06.13 13:01:05.222"; + Timestamp_t *ts = (Timestamp_t*)calloc(1,sizeof(Timestamp_t)); + ts->buf = (uint8_t*)calloc(strlen((char*)buf),1); + ts->size = strlen((char*)buf); + memcpy(ts->buf,buf,ts->size); + + printf("enc1\n"); + + CU_UP_Usage_Report_CellResourceReportItem_t *report_item = + (CU_UP_Usage_Report_CellResourceReportItem_t*)calloc(1,sizeof(CU_UP_Usage_Report_CellResourceReportItem_t)); + + uint8_t *buf2 = (uint8_t*)"747"; + + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(3,1); + plmnidstr->size = 3; + memcpy(plmnidstr->buf, buf2, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + uint8_t* buf3 = (uint8_t*)"12340"; + nrcellid->buf = (uint8_t*)calloc(1,5); + memcpy(nrcellid->buf, buf3, 5); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + printf("enc3\n"); + + report_item->nRCGI = *nrcgi; + + CU_UP_Usage_Report_UeResourceReportItem *ue_report_item = + (CU_UP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_UP_Usage_Report_UeResourceReportItem)); + + printf("enc3.2\n"); + + uint8_t* crnti_str = (uint8_t*)"1111"; + OCTET_STRING *crnti = (OCTET_STRING*)calloc(1,sizeof(OCTET_STRING)); + crnti->buf = (uint8_t*)calloc(1,4); + + printf("enc3.3\n"); + + crnti->size = strlen((char*)crnti_str); + + printf("enc3.4\n"); + memcpy(crnti->buf, crnti_str, crnti->size); + + printf("enc4\n"); + + INTEGER_t *bytesdl = (INTEGER_t*)calloc(1, sizeof(INTEGER_t)); + uint8_t buffer[1]; + buffer[0]= 40000; + bytesdl->buf = (uint8_t*)calloc(1,1); + memcpy(bytesdl->buf, buffer,1); + bytesdl->size = 1; + + INTEGER_t *bytesul = (INTEGER_t*)calloc(1, sizeof(INTEGER_t)); + uint8_t buffer1[1]; + buffer1[0] = 50000; + bytesul->buf = (uint8_t*)calloc(1,1); + memcpy(bytesul->buf, buffer1, 1); + bytesul->size = 1; + + + ue_report_item->c_RNTI = *crnti; + ue_report_item->pDCPBytesDL = bytesdl; + ue_report_item->pDCPBytesUL = bytesul; + + + ASN_SEQUENCE_ADD(&report_item->ueResourceReportList.list, ue_report_item); + + ranco->timestamp = *ts; + ranco->reportContainer.present = RAN_Container__reportContainer_PR_oCU_UP_UE; + ASN_SEQUENCE_ADD(&ranco->reportContainer.choice.oCU_UP_UE.cellResourceReportList.list, report_item); + + xer_fprint(stderr, &asn_DEF_RAN_Container, ranco); + +} + +void encode_kpm_ocucp_user_level(RAN_Container_t *ranco, + uint8_t *plmnid_buf, + uint8_t *nrcellid_buf, + uint8_t *crnti_buf, + const uint8_t *serving_buf, + const uint8_t *neighbor_buf) { + uint8_t *buf = (uint8_t*)"2020.06.13 13:01:05.222"; + Timestamp_t *ts = (Timestamp_t*)calloc(1,sizeof(Timestamp_t)); + ts->buf = (uint8_t*)calloc(strlen((char*)buf),1); + ts->size = strlen((char*)buf); + memcpy(ts->buf,buf,ts->size); + + printf("enc1\n"); + + CU_CP_Usage_Report_CellResourceReportItem_t *report_item = + (CU_CP_Usage_Report_CellResourceReportItem_t*)calloc(1,sizeof(CU_CP_Usage_Report_CellResourceReportItem_t)); + + int plmnid_size = strlen((char*)plmnid_buf); + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(plmnid_size,1); + plmnidstr->size = plmnid_size; + memcpy(plmnidstr->buf, plmnid_buf, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + + int nrcellid_size = strlen((char*)nrcellid_buf); + nrcellid->buf = (uint8_t*)calloc(1, nrcellid_size); + memcpy(nrcellid->buf, nrcellid_buf, nrcellid_size); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + printf("enc3\n"); + + report_item->nRCGI = *nrcgi; + + CU_CP_Usage_Report_UeResourceReportItem *ue_report_item = + (CU_CP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_CP_Usage_Report_UeResourceReportItem)); + + printf("enc3.2\n"); + + + int crnti_size = strlen((char*)crnti_buf); + OCTET_STRING *crnti = (OCTET_STRING*)calloc(1,sizeof(OCTET_STRING)); + crnti->buf = (uint8_t*)calloc(1, crnti_size); + + printf("enc3.3\n"); + + crnti->size = strlen((char*)crnti_buf); + + printf("enc3.4\n"); + memcpy(crnti->buf, crnti_buf, crnti->size); + + // uint8_t *buf_serving = (uint8_t*)"RSRP10"; + + int serving_buf_len = strlen((char*)serving_buf); + OCTET_STRING_t *servingstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + servingstr->buf = (uint8_t*)calloc(serving_buf_len,1); + servingstr->size = serving_buf_len; + memcpy(servingstr->buf, serving_buf, servingstr->size); + + + int neighbor_buf_len = strlen((char*)neighbor_buf); + // uint8_t *buf_neighbor = (uint8_t*)"-10,-15"; + OCTET_STRING_t *neighborstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + ts->buf = (uint8_t*)calloc(neighbor_buf_len,1); + neighborstr->buf = (uint8_t*)calloc(neighbor_buf_len,1); + neighborstr->size = neighbor_buf_len; + memcpy(neighborstr->buf, neighbor_buf, neighborstr->size); + + ue_report_item->c_RNTI = *crnti; + ue_report_item->serving_Cell_RF_Type = servingstr; + ue_report_item->neighbor_Cell_RF = neighborstr; + + + ASN_SEQUENCE_ADD(&report_item->ueResourceReportList.list, ue_report_item); + + ranco->timestamp = *ts; + ranco->reportContainer.present = RAN_Container__reportContainer_PR_oCU_CP_UE; + ASN_SEQUENCE_ADD(&ranco->reportContainer.choice.oCU_CP_UE.cellResourceReportList.list, report_item); + + xer_fprint(stderr, &asn_DEF_RAN_Container, ranco); + + +} + +void encode_kpm_ocucp_user_level(RAN_Container_t *ranco) { + + uint8_t *buf = (uint8_t*)"2020.06.13 13:01:05.222"; + Timestamp_t *ts = (Timestamp_t*)calloc(1,sizeof(Timestamp_t)); + ts->buf = (uint8_t*)calloc(strlen((char*)buf),1); + ts->size = strlen((char*)buf); + memcpy(ts->buf,buf,ts->size); + + printf("enc1\n"); + + CU_CP_Usage_Report_CellResourceReportItem_t *report_item = + (CU_CP_Usage_Report_CellResourceReportItem_t*)calloc(1,sizeof(CU_CP_Usage_Report_CellResourceReportItem_t)); + + uint8_t *buf2 = (uint8_t*)"747"; + + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(3,1); + plmnidstr->size = 3; + memcpy(plmnidstr->buf, buf2, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + uint8_t* buf3 = (uint8_t*)"12340"; + nrcellid->buf = (uint8_t*)calloc(1,5); + memcpy(nrcellid->buf, buf3, 5); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + printf("enc3\n"); + + report_item->nRCGI = *nrcgi; + + CU_CP_Usage_Report_UeResourceReportItem *ue_report_item = + (CU_CP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_CP_Usage_Report_UeResourceReportItem)); + + printf("enc3.2\n"); + + uint8_t* crnti_str = (uint8_t*)"1111"; + OCTET_STRING *crnti = (OCTET_STRING*)calloc(1,sizeof(OCTET_STRING)); + crnti->buf = (uint8_t*)calloc(1,4); + + printf("enc3.3\n"); + + crnti->size = strlen((char*)crnti_str); + + printf("enc3.4\n"); + memcpy(crnti->buf, crnti_str, crnti->size); + + uint8_t *buf_serving = (uint8_t*)"RSRP10"; + OCTET_STRING_t *servingstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + servingstr->buf = (uint8_t*)calloc(6,1); + servingstr->size = 6; + memcpy(servingstr->buf, buf_serving, servingstr->size); + + uint8_t *buf_neighbor = (uint8_t*)"-10,-15"; + OCTET_STRING_t *neighborstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + neighborstr->buf = (uint8_t*)calloc(7,1); + neighborstr->size = 7; + memcpy(neighborstr->buf, buf_neighbor, neighborstr->size); + + ue_report_item->c_RNTI = *crnti; + ue_report_item->serving_Cell_RF_Type = servingstr; + ue_report_item->neighbor_Cell_RF = neighborstr; + + + ASN_SEQUENCE_ADD(&report_item->ueResourceReportList.list, ue_report_item); + + ranco->timestamp = *ts; + ranco->reportContainer.present = RAN_Container__reportContainer_PR_oCU_CP_UE; + ASN_SEQUENCE_ADD(&ranco->reportContainer.choice.oCU_CP_UE.cellResourceReportList.list, report_item); + + xer_fprint(stderr, &asn_DEF_RAN_Container, ranco); + +} + + +void encode_kpm_odu_user_level(RAN_Container_t *ranco) { + + uint8_t *buf = (uint8_t*)"2020.06.13 13:01:05.222"; + Timestamp_t *ts = (Timestamp_t*)calloc(1,sizeof(Timestamp_t)); + ts->buf = (uint8_t*)calloc(strlen((char*)buf),1); + ts->size = strlen((char*)buf); + memcpy(ts->buf,buf,ts->size); + + printf("enc1\n"); + + DU_Usage_Report_CellResourceReportItem_t *report_item = + (DU_Usage_Report_CellResourceReportItem_t*)calloc(1,sizeof(DU_Usage_Report_CellResourceReportItem_t)); + + uint8_t *buf2 = (uint8_t*)"747"; + + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(3,1); + plmnidstr->size = 3; + memcpy(plmnidstr->buf, buf2, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + uint8_t* buf3 = (uint8_t*)"12340"; + nrcellid->buf = (uint8_t*)calloc(1,5); + memcpy(nrcellid->buf, buf3, 5); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + printf("enc3\n"); + + report_item->nRCGI = *nrcgi; + + printf("enc3.1\n"); + + DU_Usage_Report_UeResourceReportItem *ue_report_item = + (DU_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(DU_Usage_Report_UeResourceReportItem)); + + printf("enc3.2\n"); + + uint8_t* crnti_str = (uint8_t*)"1111"; + OCTET_STRING *crnti = (OCTET_STRING*)calloc(1,sizeof(OCTET_STRING)); + crnti->buf = (uint8_t*)calloc(1,4); + + printf("enc3.3\n"); + + crnti->size = strlen((char*)crnti_str); + + printf("enc3.4\n"); + memcpy(crnti->buf, crnti_str, crnti->size); + + printf("enc4\n"); + + long lval1 = 2; + long lval2 = 1; + + ue_report_item->c_RNTI = *crnti; + ue_report_item->dl_PRBUsage = &lval1; + + printf("enc5\n"); + + ue_report_item->ul_PRBUsage = &lval2; + + printf("enc6\n"); + + ASN_SEQUENCE_ADD(&report_item->ueResourceReportList.list, ue_report_item); + + + ranco->timestamp = *ts; + ranco->reportContainer.present = RAN_Container__reportContainer_PR_oDU_UE; + ASN_SEQUENCE_ADD(&ranco->reportContainer.choice.oDU_UE.cellResourceReportList.list, report_item); + + xer_fprint(stderr, &asn_DEF_RAN_Container, ranco); + + +} + +void encode_kpm_report_rancontainer_du(E2SM_KPM_IndicationMessage_t* indicationmessage) { + + RAN_Container_t *ranco = (RAN_Container_t*)calloc(1,sizeof(RAN_Container_t)); + encode_kpm_odu_user_level(ranco); + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->theRANContainer = ranco; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + int ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + asn_codec_ctx_t *opt_cod; + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + +} + +void encode_kpm_report_rancontainer_cucp_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, + uint8_t *plmnid_buf, + uint8_t *nrcellid_buf, + uint8_t *crnti_buf, + const uint8_t *serving_buf, + const uint8_t *neighbor_buf) { + + RAN_Container_t *ranco = (RAN_Container_t*)calloc(1,sizeof(RAN_Container_t)); + encode_kpm_ocucp_user_level(ranco, plmnid_buf, + nrcellid_buf, crnti_buf, + serving_buf, neighbor_buf); + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->theRANContainer = ranco; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + int ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + asn_codec_ctx_t *opt_cod; + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + +} + + +void encode_kpm_report_rancontainer_cucp(E2SM_KPM_IndicationMessage_t* indicationmessage) { + + RAN_Container_t *ranco = (RAN_Container_t*)calloc(1,sizeof(RAN_Container_t)); + encode_kpm_ocucp_user_level(ranco); + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->theRANContainer = ranco; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + int ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + asn_codec_ctx_t *opt_cod; + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + +} + +void encode_kpm_report_rancontainer_cuup_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, + uint8_t *plmnid_buf, + uint8_t *nrcellid_buf, + uint8_t *crnti_buf, + int pdcp_bytesdl, + int pdcp_bytesul) { + + +} + +void encode_kpm_report_rancontainer_cuup(E2SM_KPM_IndicationMessage_t* indicationmessage) { + + RAN_Container_t *ranco = (RAN_Container_t*)calloc(1,sizeof(RAN_Container_t)); + //encode_kpm_ocuup_user_level(ranco); + + + uint8_t *buf = (uint8_t*)"2020.06.13 13:01:05.222"; + Timestamp_t *ts = (Timestamp_t*)calloc(1,sizeof(Timestamp_t)); + ts->buf = (uint8_t*)calloc(strlen((char*)buf),1); + ts->size = strlen((char*)buf); + memcpy(ts->buf,buf,ts->size); + + printf("enc1\n"); + + CU_CP_Usage_Report_CellResourceReportItem_t *report_item = + (CU_CP_Usage_Report_CellResourceReportItem_t*)calloc(1,sizeof(CU_CP_Usage_Report_CellResourceReportItem_t)); + + uint8_t *buf2 = (uint8_t*)"747"; + + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(3,1); + plmnidstr->size = 3; + memcpy(plmnidstr->buf, buf2, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + uint8_t* buf3 = (uint8_t*)"12340"; + nrcellid->buf = (uint8_t*)calloc(1,5); + memcpy(nrcellid->buf, buf3, 5); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + printf("enc3\n"); + + report_item->nRCGI = *nrcgi; + + CU_CP_Usage_Report_UeResourceReportItem *ue_report_item = + (CU_CP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_CP_Usage_Report_UeResourceReportItem)); + + printf("enc3.2\n"); + + uint8_t* crnti_str = (uint8_t*)"1111"; + OCTET_STRING *crnti = (OCTET_STRING*)calloc(1,sizeof(OCTET_STRING)); + crnti->buf = (uint8_t*)calloc(1,4); + + printf("enc3.3\n"); + + crnti->size = strlen((char*)crnti_str); + + printf("enc3.4\n"); + memcpy(crnti->buf, crnti_str, crnti->size); + + uint8_t *buf_serving = (uint8_t*)"RSRP10"; + OCTET_STRING_t *servingstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + servingstr->buf = (uint8_t*)calloc(6,1); + servingstr->size = 6; + memcpy(servingstr->buf, buf_serving, servingstr->size); + + uint8_t *buf_neighbor = (uint8_t*)"-10,-15"; + OCTET_STRING_t *neighborstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + neighborstr->buf = (uint8_t*)calloc(7,1); + neighborstr->size = 7; + memcpy(neighborstr->buf, buf_neighbor, neighborstr->size); + + ue_report_item->c_RNTI = *crnti; + ue_report_item->serving_Cell_RF_Type = servingstr; + ue_report_item->neighbor_Cell_RF = neighborstr; + + + ASN_SEQUENCE_ADD(&report_item->ueResourceReportList.list, ue_report_item); + + ranco->timestamp = *ts; + ranco->reportContainer.present = RAN_Container__reportContainer_PR_oCU_CP_UE; + ASN_SEQUENCE_ADD(&ranco->reportContainer.choice.oCU_CP_UE.cellResourceReportList.list, report_item); + + // xer_fprint(stderr, &asn_DEF_RAN_Container, ranco); + + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->theRANContainer = ranco; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + int ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + asn_codec_ctx_t *opt_cod; + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + +} + +void encode_kpm_report_style1_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, + long fiveqi, + long dl_prb_usage, + long ul_prb_usage, + uint8_t* sd_buf, + uint8_t* sst_buf, + uint8_t* plmnid_buf, + uint8_t* nrcellid_buf, + long *dl_prbs, + long *ul_prbs) { + + + asn_codec_ctx_t *opt_cod; + + FQIPERSlicesPerPlmnPerCellListItem_t *fqi_item = + (FQIPERSlicesPerPlmnPerCellListItem_t*)calloc(1,sizeof(FQIPERSlicesPerPlmnPerCellListItem_t)); + fqi_item->fiveQI = fiveqi; + fqi_item->dl_PRBUsage = &dl_prb_usage; + fqi_item->ul_PRBUsage = &ul_prb_usage; + + uint8_t *buf1 = (uint8_t*)"4"; + OCTET_STRING_t *sst = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sst->size = 6; + sst->buf = (uint8_t*)calloc(1,6); + memcpy(sst->buf,buf1,sst->size); + + // std::string sd = "SD1"; + // std::vector sdvec(sd.begin(), sd.end()); + // uint8_t *bufz = &sdvec[0]; + uint8_t *bufz = (uint8_t*)"SD1"; + OCTET_STRING_t *sds = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sds->size = 3; + sds->buf = (uint8_t*)calloc(1,3); + memcpy(sds->buf, bufz, sds->size); + + + SNSSAI_t *snssai = (SNSSAI_t*)calloc(1, sizeof(SNSSAI_t)); + ASN_STRUCT_RESET(asn_DEF_SNSSAI,snssai); + snssai->sST.buf = (uint8_t*)calloc(1,1); + snssai->sST.size = 1; + memcpy(snssai->sST.buf, sst_buf, 1); + snssai->sD = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + snssai->sD->buf = (uint8_t*)calloc(1,3); + snssai->sD->size = 3; + memcpy(snssai->sD->buf, sd_buf, 3); + + + SlicePerPlmnPerCellListItem_t *sliceitem = + (SlicePerPlmnPerCellListItem_t*)calloc(1,sizeof(SlicePerPlmnPerCellListItem_t)); + sliceitem->sliceID = *snssai; + ASN_SEQUENCE_ADD(&sliceitem->fQIPERSlicesPerPlmnPerCellList.list, fqi_item); + + uint8_t *buf2 = (uint8_t*)"747"; + + OCTET_STRING_t *plmnid = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnid->buf = (uint8_t*)calloc(3,1); + plmnid->size = 3; + memcpy(plmnid->buf, plmnid_buf, plmnid->size); + + ServedPlmnPerCellListItem_t *percellitem1 = + (ServedPlmnPerCellListItem_t*)calloc(1,sizeof(ServedPlmnPerCellListItem_t)); + percellitem1->pLMN_Identity = *plmnid; + percellitem1->du_PM_5GC = (FGC_DU_PM_Container*)calloc(1,sizeof(FGC_DU_PM_Container)); + ASN_SEQUENCE_ADD(&percellitem1->du_PM_5GC->slicePerPlmnPerCellList.list, sliceitem); + + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(3,1); + plmnidstr->size = 3; + memcpy(plmnidstr->buf, plmnid_buf, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + uint8_t* buf3 = (uint8_t*)"12340"; + nrcellid->buf = (uint8_t*)calloc(1,5); + memcpy(nrcellid->buf, nrcellid_buf, 5); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + + CellResourceReportListItem_t *listitem1 = (CellResourceReportListItem_t*)calloc(1,sizeof(CellResourceReportListItem_t)); + listitem1->nRCGI = *nrcgi; + listitem1->dl_TotalofAvailablePRBs = dl_prbs; + listitem1->ul_TotalofAvailablePRBs = ul_prbs; + ASN_SEQUENCE_ADD(&listitem1->servedPlmnPerCellList.list, percellitem1); + + + ODU_PF_Container_t *ducont = (ODU_PF_Container_t*)calloc(1,sizeof(ODU_PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_ODU_PF_Container, ducont); + int ret = ASN_SEQUENCE_ADD(&ducont->cellResourceReportList.list, listitem1); + + PF_Container_PR pres1 = PF_Container_PR_oDU; + + PF_Container_t *pfcontainer = (PF_Container_t*)calloc(1, sizeof(PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer); + pfcontainer->present = pres1; + pfcontainer->choice.oDU = *ducont; + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->performanceContainer = pfcontainer; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + +} + + +void encode_kpm_report_style1(E2SM_KPM_IndicationMessage_t* indicationmessage) { + + long fiveqi = 8; + long dl_prb_usage = 50; + long ul_prb_usage = 70; + + asn_codec_ctx_t *opt_cod; + + FQIPERSlicesPerPlmnPerCellListItem_t *fqi_item = + (FQIPERSlicesPerPlmnPerCellListItem_t*)calloc(1,sizeof(FQIPERSlicesPerPlmnPerCellListItem_t)); + fqi_item->fiveQI = fiveqi; + fqi_item->dl_PRBUsage = &dl_prb_usage; + fqi_item->ul_PRBUsage = &ul_prb_usage; + + uint8_t *buf1 = (uint8_t*)"4"; + OCTET_STRING_t *sst = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sst->size = 6; + sst->buf = (uint8_t*)calloc(1,6); + memcpy(sst->buf,buf1,sst->size); + + // std::string sd = "SD1"; + // std::vector sdvec(sd.begin(), sd.end()); + // uint8_t *bufz = &sdvec[0]; + uint8_t *bufz = (uint8_t*)"SD1"; + OCTET_STRING_t *sds = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sds->size = 3; + sds->buf = (uint8_t*)calloc(1,3); + memcpy(sds->buf, bufz, sds->size); + + + SNSSAI_t *snssai = (SNSSAI_t*)calloc(1, sizeof(SNSSAI_t)); + ASN_STRUCT_RESET(asn_DEF_SNSSAI,snssai); + snssai->sST.buf = (uint8_t*)calloc(1,1); + snssai->sST.size = 1; + memcpy(snssai->sST.buf, buf1, 1); + snssai->sD = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + snssai->sD->buf = (uint8_t*)calloc(1,3); + snssai->sD->size = 3; + memcpy(snssai->sD->buf, bufz, 3); + + + SlicePerPlmnPerCellListItem_t *sliceitem = + (SlicePerPlmnPerCellListItem_t*)calloc(1,sizeof(SlicePerPlmnPerCellListItem_t)); + sliceitem->sliceID = *snssai; + ASN_SEQUENCE_ADD(&sliceitem->fQIPERSlicesPerPlmnPerCellList.list, fqi_item); + + uint8_t *buf2 = (uint8_t*)"747"; + + OCTET_STRING_t *plmnid = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnid->buf = (uint8_t*)calloc(3,1); + plmnid->size = 3; + memcpy(plmnid->buf, buf2, plmnid->size); + + ServedPlmnPerCellListItem_t *percellitem1 = + (ServedPlmnPerCellListItem_t*)calloc(1,sizeof(ServedPlmnPerCellListItem_t)); + percellitem1->pLMN_Identity = *plmnid; + percellitem1->du_PM_5GC = (FGC_DU_PM_Container*)calloc(1,sizeof(FGC_DU_PM_Container)); + ASN_SEQUENCE_ADD(&percellitem1->du_PM_5GC->slicePerPlmnPerCellList.list, sliceitem); + + OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnidstr->buf = (uint8_t*)calloc(3,1); + plmnidstr->size = 3; + memcpy(plmnidstr->buf, buf2, plmnidstr->size); + + printf("enc2\n"); + + NRCellIdentity_t *nrcellid = (NRCellIdentity_t*)calloc(1,sizeof(NRCellIdentity_t)); + uint8_t* buf3 = (uint8_t*)"12340"; + nrcellid->buf = (uint8_t*)calloc(1,5); + memcpy(nrcellid->buf, buf3, 5); + nrcellid->size = 5; + nrcellid->bits_unused = 4; + + NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI)); + nrcgi->pLMN_Identity = *plmnidstr; + nrcgi->nRCellIdentity = *nrcellid; + + long dl_prbs = (long)100; + long ul_prbs = (long)120; + + CellResourceReportListItem_t *listitem1 = (CellResourceReportListItem_t*)calloc(1,sizeof(CellResourceReportListItem_t)); + listitem1->nRCGI = *nrcgi; + listitem1->dl_TotalofAvailablePRBs = &dl_prbs; + listitem1->ul_TotalofAvailablePRBs = &ul_prbs; + ASN_SEQUENCE_ADD(&listitem1->servedPlmnPerCellList.list, percellitem1); + + + ODU_PF_Container_t *ducont = (ODU_PF_Container_t*)calloc(1,sizeof(ODU_PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_ODU_PF_Container, ducont); + int ret = ASN_SEQUENCE_ADD(&ducont->cellResourceReportList.list, listitem1); + + PF_Container_PR pres1 = PF_Container_PR_oDU; + + PF_Container_t *pfcontainer = (PF_Container_t*)calloc(1, sizeof(PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer); + pfcontainer->present = pres1; + pfcontainer->choice.oDU = *ducont; + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->performanceContainer = pfcontainer; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + +} + +void encode_kpm_report_style5_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, + uint8_t *gnbcuupname_buf, + int bytes_dl, + int bytes_ul, + uint8_t *sst_buf, + uint8_t *sd_buf, + uint8_t *plmnid_buf) { + + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + + // uint8_t *buf = (uint8_t*)"GNBCUUP5"; + OCTET_STRING_t *gnbcuupname = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + gnbcuupname->size = 8; + gnbcuupname->buf = (uint8_t*)calloc(1,8); + memcpy(gnbcuupname->buf, gnbcuupname_buf, gnbcuupname->size); + + + //We need to convert bytes_dl into array of uint8_t + INTEGER_t *bytesdl = (INTEGER_t*)calloc(1, sizeof(INTEGER_t)); + uint8_t buffer[1]; + buffer[0]= 40000; + bytesdl->buf = (uint8_t*)calloc(1,1); + memcpy(bytesdl->buf, buffer,1); + bytesdl->size = 1; + + + //We need to convert bytes_ul into array of uint8_t + INTEGER_t *bytesul = (INTEGER_t*)calloc(1, sizeof(INTEGER_t)); + uint8_t buffer1[1]; + buffer1[0] = 50000; + bytesul->buf = (uint8_t*)calloc(1,1); + memcpy(bytesul->buf, buffer1, 1); + bytesul->size = 1; + + FQIPERSlicesPerPlmnListItem_t *fqilistitem = (FQIPERSlicesPerPlmnListItem_t*)calloc(1, sizeof(FQIPERSlicesPerPlmnListItem_t)); + ASN_STRUCT_RESET(asn_DEF_FQIPERSlicesPerPlmnListItem, fqilistitem); + fqilistitem->fiveQI = 9; + fqilistitem->pDCPBytesDL = bytesdl; + fqilistitem->pDCPBytesUL = bytesul; + + + uint8_t *buf1 = (uint8_t*)"4"; + OCTET_STRING_t *sst = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sst->size = 6; + sst->buf = (uint8_t*)calloc(1,6); + memcpy(sst->buf,sst_buf,sst->size); + + + uint8_t *bufz = (uint8_t*)"SD1"; + OCTET_STRING_t *sds = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sds->size = 3; + sds->buf = (uint8_t*)calloc(1,3); + memcpy(sds->buf, sd_buf, sds->size); + + + SNSSAI_t *snssai = (SNSSAI_t*)calloc(1, sizeof(SNSSAI_t)); + ASN_STRUCT_RESET(asn_DEF_SNSSAI,snssai); + snssai->sST.buf = (uint8_t*)calloc(1,1); + snssai->sST.size = 1; + memcpy(snssai->sST.buf, sst_buf, 1); + snssai->sD = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + snssai->sD->buf = (uint8_t*)calloc(1,3); + snssai->sD->size = 3; + memcpy(snssai->sD->buf, sd_buf, 3); + + + + SliceToReportListItem_t *slicelistitem = (SliceToReportListItem_t*)calloc(1,sizeof(SliceToReportListItem_t)); + ASN_STRUCT_RESET(asn_DEF_SliceToReportListItem, slicelistitem); + slicelistitem->sliceID = *snssai; + int ret = ASN_SEQUENCE_ADD(&slicelistitem->fQIPERSlicesPerPlmnList.list, fqilistitem); + + asn_codec_ctx_t *opt_cod; + + + uint8_t e2smbuffera[8192]; + size_t e2smbuffer_sizea = 8192; + + + + asn_enc_rval_t era = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_SliceToReportListItem, + slicelistitem, e2smbuffera, e2smbuffer_sizea); + fprintf(stderr, "inner er encded is %d\n", era.encoded); + fprintf(stderr, "after encoding message\n"); + + + + FGC_CUUP_PM_Format_t *pm_format = (FGC_CUUP_PM_Format_t*)calloc(1,sizeof(FGC_CUUP_PM_Format_t)); + ASN_STRUCT_RESET(asn_DEF_FGC_CUUP_PM_Format, pm_format); + ret = ASN_SEQUENCE_ADD(&pm_format->sliceToReportList.list, slicelistitem); + + uint8_t *buf2 = (uint8_t*)"747"; + // std::string pl = "PLMNID7"; + // std::vector plvec(pl.begin(), pl.end()); + // uint8_t *buf2 = &plvec[0]; + + OCTET_STRING_t *plmnid = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnid->buf = (uint8_t*)calloc(3,1); + plmnid->size = 3; + memcpy(plmnid->buf, plmnid_buf, plmnid->size); + + + PlmnID_List_t *plmnidlist = (PlmnID_List_t*)calloc(1,sizeof(PlmnID_List_t)); + ASN_STRUCT_RESET(asn_DEF_PlmnID_List, plmnidlist); + plmnidlist->pLMN_Identity = *plmnid; + plmnidlist->cu_UP_PM_5GC = pm_format; + + CUUPMeasurement_Container_t *meas_cont = (CUUPMeasurement_Container_t*)calloc(1, sizeof(CUUPMeasurement_Container_t)); + ASN_STRUCT_RESET(asn_DEF_CUUPMeasurement_Container, meas_cont); + ret = ASN_SEQUENCE_ADD(&meas_cont->plmnList.list, plmnidlist); + + + + + PF_ContainerListItem_t *listitem1 = (PF_ContainerListItem_t*)calloc(1, sizeof(PF_ContainerListItem_t)); + ASN_STRUCT_RESET(asn_DEF_PF_ContainerListItem, listitem1); + listitem1->interface_type = 2; + listitem1->o_CU_UP_PM_Container = *meas_cont; + + OCUUP_PF_Container_t *cuupcont = (OCUUP_PF_Container_t*)calloc(1,sizeof(OCUUP_PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_OCUUP_PF_Container, cuupcont); + cuupcont->gNB_CU_UP_Name = gnbcuupname; + ret = ASN_SEQUENCE_ADD(&cuupcont->pf_ContainerList.list, listitem1); + + PF_Container_PR pres1 = PF_Container_PR_oCU_UP; + + PF_Container_t *pfcontainer = (PF_Container_t*)calloc(1, sizeof(PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer); + pfcontainer->present = pres1; + pfcontainer->choice.oCU_UP = *cuupcont; + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->performanceContainer = pfcontainer; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + + +} + +void encode_kpm_report_style5(E2SM_KPM_IndicationMessage_t* indicationmessage) { + + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + + uint8_t *buf = (uint8_t*)"GNBCUUP5"; + OCTET_STRING_t *gnbcuupname = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + gnbcuupname->size = 8; + gnbcuupname->buf = (uint8_t*)calloc(1,8); + memcpy(gnbcuupname->buf, buf, gnbcuupname->size); + + + INTEGER_t *bytesdl = (INTEGER_t*)calloc(1, sizeof(INTEGER_t)); + uint8_t buffer[1]; + buffer[0]= 40000; + bytesdl->buf = (uint8_t*)calloc(1,1); + memcpy(bytesdl->buf, buffer,1); + bytesdl->size = 1; + + INTEGER_t *bytesul = (INTEGER_t*)calloc(1, sizeof(INTEGER_t)); + uint8_t buffer1[1]; + buffer1[0] = 50000; + bytesul->buf = (uint8_t*)calloc(1,1); + memcpy(bytesul->buf, buffer1, 1); + bytesul->size = 1; + + FQIPERSlicesPerPlmnListItem_t *fqilistitem = (FQIPERSlicesPerPlmnListItem_t*)calloc(1, sizeof(FQIPERSlicesPerPlmnListItem_t)); + ASN_STRUCT_RESET(asn_DEF_FQIPERSlicesPerPlmnListItem, fqilistitem); + fqilistitem->fiveQI = 9; + fqilistitem->pDCPBytesDL = bytesdl; + fqilistitem->pDCPBytesUL = bytesul; + + + uint8_t *buf1 = (uint8_t*)"4"; + OCTET_STRING_t *sst = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sst->size = 6; + sst->buf = (uint8_t*)calloc(1,6); + memcpy(sst->buf,buf1,sst->size); + + + uint8_t *bufz = (uint8_t*)"SD1"; + OCTET_STRING_t *sds = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + sds->size = 3; + sds->buf = (uint8_t*)calloc(1,3); + memcpy(sds->buf, bufz, sds->size); + + + SNSSAI_t *snssai = (SNSSAI_t*)calloc(1, sizeof(SNSSAI_t)); + ASN_STRUCT_RESET(asn_DEF_SNSSAI,snssai); + snssai->sST.buf = (uint8_t*)calloc(1,1); + snssai->sST.size = 1; + memcpy(snssai->sST.buf, buf1, 1); + snssai->sD = (OCTET_STRING_t*)calloc(1, sizeof(OCTET_STRING_t)); + snssai->sD->buf = (uint8_t*)calloc(1,3); + snssai->sD->size = 3; + memcpy(snssai->sD->buf, bufz, 3); + + + + SliceToReportListItem_t *slicelistitem = (SliceToReportListItem_t*)calloc(1,sizeof(SliceToReportListItem_t)); + ASN_STRUCT_RESET(asn_DEF_SliceToReportListItem, slicelistitem); + slicelistitem->sliceID = *snssai; + int ret = ASN_SEQUENCE_ADD(&slicelistitem->fQIPERSlicesPerPlmnList.list, fqilistitem); + + asn_codec_ctx_t *opt_cod; + + + uint8_t e2smbuffera[8192]; + size_t e2smbuffer_sizea = 8192; + + + + asn_enc_rval_t era = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_SliceToReportListItem, + slicelistitem, e2smbuffera, e2smbuffer_sizea); + fprintf(stderr, "inner er encded is %d\n", era.encoded); + fprintf(stderr, "after encoding message\n"); + + + + FGC_CUUP_PM_Format_t *pm_format = (FGC_CUUP_PM_Format_t*)calloc(1,sizeof(FGC_CUUP_PM_Format_t)); + ASN_STRUCT_RESET(asn_DEF_FGC_CUUP_PM_Format, pm_format); + ret = ASN_SEQUENCE_ADD(&pm_format->sliceToReportList.list, slicelistitem); + + uint8_t *buf2 = (uint8_t*)"747"; + // std::string pl = "PLMNID7"; + // std::vector plvec(pl.begin(), pl.end()); + // uint8_t *buf2 = &plvec[0]; + + OCTET_STRING_t *plmnid = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t)); + plmnid->buf = (uint8_t*)calloc(3,1); + plmnid->size = 3; + memcpy(plmnid->buf, buf2, plmnid->size); + + + PlmnID_List_t *plmnidlist = (PlmnID_List_t*)calloc(1,sizeof(PlmnID_List_t)); + ASN_STRUCT_RESET(asn_DEF_PlmnID_List, plmnidlist); + plmnidlist->pLMN_Identity = *plmnid; + plmnidlist->cu_UP_PM_5GC = pm_format; + + CUUPMeasurement_Container_t *meas_cont = (CUUPMeasurement_Container_t*)calloc(1, sizeof(CUUPMeasurement_Container_t)); + ASN_STRUCT_RESET(asn_DEF_CUUPMeasurement_Container, meas_cont); + ret = ASN_SEQUENCE_ADD(&meas_cont->plmnList.list, plmnidlist); + + + + + PF_ContainerListItem_t *listitem1 = (PF_ContainerListItem_t*)calloc(1, sizeof(PF_ContainerListItem_t)); + ASN_STRUCT_RESET(asn_DEF_PF_ContainerListItem, listitem1); + listitem1->interface_type = 2; + listitem1->o_CU_UP_PM_Container = *meas_cont; + + OCUUP_PF_Container_t *cuupcont = (OCUUP_PF_Container_t*)calloc(1,sizeof(OCUUP_PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_OCUUP_PF_Container, cuupcont); + cuupcont->gNB_CU_UP_Name = gnbcuupname; + ret = ASN_SEQUENCE_ADD(&cuupcont->pf_ContainerList.list, listitem1); + + PF_Container_PR pres1 = PF_Container_PR_oCU_UP; + + PF_Container_t *pfcontainer = (PF_Container_t*)calloc(1, sizeof(PF_Container_t)); + ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer); + pfcontainer->present = pres1; + pfcontainer->choice.oCU_UP = *cuupcont; + + PM_Containers_List_t *containers_list = (PM_Containers_List_t*)calloc(1, sizeof(PM_Containers_List_t)); + ASN_STRUCT_RESET(asn_DEF_PM_Containers_List, containers_list); + containers_list->performanceContainer = pfcontainer; + + E2SM_KPM_IndicationMessage_Format1_t *format = + (E2SM_KPM_IndicationMessage_Format1_t*)calloc(1, sizeof(E2SM_KPM_IndicationMessage_Format1_t)); + ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage_Format1, format); + + ret = ASN_SEQUENCE_ADD(&format->pm_Containers.list, containers_list); + + E2SM_KPM_IndicationMessage__indicationMessage_PR pres = E2SM_KPM_IndicationMessage__indicationMessage_PR_indicationMessage_Format1; + + indicationmessage->indicationMessage.present = pres; + + indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format; + + char *error_buf = (char*)calloc(300, sizeof(char)); + size_t errlen; + + asn_check_constraints(&asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage, error_buf, &errlen); + printf("error length %d\n", errlen); + printf("error buf %s\n", error_buf); + + xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); + + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + asn_enc_rval_t er = + asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + indicationmessage, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + +} + void encode_kpm(E2SM_KPM_IndicationMessage_t* indicationmessage) { + + /* ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); //std::string gn = "GNBCUUP5"; //std::vector gnvec(gn.begin(), gn.end()); @@ -81,7 +1501,7 @@ void encode_kpm(E2SM_KPM_IndicationMessage_t* indicationmessage) { asn_codec_ctx_t *opt_cod; - /* + uint8_t e2smbuffera[8192]; size_t e2smbuffer_sizea = 8192; @@ -94,7 +1514,8 @@ void encode_kpm(E2SM_KPM_IndicationMessage_t* indicationmessage) { slicelistitem, e2smbuffera, e2smbuffer_sizea); fprintf(stderr, "inner er encded is %d\n", era.encoded); fprintf(stderr, "after encoding message\n"); - */ + + FGC_CUUP_PM_Format_t *pm_format = (FGC_CUUP_PM_Format_t*)calloc(1,sizeof(FGC_CUUP_PM_Format_t)); ASN_STRUCT_RESET(asn_DEF_FGC_CUUP_PM_Format, pm_format); @@ -181,10 +1602,10 @@ void encode_kpm(E2SM_KPM_IndicationMessage_t* indicationmessage) { fprintf(stderr, "er encded is %d\n", er.encoded); fprintf(stderr, "after encoding message\n"); - + */ } - +/* void encode_kpm_bak(E2SM_KPM_IndicationMessage_t* indicationmessage) { ASN_STRUCT_RESET(asn_DEF_E2SM_KPM_IndicationMessage, indicationmessage); std::string gn = "GNBCUUP5"; @@ -349,3 +1770,4 @@ void encode_kpm_bak(E2SM_KPM_IndicationMessage_t* indicationmessage) { } +*/ diff --git a/e2sim/e2apv1sim/encode_kpm.hpp b/e2sim/e2apv1sim/encode_kpm.hpp index 1385b7e..60b09e9 100644 --- a/e2sim/e2apv1sim/encode_kpm.hpp +++ b/e2sim/e2apv1sim/encode_kpm.hpp @@ -3,7 +3,35 @@ #include "asn_application.h" #include "E2SM-KPM-IndicationMessage.h" #include "FQIPERSlicesPerPlmnListItem.h" +#include "E2SM-KPM-RANfunction-Description.h" +#include "Timestamp.h" void encode_kpm(E2SM_KPM_IndicationMessage_t* indicationmessage); void encode_kpm_bak(E2SM_KPM_IndicationMessage_t* indicationmessage); + +void encode_kpm_function_description(E2SM_KPM_RANfunction_Description_t* ranfunc_desc); + +void encode_kpm_report_style5(E2SM_KPM_IndicationMessage_t* indicationmessage); + +void encode_kpm_odu_user_level(RAN_Container_t *ranco); + +void encode_kpm_ocucp_user_level(RAN_Container_t *ranco); + +void encode_kpm_ocuup_user_level(RAN_Container_t *ranco); + +void encode_kpm_report_rancontainer_du(E2SM_KPM_IndicationMessage_t *indMsg); + +void encode_kpm_report_rancontainer_cucp(E2SM_KPM_IndicationMessage_t *indMsg); + +void encode_kpm_report_rancontainer_cuup(E2SM_KPM_IndicationMessage_t *indMsg); + +void encode_kpm_report_style1(E2SM_KPM_IndicationMessage_t* indicationmessage); + +void encode_kpm_report_rancontainer_cucp_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage,uint8_t *plmnid_buf,uint8_t *nrcellid_buf,uint8_t *crnti_buf,const uint8_t *serving_buf, const uint8_t *neighbor_buf); + +void encode_kpm_report_rancontainer_cuup_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, uint8_t *plmnid_buf, uint8_t *nrcellid_buf, uint8_t *crnti_buf,int pdcp_bytesdl, int pdcp_bytesul); + +void encode_kpm_report_style1_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, long fiveqi, long dl_prb_usage, long ul_prb_usage, uint8_t* sd_buf, uint8_t* sst_buf,uint8_t* plmnid_buf, uint8_t* nrcellid_buf, long *dl_prbs, long *ul_prbs); + +void encode_kpm_report_style5_parameterized(E2SM_KPM_IndicationMessage_t* indicationmessage, uint8_t *gnbcuupname_buf, int bytes_dl,int bytes_ul, uint8_t *sst_buf, uint8_t *sd_buf, uint8_t *plmnid_buf); diff --git a/e2sim/e2apv1sim/kpm_callbacks.cpp b/e2sim/e2apv1sim/kpm_callbacks.cpp new file mode 100644 index 0000000..4fa4c8d --- /dev/null +++ b/e2sim/e2apv1sim/kpm_callbacks.cpp @@ -0,0 +1,326 @@ + + +#include +#include +#include + + +#include "OCUCP-PF-Container.h" +#include "OCTET_STRING.h" +#include "asn_application.h" +#include "E2SM-KPM-IndicationMessage.h" +#include "FQIPERSlicesPerPlmnListItem.h" +#include "E2SM-KPM-RANfunction-Description.h" +#include "Timestamp.h" +#include "E2AP-PDU.h" +#include "encode_kpm.hpp" +#include "encode_e2apv1.hpp" +#include "e2sim.hpp" + +using namespace std; + +struct neighbor_cell_entry { + char *cellid; + int rsrp; + int rsrq; + int rssinr; + +}; + +void run_report_loop(long requestorId, long instanceId, long ranFunctionId, long actionId, int socket_fd) { + + //Process simulation file + + ifstream simfile; + string line; + + long seqNum = 1; + + simfile.open("simulation.txt", ios::in); + + if (simfile.is_open()) { + + while (getline(simfile, line)) { + cout << line << "\n"; + + //REPORT Message 1 -- Encode and send ODU cell-level report + + E2SM_KPM_IndicationMessage_t *ind_msg1 = + (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t)); + E2AP_PDU *pdu = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU)); + + long fiveqi = 7; + uint8_t *sst_buf = (uint8_t*)"1"; + uint8_t *sd_buf = (uint8_t*)"100"; + uint8_t *plmnid_buf = (uint8_t*)"747"; + uint8_t *nrcellid_buf = (uint8_t*)"12340"; + long dl_prbs = 100; + long ul_prbs = 50; + + encode_kpm_report_style1_parameterized(ind_msg1, fiveqi, dl_prbs, ul_prbs, sst_buf, sd_buf, plmnid_buf, nrcellid_buf, &dl_prbs, &ul_prbs); + + uint8_t e2smbuffer[8192]; + size_t e2smbuffer_size = 8192; + asn_codec_ctx_t *opt_cod; + + asn_enc_rval_t er = asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + ind_msg1, e2smbuffer, e2smbuffer_size); + + fprintf(stderr, "er encded is %d\n", er.encoded); + fprintf(stderr, "after encoding message\n"); + uint8_t *e2smheader_buf = (uint8_t*)"header"; + + uint8_t *cpid_buf = (uint8_t*)"CPID"; + + fprintf(stderr, "About to encode Indication\n"); + generate_e2apv1_indication_request_parameterized(pdu, requestorId, + instanceId, ranFunctionId, + actionId, seqNum, e2smheader_buf, 6, e2smbuffer, er.encoded); + + encode_and_send_sctp_data(pdu, socket_fd); + + seqNum++; + + //REPORT Message 2 -- Encode and send OCUUP cell-level report + + uint8_t *buf = (uint8_t*)"GNBCUUP5"; + + int bytes_dl = 40000; + int bytes_ul = 50000; + + E2SM_KPM_IndicationMessage_t *ind_msg2 = + (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t)); + E2AP_PDU *pdu2 = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU)); + + encode_kpm_report_style5_parameterized(ind_msg2 , buf, bytes_dl, bytes_ul, sst_buf, sd_buf, plmnid_buf); + + uint8_t e2smbuffer2[8192]; + size_t e2smbuffer_size2 = 8192; + + + asn_enc_rval_t er2 = asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + ind_msg2, e2smbuffer2, e2smbuffer_size2); + + fprintf(stderr, "er encded is %d\n", er2.encoded); + fprintf(stderr, "after encoding message\n"); + uint8_t *e2smheader_buf2 = (uint8_t*)"header"; + + generate_e2apv1_indication_request_parameterized(pdu2, requestorId, + instanceId, ranFunctionId, + actionId, seqNum, e2smheader_buf2, 6, e2smbuffer2, er2.encoded); + + encode_and_send_sctp_data(pdu2, socket_fd); + + seqNum++; + + //REPORT Message 3 -- Encode and send OCUCP user-level report + + E2SM_KPM_IndicationMessage_t *ind_msg3 = + (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t)); + E2AP_PDU *pdu3 = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU)); + + uint8_t *crnti_buf = (uint8_t*)"12"; + // uint8_t *serving_buf = (uint8_t*)"RSRP10"; + //uint8_t *neighbor_buf = (uint8_t*)"-10,-15"; + int rsrpServ = 10; + int rsrqServ = 0; + int rssinrServ = 0; + + std::string serving_str = "{\"rsrp\": " + std::to_string(rsrpServ) + ", \"rsrq\": " + + std::to_string(rsrqServ) + ", \"rssinr\": " + std::to_string(rssinrServ) + "}"; + const uint8_t *serving_buf = reinterpret_cast(serving_str.c_str()); + + + neighbor_cell_entry n_entries[3]; + n_entries[0] = {"123", 10, 0, 0}; + n_entries[1] = {"456", 10, 0, 0}; + n_entries[2] = {"789", 10, 0, 0}; + + std::string neighbor_str = "["; + + for (int i=0; i < sizeof(n_entries)/sizeof(n_entries[0]); i++) { + + if (i != 0) { + neighbor_str += ","; + } + neighbor_str += "{\"CID\" : \"" + std::string(n_entries[i].cellid) + "\", \"Cell-RF\" : \"{\"rsrp\": " + std::to_string(n_entries[i].rsrp) + + ", \"rsrq\": " + std::to_string(n_entries[i].rsrq) + ", \"rssinr\": " + std::to_string(n_entries[i].rsrp) + "}}"; + } + + neighbor_str += "]"; + + const uint8_t *neighbor_buf = reinterpret_cast(neighbor_str.c_str()); + + printf("Neighbor string\n%s", neighbor_buf); + + encode_kpm_report_rancontainer_cucp_parameterized(ind_msg3, plmnid_buf, nrcellid_buf, crnti_buf, serving_buf, neighbor_buf); + + uint8_t e2smbuffer3[8192]; + size_t e2smbuffer_size3 = 8192; + + asn_enc_rval_t er3 = asn_encode_to_buffer(opt_cod, + ATS_ALIGNED_BASIC_PER, + &asn_DEF_E2SM_KPM_IndicationMessage, + ind_msg3, e2smbuffer3, e2smbuffer_size3); + + fprintf(stderr, "er encded is %d\n", er3.encoded); + fprintf(stderr, "after encoding message\n"); + uint8_t *e2smheader_buf3 = (uint8_t*)"header"; + + generate_e2apv1_indication_request_parameterized(pdu3, requestorId, + instanceId, ranFunctionId, + actionId, seqNum, e2smheader_buf3, 6, e2smbuffer3, er3.encoded); + + encode_and_send_sctp_data(pdu3, socket_fd); + + seqNum++; + + //Encode and send OCUUP user-level report + + + + //Encode and send ODU user-level report + + + + + } + + simfile.close(); + + } + +} + +void callback_kpm_subscription_request(E2AP_PDU_t *sub_req_pdu, int socket_fd) { + + + //Record RIC Request ID + //Go through RIC action to be Setup List + //Find first entry with REPORT action Type + //Record ricActionID + //Encode subscription response + + RICsubscriptionRequest_t orig_req = + sub_req_pdu->choice.initiatingMessage->value.choice.RICsubscriptionRequest; + + RICsubscriptionResponse_IEs_t *ricreqid = + (RICsubscriptionResponse_IEs_t*)calloc(1, sizeof(RICsubscriptionResponse_IEs_t)); + + int count = orig_req.protocolIEs.list.count; + int size = orig_req.protocolIEs.list.size; + + RICsubscriptionRequest_IEs_t **ies = (RICsubscriptionRequest_IEs_t**)orig_req.protocolIEs.list.array; + + fprintf(stderr, "count%d\n", count); + fprintf(stderr, "size%d\n", size); + + RICsubscriptionRequest_IEs__value_PR pres; + + long reqRequestorId; + long reqInstanceId; + long reqActionId; + + std::vector actionIdsAccept; + std::vector actionIdsReject; + + for (int i=0; i < count; i++) { + RICsubscriptionRequest_IEs_t *next_ie = ies[i]; + pres = next_ie->value.present; + + fprintf(stderr, "next present value %d\n", pres); + + switch(pres) { + case RICsubscriptionRequest_IEs__value_PR_RICrequestID: + { + RICrequestID_t reqId = next_ie->value.choice.RICrequestID; + long requestorId = reqId.ricRequestorID; + long instanceId = reqId.ricInstanceID; + fprintf(stderr, "requestorId %d\n", requestorId); + fprintf(stderr, "instanceId %d\n", instanceId); + reqRequestorId = requestorId; + reqInstanceId = instanceId; + + break; + } + case RICsubscriptionRequest_IEs__value_PR_RANfunctionID: + break; + case RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails: + { + RICsubscriptionDetails_t subDetails = next_ie->value.choice.RICsubscriptionDetails; + RICeventTriggerDefinition_t triggerDef = subDetails.ricEventTriggerDefinition; + RICactions_ToBeSetup_List_t actionList = subDetails.ricAction_ToBeSetup_List; + + //We are ignoring the trigger definition + + //We identify the first action whose type is REPORT + //That is the only one accepted; all others are rejected + + int actionCount = actionList.list.count; + fprintf(stderr, "action count%d\n", actionCount); + + auto **item_array = actionList.list.array; + + bool foundAction = false; + + for (int i=0; i < actionCount; i++) { + + auto *next_item = item_array[i]; + RICactionID_t actionId = ((RICaction_ToBeSetup_ItemIEs*)next_item)->value.choice.RICaction_ToBeSetup_Item.ricActionID; + RICactionType_t actionType = ((RICaction_ToBeSetup_ItemIEs*)next_item)->value.choice.RICaction_ToBeSetup_Item.ricActionType; + + if (!foundAction && actionType == RICactionType_report) { + reqActionId = actionId; + actionIdsAccept.push_back(reqActionId); + printf("adding accept\n"); + foundAction = true; + } else { + reqActionId = actionId; + printf("adding reject\n"); + actionIdsReject.push_back(reqActionId); + } + } + + break; + } + } + + } + + fprintf(stderr, "After Processing Subscription Request\n"); + + fprintf(stderr, "requestorId %d\n", reqRequestorId); + fprintf(stderr, "instanceId %d\n", reqInstanceId); + + + for (int i=0; i < actionIdsAccept.size(); i++) { + fprintf(stderr, "Action ID %d %ld\n", i, actionIdsAccept.at(i)); + + } + + E2AP_PDU *e2ap_pdu = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU)); + + long *accept_array = &actionIdsAccept[0]; + long *reject_array = &actionIdsReject[0]; + int accept_size = actionIdsAccept.size(); + int reject_size = actionIdsReject.size(); + + generate_e2apv1_subscription_response_success(e2ap_pdu, accept_array, reject_array, accept_size, reject_size, reqRequestorId, reqInstanceId); + + encode_and_send_sctp_data(e2ap_pdu,socket_fd); + + //Start thread for sending REPORT messages + + // std::thread loop_thread; + + long funcId = 1; + + run_report_loop(reqRequestorId, reqInstanceId, funcId, reqActionId, socket_fd); + + // loop_thread = std::thread(&run_report_loop); + +} diff --git a/e2sim/e2apv1sim/kpm_callbacks.hpp b/e2sim/e2apv1sim/kpm_callbacks.hpp new file mode 100644 index 0000000..ef590a2 --- /dev/null +++ b/e2sim/e2apv1sim/kpm_callbacks.hpp @@ -0,0 +1,4 @@ + +void callback_kpm_subscription_request(E2AP_PDU_t *pdu, int socket_fd); + +void run_report_loop(long requestorId, long instanceId, long ranFunctionId, long actionId); diff --git a/e2sim/e2apv1sim/ricsim.cpp b/e2sim/e2apv1sim/ricsim.cpp index 28f87d4..d91c9e5 100644 --- a/e2sim/e2apv1sim/ricsim.cpp +++ b/e2sim/e2apv1sim/ricsim.cpp @@ -62,6 +62,8 @@ struct { } */ +int client_fd = 0; + void encode_and_send_sctp_data(E2AP_PDU_t* pdu, int client_fd) { uint8_t *buf; @@ -73,6 +75,18 @@ void encode_and_send_sctp_data(E2AP_PDU_t* pdu, int client_fd) sctp_send_data(client_fd, data); } + +void encode_and_send_sctp_data(E2AP_PDU_t* pdu) +{ + uint8_t *buf; + sctp_buffer_t data; + + data.len = e2ap_asn1c_encode_pdu(pdu, &buf); + memcpy(data.buffer, buf, min(data.len, MAX_SCTP_BUFFER)); + + sctp_send_data(client_fd, data); +} + void wait_for_sctp_data(int client_fd) { sctp_buffer_t recv_buf; @@ -93,7 +107,7 @@ int main(int argc, char* argv[]){ options_t ops = read_input_options(argc, argv); int server_fd = sctp_start_server(ops.server_ip, ops.server_port); - int client_fd = sctp_accept_connection(ops.server_ip, server_fd); + client_fd = sctp_accept_connection(ops.server_ip, server_fd); sctp_buffer_t recv_buf; diff --git a/e2sim/e2apv1sim/ricsim.hpp b/e2sim/e2apv1sim/ricsim.hpp new file mode 100644 index 0000000..9af2552 --- /dev/null +++ b/e2sim/e2apv1sim/ricsim.hpp @@ -0,0 +1,5 @@ +#include "E2AP-PDU.h" + +void encode_and_send_sctp_data(E2AP_PDU_t* pdu); + +void encode_and_send_sctp_data(E2AP_PDU_t* pdu, int socket_fd); diff --git a/e2sim/e2apv1sim/simulation.txt b/e2sim/e2apv1sim/simulation.txt new file mode 100644 index 0000000..c1eedb7 --- /dev/null +++ b/e2sim/e2apv1sim/simulation.txt @@ -0,0 +1,3 @@ +This is a silulation file +This is a simulation +This is a a a a a simulation file! diff --git a/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.cpp b/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.cpp index efdf175..44f028d 100644 --- a/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.cpp +++ b/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.cpp @@ -19,12 +19,13 @@ # * ******************************************************************************/ #include "e2ap_message_handler.hpp" -#include + //#include //#include #include "encode_e2apv1.hpp" +#include "kpm_callbacks.hpp" - +#include void e2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data, bool xmlenc) { @@ -37,11 +38,11 @@ void e2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data, bool xmlenc) asn_transfer_syntax syntax; - if (!xmlenc) - syntax = ATS_ALIGNED_BASIC_PER; - else - syntax = ATS_BASIC_XER; + syntax = ATS_ALIGNED_BASIC_PER; + + + fprintf(stderr, "full buffer\n%s\n", data.buffer); // e2ap_asn1c_decode_pdu(pdu, data.buffer, data.len); auto rval = asn_decode(nullptr, syntax, &asn_DEF_E2AP_PDU, (void **) &pdu, @@ -70,7 +71,7 @@ void e2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data, bool xmlenc) switch(index) { case E2AP_PDU_PR_initiatingMessage: - e2ap_handle_E2SetupRequest(pdu, socket_fd); + e2ap_handle_E2SetupRequest(pdu, socket_fd); LOG_I("[E2AP] Received SETUP-REQUEST"); break; @@ -112,7 +113,8 @@ void e2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data, bool xmlenc) { case E2AP_PDU_PR_initiatingMessage: //initiatingMessage LOG_I("[E2AP] Received RIC-SUBSCRIPTION-REQUEST"); - e2ap_handle_RICSubscriptionRequest(pdu, socket_fd); + // e2ap_handle_RICSubscriptionRequest(pdu, socket_fd); + callback_kpm_subscription_request(pdu, socket_fd); // e2ap_handle_RICSubscriptionRequest_securityDemo(pdu, socket_fd); break; diff --git a/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.hpp b/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.hpp index 9dca085..9c23165 100644 --- a/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.hpp +++ b/e2sim/e2apv1sim/src/E2AP/e2ap_message_handler.hpp @@ -19,8 +19,10 @@ #ifndef E2AP_MESSAGE_HANDLER_HPP #define E2AP_MESSAGE_HANDLER_HPP + #include "e2sim_sctp.hpp" + extern "C" { #include "e2sim_defs.h" #include "e2ap_asn1c_codec.h" -- 2.16.6