Commit 5e20c970 authored by shahab's avatar shahab

warning decreasing

parent dc9cada6
......@@ -77,7 +77,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header;
int i, j, k;
int i;
// int cc_id = 0;
......
......@@ -262,11 +262,11 @@ 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*/
void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t* measResults) {
int i, m, k;
int i;
// int priority = 0; // Warning Preventing
// void *data;
// int size;
err_code_t err_code = -100;
// err_code_t err_code = -100;
triggered_rrc = true;
int num;
......@@ -490,9 +490,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header;
int i, j, k;
// int cc_id = 0;
int enb_id = mod_id;
int i;
/* Allocate memory for list of UE reports */
if (report_config->nr_ue > 0) {
......
......@@ -68,12 +68,12 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
error:
LOG_I(FLEXRAN_AGENT,"there was an error\n");
return 1;
return NULL;
}
int flexran_agent_async_msg_send(void *data, int size, int priority, void *channel_info) {
flexran_agent_async_channel_t *channel;
channel = (flexran_agent_channel_t *)channel_info;
channel = (flexran_agent_async_channel_t *)channel_info;
return message_put(channel->send_queue, data, size, priority);
}
......
......@@ -129,10 +129,8 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
yaml_event_t event;
void *param;
char *endptr;
int is_array = 0;
int i = 0;
// int is_array;
int done = 0;
int mapping_started = 0;
......@@ -145,7 +143,7 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
switch (event.type) {
// We are expecting a mapping of parameters
case YAML_SEQUENCE_START_EVENT:
is_array = 1;
// is_array = 1;
break;
case YAML_MAPPING_START_EVENT:
LOG_D(ENB_APP, "The mapping of the parameters started\n");
......@@ -193,7 +191,6 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
int parse_enb_config_parameters(mid_t mod_id, yaml_parser_t *parser) {
yaml_event_t event;
void *param;
char *endptr;
int done = 0;
......
......@@ -30,6 +30,7 @@
#include "flexran_agent_common.h"
#include "flexran_agent_mac.h"
#include "flexran_agent_rrc.h"
#include "flexran_agent_pdcp.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_ran_api.h"
#include "log.h"
......@@ -97,7 +98,6 @@ 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);
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;
......
......@@ -141,9 +141,9 @@ int flexran_agent_destroy_channel(int channel_id) {
for (i = 0; i < NUM_MAX_ENB; i++) {
for (j = 0; j < FLEXRAN_AGENT_MAX; j++) {
if (agent_channel[i][j] != NULL) {
if (agent_channel[i][j]->channel_id == e->channel_id) {
agent_channel[i][j] == NULL;
}
if (agent_channel[i][j]->channel_id == e->channel_id) {
free(agent_channel[i][j]);
}
}
}
}
......@@ -164,7 +164,7 @@ err_code_t flexran_agent_init_channel_container(void) {
for (i = 0; i < NUM_MAX_ENB; i++) {
for (j = 0; j < FLEXRAN_AGENT_MAX; j++) {
agent_channel[i][j] == NULL;
agent_channel[i][j] = malloc(sizeof(flexran_agent_channel_t));
}
}
......
......@@ -38,6 +38,7 @@
void * enb[NUM_MAX_ENB];
void * enb_ue[NUM_MAX_ENB];
void * enb_rrc[NUM_MAX_ENB];
Enb_properties_array_t* enb_properties;
void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
......@@ -47,10 +48,12 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
enb[mod_id] = NULL;
enb_ue[mod_id] = NULL;
enb_rrc[mod_id] = NULL;
enb_properties = NULL;
}else{
enb[mod_id] = (void *)&eNB_mac_inst[mod_id];
enb_ue[mod_id] = (void *)&eNB_mac_inst[mod_id].UE_list;
enb_rrc[mod_id] = (void *)&eNB_rrc_inst[mod_id];
enb_properties = (Enb_properties_array_t *) enb_config_get();
}
break;
default :
......@@ -1039,52 +1042,43 @@ int flexran_get_antenna_ports(mid_t mod_id, int CC_id){
uint32_t flexran_agent_get_operating_dl_freq (mid_t mod_id, int cc_id) {
const Enb_properties_array_t* enb_properties = enb_config_get();
return (enb_properties->properties[mod_id]->downlink_frequency[cc_id] / 1000000);
}
uint32_t flexran_agent_get_operating_ul_freq (mid_t mod_id, int cc_id) {
const Enb_properties_array_t* enb_properties = enb_config_get();
return ((enb_properties->properties[mod_id]->downlink_frequency[cc_id] + enb_properties->properties[0]->uplink_frequency_offset[cc_id]) / 1000000);
}
int flexran_agent_get_operating_eutra_band (mid_t mod_id, int cc_id) {
const Enb_properties_array_t* enb_properties = enb_config_get();
return enb_properties->properties[mod_id]->eutra_band[cc_id];
}
int flexran_agent_get_operating_pdsch_refpower (mid_t mod_id, int cc_id) {
const Enb_properties_array_t* enb_properties = enb_config_get();
return enb_properties->properties[mod_id]->pdsch_referenceSignalPower[cc_id];
}
int flexran_agent_get_operating_pusch_p0 (mid_t mod_id, int cc_id) {
const Enb_properties_array_t* enb_properties = enb_config_get();
return enb_properties->properties[mod_id]->pusch_p0_Nominal[cc_id];
}
void flexran_agent_set_operating_dl_freq (mid_t mod_id, int cc_id, uint32_t dl_freq_mhz) {
Enb_properties_array_t* enb_properties = enb_config_get();
enb_properties->properties[mod_id]->downlink_frequency[cc_id]=dl_freq_mhz * 1000000;
/*printf("[ENB_APP] mod id %d ccid %d dl freq %d/%d\n", mod_id, cc_id, dl_freq_mhz, enb_properties->properties[mod_id]->downlink_frequency[cc_id]); */
}
void flexran_agent_set_operating_ul_freq (mid_t mod_id, int cc_id, int32_t ul_freq_offset_mhz) {
Enb_properties_array_t* enb_properties = enb_config_get();
enb_properties->properties[mod_id]->uplink_frequency_offset[cc_id]=ul_freq_offset_mhz * 1000000;
}
//TBD
void flexran_agent_set_operating_eutra_band (mid_t mod_id, int cc_id) {
Enb_properties_array_t* enb_properties = enb_config_get();
enb_properties->properties[mod_id]->eutra_band[cc_id]=7;
}
void flexran_agent_set_operating_bandwidth (mid_t mod_id, int cc_id, int bandwidth) {
Enb_properties_array_t* enb_properties = enb_config_get();
enb_properties->properties[mod_id]->N_RB_DL[cc_id]=bandwidth;
}
void flexran_agent_set_operating_frame_type (mid_t mod_id, int cc_id, int frame_type) {
Enb_properties_array_t* enb_properties = enb_config_get();
enb_properties->properties[mod_id]->frame_type[cc_id]=frame_type;
}
......
......@@ -117,7 +117,7 @@ int message_get(message_queue_t *queue, void **data, int *size, int *priority) {
return 0;
}
message_queue_t destroy_message_queue(message_queue_t *queue) {
void destroy_message_queue(message_queue_t *queue) {
struct lfds700_misc_prng_state ls;
message_t *m;
......
......@@ -48,6 +48,6 @@ typedef struct {
message_queue_t * new_message_queue(int size);
int message_put(message_queue_t *queue, void *data, int size, int priority);
int message_get(message_queue_t *queue, void **data, int *size, int *priority);
message_queue_t destroy_message_queue(message_queue_t *queue);
void destroy_message_queue(message_queue_t *queue);
#endif /* RINGBUFFER_QUEUE_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