Commit fdd7de32 authored by winckel's avatar winckel

Introduced MAC xCCH DATA REQ messages to complete RRC MAC interface, they are not actually used!

Integrated SDU buffer into MAX xCCH messages with a fixed size.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4302 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 5260b60d
......@@ -14,8 +14,12 @@ MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSy
MESSAGE_DEF(RRC_MAC_BCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataReq, rrc_mac_bcch_data_req)
MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataReq, rrc_mac_ccch_data_req)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_CNF, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataCnf, rrc_mac_ccch_data_cnf)
MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind)
MESSAGE_DEF(RRC_MAC_CCCH_SUCCESS_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchSuccessInd, rrc_mac_ccch_success_ind)
MESSAGE_DEF(RRC_MAC_MCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataReq, rrc_mac_mcch_data_req)
MESSAGE_DEF(RRC_MAC_MCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataInd, rrc_mac_mcch_data_ind)
//-------------------------------------------------------------------------------------------//
......
......@@ -18,13 +18,22 @@
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->msg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_bcch_data_ind
#define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_data_req
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_data_cnf
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_data_ind
#define RRC_MAC_CCCH_SUCCESS_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_ccch_success_ind
#define RRC_MAC_MCCH_DATA_REQ(mSGpTR) (mSGpTR)->msg.rrc_mac_mcch_data_req
#define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_mac_mcch_data_ind
#define RRC_DCCH_DATA_REQ(mSGpTR) (mSGpTR)->msg.rrc_dcch_data_req
#define RRC_DCCH_DATA_IND(mSGpTR) (mSGpTR)->msg.rrc_dcch_data_ind
// Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE (128)
#define CCCH_SDU_SIZE (128)
#define MCCH_SDU_SIZE (128)
typedef UE_EUTRA_Capability_t RrcUeEutraCapability;
//-------------------------------------------------------------------------------------------//
......@@ -40,27 +49,47 @@ typedef RrcMacInSyncInd RrcMacOutOfSyncInd;
typedef struct {
uint32_t frame;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t sdu[BCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacBcchDataReq;
typedef struct {
uint32_t frame;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t sdu[BCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacBcchDataInd;
typedef RrcMacBcchDataInd RrcMacCcchDataInd;
typedef struct {
uint32_t frame;
uint32_t sdu_size;
uint8_t sdu[CCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacCcchDataReq;
typedef struct {
uint8_t enb_index;
} RrcMacCcchDataCnf;
typedef struct {
uint32_t frame;
uint32_t sdu_size;
uint8_t sdu[CCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacCcchDataInd;
typedef struct {
uint32_t frame;
uint32_t sdu_size;
uint8_t sdu[MCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacCcchSuccessInd;
uint8_t mbsfn_sync_area;
} RrcMacMcchDataReq;
typedef struct {
uint32_t frame;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t sdu[MCCH_SDU_SIZE];
uint8_t enb_index;
uint8_t mbsfn_sync_area;
} RrcMacMcchDataInd;
......
......@@ -4224,12 +4224,29 @@ void eNB_dlsch_ulsch_scheduler(u8 Mod_id,u8 cooperation_flag, u32 frame, u8 subf
msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
RRC_MAC_BCCH_DATA_REQ (msg_p).frame, RRC_MAC_BCCH_DATA_REQ (msg_p).enb_index);
// Message buffer has been processed, free it now.
free (RRC_MAC_BCCH_DATA_REQ (msg_p).sdu_p);
// TODO process BCCH data req.
break;
case RRC_MAC_CCCH_DATA_REQ:
LOG_D(MAC, "Received %s from %s: instance %d, frame %d, eNB_index %d\n",
msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
RRC_MAC_CCCH_DATA_REQ (msg_p).frame, RRC_MAC_CCCH_DATA_REQ (msg_p).enb_index);
// TODO process CCCH data req.
break;
#ifdef Rel10
case RRC_MAC_MCCH_DATA_REQ:
LOG_D(MAC, "Received %s from %s: instance %d, frame %d, eNB_index %d, mbsfn_sync_area %d\n",
msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
RRC_MAC_MCCH_DATA_REQ (msg_p).frame, RRC_MAC_MCCH_DATA_REQ (msg_p).enb_index, RRC_MAC_MCCH_DATA_REQ (msg_p).mbsfn_sync_area);
// TODO process MCCH data req.
break;
#endif
default:
LOG_E(MAC, "Received unexpected message %s\n", msg_name));
LOG_E(MAC, "Received unexpected message %s\n", msg_name);
break;
}
......
......@@ -1276,7 +1276,9 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
// mac_rlc_status_resp_t rlc_status[MAX_NUM_LCGID]; // 4
// s8 lcg_id;
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
#ifdef EXMIMO
int ret;
#endif
#if defined(ENABLE_ITTI)
MessageDef *msg_p;
const char *msg_name;
......@@ -1295,6 +1297,14 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
instance = ITTI_MSG_INSTANCE (msg_p);
switch (msg_p->header.messageId) {
case RRC_MAC_CCCH_DATA_REQ:
LOG_D(MAC, "Received %s from %s: instance %d, frame %d, eNB_index %d\n",
msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
RRC_MAC_CCCH_DATA_REQ (msg_p).frame, RRC_MAC_CCCH_DATA_REQ (msg_p).enb_index);
// TODO process CCCH data req.
break;
default:
LOG_E(MAC, "Received unexpected message %s\n", msg_name);
......
This diff is collapsed.
......@@ -1805,11 +1805,16 @@ void *rrc_ue_task(void *args_p) {
RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index);
decode_BCCH_DLSCH_Message (instance, RRC_MAC_BCCH_DATA_IND (msg_p).frame,
RRC_MAC_BCCH_DATA_IND (msg_p).enb_index, RRC_MAC_BCCH_DATA_IND (msg_p).sdu_p,
RRC_MAC_BCCH_DATA_IND (msg_p).enb_index, RRC_MAC_BCCH_DATA_IND (msg_p).sdu,
RRC_MAC_BCCH_DATA_IND (msg_p).sdu_size);
break;
// Message buffer has been processed, free it now.
free (RRC_MAC_BCCH_DATA_IND (msg_p).sdu_p);
case RRC_MAC_CCCH_DATA_CNF:
LOG_D(RRC, "Received %s: instance %d, eNB %d\n", msg_name, instance,
RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index);
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst[instance].Srb0[RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index].Tx_buffer.payload_size = 0;
break;
case RRC_MAC_CCCH_DATA_IND:
......@@ -1818,22 +1823,11 @@ void *rrc_ue_task(void *args_p) {
srb_info_p = &UE_rrc_inst[instance].Srb0[RRC_MAC_CCCH_DATA_IND (msg_p).enb_index];
memcpy (srb_info_p->Rx_buffer.Payload, RRC_MAC_CCCH_DATA_IND (msg_p).sdu_p,
memcpy (srb_info_p->Rx_buffer.Payload, RRC_MAC_CCCH_DATA_IND (msg_p).sdu,
RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size);
srb_info_p->Rx_buffer.payload_size = RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size;
rrc_ue_decode_ccch (instance, RRC_MAC_CCCH_DATA_IND (msg_p).frame, srb_info_p,
RRC_MAC_CCCH_DATA_IND (msg_p).enb_index);
// Message buffer has been processed, free it now.
free (RRC_MAC_CCCH_DATA_IND (msg_p).sdu_p);
break;
case RRC_MAC_CCCH_SUCCESS_IND:
LOG_D(RRC, "Received %s: instance %d, eNB %d\n", msg_name, instance,
RRC_MAC_CCCH_SUCCESS_IND (msg_p).enb_index);
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst[instance].Srb0[RRC_MAC_CCCH_SUCCESS_IND (msg_p).enb_index].Tx_buffer.payload_size = 0;
break;
#ifdef Rel10
......@@ -1842,11 +1836,8 @@ void *rrc_ue_task(void *args_p) {
RRC_MAC_MCCH_DATA_IND (msg_p).frame, RRC_MAC_MCCH_DATA_IND (msg_p).enb_index, RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
decode_MCCH_Message (instance, RRC_MAC_MCCH_DATA_IND (msg_p).frame, RRC_MAC_MCCH_DATA_IND (msg_p).enb_index,
RRC_MAC_MCCH_DATA_IND (msg_p).sdu_p, RRC_MAC_MCCH_DATA_IND (msg_p).sdu_size,
RRC_MAC_MCCH_DATA_IND (msg_p).sdu, RRC_MAC_MCCH_DATA_IND (msg_p).sdu_size,
RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
// Message buffer has been processed, free it now.
free (RRC_MAC_MCCH_DATA_IND (msg_p).sdu_p);
break;
#endif
......
......@@ -2020,13 +2020,10 @@ void *rrc_enb_task(void *args_p) {
srb_info_p = &eNB_rrc_inst[instance].Srb0;
memcpy (srb_info_p->Rx_buffer.Payload, RRC_MAC_CCCH_DATA_IND (msg_p).sdu_p,
memcpy (srb_info_p->Rx_buffer.Payload, RRC_MAC_CCCH_DATA_IND (msg_p).sdu,
RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size);
srb_info_p->Rx_buffer.payload_size = RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size;
rrc_eNB_decode_ccch (instance, RRC_MAC_CCCH_DATA_IND (msg_p).frame, srb_info_p);
// Message buffer has been processed, free it now.
free (RRC_MAC_CCCH_DATA_IND (msg_p).sdu_p);
break;
case RRC_DCCH_DATA_IND:
......
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