Commit c739058c authored by Laurent THOMAS's avatar Laurent THOMAS

enhanced macros for asn1c

parent fefeb169
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#define F1AP_COMMON_H_ #define F1AP_COMMON_H_
#include "openairinterface5g_limits.h" #include "openairinterface5g_limits.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
#define F1AP_UE_IDENTIFIER_NUMBER 3 #define F1AP_UE_IDENTIFIER_NUMBER 3
#define F1AP_TRANSACTION_IDENTIFIER_NUMBER 3 #define F1AP_TRANSACTION_IDENTIFIER_NUMBER 3
...@@ -479,10 +480,6 @@ static inline f1ap_setup_req_t *f1ap_req(F1_t isCu, instance_t instanceP) { ...@@ -479,10 +480,6 @@ static inline f1ap_setup_req_t *f1ap_req(F1_t isCu, instance_t instanceP) {
return &getCxt(isCu, instanceP)->setupReq; return &getCxt(isCu, instanceP)->setupReq;
} }
#define asn1cCalloc(VaR, TyPe, lOcPtr) TyPe *lOcPtr=VaR=(TyPe*) calloc(1,sizeof(TyPe));
#define asn1cCallocOne(VaR, TyPe, VaLue) VaR=(TyPe*) calloc(1,sizeof(TyPe)); *VaR=VaLue;
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) TyPe *lOcPtr=(TyPe*) calloc(1,sizeof(TyPe)); ASN_SEQUENCE_ADD(&VaR,lOcPtr);
#define TASK_F1APP f1ap_req(false, instance)->cell_type==CELL_MACRO_GNB?TASK_GNB_APP:TASK_ENB_APP #define TASK_F1APP f1ap_req(false, instance)->cell_type==CELL_MACRO_GNB?TASK_GNB_APP:TASK_ENB_APP
//lts: C struct type is not homogeneous, so we need macros instead of functions //lts: C struct type is not homogeneous, so we need macros instead of functions
......
...@@ -241,7 +241,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -241,7 +241,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp); asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_F1Setup; tmp->procedureCode = F1AP_ProcedureCode_id_F1Setup;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_F1SetupResponse; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_F1SetupResponse;
...@@ -345,7 +345,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { ...@@ -345,7 +345,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
uint32_t len=0; uint32_t len=0;
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
asn1cCalloc(pdu.choice.unsuccessfulOutcome, F1AP_UnsuccessfulOutcome_t, UnsuccessfulOutcome); asn1cCalloc(pdu.choice.unsuccessfulOutcome, UnsuccessfulOutcome);
pdu.present = F1AP_F1AP_PDU_PR_unsuccessfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_unsuccessfulOutcome;
UnsuccessfulOutcome->procedureCode = F1AP_ProcedureCode_id_F1Setup; UnsuccessfulOutcome->procedureCode = F1AP_ProcedureCode_id_F1Setup;
UnsuccessfulOutcome->criticality = F1AP_Criticality_reject; UnsuccessfulOutcome->criticality = F1AP_Criticality_reject;
...@@ -385,13 +385,13 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { ...@@ -385,13 +385,13 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
ie4->criticality = F1AP_Criticality_ignore; ie4->criticality = F1AP_Criticality_ignore;
ie4->value.present = F1AP_F1SetupFailureIEs__value_PR_CriticalityDiagnostics; ie4->value.present = F1AP_F1SetupFailureIEs__value_PR_CriticalityDiagnostics;
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCode, asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCode,
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup); F1AP_ProcedureCode_id_UEContextSetup);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.triggeringMessage, asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.triggeringMessage,
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message); F1AP_TriggeringMessage_initiating_message);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCriticality, asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCriticality,
F1AP_Criticality_t, F1AP_Criticality_reject); F1AP_Criticality_reject);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.transactionID, asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.transactionID,
F1AP_TransactionID_t, 0); 0);
} }
/* encode */ /* encode */
...@@ -438,7 +438,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -438,7 +438,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, initMsg); asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
initMsg->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate; initMsg->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate;
initMsg->criticality = F1AP_Criticality_reject; initMsg->criticality = F1AP_Criticality_reject;
initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate; initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate;
...@@ -472,7 +472,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -472,7 +472,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
addnRCGI(cells_to_be_activated_list_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i); addnRCGI(cells_to_be_activated_list_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i);
// optional // optional
// -nRPCI // -nRPCI
asn1cCalloc(cells_to_be_activated_list_item->nRPCI, F1AP_NRPCI_t, tmp); asn1cCalloc(cells_to_be_activated_list_item->nRPCI, tmp);
*tmp = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007 *tmp = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007
// optional // optional
// 3.1.2 gNB-CUSystem Information // 3.1.2 gNB-CUSystem Information
......
...@@ -148,7 +148,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -148,7 +148,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_DLRRCMessageTransfer; tmp->procedureCode = F1AP_ProcedureCode_id_DLRRCMessageTransfer;
tmp->criticality = F1AP_Criticality_ignore; tmp->criticality = F1AP_Criticality_ignore;
tmp->value.present = F1AP_InitiatingMessage__value_PR_DLRRCMessageTransfer; tmp->value.present = F1AP_InitiatingMessage__value_PR_DLRRCMessageTransfer;
......
...@@ -46,28 +46,26 @@ ...@@ -46,28 +46,26 @@
#include <openair3/ocp-gtpu/gtp_itf.h> #include <openair3/ocp-gtpu/gtp_itf.h>
static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) { static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) {
asn1cCalloc(toFill,F1AP_NonDynamic5QIDescriptor_t, tmp); asn1cCalloc(toFill, tmp);
/* fiveQI */ /* fiveQI */
tmp->fiveQI = 1L; tmp->fiveQI = 1L;
/* OPTIONAL */ /* OPTIONAL */
/* qoSPriorityLevel */ /* qoSPriorityLevel */
if (0) { if (0) {
asn1cCallocOne(toFill->qoSPriorityLevel, long, 1L); asn1cCallocOne(toFill->qoSPriorityLevel, 1L);
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
asn1cCallocOne(toFill->averagingWindow, asn1cCallocOne(toFill->averagingWindow, 1L);
F1AP_AveragingWindow_t, 1L);
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
asn1cCallocOne(toFill->maxDataBurstVolume, asn1cCallocOne(toFill->maxDataBurstVolume, 1L);
F1AP_MaxDataBurstVolume_t, 1L);
} }
} }
...@@ -77,7 +75,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -77,7 +75,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextSetupRequest; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextSetupRequest;
...@@ -136,15 +134,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -136,15 +134,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 6.1 cG_ConfigInfo */ /* 6.1 cG_ConfigInfo */
if (0) { if (0) {
const char cG_ConfigInfoStr[]="asdsa1d32sa1d31asd31as"; const char cG_ConfigInfoStr[]="asdsa1d32sa1d31asd31as";
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, F1AP_CG_ConfigInfo_t, cG_ConfigInfo); asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, cG_ConfigInfo);
OCTET_STRING_fromBuf(cG_ConfigInfo, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ; OCTET_STRING_fromBuf(cG_ConfigInfo, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ;
/* optional */ /* optional */
/* 6.2 uE_CapabilityRAT_ContainerList */ /* 6.2 uE_CapabilityRAT_ContainerList */
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, F1AP_UE_CapabilityRAT_ContainerList_t, uE_CapabilityRAT_ContainerList ); asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, uE_CapabilityRAT_ContainerList );
OCTET_STRING_fromBuf(uE_CapabilityRAT_ContainerList, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ; OCTET_STRING_fromBuf(uE_CapabilityRAT_ContainerList, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ;
/* optional */ /* optional */
/* 6.3 measConfig */ /* 6.3 measConfig */
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, F1AP_MeasConfig_t, measConfig); asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, measConfig);
OCTET_STRING_fromBuf(measConfig, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ; OCTET_STRING_fromBuf(measConfig, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ;
} }
...@@ -183,14 +181,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -183,14 +181,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 8.2 shortDRXCycleLength */ /* 8.2 shortDRXCycleLength */
if (0) { if (0) {
asn1cCallocOne(ie6->value.choice.DRXCycle.shortDRXCycleLength, asn1cCallocOne(ie6->value.choice.DRXCycle.shortDRXCycleLength,
F1AP_ShortDRXCycleLength_t, F1AP_ShortDRXCycleLength_ms2); // enum F1AP_ShortDRXCycleLength_ms2); // enum
} }
/* optional */ /* optional */
/* 8.3 shortDRXCycleTimer */ /* 8.3 shortDRXCycleTimer */
if (0) { if (0) {
asn1cCallocOne(ie8->value.choice.DRXCycle.shortDRXCycleTimer, asn1cCallocOne(ie8->value.choice.DRXCycle.shortDRXCycleTimer,
F1AP_ShortDRXCycleTimer_t, 123L); 123L);
} }
} }
...@@ -232,7 +230,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -232,7 +230,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 10.1.3 sCellULConfigured*/ /* 10.1.3 sCellULConfigured*/
if (0) { if (0) {
asn1cCallocOne(scell_toBeSetup_item->sCellULConfigured, asn1cCallocOne(scell_toBeSetup_item->sCellULConfigured,
F1AP_CellULConfigured_t, F1AP_CellULConfigured_ul_and_sul); // enum F1AP_CellULConfigured_ul_and_sul); // enum
} }
} }
...@@ -257,7 +255,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -257,7 +255,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 11.1.2 duplicationIndication */ /* 11.1.2 duplicationIndication */
//if (0) { //if (0) {
asn1cCallocOne(srbs_toBeSetup_item->duplicationIndication, asn1cCallocOne(srbs_toBeSetup_item->duplicationIndication,
F1AP_DuplicationIndication_t, F1AP_DuplicationIndication_true); // enum F1AP_DuplicationIndication_true); // enum
//} //}
} }
...@@ -285,7 +283,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -285,7 +283,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
if (some_decide_qos) { if (some_decide_qos) {
drbs_toBeSetup_item->qoSInformation.present = F1AP_QoSInformation_PR_eUTRANQoS; drbs_toBeSetup_item->qoSInformation.present = F1AP_QoSInformation_PR_eUTRANQoS;
/* 12.1.2.1 eUTRANQoS */ /* 12.1.2.1 eUTRANQoS */
asn1cCalloc(drbs_toBeSetup_item->qoSInformation.choice.eUTRANQoS, F1AP_EUTRANQoS_t, eUTRANQoS); asn1cCalloc(drbs_toBeSetup_item->qoSInformation.choice.eUTRANQoS, eUTRANQoS);
/* 12.1.2.1.1 qCI */ /* 12.1.2.1.1 qCI */
eUTRANQoS->qCI = 254L; eUTRANQoS->qCI = 254L;
/* 12.1.2.1.2 allocationAndRetentionPriority */ /* 12.1.2.1.2 allocationAndRetentionPriority */
...@@ -327,7 +325,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -327,7 +325,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
setQos(DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI); setQos(DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI);
} else { } else {
DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_dynamic_5QI; DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_dynamic_5QI;
asn1cCalloc(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI, F1AP_Dynamic5QIDescriptor_t, tmp); asn1cCalloc(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI, tmp);
/* qoSPriorityLevel */ /* qoSPriorityLevel */
tmp->qoSPriorityLevel = 1L; tmp->qoSPriorityLevel = 1L;
/* packetDelayBudget */ /* packetDelayBudget */
...@@ -339,22 +337,19 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -339,22 +337,19 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* delayCritical */ /* delayCritical */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical, asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical, 1L);
long, 1L);
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow, asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow, 1L);
F1AP_AveragingWindow_t, 1L);
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume, asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume, 1L);
F1AP_MaxDataBurstVolume_t, 1L);
} }
} // if some_decide_qoS_characteristics } // if some_decide_qoS_characteristics
} // qoS_Characteristics } // qoS_Characteristics
...@@ -368,7 +363,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -368,7 +363,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* gBR_QoS_Flow_Information */ /* gBR_QoS_Flow_Information */
if (0) { if (0) {
asn1cCalloc(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information, F1AP_GBR_QoSFlowInformation_t, tmp); asn1cCalloc(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information, tmp);
asn_long2INTEGER(&tmp->maxFlowBitRateDownlink, 1L); asn_long2INTEGER(&tmp->maxFlowBitRateDownlink, 1L);
asn_long2INTEGER(&tmp->maxFlowBitRateUplink, 1L); asn_long2INTEGER(&tmp->maxFlowBitRateUplink, 1L);
asn_long2INTEGER(&tmp->guaranteedFlowBitRateDownlink, 1L); asn_long2INTEGER(&tmp->guaranteedFlowBitRateDownlink, 1L);
...@@ -377,23 +372,20 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -377,23 +372,20 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* maxPacketLossRateDownlink */ /* maxPacketLossRateDownlink */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, 1L);
F1AP_MaxPacketLossRate_t, 1L);
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxPacketLossRateUplink */ /* maxPacketLossRateUplink */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink, asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink, 1L);
F1AP_MaxPacketLossRate_t, 1L);
} }
} }
/* OPTIONAL */ /* OPTIONAL */
/* reflective_QoS_Attribute */ /* reflective_QoS_Attribute */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.reflective_QoS_Attribute, asn1cCallocOne(DRB_Information->dRB_QoS.reflective_QoS_Attribute, 1L);
long, 1L);
} }
} // dRB_QoS } // dRB_QoS
/* 12.1.2.2 sNSSAI */ /* 12.1.2.2 sNSSAI */
...@@ -405,7 +397,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -405,7 +397,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* sD */ /* sD */
if (0) { if (0) {
asn1cCalloc(DRB_Information->sNSSAI.sD, OCTET_STRING_t, tmp); asn1cCalloc(DRB_Information->sNSSAI.sD, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as", OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as",
strlen("asdsa1d32sa1d31asd31as")); strlen("asdsa1d32sa1d31asd31as"));
} }
...@@ -415,7 +407,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -415,7 +407,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 12.1.2.3 notificationControl */ /* 12.1.2.3 notificationControl */
if (0) { if (0) {
asn1cCallocOne(DRB_Information->notificationControl, asn1cCallocOne(DRB_Information->notificationControl,
F1AP_NotificationControl_t, F1AP_NotificationControl_active); // enum F1AP_NotificationControl_active); // enum
} }
/* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy /* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy
...@@ -437,7 +429,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -437,7 +429,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
setQos(QosParams->choice.non_Dynamic_5QI); setQos(QosParams->choice.non_Dynamic_5QI);
} else { } else {
QosParams->present = F1AP_QoS_Characteristics_PR_dynamic_5QI; QosParams->present = F1AP_QoS_Characteristics_PR_dynamic_5QI;
asn1cCalloc(QosParams->choice.dynamic_5QI, F1AP_Dynamic5QIDescriptor_t, tmp); asn1cCalloc(QosParams->choice.dynamic_5QI, tmp);
/* qoSPriorityLevel */ /* qoSPriorityLevel */
tmp->qoSPriorityLevel = 1L; tmp->qoSPriorityLevel = 1L;
/* packetDelayBudget */ /* packetDelayBudget */
...@@ -449,21 +441,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -449,21 +441,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* delayCritical */ /* delayCritical */
if (0) { if (0) {
asn1cCalloc(QosParams->choice.dynamic_5QI->delayCritical, long, tmp); asn1cCalloc(QosParams->choice.dynamic_5QI->delayCritical, tmp);
*tmp = 1L; *tmp = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
asn1cCalloc(QosParams->choice.dynamic_5QI->averagingWindow, F1AP_AveragingWindow_t, tmp); asn1cCalloc(QosParams->choice.dynamic_5QI->averagingWindow, tmp);
*tmp = 1L; *tmp = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
asn1cCalloc(QosParams->choice.dynamic_5QI->maxDataBurstVolume, F1AP_MaxDataBurstVolume_t, tmp); asn1cCalloc(QosParams->choice.dynamic_5QI->maxDataBurstVolume, tmp);
*tmp= 1L; *tmp= 1L;
} }
} // if some_decide_qoS_characteristics } // if some_decide_qoS_characteristics
...@@ -478,7 +470,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -478,7 +470,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* gBR_QoS_Flow_Information */ /* gBR_QoS_Flow_Information */
if (0) { if (0) {
asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information, F1AP_GBR_QoSFlowInformation_t, tmp); asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information, tmp);
asn_long2INTEGER(&tmp->maxFlowBitRateDownlink, 1L); asn_long2INTEGER(&tmp->maxFlowBitRateDownlink, 1L);
asn_long2INTEGER(&tmp->maxFlowBitRateUplink, 1L); asn_long2INTEGER(&tmp->maxFlowBitRateUplink, 1L);
asn_long2INTEGER(&tmp->guaranteedFlowBitRateDownlink, 1L); asn_long2INTEGER(&tmp->guaranteedFlowBitRateDownlink, 1L);
...@@ -487,23 +479,20 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -487,23 +479,20 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* maxPacketLossRateDownlink */ /* maxPacketLossRateDownlink */
if (0) { if (0) {
asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, F1AP_MaxPacketLossRate_t, tmp); asn1cCallocOne(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink, 1L);
*tmp = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxPacketLossRateUplink */ /* maxPacketLossRateUplink */
if (0) { if (0) {
asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink, F1AP_MaxPacketLossRate_t, tmp); asn1cCallocOne(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink, 1L);
*tmp = 1L;
} }
} }
/* OPTIONAL */ /* OPTIONAL */
/* reflective_QoS_Attribute */ /* reflective_QoS_Attribute */
if (0) { if (0) {
asn1cCalloc(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.reflective_QoS_Attribute, long, tmp); asn1cCallocOne(flows_mapped_to_drb_item->qoSFlowLevelQoSParameters.reflective_QoS_Attribute, 1L);
*tmp = 1L;
} }
} // qoSFlowLevelQoSParameters } // qoSFlowLevelQoSParameters
} }
...@@ -533,7 +522,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -533,7 +522,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item); F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item);
uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc( uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel, asn1cCalloc( uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel); gTPTunnel);
/* 12.3.1.1.1 transportLayerAddress */ /* 12.3.1.1.1 transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].tl_address, TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].tl_address,
&gTPTunnel->transportLayerAddress); &gTPTunnel->transportLayerAddress);
...@@ -556,14 +545,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -556,14 +545,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* 12.1.5 ULConfiguration */ /* 12.1.5 ULConfiguration */
if (0) { if (0) {
asn1cCalloc(drbs_toBeSetup_item->uLConfiguration, F1AP_ULConfiguration_t, tmp); asn1cCalloc(drbs_toBeSetup_item->uLConfiguration, tmp);
tmp->uLUEConfiguration = F1AP_ULUEConfiguration_no_data; tmp->uLUEConfiguration = F1AP_ULUEConfiguration_no_data;
} }
/* OPTIONAL */ /* OPTIONAL */
/* 12.1.6 duplicationActivation */ /* 12.1.6 duplicationActivation */
if (0) { if (0) {
asn1cCalloc(drbs_toBeSetup_item->duplicationActivation, F1AP_DuplicationActivation_t, tmp); asn1cCalloc(drbs_toBeSetup_item->duplicationActivation, tmp);
*tmp = F1AP_DuplicationActivation_active; // enum *tmp = F1AP_DuplicationActivation_active; // enum
} }
} }
...@@ -848,7 +837,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -848,7 +837,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseCommand; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseCommand;
...@@ -1025,7 +1014,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1025,7 +1014,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextModificationRequest; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextModificationRequest;
...@@ -1074,13 +1063,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1074,13 +1063,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
ie5->value.choice.DRXCycle.longDRXCycleLength = F1AP_LongDRXCycleLength_ms10; // enum ie5->value.choice.DRXCycle.longDRXCycleLength = F1AP_LongDRXCycleLength_ms10; // enum
if (0) { if (0) {
asn1cCalloc(ie5->value.choice.DRXCycle.shortDRXCycleLength, F1AP_ShortDRXCycleLength_t,tmp); asn1cCallocOne(ie5->value.choice.DRXCycle.shortDRXCycleLength,
*tmp = F1AP_ShortDRXCycleLength_ms2; // enum F1AP_ShortDRXCycleLength_ms2); // enum
} }
if (0) { if (0) {
asn1cCalloc(ie5->value.choice.DRXCycle.shortDRXCycleTimer, F1AP_ShortDRXCycleTimer_t, tmp); asn1cCallocOne(ie5->value.choice.DRXCycle.shortDRXCycleTimer, 123L);
*tmp = 123L;
} }
} }
...@@ -1091,12 +1079,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1091,12 +1079,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
ie5->id = F1AP_ProtocolIE_ID_id_CUtoDURRCInformation; ie5->id = F1AP_ProtocolIE_ID_id_CUtoDURRCInformation;
ie5->criticality = F1AP_Criticality_reject; ie5->criticality = F1AP_Criticality_reject;
ie5->value.present = F1AP_UEContextModificationRequestIEs__value_PR_CUtoDURRCInformation; ie5->value.present = F1AP_UEContextModificationRequestIEs__value_PR_CUtoDURRCInformation;
asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.cG_ConfigInfo, F1AP_CG_ConfigInfo_t, tmp); asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.cG_ConfigInfo, tmp);
/* optional */ /* optional */
OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as", OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as",
strlen("asdsa1d32sa1d31asd31as")); strlen("asdsa1d32sa1d31asd31as"));
asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, asn1cCalloc(ie5->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList,
F1AP_UE_CapabilityRAT_ContainerList_t,tmp2); tmp2);
/* optional */ /* optional */
OCTET_STRING_fromBuf(tmp2, "asdsa1d32sa1d31asd31as", OCTET_STRING_fromBuf(tmp2, "asdsa1d32sa1d31asd31as",
strlen("asdsa1d32sa1d31asd31as")); strlen("asdsa1d32sa1d31asd31as"));
...@@ -1243,7 +1231,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1243,7 +1231,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item); F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item);
uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc(uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel, asn1cCalloc(uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel) gTPTunnel)
/* transportLayerAddress */ /* transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
/* gTP_TEID */ /* gTP_TEID */
...@@ -1281,7 +1269,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1281,7 +1269,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
/* dRBID */ /* dRBID */
drbs_toBeModified_item->dRBID = 30L; drbs_toBeModified_item->dRBID = 30L;
/* qoSInformation */ /* qoSInformation */
asn1cCalloc(drbs_toBeModified_item->qoSInformation, F1AP_QoSInformation_t, tmp); asn1cCalloc(drbs_toBeModified_item->qoSInformation, tmp);
tmp->present = F1AP_QoSInformation_PR_eUTRANQoS; tmp->present = F1AP_QoSInformation_PR_eUTRANQoS;
tmp->choice.eUTRANQoS = (F1AP_EUTRANQoS_t *)calloc(1, sizeof(F1AP_EUTRANQoS_t)); tmp->choice.eUTRANQoS = (F1AP_EUTRANQoS_t *)calloc(1, sizeof(F1AP_EUTRANQoS_t));
tmp->choice.eUTRANQoS->qCI = 254L; tmp->choice.eUTRANQoS->qCI = 254L;
...@@ -1294,7 +1282,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1294,7 +1282,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item); F1AP_ULUPTNLInformation_ToBeSetup_Item_t, uLUPTNLInformation_ToBeSetup_Item);
uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc(uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel, asn1cCalloc(uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel); gTPTunnel);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
strlen("1204")); strlen("1204"));
......
...@@ -102,7 +102,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -102,7 +102,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* Create */ /* Create */
/* 0. pdu Type */ /* 0. pdu Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, initMsg); asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
initMsg->procedureCode = F1AP_ProcedureCode_id_F1Setup; initMsg->procedureCode = F1AP_ProcedureCode_id_F1Setup;
initMsg->criticality = F1AP_Criticality_reject; initMsg->criticality = F1AP_Criticality_reject;
initMsg->value.present = F1AP_InitiatingMessage__value_PR_F1SetupRequest; initMsg->value.present = F1AP_InitiatingMessage__value_PR_F1SetupRequest;
...@@ -159,7 +159,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -159,7 +159,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007 served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
uint32_t tac=htonl(cell->tac); uint32_t tac=htonl(cell->tac);
asn1cCalloc(served_cell_information->fiveGS_TAC, F1AP_FiveGS_TAC_t, netOrder); asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder);
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3); OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
...@@ -176,14 +176,14 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -176,14 +176,14 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
if (f1ap_req(false, instance)->fdd_flag) { // FDD if (f1ap_req(false, instance)->fdd_flag) { // FDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info); asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
/* FDD.1 UL NRFreqInfo */ /* FDD.1 UL NRFreqInfo */
/* FDD.1.1 UL NRFreqInfo ARFCN */ /* FDD.1.1 UL NRFreqInfo ARFCN */
fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
/* FDD.1.2 F1AP_SUL_Information */ /* FDD.1.2 F1AP_SUL_Information */
if(0) { // Optional if(0) { // Optional
asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, F1AP_SUL_Information_t, fdd_sul_info); asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, fdd_sul_info);
fdd_sul_info->sUL_NRARFCN = 0; fdd_sul_info->sUL_NRARFCN = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0; fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0; fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
...@@ -247,7 +247,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -247,7 +247,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb); fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb);
} else { // TDD } else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info); asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
/* TDD.1 nRFreqInfo */ /* TDD.1 nRFreqInfo */
/* TDD.1.1 nRFreqInfo ARFCN */ /* TDD.1.1 nRFreqInfo ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer
...@@ -289,7 +289,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -289,7 +289,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration, OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
measurementTimingConfiguration, measurementTimingConfiguration,
strlen(measurementTimingConfiguration)); strlen(measurementTimingConfiguration));
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information); asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information);
/* 4.1.2 gNB-DU System Information */ /* 4.1.2 gNB-DU System Information */
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
(const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib, (const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib,
...@@ -535,7 +535,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -535,7 +535,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage,F1AP_InitiatingMessage_t, initMsg); asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
initMsg->procedureCode = F1AP_ProcedureCode_id_gNBDUConfigurationUpdate; initMsg->procedureCode = F1AP_ProcedureCode_id_gNBDUConfigurationUpdate;
initMsg->criticality = F1AP_Criticality_reject; initMsg->criticality = F1AP_Criticality_reject;
initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBDUConfigurationUpdate; initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBDUConfigurationUpdate;
...@@ -587,7 +587,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -587,7 +587,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
if (f1ap_setup_req->fdd_flag) { if (f1ap_setup_req->fdd_flag) {
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
/* > FDD >> FDD Info */ /* > FDD >> FDD Info */
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info); asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
/* >>> UL NRFreqInfo */ /* >>> UL NRFreqInfo */
fDD_Info->uL_NRFreqInfo.nRARFCN = 999L; fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem); asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem);
...@@ -609,7 +609,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -609,7 +609,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
} else { // TDD } else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
/* > TDD >> TDD Info */ /* > TDD >> TDD Info */
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info); asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
/* >>> ARFCN */ /* >>> ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem); asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
...@@ -626,7 +626,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -626,7 +626,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
measurementTimingConfiguration, measurementTimingConfiguration,
strlen(measurementTimingConfiguration)); strlen(measurementTimingConfiguration));
/* 2.1.2 gNB-DU System Information */ /* 2.1.2 gNB-DU System Information */
asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information); asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, gNB_DU_System_Information);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
"1", "1",
sizeof("1")); sizeof("1"));
...@@ -659,14 +659,14 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -659,14 +659,14 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
/* - nRPCI */ /* - nRPCI */
served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci; // int 0..1007 served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
asn1cCalloc(served_cell_information->fiveGS_TAC,F1AP_FiveGS_TAC_t, tac ); asn1cCalloc(served_cell_information->fiveGS_TAC, tac );
OCTET_STRING_fromBuf(tac, OCTET_STRING_fromBuf(tac,
(const char *) &f1ap_setup_req->cell[i].tac, (const char *) &f1ap_setup_req->cell[i].tac,
3); 3);
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
if(1) { if(1) {
asn1cCalloc(served_cell_information->configured_EPS_TAC, F1AP_Configured_EPS_TAC_t, tmp2); asn1cCalloc(served_cell_information->configured_EPS_TAC, tmp2);
OCTET_STRING_fromBuf(tmp2, OCTET_STRING_fromBuf(tmp2,
"2", "2",
2); 2);
...@@ -680,7 +680,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -680,7 +680,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
if (f1ap_setup_req->fdd_flag) { if (f1ap_setup_req->fdd_flag) {
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
/* > FDD >> FDD Info */ /* > FDD >> FDD Info */
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info); asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
/* >>> UL NRFreqInfo */ /* >>> UL NRFreqInfo */
fDD_Info->uL_NRFreqInfo.nRARFCN = 999L; fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem); asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem);
...@@ -703,7 +703,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -703,7 +703,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
} else { // TDD } else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
/* > TDD >> TDD Info */ /* > TDD >> TDD Info */
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info); asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
/* >>> ARFCN */ /* >>> ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem); asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
...@@ -720,7 +720,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -720,7 +720,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
measurementTimingConfiguration, measurementTimingConfiguration,
strlen(measurementTimingConfiguration)); strlen(measurementTimingConfiguration));
/* 3.2.2 gNB-DU System Information */ /* 3.2.2 gNB-DU System Information */
asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information); asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, gNB_DU_System_Information);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
"1", "1",
sizeof("1")); sizeof("1"));
...@@ -949,7 +949,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, ...@@ -949,7 +949,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
/* Create */ /* Create */
/* 0. pdu Type */ /* 0. pdu Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp); asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate; tmp->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_GNBCUConfigurationUpdateAcknowledge; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_GNBCUConfigurationUpdateAcknowledge;
......
...@@ -767,7 +767,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, ...@@ -767,7 +767,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_InitialULRRCMessageTransfer; tmp->procedureCode = F1AP_ProcedureCode_id_InitialULRRCMessageTransfer;
tmp->criticality = F1AP_Criticality_ignore; tmp->criticality = F1AP_Criticality_ignore;
tmp->value.present = F1AP_InitiatingMessage__value_PR_InitialULRRCMessageTransfer; tmp->value.present = F1AP_InitiatingMessage__value_PR_InitialULRRCMessageTransfer;
...@@ -841,7 +841,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -841,7 +841,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_ULRRCMessageTransfer; tmp->procedureCode = F1AP_ProcedureCode_id_ULRRCMessageTransfer;
tmp->criticality = F1AP_Criticality_ignore; tmp->criticality = F1AP_Criticality_ignore;
tmp->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer; tmp->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer;
......
...@@ -249,7 +249,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -249,7 +249,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t,tmp); asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextSetupResponse; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextSetupResponse;
...@@ -284,16 +284,14 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -284,16 +284,14 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* OPTIONAL */ /* OPTIONAL */
/* measGapConfig */ /* measGapConfig */
if (0) { if (0) {
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig, asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig, tmp);
F1AP_MeasGapConfig_t, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa")); OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa"));
} }
/* OPTIONAL */ /* OPTIONAL */
/* requestedP_MaxFR1 */ /* requestedP_MaxFR1 */
if (0) { if (0) {
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1, asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1, tmp);
OCTET_STRING_t, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa")); OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa"));
} }
} }
...@@ -362,8 +360,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -362,8 +360,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item); F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
/* gTPTunnel */ /* gTPTunnel */
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,gTPTunnel);
F1AP_GTPTunnel_t, gTPTunnel);
/* transportLayerAddress */ /* transportLayerAddress */
struct sockaddr_in addr= {0}; struct sockaddr_in addr= {0};
inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address, inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
...@@ -396,7 +393,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -396,7 +393,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* sRBID */ /* sRBID */
srbs_failedToBeSetup_item->sRBID = 13L; srbs_failedToBeSetup_item->sRBID = 13L;
/* cause */ /* cause */
asn1cCalloc(srbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp); asn1cCalloc(srbs_failedToBeSetup_item->cause, tmp);
// dummy value // dummy value
tmp->present = F1AP_Cause_PR_radioNetwork; tmp->present = F1AP_Cause_PR_radioNetwork;
...@@ -445,7 +442,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -445,7 +442,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* dRBID */ /* dRBID */
drbs_failedToBeSetup_item->dRBID = 14; drbs_failedToBeSetup_item->dRBID = 14;
/* cause */ /* cause */
asn1cCalloc(drbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp); asn1cCalloc(drbs_failedToBeSetup_item->cause,tmp);
// dummy value // dummy value
tmp->present = F1AP_Cause_PR_radioNetwork; tmp->present = F1AP_Cause_PR_radioNetwork;
...@@ -493,7 +490,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -493,7 +490,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* sCell_ID */ /* sCell_ID */
addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_req(false, instance)->cell+i); addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_req(false, instance)->cell+i);
/* cause */ /* cause */
asn1cCalloc(sCell_FailedtoSetup_item->cause, F1AP_Cause_t, tmp); asn1cCalloc(sCell_FailedtoSetup_item->cause, tmp);
// dummy value // dummy value
tmp->present = F1AP_Cause_PR_radioNetwork; tmp->present = F1AP_Cause_PR_radioNetwork;
...@@ -559,13 +556,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup ...@@ -559,13 +556,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
ie12->criticality = F1AP_Criticality_ignore; ie12->criticality = F1AP_Criticality_ignore;
ie12->value.present = F1AP_UEContextSetupResponseIEs__value_PR_CriticalityDiagnostics; ie12->value.present = F1AP_UEContextSetupResponseIEs__value_PR_CriticalityDiagnostics;
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCode, asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCode,
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup); F1AP_ProcedureCode_id_UEContextSetup);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.triggeringMessage, asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.triggeringMessage,
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message); F1AP_TriggeringMessage_initiating_message);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCriticality, asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCriticality,
F1AP_Criticality_t, F1AP_Criticality_reject); F1AP_Criticality_reject);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.transactionID, asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.transactionID,
F1AP_TransactionID_t, 0); 0);
} }
/* encode */ /* encode */
...@@ -592,7 +589,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -592,7 +589,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp); asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextReleaseRequest; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextReleaseRequest;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest; tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest;
...@@ -806,7 +803,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, ...@@ -806,7 +803,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp); asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete;
...@@ -904,7 +901,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { ...@@ -904,7 +901,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome,F1AP_SuccessfulOutcome_t, tmp); asn1cCalloc(pdu.choice.successfulOutcome,tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification; tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification;
tmp->criticality = F1AP_Criticality_reject; tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextModificationResponse; tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextModificationResponse;
...@@ -981,7 +978,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { ...@@ -981,7 +978,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item); F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel); gTPTunnel);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
strlen("1204")); strlen("1204"));
...@@ -1014,10 +1011,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { ...@@ -1014,10 +1011,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* DLTunnels_Modified_Item */ /* DLTunnels_Modified_Item */
asn1cSequenceAdd(drbs_modified_item->dLUPTNLInformation_ToBeSetup_List.list, asn1cSequenceAdd(drbs_modified_item->dLUPTNLInformation_ToBeSetup_List.list,
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item); F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item, F1AP_DLUPTNLInformation_ToBeSetup_Item_t, tmp); asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item, tmp);
tmp->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel; tmp->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, gTPTunnel);
F1AP_GTPTunnel_t, gTPTunnel);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", strlen("1204")); OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", strlen("1204"));
} }
...@@ -1042,7 +1038,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { ...@@ -1042,7 +1038,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
&srbs_failedToBeSetupMod_item_ies->value.choice.SRBs_FailedToBeSetupMod_Item; &srbs_failedToBeSetupMod_item_ies->value.choice.SRBs_FailedToBeSetupMod_Item;
/* - sRBID */ /* - sRBID */
srbs_failedToBeSetupMod_item->sRBID = 50L; srbs_failedToBeSetupMod_item->sRBID = 50L;
asn1cCalloc(srbs_failedToBeSetupMod_item->cause, F1AP_Cause_t, tmp) asn1cCalloc(srbs_failedToBeSetupMod_item->cause, tmp)
tmp->present = F1AP_Cause_PR_radioNetwork; tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
} }
...@@ -1089,7 +1085,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { ...@@ -1089,7 +1085,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
F1AP_SCell_FailedtoSetupMod_Item_t *scell_failedtoSetupMod_item=&scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item; F1AP_SCell_FailedtoSetupMod_Item_t *scell_failedtoSetupMod_item=&scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item;
/* - sCell_ID */ /* - sCell_ID */
addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_req(false, instance)->cell[i]); addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_req(false, instance)->cell[i]);
asn1cCalloc(scell_failedtoSetupMod_item->cause, F1AP_Cause_t, tmp); asn1cCalloc(scell_failedtoSetupMod_item->cause, tmp);
tmp->present = F1AP_Cause_PR_radioNetwork; tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
} }
...@@ -1113,7 +1109,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { ...@@ -1113,7 +1109,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
&drbs_failedToBeModified_item_ies->value.choice.DRBs_FailedToBeModified_Item ; &drbs_failedToBeModified_item_ies->value.choice.DRBs_FailedToBeModified_Item ;
/* dRBID */ /* dRBID */
drbs_failedToBeModified_item->dRBID = 30L; drbs_failedToBeModified_item->dRBID = 30L;
asn1cCalloc(drbs_failedToBeModified_item->cause, F1AP_Cause_t, tmp); asn1cCalloc(drbs_failedToBeModified_item->cause, tmp);
tmp->present = F1AP_Cause_PR_radioNetwork; tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
} }
......
...@@ -52,6 +52,14 @@ ...@@ -52,6 +52,14 @@
*/ */
int xer_sprint(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr); int xer_sprint(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr);
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue;
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR));
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
ASN_SEQUENCE_ADD(&VaR,lOcPtr);
uint16_t get_adjacent_cell_id(uint8_t Mod_id,uint8_t index); uint16_t get_adjacent_cell_id(uint8_t Mod_id,uint8_t index);
uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId); uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
......
...@@ -153,6 +153,15 @@ typedef struct xer_sprint_string_s { ...@@ -153,6 +153,15 @@ typedef struct xer_sprint_string_s {
size_t string_index; size_t string_index;
} xer_sprint_string_t; } xer_sprint_string_t;
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue;
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR));
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
ASN_SEQUENCE_ADD(&VaR,lOcPtr);
//replace LTE //replace LTE
//extern unsigned char NB_eNB_INST; //extern unsigned char NB_eNB_INST;
extern unsigned char NB_gNB_INST; extern unsigned char NB_gNB_INST;
......
...@@ -53,6 +53,15 @@ ...@@ -53,6 +53,15 @@
*/ */
int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr); int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr);
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue;
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR));
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
ASN_SEQUENCE_ADD(&VaR,lOcPtr);
uint8_t do_MIB_NR(gNB_RRC_INST *rrc, uint8_t do_MIB_NR(gNB_RRC_INST *rrc,
uint32_t frame); uint32_t frame);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment