Commit 058b040c authored by Laurent THOMAS's avatar Laurent THOMAS

ue context setup first fix, the feature is not well implemented

parent 90999e5a
...@@ -133,17 +133,19 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -133,17 +133,19 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie6->value.present = F1AP_UEContextSetupRequestIEs__value_PR_CUtoDURRCInformation; ie6->value.present = F1AP_UEContextSetupRequestIEs__value_PR_CUtoDURRCInformation;
/* optional */ /* optional */
/* 6.1 cG_ConfigInfo */ /* 6.1 cG_ConfigInfo */
const char cG_ConfigInfoStr[]="asdsa1d32sa1d31asd31as"; if (0) {
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, F1AP_CG_ConfigInfo_t, cG_ConfigInfo); const char cG_ConfigInfoStr[]="asdsa1d32sa1d31asd31as";
OCTET_STRING_fromBuf(cG_ConfigInfo, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ; asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, F1AP_CG_ConfigInfo_t, cG_ConfigInfo);
/* optional */ OCTET_STRING_fromBuf(cG_ConfigInfo, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ;
/* 6.2 uE_CapabilityRAT_ContainerList */ /* optional */
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, F1AP_UE_CapabilityRAT_ContainerList_t, uE_CapabilityRAT_ContainerList ); /* 6.2 uE_CapabilityRAT_ContainerList */
OCTET_STRING_fromBuf(uE_CapabilityRAT_ContainerList, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ; asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList, F1AP_UE_CapabilityRAT_ContainerList_t, uE_CapabilityRAT_ContainerList );
/* optional */ OCTET_STRING_fromBuf(uE_CapabilityRAT_ContainerList, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ;
/* 6.3 measConfig */ /* optional */
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, F1AP_MeasConfig_t, measConfig); /* 6.3 measConfig */
OCTET_STRING_fromBuf(measConfig, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ; asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, F1AP_MeasConfig_t, measConfig);
OCTET_STRING_fromBuf(measConfig, cG_ConfigInfoStr, strlen( cG_ConfigInfoStr )) ;
}
/* mandatory */ /* mandatory */
/* c7. Candidate_SpCell_List */ /* c7. Candidate_SpCell_List */
......
...@@ -148,12 +148,11 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -148,12 +148,11 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
// AssertFatal(0, "check configuration, send to appropriate handler\n"); // AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
// ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID); // decode RRC Container and act on the message type
ctxt.rnti = 0x1234; rnti_t rnti = f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id);
ctxt.module_id = instance; ctxt.module_id = instance;
ctxt.instance = instance; ctxt.instance = instance;
ctxt.enb_flag = 1; ctxt.enb_flag = 1;
if ( ie->value.choice.RRCContainer.size ) { if ( ie->value.choice.RRCContainer.size ) {
mem_block_t *pdcp_pdu_p = NULL; mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__); pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__);
...@@ -161,22 +160,23 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -161,22 +160,23 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
/* for rfsim */ /* for rfsim */
du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p); du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p);
DU_send_UE_CONTEXT_SETUP_RESPONSE(instance, ctxt.rnti);
} else { } else {
LOG_E(F1AP, " RRCContainer in UEContextSetupRequestIEs size id 0\n"); LOG_E(F1AP, " RRCContainer in UEContextSetupRequestIEs size id 0\n");
} }
} else { } else {
LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer); LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
} }
return 0; return 0;
} }
//void DU_send_UE_CONTEXT_SETUP_RESPONSE(F1AP_UEContextSetupResponse_t *UEContextSetupResponse) { //void DU_send_UE_CONTEXT_SETUP_RESPONSE(F1AP_UEContextSetupResponse_t *UEContextSetupResponse) {
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, rnti_t rntiP) {
F1AP_F1AP_PDU_t pdu= {0}; F1AP_F1AP_PDU_t pdu= {0};
F1AP_UEContextSetupResponse_t *out; F1AP_UEContextSetupResponse_t *out;
uint8_t *buffer=NULL; uint8_t *buffer=NULL;
uint32_t len=0; uint32_t len=0;
rnti_t rntiP; // note: need get value
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
...@@ -208,8 +208,8 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { ...@@ -208,8 +208,8 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
{ {
/* cellGroupConfig */ /* cellGroupConfig */
OCTET_STRING_fromBuf(&ie3->value.choice.DUtoCURRCInformation.cellGroupConfig, "asdsa", OCTET_STRING_fromBuf(&ie3->value.choice.DUtoCURRCInformation.cellGroupConfig, "asdsa",
strlen("asdsa")); strlen("asdsa"));
/* OPTIONAL */ /* OPTIONAL */
/* measGapConfig */ /* measGapConfig */
if (0) { if (0) {
...@@ -474,6 +474,10 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { ...@@ -474,6 +474,10 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(false, instance,
buffer,
len,
getCxt(false, instance)->default_sctp_stream_id);
return 0; return 0;
} }
......
...@@ -40,7 +40,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -40,7 +40,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
uint32_t assoc_id, uint32_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance);
int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance); int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance);
......
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