Commit eb91417f authored by nikaeinn's avatar nikaeinn
Browse files

* applying patch 11 contributed from S. Held

* add protocol configuration to OCG XML file


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6629 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 103b751f
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
#include "pss6144.h" #include "pss6144.h"
#define DEBUG_TF 1 #define DEBUG_TF 1
extern print_shorts(char*,__m128i*); extern void print_shorts(char*,__m128i*);
void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) { void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) {
......
...@@ -508,7 +508,6 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t ...@@ -508,7 +508,6 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
} }
len += sprintf(&buffer[len],"EOF\n"); len += sprintf(&buffer[len],"EOF\n");
len += sprintf(&buffer[len],"\0");
return len; return len;
} // is_clusterhead } // is_clusterhead
...@@ -751,7 +750,6 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -751,7 +750,6 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
len += sprintf(&buffer[len],"\n"); len += sprintf(&buffer[len],"\n");
} }
len += sprintf(&buffer[len],"EOF\n"); len += sprintf(&buffer[len],"EOF\n");
len += sprintf(&buffer[len],"\0");
return len; return len;
} }
...@@ -3640,7 +3640,8 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold ...@@ -3640,7 +3640,8 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
frame_tx, frame_tx,
subframe_rx, subframe_rx,
subframe_select(&phy_vars_ue->lte_frame_parms,subframe_tx), subframe_select(&phy_vars_ue->lte_frame_parms,subframe_tx),
eNB_id); eNB_id,
0/*FIXME CC_id*/);
if (ret == CONNECTION_LOST) { if (ret == CONNECTION_LOST) {
LOG_E(PHY,"[UE %d] Frame %d, subframe %d RRC Connection lost, returning to PRACH\n",phy_vars_ue->Mod_id, LOG_E(PHY,"[UE %d] Frame %d, subframe %d RRC Connection lost, returning to PRACH\n",phy_vars_ue->Mod_id,
frame_rx,subframe_tx); frame_rx,subframe_tx);
......
...@@ -460,7 +460,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -460,7 +460,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
libconfig_int tdd_config_s; libconfig_int tdd_config_s;
const char* prefix_type = NULL; const char* prefix_type = NULL;
libconfig_int eutra_band; libconfig_int eutra_band;
int64_t downlink_frequency; long long int downlink_frequency;
libconfig_int uplink_frequency_offset; libconfig_int uplink_frequency_offset;
libconfig_int Nid_cell; libconfig_int Nid_cell;
libconfig_int Nid_cell_mbsfn; libconfig_int Nid_cell_mbsfn;
......
...@@ -393,7 +393,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un ...@@ -393,7 +393,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
DevAssert( UE_id != UE_INDEX_INVALID ); // FIXME not sure how to gracefully return DevAssert( UE_id != UE_INDEX_INVALID ); // FIXME not sure how to gracefully return
offset = generate_dlsch_header((unsigned char*)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0], offset = generate_dlsch_header((unsigned char*)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0],
1, //num_sdus 1, //num_sdus
&rrc_sdu_length, // (unsigned short*)&rrc_sdu_length, //
&lcid, // sdu_lcid &lcid, // sdu_lcid
255, // no drx 255, // no drx
0, // no timing advance 0, // no timing advance
......
...@@ -450,9 +450,10 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -450,9 +450,10 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
else if( (min_rb_unit[CC_id] * total_ue_count) <= (frame_parms[CC_id]->N_RB_DL) ) else if( (min_rb_unit[CC_id] * total_ue_count) <= (frame_parms[CC_id]->N_RB_DL) )
average_rbs_per_user[CC_id] = (uint16_t) floor(frame_parms[CC_id]->N_RB_DL/total_ue_count); average_rbs_per_user[CC_id] = (uint16_t) floor(frame_parms[CC_id]->N_RB_DL/total_ue_count);
else else
average_rbs_per_user[CC_id] = min_rb_unit[CC_id]; average_rbs_per_user[CC_id] = min_rb_unit[CC_id]; // consider the total number of use that can be scheduled UE
} }
} }
// note: nb_rbs_required is assigned according to total_buffer_dl // note: nb_rbs_required is assigned according to total_buffer_dl
// extend nb_rbs_required to capture per LCID RB required // extend nb_rbs_required to capture per LCID RB required
for(i=UE_list->head;i>=0;i=UE_list->next[i]){ for(i=UE_list->head;i>=0;i=UE_list->next[i]){
...@@ -461,14 +462,16 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -461,14 +462,16 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
// control channel // control channel
if (mac_get_rrc_status(Mod_id,1,i) < RRC_RECONFIGURED) if (mac_get_rrc_status(Mod_id,1,i) < RRC_RECONFIGURED)
nb_rbs_required_remaining_1[CC_id][i] = nb_rbs_required[CC_id][i]; nb_rbs_required_remaining_1[CC_id][i] = nb_rbs_required[CC_id][i];
else else{
nb_rbs_required_remaining_1[CC_id][i] = cmin(average_rbs_per_user[CC_id],nb_rbs_required[CC_id][i]); nb_rbs_required_remaining_1[CC_id][i] = cmin(average_rbs_per_user[CC_id],nb_rbs_required[CC_id][i]);
}
} }
} }
//Allocation to UEs is done in 2 rounds, //Allocation to UEs is done in 2 rounds,
// 1st round: average number of RBs allocated to each UE // 1st stage: average number of RBs allocated to each UE
// 2nd round: remaining RBs are allocated to high priority UEs // 2nd stage: remaining RBs are allocated to high priority UEs
for(r1=0;r1<2;r1++){ for(r1=0;r1<2;r1++){
for(i=UE_list->head; i>=0;i=UE_list->next[i]) { for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
...@@ -511,7 +514,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -511,7 +514,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
// retransmission in data channels // retransmission in data channels
// control channel in the 1st transmission // control channel in the 1st transmission
// data channel for all TM // data channel for all TM
LOG_D(MAC,"calling dlsch_scheduler_pre_processor_allocate .. \n "); LOG_T(MAC,"calling dlsch_scheduler_pre_processor_allocate .. \n ");
dlsch_scheduler_pre_processor_allocate (Mod_id, dlsch_scheduler_pre_processor_allocate (Mod_id,
UE_id, UE_id,
CC_id, CC_id,
......
...@@ -933,7 +933,9 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) ...@@ -933,7 +933,9 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
for (dst_id = 0; dst_id<NUMBER_OF_UE_MAX; dst_id++) { for (dst_id = 0; dst_id<NUMBER_OF_UE_MAX; dst_id++) {
if (mac_get_rrc_status(ctxt_pP->enb_module_id, ctxt_pP->enb_flag, dst_id ) > 2) { if (mac_get_rrc_status(ctxt_pP->enb_module_id, ctxt_pP->enb_flag, dst_id ) > 2) {
otg_pkt=packet_gen(src_id, dst_id, 0, ctime, &pkt_size); unsigned int temp = 0;
otg_pkt = packet_gen( src_id, dst_id, 0, ctime, &temp );
pkt_size = temp;
if (otg_pkt != NULL){ if (otg_pkt != NULL){
rb_id = dst_id * maxDRB + DTCH; rb_id = dst_id * maxDRB + DTCH;
ctxt.ue_module_id = dst_id; ctxt.ue_module_id = dst_id;
......
...@@ -416,7 +416,8 @@ rlc_am_write_status_pdu( ...@@ -416,7 +416,8 @@ rlc_am_write_status_pdu(
rlc_am_write16_bit_field(&byte_pos_p, &bit_pos, 15, pdu_info_pP->nack_list[index].so_end); rlc_am_write16_bit_field(&byte_pos_p, &bit_pos, 15, pdu_info_pP->nack_list[index].so_end);
} }
} }
num_bytes = ((unsigned int)byte_pos_p) - ((unsigned int)(&rlc_am_pdu_sn_10_pP->b1)); ptrdiff_t diff = byte_pos_p - &rlc_am_pdu_sn_10_pP->b1; // this is the difference in terms of typeof(byte_pos_p), which is uint8_t
num_bytes = diff;
if (bit_pos > 0) { if (bit_pos > 0) {
num_bytes += 1; num_bytes += 1;
} }
......
...@@ -297,7 +297,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP) ...@@ -297,7 +297,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP)
sdu_mngt_p->sdu_size); sdu_mngt_p->sdu_size);
#endif #endif
} }
data_sdu_p = &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]); data_sdu_p = (char *) &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]);
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) { if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
#if defined(TRACE_RLC_UM_SEGMENT) #if defined(TRACE_RLC_UM_SEGMENT)
...@@ -744,7 +744,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP) ...@@ -744,7 +744,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP)
sdu_mngt_p->sdu_size); sdu_mngt_p->sdu_size);
#endif #endif
} }
data_sdu_p = &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]); data_sdu_p = (char*) &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]);
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) { if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
#if defined(TRACE_RLC_UM_SEGMENT) #if defined(TRACE_RLC_UM_SEGMENT)
......
...@@ -522,7 +522,7 @@ rlc_op_status_t rrc_rlc_remove_rlc ( ...@@ -522,7 +522,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX); AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
h_rc = hashtable_get(rlc_coll_p, key, &rlc_union_p); h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
if (h_rc == HASH_TABLE_OK) { if (h_rc == HASH_TABLE_OK) {
h_rc = hashtable_remove(rlc_coll_p, key); h_rc = hashtable_remove(rlc_coll_p, key);
LOG_D(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASED %s\n", LOG_D(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASED %s\n",
......
...@@ -174,7 +174,7 @@ typedef struct ...@@ -174,7 +174,7 @@ typedef struct
void (*dl_phy_sync_success) (module_id_t Mod_id,frame_t frameP, uint8_t CH_index,uint8_t first_sync); void (*dl_phy_sync_success) (module_id_t Mod_id,frame_t frameP, uint8_t CH_index,uint8_t first_sync);
/// Only calls the PDCP for now /// Only calls the PDCP for now
UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t frameP,sub_frame_t subframe, lte_subframe_t direction,uint8_t eNB_id); UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t frameP,sub_frame_t subframe, lte_subframe_t direction, uint8_t eNB_id, int CC_id);
/// PHY-Config-Dedicated UE /// PHY-Config-Dedicated UE
void (*phy_config_dedicated_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index, void (*phy_config_dedicated_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index,
......
...@@ -3265,7 +3265,7 @@ void ...@@ -3265,7 +3265,7 @@ void
switch (rrc_get_state(ue_mod_id)) { switch (rrc_get_state(ue_mod_id)) {
case RRC_STATE_IDLE: case RRC_STATE_IDLE:
{ {
if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) {
rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING); rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING);
} }
break; break;
......
...@@ -2849,7 +2849,7 @@ int rrc_eNB_decode_ccch( ...@@ -2849,7 +2849,7 @@ int rrc_eNB_decode_ccch(
SRB_INFO * Srb_info) { SRB_INFO * Srb_info) {
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
module_id_t Idx, ue_mod_id; module_id_t Idx, ue_mod_id = 0;
asn_dec_rval_t dec_rval; asn_dec_rval_t dec_rval;
UL_CCCH_Message_t *ul_ccch_msg = NULL; UL_CCCH_Message_t *ul_ccch_msg = NULL;
RRCConnectionRequest_r8_IEs_t *rrcConnectionRequest; RRCConnectionRequest_r8_IEs_t *rrcConnectionRequest;
......
...@@ -487,6 +487,7 @@ void logRecord(const char *file, const char *func, int line, int comp, ...@@ -487,6 +487,7 @@ void logRecord(const char *file, const char *func, int line, int comp,
log_list_nb_elements++; log_list_nb_elements++;
} }
if(pthread_cond_signal(&log_notify) != 0) { if(pthread_cond_signal(&log_notify) != 0) {
pthread_mutex_unlock(&log_lock);
return; return;
} }
......
...@@ -82,43 +82,43 @@ pool_buffer_init () ...@@ -82,43 +82,43 @@ pool_buffer_init ()
//memory->mem_blocks[mb_index + index].next = NULL; -> done in memset 0 //memory->mem_blocks[mb_index + index].next = NULL; -> done in memset 0
switch (pool_index) { switch (pool_index) {
case 0: case 0:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool0[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool0[index][0]);
break; break;
case 1: case 1:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool1[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool1[index][0]);
break; break;
case 2: case 2:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool2[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool2[index][0]);
break; break;
case 3: case 3:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool3[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool3[index][0]);
break; break;
case 4: case 4:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool4[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool4[index][0]);
break; break;
case 5: case 5:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool5[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool5[index][0]);
break; break;
case 6: case 6:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool6[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool6[index][0]);
break; break;
case 7: case 7:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool7[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool7[index][0]);
break; break;
case 8: case 8:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool8[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool8[index][0]);
break; break;
case 9: case 9:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool9[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool9[index][0]);
break; break;
case 10: case 10:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool10[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool10[index][0]);
break; break;
case 11: case 11:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool11[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool11[index][0]);
break; break;
case 12: case 12:
memory->mem_blocks[mb_index + index].data = &(memory->mem_pool12[index][0]); memory->mem_blocks[mb_index + index].data = (unsigned char*)&(memory->mem_pool12[index][0]);
break; break;
default:; default:;
memory->mem_blocks[mb_index + index].data = NULL; // pool copy memory->mem_blocks[mb_index + index].data = NULL; // pool copy
...@@ -300,79 +300,79 @@ check_mem_area (void) ...@@ -300,79 +300,79 @@ check_mem_area (void)
mem_pool *memory = (mem_pool *) &mem_block_var; mem_pool *memory = (mem_pool *) &mem_block_var;
for (index = 0; index < MEM_MNGT_MB0_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB0_NB_BLOCKS; index++) {
if ((memory->mem_blocks[index].data != &(memory->mem_pool0[index][0])) && (memory->mem_blocks[index].pool_id != MEM_MNGT_POOL_ID0)) { if ((memory->mem_blocks[index].data != (unsigned char*)&(memory->mem_pool0[index][0])) && (memory->mem_blocks[index].pool_id != MEM_MNGT_POOL_ID0)) {
msg ("[MEM] ERROR POOL0 block index %d\n", index); msg ("[MEM] ERROR POOL0 block index %d\n", index);
} }
} }
mb_index = MEM_MNGT_MB0_NB_BLOCKS; mb_index = MEM_MNGT_MB0_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB1_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB1_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool1[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID1)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool1[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID1)) {
msg ("[MEM] ERROR POOL1 block index %d\n", index); msg ("[MEM] ERROR POOL1 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB1_NB_BLOCKS; mb_index += MEM_MNGT_MB1_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB2_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB2_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool2[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID2)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool2[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID2)) {
msg ("[MEM] ERROR POOL2 block index %d\n", index); msg ("[MEM] ERROR POOL2 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB2_NB_BLOCKS; mb_index += MEM_MNGT_MB2_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB3_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB3_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool3[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID3)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool3[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID3)) {
msg ("[MEM] ERROR POOL3 block index %d\n", index); msg ("[MEM] ERROR POOL3 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB3_NB_BLOCKS; mb_index += MEM_MNGT_MB3_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB4_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB4_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool4[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID4)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool4[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID4)) {
msg ("[MEM] ERROR POOL4 block index %d\n", index); msg ("[MEM] ERROR POOL4 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB4_NB_BLOCKS; mb_index += MEM_MNGT_MB4_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB5_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB5_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool5[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID5)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool5[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID5)) {
msg ("[MEM] ERROR POOL5 block index %d\n", index); msg ("[MEM] ERROR POOL5 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB5_NB_BLOCKS; mb_index += MEM_MNGT_MB5_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB6_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB6_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool6[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID6)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool6[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID6)) {
msg ("[MEM] ERROR POOL6 block index %d\n", index); msg ("[MEM] ERROR POOL6 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB6_NB_BLOCKS; mb_index += MEM_MNGT_MB6_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB7_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB7_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool7[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID7)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool7[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID7)) {
msg ("[MEM] ERROR POOL7 block index %d\n", index); msg ("[MEM] ERROR POOL7 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB7_NB_BLOCKS; mb_index += MEM_MNGT_MB7_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB8_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB8_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool8[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID8)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool8[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID8)) {
msg ("[MEM] ERROR POOL8 block index %d\n", index); msg ("[MEM] ERROR POOL8 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB8_NB_BLOCKS; mb_index += MEM_MNGT_MB8_NB_BLOCKS;
for (index = 0; index < MEM_MNGT_MB9_NB_BLOCKS; index++) { for (index = 0; index < MEM_MNGT_MB9_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool9[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID9)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool9[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID9)) {
msg ("[MEM] ERROR POOL9 block index %d\n", index); msg ("[MEM] ERROR POOL9 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB9_NB_BLOCKS; mb_index += MEM_MNGT_MB9_NB_BLOCKS;
for (index = mb_index; index < MEM_MNGT_MB10_NB_BLOCKS; index++) { for (index = mb_index; index < MEM_MNGT_MB10_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool10[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID10)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool10[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID10)) {
msg ("[MEM] ERROR POOL10 block index %d\n", index); msg ("[MEM] ERROR POOL10 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB10_NB_BLOCKS; mb_index += MEM_MNGT_MB10_NB_BLOCKS;
for (index = mb_index; index < MEM_MNGT_MB11_NB_BLOCKS; index++) { for (index = mb_index; index < MEM_MNGT_MB11_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool11[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID11)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool11[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID11)) {
msg ("[MEM] ERROR POOL11 block index %d\n", index); msg ("[MEM] ERROR POOL11 block index %d\n", index);
} }
} }
mb_index += MEM_MNGT_MB11_NB_BLOCKS; mb_index += MEM_MNGT_MB11_NB_BLOCKS;
for (index = mb_index; index < MEM_MNGT_MB12_NB_BLOCKS; index++) { for (index = mb_index; index < MEM_MNGT_MB12_NB_BLOCKS; index++) {
if ((memory->mem_blocks[mb_index + index].data != &(memory->mem_pool12[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID12)) { if ((memory->mem_blocks[mb_index + index].data != (unsigned char*)&(memory->mem_pool12[index][0])) && (memory->mem_blocks[mb_index + index].pool_id != MEM_MNGT_POOL_ID12)) {
msg ("[MEM] ERROR POOL12 block index %d\n", index); msg ("[MEM] ERROR POOL12 block index %d\n", index);
} }
} }
......
...@@ -467,28 +467,33 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need ...@@ -467,28 +467,33 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
typedef struct typedef struct
{ {
uint16_t priority[11];//pas possible d'acceder au MAX_NUM_LCID uint16_t priority[11];//pas possible d'acceder au MAX_NUM_LCID
// //
uint8_t DCI_aggregation_min; uint8_t DCI_aggregation_min;
uint8_t DLSCH_dci_size_bits; uint8_t DLSCH_dci_size_bits;
//UL transmission bandwidth in RBs //UL transmission bandwidth in RBs
uint8_t ul_bandwidth[11]; uint8_t ul_bandwidth[11];
//DL transmission bandwidth in RBs //DL transmission bandwidth in RBs
uint8_t dl_bandwidth[11]; uint8_t dl_bandwidth[11];
//UL transmission bandwidth in RBs //UL transmission bandwidth in RBs
uint8_t min_ul_bandwidth[11]; uint8_t min_ul_bandwidth[11];
//DL transmission bandwidth in RBs //DL transmission bandwidth in RBs
uint8_t min_dl_bandwidth[11]; uint8_t min_dl_bandwidth[11];
//aggregated bit rate of non-gbr bearer per UE //aggregated bit rate of non-gbr bearer per UE
uint64_t ue_AggregatedMaximumBitrateDL; uint64_t ue_AggregatedMaximumBitrateDL;
//aggregated bit rate of non-gbr bearer per UE //aggregated bit rate of non-gbr bearer per UE
uint64_t ue_AggregatedMaximumBitrateUL; uint64_t ue_AggregatedMaximumBitrateUL;
//CQI scheduling interval in subframes. //CQI scheduling interval in subframes.
uint16_t cqiSchedInterval; uint16_t cqiSchedInterval;
//Contention resolution timer used during random access //Contention resolution timer used during random access
uint8_t mac_ContentionResolutionTimer; uint8_t mac_ContentionResolutionTimer;
uint16_t max_allowed_rbs[11]; uint16_t max_allowed_rbs[11];
uint8_t max_mcs[11]; uint8_t max_mcs[11];
uint8_t num_groups;
} Mac_config; } Mac_config;
/** @defgroup _Predefined_traffic Configuration /** @defgroup _Predefined_traffic Configuration
...@@ -653,6 +658,24 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need ...@@ -653,6 +658,24 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
} Emulation_Config; } Emulation_Config;
/* @}*/ /* @}*/
/** @defgroup _OSD_basic OAI protocol config
* @ingroup _OCG
* @brief OAI Emulation struct for protocol configuration
* @{*/
typedef struct{