Commit f4633ba2 authored by Robert Schmidt's avatar Robert Schmidt

Correctly add headers for RRC message transfer, remove warnings

parent 911e738f
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
*/ */
#include "f1ap_common.h" #include "f1ap_common.h"
#include "f1ap_encoder.h"
#include "f1ap_decoder.h"
#include "f1ap_itti_messaging.h"
#include "f1ap_cu_rrc_message_transfer.h" #include "f1ap_cu_rrc_message_transfer.h"
// undefine C_RNTI from // undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which // openair1/PHY/LTE_TRANSPORT/transport_common.h which
...@@ -42,7 +45,8 @@ ...@@ -42,7 +45,8 @@
Initial UL RRC Message Transfer Initial UL RRC Message Transfer
*/ */
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id, int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu) { F1AP_F1AP_PDU_t *pdu) {
...@@ -54,13 +58,10 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id, ...@@ -54,13 +58,10 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id,
F1AP_InitialULRRCMessageTransfer_t *container; F1AP_InitialULRRCMessageTransfer_t *container;
F1AP_InitialULRRCMessageTransferIEs_t *ie; F1AP_InitialULRRCMessageTransferIEs_t *ie;
SRB_INFO* Srb_info;
protocol_ctxt_t ctxt;
rnti_t rnti; rnti_t rnti;
uint8_t *ccch_sdu; uint8_t *ccch_sdu;
sdu_size_t ccch_sdu_len; sdu_size_t ccch_sdu_len;
int CC_id =0; int CC_id =0;
int instance=0;
uint64_t du_ue_f1ap_id; uint64_t du_ue_f1ap_id;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
...@@ -82,7 +83,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id, ...@@ -82,7 +83,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id,
/* NRCGI */ /* NRCGI */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_NRCGI, true); F1AP_ProtocolIE_ID_id_NRCGI, true);
instance = 0; ///ie->value.choice. ?? //@Todo
/* RNTI */ /* RNTI */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
...@@ -140,6 +140,8 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id, ...@@ -140,6 +140,8 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id,
*/ */
// if size > 0 // if size > 0
// CU_send_DL_RRC_MESSAGE_TRANSFER(C.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size) // CU_send_DL_RRC_MESSAGE_TRANSFER(C.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size)
return 0;
} }
...@@ -148,7 +150,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id, ...@@ -148,7 +150,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id,
*/ */
//void CU_send_DL_RRC_MESSAGE_TRANSFER(F1AP_DLRRCMessageTransfer_t *DLRRCMessageTransfer) { //void CU_send_DL_RRC_MESSAGE_TRANSFER(F1AP_DLRRCMessageTransfer_t *DLRRCMessageTransfer) {
void CU_send_DL_RRC_MESSAGE_TRANSFER(void) { int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance) {
F1AP_F1AP_PDU_t pdu; F1AP_F1AP_PDU_t pdu;
F1AP_DLRRCMessageTransfer_t *out; F1AP_DLRRCMessageTransfer_t *out;
F1AP_DLRRCMessageTransferIEs_t *ie; F1AP_DLRRCMessageTransferIEs_t *ie;
...@@ -244,6 +246,7 @@ void CU_send_DL_RRC_MESSAGE_TRANSFER(void) { ...@@ -244,6 +246,7 @@ void CU_send_DL_RRC_MESSAGE_TRANSFER(void) {
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n"); printf("Failed to encode F1 setup request\n");
return -1;
} }
printf("\n"); printf("\n");
...@@ -251,14 +254,19 @@ void CU_send_DL_RRC_MESSAGE_TRANSFER(void) { ...@@ -251,14 +254,19 @@ void CU_send_DL_RRC_MESSAGE_TRANSFER(void) {
/* decode */ /* decode */
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) { if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
printf("Failed to decode F1 setup request\n"); printf("Failed to decode F1 setup request\n");
return -1;
} }
//AssertFatal(1==0,"Not implemented yet\n");
return 0;
} }
/* /*
UL RRC Message Transfer UL RRC Message Transfer
*/ */
void CU_handle_UL_RRC_MESSAGE_TRANSFER(F1AP_ULRRCMessageTransfer_t *ULRRCMessageTransfer) { int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n"); AssertFatal(1==0,"Not implemented yet\n");
} }
...@@ -33,7 +33,16 @@ ...@@ -33,7 +33,16 @@
#ifndef F1AP_CU_RRC_MESSAGE_TRANSFER_H_ #ifndef F1AP_CU_RRC_MESSAGE_TRANSFER_H_
#define F1AP_CU_RRC_MESSAGE_TRANSFER_H_ #define F1AP_CU_RRC_MESSAGE_TRANSFER_H_
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(int32_t assoc_id, int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance);
int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
#endif /* F1AP_CU_RRC_MESSAGE_TRANSFER_H_ */ #endif /* F1AP_CU_RRC_MESSAGE_TRANSFER_H_ */
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "f1ap_common.h" #include "f1ap_common.h"
#include "f1ap_encoder.h" #include "f1ap_encoder.h"
#include "f1ap_decoder.h" #include "f1ap_decoder.h"
#include "f1ap_itti_messaging.h"
#include "f1ap_du_rrc_message_transfer.h" #include "f1ap_du_rrc_message_transfer.h"
// undefine C_RNTI from // undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which // openair1/PHY/LTE_TRANSPORT/transport_common.h which
...@@ -43,12 +44,15 @@ ...@@ -43,12 +44,15 @@
extern f1ap_setup_req_t *f1ap_du_data; extern f1ap_setup_req_t *f1ap_du_data;
/* DL RRC Message Transfer */ /* DL RRC Message Transfer */
void DU_handle_DL_RRC_MESSAGE_TRANSFER(F1AP_DLRRCMessageTransfer_t *DLRRCMessageTransfer) { int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n"); AssertFatal(1==0,"Not implemented yet\n");
} }
//void DU_send_UL_RRC_MESSAGE_TRANSFER(F1AP_ULRRCMessageTransfer_t *ULRRCMessageTransfer) { //void DU_send_UL_RRC_MESSAGE_TRANSFER(F1AP_ULRRCMessageTransfer_t *ULRRCMessageTransfer) {
void DU_send_UL_RRC_MESSAGE_TRANSFER(void) { int DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
F1AP_F1AP_PDU_t pdu; F1AP_F1AP_PDU_t pdu;
F1AP_ULRRCMessageTransfer_t *out; F1AP_ULRRCMessageTransfer_t *out;
F1AP_ULRRCMessageTransferIEs_t *ie; F1AP_ULRRCMessageTransferIEs_t *ie;
...@@ -107,6 +111,7 @@ void DU_send_UL_RRC_MESSAGE_TRANSFER(void) { ...@@ -107,6 +111,7 @@ void DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n"); printf("Failed to encode F1 setup request\n");
return -1;
} }
printf("\n"); printf("\n");
...@@ -117,10 +122,12 @@ void DU_send_UL_RRC_MESSAGE_TRANSFER(void) { ...@@ -117,10 +122,12 @@ void DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
// printf("Failed to decode F1 setup request\n"); // printf("Failed to decode F1 setup request\n");
// } // }
//AssertFatal(1==0,"Not implemented yet\n"); //AssertFatal(1==0,"Not implemented yet\n");
return 0;
} }
/* UL RRC Message Transfer */ /* UL RRC Message Transfer */
void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER( int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
module_id_t module_idP, module_id_t module_idP,
int CC_idP, int CC_idP,
int UE_id, int UE_id,
...@@ -204,11 +211,13 @@ void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER( ...@@ -204,11 +211,13 @@ void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n"); printf("Failed to encode F1 setup request\n");
return -1;
} }
printf("\n"); printf("\n");
du_f1ap_itti_send_sctp_data_req(0, f1ap_du_data->assoc_id, buffer, len, 0); du_f1ap_itti_send_sctp_data_req(0, f1ap_du_data->assoc_id, buffer, len, 0);
return 0;
/* decode */ /* decode */
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) { // if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
// printf("Failed to decode F1 setup request\n"); // printf("Failed to decode F1 setup request\n");
......
...@@ -34,4 +34,19 @@ ...@@ -34,4 +34,19 @@
#ifndef F1AP_DU_RRC_MESSAGE_TRANSFER_H_ #ifndef F1AP_DU_RRC_MESSAGE_TRANSFER_H_
#define F1AP_DU_RRC_MESSAGE_TRANSFER_H_ #define F1AP_DU_RRC_MESSAGE_TRANSFER_H_
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_UL_RRC_MESSAGE_TRANSFER(void);
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
uint8_t *sduP,
sdu_size_t sdu_lenP);
#endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */ #endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */
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