Commit 714ad4d7 authored by shahab's avatar shahab

Warning Decreasing

parent 4cfa87b6
......@@ -32,6 +32,7 @@
#include "flexran_agent_mac_internal.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_ran_api.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/flexran_agent_mac_proto.h"
......@@ -63,7 +64,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header;
int i, j, k;
int cc_id = 0;
// int cc_id = 0;
int enb_id = mod_id;
/* Allocate memory for list of UE reports */
......@@ -141,11 +142,11 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
/* Check flag for creation of MAC CE buffer status report */
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_CE_BS) {
// TODO: Fill in the actual MAC CE buffer status report
ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2)
| (0 << 3)) & 15; /* Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the
PROTOCOL__FLEX_CE_TYPE__FLPCET_ values
found in stats_common.pb-c.h. See
flex_ce_type in FlexRAN specification */
ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15;
// Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the
// PROTOCOL__FLEX_CE_TYPE__FLPCET_ values
// found in stats_common.pb-c.h. See
// flex_ce_type in FlexRAN specification
ue_report[i]->has_pending_mac_ces = 1;
}
......@@ -213,7 +214,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
goto error;
protocol__flex_csi_p11__init(csi11);
csi11->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
csi11->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
// According To spec 36.213
if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 1) {
......
......@@ -61,12 +61,12 @@ void flexran_agent_init_rrc_agent(mid_t mod_id) {
int flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change) {
void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change) {
int size;
Protocol__FlexranMessage *msg;
Protocol__FlexHeader *header;
void *data;
int priority;
int priority = 0;
err_code_t err_code;
int xid = 0;
......@@ -258,7 +258,7 @@ int flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_cha
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
return;
error:
LOG_D(FLEXRAN_AGENT, "Could not send UE state message\n");
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
}
......@@ -278,10 +278,10 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
}
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
int flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t* measResults) {
void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t* measResults) {
// int i, m, k;
int priority;
int priority = 0; // Warning Preventing
void *data;
int size;
err_code_t err_code;
......@@ -618,16 +618,16 @@ int flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t* measResults)
LOG_I(FLEXRAN_AGENT,"RRC Trigger is done \n");
return 0;
return;
error:
LOG_E(RRC, "Error triggering RRC measurements message!");
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
/* Free the measurement report received from UE. */
// ASN_STRUCT_FREE(asn_DEF_MeasResults, p->meas);
/* Free the params. */
// free(p);
return -1;
// return -1;
}
......
......@@ -41,7 +41,7 @@
#include "flexran.pb-c.h"
#include "stats_messages.pb-c.h"
#include "stats_common.pb-c.h"
#include "MeasResults.h"
#include "flexran_agent_common.h"
#include "flexran_agent_rrc_defs.h"
......@@ -51,7 +51,7 @@
void flexran_agent_init_rrc_agent(mid_t mod_id);
/* UE state change message constructor and destructor */
int flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change);
void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change);
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
......@@ -63,7 +63,7 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
// void flexran_agent_send_update_rrc_stats(mid_t mod_id);
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
int flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *);
void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *);
/*Register technology specific interface callbacks*/
int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface);
......
......@@ -38,9 +38,11 @@
#ifndef __FLEXRAN_AGENT_RRC_PRIMITIVES_H__
#define __FLEXRAN_AGENT_RRC_PRIMITIVES_H__
#include "PHY/extern.h"
#include "flexran_agent_defs.h"
#include "flexran.pb-c.h"
#include "header.pb-c.h"
#include "MeasResults.h"
#define RINGBUFFER_SIZE 100
......@@ -55,7 +57,7 @@ typedef struct {
void (*flexran_agent_notify_ue_state_change)(mid_t mod_id, uint32_t rnti,
uint32_t state_change);
void (*flexran_trigger_rrc_measurements)(mid_t mod_id, MeasResults_t* measResults)
void (*flexran_trigger_rrc_measurements)(mid_t mod_id, MeasResults_t* measResults);
} AGENT_RRC_xface;
......
......@@ -264,7 +264,7 @@ int flexran_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properti
AGENT_MAC_xface *mac_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
flexran_agent_register_mac_xface(mod_id, mac_agent_xface);
AGENT_RRC_xface *rrc_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
AGENT_RRC_xface *rrc_agent_xface = (AGENT_RRC_xface *) malloc(sizeof(AGENT_RRC_xface));
flexran_agent_register_rrc_xface(mod_id, rrc_agent_xface);
/*
......
......@@ -34,7 +34,10 @@
#include "flexran_agent_extern.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_defs.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_ran_api.h"
#include "flexran_agent_mac.h"
#include "flexran_agent_rrc.h"
#include "log.h"
#include "assertions.h"
......
......@@ -33,6 +33,7 @@
#include "flexran_agent_common_internal.h"
#include "flexran_agent_extern.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_ran_api.h"
#include "PHY/extern.h"
#include "log.h"
......
......@@ -37,7 +37,8 @@
#include "flexran.pb-c.h"
#include "stats_messages.pb-c.h"
#include "stats_common.pb-c.h"
#include "flexran_agent_ran_api.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_defs.h"
#include "enb_config.h"
......@@ -156,16 +157,15 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
/* Function to be used to handle reply message . */
int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg);
/* Statistics request protocol message constructor and destructor */
/* Top level Statistics request protocol message constructor and destructor */
int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg);
int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg);
err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id, xid_t xid, stats_request_config_t *stats_req) ;
err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id);
void flexran_agent_send_update_stats(mid_t mod_id);
int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id, xid_t xid, stats_request_config_t *stats_req) ;
#endif
......@@ -31,6 +31,7 @@
#include "flexran_agent_mac.h"
#include "flexran_agent_rrc.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_ran_api.h"
#include "log.h"
#include "assertions.h"
......@@ -96,7 +97,7 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
err_code= PROTOCOL__FLEXRAN_ERR__MSG_DECODING;
goto error;
}
printf("==================> %d %d \n", decoded_message->msg_case, decoded_message->msg_dir);
//printf("==================> %d %d \n", decoded_message->msg_case, decoded_message->msg_dir);
if ((decoded_message->msg_case > sizeof(agent_messages_callback) / (3 * sizeof(flexran_agent_message_decoded_callback))) ||
(decoded_message->msg_dir > PROTOCOL__FLEXRAN_DIRECTION__UNSUCCESSFUL_OUTCOME)){
err_code= PROTOCOL__FLEXRAN_ERR__MSG_NOT_HANDLED;
......@@ -754,4 +755,4 @@ err_code_t flexran_agent_destroy_cont_stats_update(mid_t mod_id) {
// mac_agent_registered[mod_id] = 0;
return 1;
}
\ No newline at end of file
}
......@@ -152,11 +152,21 @@ int flexran_get_ue_wcqi (mid_t mod_id, mid_t ue_id) {
// return ((UE_list_t *)enb_ue[mod_id])->eNB_UE_stats[UE_PCCID(mod_id,ue_id)][ue_id].dl_cqi;
}
int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) {
int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id, char * buffer_status) {
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id,frame,ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
return rlc_status.bytes_in_buffer;
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id,frame,ENB_FLAG_YES,MBMS_FLAG_NO,channel_id,0);
if (strcmp(buffer_status, "bytes_buffer")){
return rlc_status.bytes_in_buffer;
} else if(strcmp(buffer_status, "pdu_buffer")) {
return rlc_status.pdus_in_buffer;
}
/* else if (strcmp(buffer_status, "head_line")){ */
/* return rlc_status.head_sdu_remaining_size_to_send; */
/* } */
}
int flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) {
......@@ -168,7 +178,7 @@ int flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_i
short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list;
// UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list;
int rnti;
rnti = flexran_get_ue_crnti(mod_id, ue_id);
......@@ -227,7 +237,7 @@ void flexran_update_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id,int CC_id) {
UE_list_t *UE_list = &eNB_mac_inst[mod_id].UE_list;
// UE_list_t *UE_list = &eNB_mac_inst[mod_id].UE_list;
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
LTE_eNB_UE_stats *eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id,CC_id,rnti);
......
......@@ -89,7 +89,7 @@ int flexran_get_ue_phr (mid_t mod_id, mid_t ue_id);
int flexran_get_ue_wcqi (mid_t mod_id, mid_t ue_id);
/* Get the transmission queue size for a UE with a channel_id logical channel id */
int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id, char * buffer_status);
/* Get the head of line delay for a UE with a channel_id logical channel id */
int flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
......@@ -198,6 +198,17 @@ int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id);
int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id);
int flexran_get_hopping_mode(mid_t mod_id, int CC_id);
int flexran_get_hopping_offset(mid_t mod_id, int CC_id);
int flexran_get_n_SB(mid_t mod_id, int CC_id);
int flexran_get_phich_resource(mid_t mod_id, int CC_id);
int flexran_get_enable64QAM(mid_t mod_id, int CC_id);
int flexran_get_phich_duration(mid_t mod_id, int CC_id);
/*
* ************************************
......
......@@ -50,7 +50,7 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "ENB_APP/flexran_agent_defs.h"
#include "flexran_agent_ran_api.h"
#include "pdcp.h"
#include "header.pb-c.h"
......
......@@ -30,7 +30,7 @@
*/
#include "flexran_agent_common_internal.h"
#include "flexran_agent_ran_api.h"
#include "flexran_agent_scheduler_dlsch_ue_remote.h"
#include "LAYER2/MAC/defs.h"
......
......@@ -2198,10 +2198,10 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
MeasObjectToAddModList_t *MeasObj_list = NULL;
MeasObjectToAddMod_t *MeasObj = NULL;
ReportConfigToAddModList_t *ReportConfig_list = NULL;
ReportConfigToAddMod_t *ReportConfig_per, *ReportConfig_A1,
*ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
ReportConfigToAddMod_t *ReportConfig_per;//, *ReportConfig_A1,
// *ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
MeasIdToAddModList_t *MeasId_list = NULL;
MeasIdToAddMod_t *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
MeasIdToAddMod_t *MeasId0; //, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
#if Rel10
long *sr_ProhibitTimer_r9 = NULL;
// uint8_t sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1);
......
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