// long fqival = 9;
// long qcival = 9;
- 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);
-
-
- 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);
ind_header->nRCGI = (NRCGI*)calloc(1,sizeof(NRCGI));
ind_header->nRCGI->pLMN_Identity = *plmnid;
ind_header->nRCGI->nRCellIdentity = *nrcellid;
+ if (nrcellid) free(nrcellid);
ind_header->pLMN_Identity = plmnid;
// memcpy(ind_header->fiveQI, &fqival, 4);
ind_header->gNB_Name = (GNB_Name*)calloc(1,sizeof(GNB_Name));
ind_header->gNB_Name->present = GNB_Name_PR_gNB_CU_UP_Name;
ind_header->gNB_Name->choice.gNB_CU_UP_Name = *cuupname;
+ if (cuupname) free(cuupname);
ind_header->global_GNB_ID = (GlobalgNB_ID*)calloc(1,sizeof(GlobalgNB_ID));
ihead->present = E2SM_KPM_IndicationHeader_PR_indicationHeader_Format1;
ihead->choice.indicationHeader_Format1 = *ind_header;
+ if (ind_header) free(ind_header);
xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationHeader, ihead);
NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI));
nrcgi->pLMN_Identity = *plmnidstr;
nrcgi->nRCellIdentity = *nrcellid;
+ if (plmnidstr) free(plmnidstr);
+ if (nrcellid) free(nrcellid);
printf("enc3\n");
report_item->nRCGI = *nrcgi;
+ if (nrcgi) free(nrcgi);
CU_UP_Usage_Report_UeResourceReportItem *ue_report_item =
(CU_UP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_UP_Usage_Report_UeResourceReportItem));
ue_report_item->c_RNTI = *crnti;
ue_report_item->pDCPBytesDL = bytesdl;
ue_report_item->pDCPBytesUL = bytesul;
+ if (crnti) free(crnti);
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);
+ if (ts) free(ts);
xer_fprint(stderr, &asn_DEF_RAN_Container, ranco);
NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI));
nrcgi->pLMN_Identity = *plmnidstr;
nrcgi->nRCellIdentity = *nrcellid;
+ if (plmnidstr) free(plmnidstr);
+ if (nrcellid) free(nrcellid);
printf("enc3\n");
report_item->nRCGI = *nrcgi;
+ if (nrcgi) free(nrcgi);
CU_CP_Usage_Report_UeResourceReportItem *ue_report_item =
(CU_CP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_CP_Usage_Report_UeResourceReportItem));
ue_report_item->c_RNTI = *crnti;
ue_report_item->serving_Cell_RF_Type = servingstr;
ue_report_item->neighbor_Cell_RF = neighborstr;
+ if (crnti) free(crnti);
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);
+ if (ts->buf) free(ts->buf);
+ if (ts) free(ts);
xer_fprint(stderr, &asn_DEF_RAN_Container, ranco);
printf("enc3\n");
report_item->nRCGI = *nrcgi;
+ if (nrcgi) free(nrcgi);
CU_CP_Usage_Report_UeResourceReportItem *ue_report_item =
(CU_CP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_CP_Usage_Report_UeResourceReportItem));
NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI));
nrcgi->pLMN_Identity = *plmnidstr;
nrcgi->nRCellIdentity = *nrcellid;
+ if (plmnidstr) free(plmnidstr);
+ if (nrcellid) free(nrcellid);
printf("enc3\n");
report_item->nRCGI = *nrcgi;
+ if (nrcgi) free(nrcgi);
printf("enc3.1\n");
ue_report_item->c_RNTI = *crnti;
ue_report_item->dl_PRBUsage = &prb_usage_dl;
+ if (crnti) free(crnti);
printf("enc5\n");
ranco->timestamp = *ts;
ranco->reportContainer.present = RAN_Container__reportContainer_PR_oDU_UE;
ASN_SEQUENCE_ADD(&ranco->reportContainer.choice.oDU_UE.cellResourceReportList.list, report_item);
+ if (ts) free(ts);
xer_fprint(stderr, &asn_DEF_RAN_Container, ranco);
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI));
nrcgi->pLMN_Identity = *plmnidstr;
nrcgi->nRCellIdentity = *nrcellid;
+ if (plmnidstr) free(plmnidstr);
+ if (nrcellid) free(nrcellid);
printf("enc3\n");
report_item->nRCGI = *nrcgi;
+ if (nrcgi) free(nrcgi);
CU_CP_Usage_Report_UeResourceReportItem *ue_report_item =
(CU_CP_Usage_Report_UeResourceReportItem*)calloc(1,sizeof(CU_CP_Usage_Report_UeResourceReportItem));
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
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<uint8_t> 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);
(SlicePerPlmnPerCellListItem_t*)calloc(1,sizeof(SlicePerPlmnPerCellListItem_t));
sliceitem->sliceID = *snssai;
ASN_SEQUENCE_ADD(&sliceitem->fQIPERSlicesPerPlmnPerCellList.list, fqi_item);
+ if (snssai) free(snssai);
uint8_t *buf2 = (uint8_t*)"747";
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);
+ if (plmnid) free(plmnid);
OCTET_STRING_t *plmnidstr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t));
plmnidstr->buf = (uint8_t*)calloc(3,1);
NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI));
nrcgi->pLMN_Identity = *plmnidstr;
nrcgi->nRCellIdentity = *nrcellid;
+ if (plmnidstr) free(plmnidstr);
+ if (nrcellid) free(nrcellid);
CellResourceReportListItem_t *listitem1 = (CellResourceReportListItem_t*)calloc(1,sizeof(CellResourceReportListItem_t));
listitem1->dl_TotalofAvailablePRBs = dl_prbs;
listitem1->ul_TotalofAvailablePRBs = ul_prbs;
ASN_SEQUENCE_ADD(&listitem1->servedPlmnPerCellList.list, percellitem1);
+ if (nrcgi) free(nrcgi);
ODU_PF_Container_t *ducont = (ODU_PF_Container_t*)calloc(1,sizeof(ODU_PF_Container_t));
ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer);
pfcontainer->present = pres1;
pfcontainer->choice.oDU = *ducont;
+ if (ducont) free(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);
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
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<uint8_t> 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);
(SlicePerPlmnPerCellListItem_t*)calloc(1,sizeof(SlicePerPlmnPerCellListItem_t));
sliceitem->sliceID = *snssai;
ASN_SEQUENCE_ADD(&sliceitem->fQIPERSlicesPerPlmnPerCellList.list, fqi_item);
+ if (snssai) free(snssai);
uint8_t *buf2 = (uint8_t*)"747";
NRCGI *nrcgi = (NRCGI*)calloc(1,sizeof(NRCGI));
nrcgi->pLMN_Identity = *plmnidstr;
nrcgi->nRCellIdentity = *nrcellid;
+ if (plmnidstr) free(plmnidstr);
+ if (nrcellid) free(nrcellid);
long dl_prbs = (long)100;
long ul_prbs = (long)120;
listitem1->dl_TotalofAvailablePRBs = &dl_prbs;
listitem1->ul_TotalofAvailablePRBs = &ul_prbs;
ASN_SEQUENCE_ADD(&listitem1->servedPlmnPerCellList.list, percellitem1);
+ if (nrcgi) free(nrcgi);
ODU_PF_Container_t *ducont = (ODU_PF_Container_t*)calloc(1,sizeof(ODU_PF_Container_t));
ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer);
pfcontainer->present = pres1;
pfcontainer->choice.oDU = *ducont;
+ if (ducont) free(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);
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
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);
ASN_STRUCT_RESET(asn_DEF_SliceToReportListItem, slicelistitem);
slicelistitem->sliceID = *snssai;
int ret = ASN_SEQUENCE_ADD(&slicelistitem->fQIPERSlicesPerPlmnList.list, fqilistitem);
+ if (snssai) free(snssai);
asn_codec_ctx_t *opt_cod;
ASN_STRUCT_RESET(asn_DEF_PlmnID_List, plmnidlist);
plmnidlist->pLMN_Identity = *plmnid;
plmnidlist->cu_UP_PM_5GC = pm_format;
+ if (plmnid) free(plmnid);
CUUPMeasurement_Container_t *meas_cont = (CUUPMeasurement_Container_t*)calloc(1, sizeof(CUUPMeasurement_Container_t));
ASN_STRUCT_RESET(asn_DEF_CUUPMeasurement_Container, meas_cont);
ASN_STRUCT_RESET(asn_DEF_PF_ContainerListItem, listitem1);
listitem1->interface_type = 2;
listitem1->o_CU_UP_PM_Container = *meas_cont;
+ if (meas_cont) free(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);
ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer);
pfcontainer->present = pres1;
pfcontainer->choice.oCU_UP = *cuupcont;
+ if (cuupcont) free(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);
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
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);
ASN_STRUCT_RESET(asn_DEF_SliceToReportListItem, slicelistitem);
slicelistitem->sliceID = *snssai;
int ret = ASN_SEQUENCE_ADD(&slicelistitem->fQIPERSlicesPerPlmnList.list, fqilistitem);
+ if (snssai) free(snssai);
asn_codec_ctx_t *opt_cod;
ASN_STRUCT_RESET(asn_DEF_PF_ContainerListItem, listitem1);
listitem1->interface_type = 2;
listitem1->o_CU_UP_PM_Container = *meas_cont;
+ if (meas_cont) free(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);
ASN_STRUCT_RESET(asn_DEF_PF_Container, pfcontainer);
pfcontainer->present = pres1;
pfcontainer->choice.oCU_UP = *cuupcont;
+ if (cuupcont) free(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);
indicationmessage->indicationMessage.present = pres;
indicationmessage->indicationMessage.choice.indicationMessage_Format1 = *format;
+ if (format) free(format);
char error_buf[300] = {0, };
size_t errlen;
ATS_ALIGNED_BASIC_PER,
&asn_DEF_E2SM_KPM_IndicationMessage,
ind_msg_cucp_ue, e2sm_message_buf_cucp_ue, e2sm_message_buf_size_cucp_ue);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, ind_msg_cucp_ue);
fprintf(stderr, "er encded is %d\n", er_message_cucp_ue.encoded);
fprintf(stderr, "after encoding message\n");
ATS_ALIGNED_BASIC_PER,
&asn_DEF_E2SM_KPM_IndicationHeader,
ind_header_cucp_ue, e2sm_header_buf_cucp_ue, e2sm_header_buf_size_cucp_ue);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, ind_header_cucp_ue);
fprintf(stderr, "er encded is %d\n", er_header_cucp_ue.encoded);
fprintf(stderr, "error buf is %s\n", (char*)e2sm_header_buf_cucp_ue);
ATS_ALIGNED_BASIC_PER,
&asn_DEF_E2SM_KPM_IndicationMessage,
ind_msg_cuup_ue, e2sm_message_buf_cuup_ue, e2sm_message_buf_size_cuup_ue);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, ind_msg_cuup_ue);
fprintf(stderr, "er encded is %d\n", er_message_cuup_ue.encoded);
fprintf(stderr, "after encoding message\n");
ATS_ALIGNED_BASIC_PER,
&asn_DEF_E2SM_KPM_IndicationHeader,
ind_header_cuup_ue, e2sm_header_buf_cuup_ue, e2sm_header_buf_size_cuup_ue);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, ind_header_cuup_ue);
E2AP_PDU *pdu_cuup_ue = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
ind_message_du_ue,
e2sm_message_buf_du_ue,
e2sm_message_buf_size_du_ue);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, ind_message_du_ue);
fprintf(stderr, "er encded is %d\n", er_message_du_ue.encoded);
fprintf(stderr, "after encoding message\n");
&asn_DEF_E2SM_KPM_IndicationHeader,
ind_header_du_ue, e2sm_header_buf_du_ue,
e2sm_header_buf_size_du_ue);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, ind_header_du_ue);
E2AP_PDU *pdu_du_ue = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
ATS_ALIGNED_BASIC_PER,
&asn_DEF_E2SM_KPM_IndicationMessage,
ind_msg_style5, e2sm_message_buf_style5, e2sm_message_buf_size_style5);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, ind_msg_style5);
fprintf(stderr, "er encded is %d\n", er_message_style5.encoded);
fprintf(stderr, "after encoding message\n");
&asn_DEF_E2SM_KPM_IndicationHeader,
ind_header_style5,
e2sm_header_buf_style5, e2sm_header_buf_size_style5);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, ind_header_style5);
encoding::generate_e2apv1_indication_request_parameterized(pdu_style5, requestorId,
&asn_DEF_E2SM_KPM_IndicationMessage,
ind_message_style1,
e2sm_message_buf_style1, e2sm_message_buf_size_style1);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, ind_message_style1);
fprintf(stderr, "er encded is %d\n", er_message_style1.encoded);
fprintf(stderr, "after encoding message\n");
&asn_DEF_E2SM_KPM_IndicationHeader,
ind_header_style1,
e2sm_header_buf_style1, e2sm_header_buf_size_style1);
+ ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, ind_header_style1);
encoding::generate_e2apv1_indication_request_parameterized(pdu_style1, requestorId,
instanceId, ranFunctionId,