Commit e56dc692 authored by Lionel Gauthier's avatar Lionel Gauthier

Update for MIH

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4801 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f9145ff8
......@@ -90,11 +90,22 @@
# include "commonDef.h"
#endif
#if defined(ENABLE_RAL)
# include "collection/hashtable/obj_hashtable.h"
#endif
/** @defgroup _rrc_impl_ RRC Layer Reference Implementation
* @ingroup _ref_implementation_
* @{
*/
#if defined(ENABLE_RAL)
typedef struct rrc_ral_threshold_key_s {
ral_link_param_type_t link_param_type;
ral_threshold_t threshold;
}rrc_ral_threshold_key_t;
#endif
//#define NUM_PRECONFIGURED_LCHAN (NB_CH_CX*2) //BCCH, CCCH
#define UE_INDEX_INVALID ((uint8_t) ~0)
......@@ -333,6 +344,9 @@ typedef struct eNB_RRC_INST_s {
MeasConfig_t *measConfig[NUMBER_OF_UE_MAX];
HANDOVER_INFO *handover_info[NUMBER_OF_UE_MAX];
uint8_t HO_flag;
#if defined(ENABLE_RAL)
obj_hash_table_t *ral_meas_thresholds;
#endif
#if defined(ENABLE_SECURITY)
/* KeNB as derived from KASME received from EPC */
uint8_t kenb[NUMBER_OF_UE_MAX][32];
......@@ -415,6 +429,9 @@ typedef struct UE_RRC_INST_s {
float rsrq_db[7];
float rsrp_db_filtered[7];
float rsrq_db_filtered[7];
#if defined(ENABLE_RAL)
obj_hash_table_t *ral_meas_thresholds;
#endif
#if defined(ENABLE_SECURITY)
/* KeNB as computed from parameters within USIM card */
uint8_t kenb[32];
......
......@@ -42,6 +42,7 @@
#include "rrc_UE_ral.h"
#include "assertions.h"
#include "collection/hashtable/obj_hashtable.h"
#include "RRC/LITE/defs.h"
#include "RRC/LITE/extern.h"
......@@ -105,6 +106,7 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
rrc_ral_configure_threshold_req_t *configure_threshold_req_p = NULL;
ral_link_cfg_param_t *link_cfg_param_p = NULL;
ral_threshold_t *threshold_p = NULL;
MessageDef *message_p = NULL;
unsigned int ix_param = 0;
unsigned int ix_thresholds = 0;
......@@ -130,6 +132,10 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
case RAL_LINK_PARAM_GEN_SINR:
case RAL_LINK_PARAM_GEN_THROUGHPUT:
case RAL_LINK_PARAM_GEN_PACKET_ERROR_RATE:
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
itti_send_msg_to_task (TASK_PHY_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
break;
default:
LOG_E(RRC, "Message RRC_RAL_CONFIGURE_THRESHOLD_REQ malformed, unknown link_param_gen %d\n", link_cfg_param_p->link_param_type._union.link_param_gen);
......@@ -145,6 +151,10 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
case RAL_LINK_PARAM_QOS_MAX_PACKET_TRANSFER_DELAY_ALL_COS:
case RAL_LINK_PARAM_QOS_STD_DEVIATION_PACKET_TRANSFER_DELAY:
case RAL_LINK_PARAM_QOS_PACKET_LOSS_RATE_ALL_COS_FRAME_RATIO:
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
itti_send_msg_to_task (TASK_MAC_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
break;
default:
LOG_E(RRC, "Message RRC_RAL_CONFIGURE_THRESHOLD_REQ malformed, unknown link_param_qos %d\n", link_cfg_param_p->link_param_type._union.link_param_qos);
......@@ -158,13 +168,21 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
case RAL_LINK_PARAM_LTE_UE_RSRP:
case RAL_LINK_PARAM_LTE_UE_RSRQ:
case RAL_LINK_PARAM_LTE_UE_CQI:
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
itti_send_msg_to_task (TASK_PHY_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
break;
case RAL_LINK_PARAM_LTE_AVAILABLE_BW:
case RAL_LINK_PARAM_LTE_PACKET_DELAY:
case RAL_LINK_PARAM_LTE_PACKET_LOSS_RATE:
case RAL_LINK_PARAM_LTE_L2_BUFFER_STATUS:
case RAL_LINK_PARAM_LTE_PACKET_DELAY:
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
itti_send_msg_to_task (TASK_MAC_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
break;
break;
case RAL_LINK_PARAM_LTE_MOBILE_NODE_CAPABILITIES:
......@@ -172,6 +190,7 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
case RAL_LINK_PARAM_LTE_JUMBO_FEASIBILITY:
case RAL_LINK_PARAM_LTE_JUMBO_SETUP_STATUS:
case RAL_LINK_PARAM_LTE_NUM_ACTIVE_EMBMS_RECEIVERS_PER_FLOW:
#warning "TO DO MIH LTE LINK PARAMS IN RRC UE"
break;
default:
......
......@@ -67,10 +67,6 @@
#include "ral_messages_types.h"
#include "defs.h"
typedef struct rrc_ral_threshold_key_s {
ral_link_param_type_t link_param_type;
ral_threshold_t threshold;
}rrc_ral_threshold_key_t;
private_rrc_ue_ral( int rrc_ue_ral_delete_all_thresholds_type (unsigned int mod_idP, ral_link_param_type_t *param_type_pP);)
private_rrc_ue_ral( int rrc_ue_ral_delete_threshold (unsigned int mod_idP, ral_link_param_type_t *param_type_pP, ral_threshold_t *threshold_pP);)
protected_rrc_ue_ral(int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageDef *msg_pP);)
......
......@@ -36,6 +36,8 @@
* \company Eurecom
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
*/
#define RRC_ENB
#define RRC_ENB_C
#include "defs.h"
#include "extern.h"
......@@ -85,6 +87,10 @@
# include "intertask_interface.h"
#endif
#ifdef ENABLE_RAL
#include "rrc_eNB_ral.h"
#endif
//#define XER_PRINT
#ifdef PHY_EMUL
......@@ -3104,6 +3110,13 @@ void *rrc_enb_task(void *args_p) {
openair_rrc_lite_eNB_configuration(instance, &RRC_CONFIGURATION_REQ (msg_p));
break;
#ifdef ENABLE_RAL
case RRC_RAL_CONFIGURE_THRESHOLD_REQ:
rrc_enb_ral_handle_configure_threshold_request(instance, msg_p);
break;
#endif
default:
LOG_E(RRC, "[eNB %d] Received unexpected message %s\n", instance, msg_name);
break;
......
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