Remove compilation warnings, also fix telnet server compilation failure and NB-IoT shared lib compilation failure introduced when reviewing L1 sources organization
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include "common/config/config_userapi.h"
|
||||||
|
|
||||||
#define QUIT(x) do { \
|
#define QUIT(x) do { \
|
||||||
printf("T tracer: QUIT: %s\n", x); \
|
printf("T tracer: QUIT: %s\n", x); \
|
||||||
exit(1); \
|
exit(1); \
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
/* array used to activate/disactivate a log */
|
/* array used to activate/disactivate a log */
|
||||||
static int T_IDs[T_NUMBER_OF_IDS];
|
static int T_IDs[T_NUMBER_OF_IDS];
|
||||||
int *T_active = T_IDs;
|
int *T_active = T_IDs;
|
||||||
|
int T_stdout;
|
||||||
|
|
||||||
static int T_socket;
|
static int T_socket;
|
||||||
|
|
||||||
@@ -157,3 +160,28 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
|
|||||||
|
|
||||||
new_thread(T_receive_thread, NULL);
|
new_thread(T_receive_thread, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void T_Config_Init(void)
|
||||||
|
{
|
||||||
|
int T_port; /* by default we wait for the tracer */
|
||||||
|
int T_nowait; /* default port to listen to to wait for the tracer */
|
||||||
|
int T_dont_fork; /* default is to fork, see 'T_init' to understand */
|
||||||
|
|
||||||
|
paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC ;
|
||||||
|
|
||||||
|
/* compatibility: look for TTracer parameters in root section */
|
||||||
|
config_get( ttraceparams,sizeof(ttraceparams)/sizeof(paramdef_t),NULL);
|
||||||
|
|
||||||
|
/* but for a cleaner config file, TTracer params should be defined in a specific section... */
|
||||||
|
int ret = config_get( ttraceparams,sizeof(ttraceparams)/sizeof(paramdef_t),TTRACER_CONFIG_PREFIX);
|
||||||
|
if (ret <0) {
|
||||||
|
printf( "TTracer configuration couldn't be performed via config module\n");
|
||||||
|
}
|
||||||
|
if (T_stdout == 0) {
|
||||||
|
T_init(T_port, 1-T_nowait, T_dont_fork);
|
||||||
|
} else {
|
||||||
|
for( int i=0 ; i<T_NUMBER_OF_IDS ; i++ ) {
|
||||||
|
T_active[i] = T_ACTIVE_STDOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
|
|
||||||
#include "openair1/PHY/extern.h"
|
#include "openair1/PHY/phy_extern.h"
|
||||||
|
|
||||||
|
|
||||||
#define TELNETVAR_PHYCC0 0
|
#define TELNETVAR_PHYCC0 0
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "log_extern.h"
|
#include "log_extern.h"
|
||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
#include "openair1/PHY/extern.h"
|
#include "openair1/PHY/phy_extern.h"
|
||||||
#include "telnetsrv_proccmd.h"
|
#include "telnetsrv_proccmd.h"
|
||||||
|
|
||||||
void decode_procstat(char *record, int debug, telnet_printfunc_t prnt)
|
void decode_procstat(char *record, int debug, telnet_printfunc_t prnt)
|
||||||
@@ -193,7 +193,6 @@ struct dirent *entry;
|
|||||||
|
|
||||||
int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
|
int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
|
||||||
{
|
{
|
||||||
extern log_t *g_log;
|
|
||||||
|
|
||||||
if (debug > 0)
|
if (debug > 0)
|
||||||
prnt(" proccmd_show received %s\n",buf);
|
prnt(" proccmd_show received %s\n",buf);
|
||||||
@@ -203,10 +202,12 @@ extern log_t *g_log;
|
|||||||
if (strcasestr(buf,"loglvl") != NULL) {
|
if (strcasestr(buf,"loglvl") != NULL) {
|
||||||
prnt("component verbosity level enabled\n");
|
prnt("component verbosity level enabled\n");
|
||||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||||
prnt("%02i %17.17s:%10.10s%10.10s %s\n",i ,g_log->log_component[i].name,
|
if (g_log->log_component[i].name != NULL) {
|
||||||
map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
|
prnt("%02i %17.17s:%10.10s%10.10s %s\n",i ,g_log->log_component[i].name,
|
||||||
map_int_to_str(log_level_names,g_log->log_component[i].level),
|
map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
|
||||||
((g_log->log_component[i].interval>0)?"Y":"N") );
|
map_int_to_str(log_level_names,g_log->log_component[i].level),
|
||||||
|
((g_log->log_component[i].interval>0)?"Y":"N") );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strcasestr(buf,"config") != NULL) {
|
if (strcasestr(buf,"config") != NULL) {
|
||||||
@@ -368,6 +369,15 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
|
|||||||
if (logparam != NULL) free(logparam);
|
if (logparam != NULL) free(logparam);
|
||||||
if (tmpstr != NULL) free(tmpstr);
|
if (tmpstr != NULL) free(tmpstr);
|
||||||
for (int i=idx1; i<=idx2 ; i++) {
|
for (int i=idx1; i<=idx2 ; i++) {
|
||||||
|
if (level < 0) {
|
||||||
|
level=g_log->log_component[i].level;
|
||||||
|
}
|
||||||
|
if (verbosity < 0) {
|
||||||
|
verbosity=g_log->log_component[i].flag;
|
||||||
|
}
|
||||||
|
if (interval < 0) {
|
||||||
|
interval=g_log->log_component[i].interval;
|
||||||
|
}
|
||||||
set_comp_log(i, level, verbosity, interval);
|
set_comp_log(i, level, verbosity, interval);
|
||||||
prnt("log level/verbosity comp %i %s set to %s / %s (%s)\n",
|
prnt("log level/verbosity comp %i %s set to %s / %s (%s)\n",
|
||||||
i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name),
|
i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name),
|
||||||
|
|||||||
@@ -2924,7 +2924,7 @@ static uint8_t unpack_dl_config_bch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
|
|||||||
nfapi_dl_config_bch_pdu_rel8_t* bch_pdu_rel8 = (nfapi_dl_config_bch_pdu_rel8_t*)tlv;
|
nfapi_dl_config_bch_pdu_rel8_t* bch_pdu_rel8 = (nfapi_dl_config_bch_pdu_rel8_t*)tlv;
|
||||||
|
|
||||||
return ( pull16(ppReadPackedMsg, &bch_pdu_rel8->length, end) &&
|
return ( pull16(ppReadPackedMsg, &bch_pdu_rel8->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &bch_pdu_rel8->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&bch_pdu_rel8->pdu_index, end) &&
|
||||||
pull16(ppReadPackedMsg, &bch_pdu_rel8->transmission_power, end));
|
pull16(ppReadPackedMsg, &bch_pdu_rel8->transmission_power, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2933,7 +2933,7 @@ static uint8_t unpack_dl_config_mch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
|
|||||||
nfapi_dl_config_mch_pdu_rel8_t* mch_pdu_rel8 = (nfapi_dl_config_mch_pdu_rel8_t*)tlv;
|
nfapi_dl_config_mch_pdu_rel8_t* mch_pdu_rel8 = (nfapi_dl_config_mch_pdu_rel8_t*)tlv;
|
||||||
|
|
||||||
return (pull16(ppReadPackedMsg, &mch_pdu_rel8->length, end) &&
|
return (pull16(ppReadPackedMsg, &mch_pdu_rel8->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &mch_pdu_rel8->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&mch_pdu_rel8->pdu_index, end) &&
|
||||||
pull16(ppReadPackedMsg, &mch_pdu_rel8->rnti, end) &&
|
pull16(ppReadPackedMsg, &mch_pdu_rel8->rnti, end) &&
|
||||||
pull8(ppReadPackedMsg, &mch_pdu_rel8->resource_allocation_type, end) &&
|
pull8(ppReadPackedMsg, &mch_pdu_rel8->resource_allocation_type, end) &&
|
||||||
pull32(ppReadPackedMsg, &mch_pdu_rel8->resource_block_coding, end) &&
|
pull32(ppReadPackedMsg, &mch_pdu_rel8->resource_block_coding, end) &&
|
||||||
@@ -2947,7 +2947,7 @@ static uint8_t unpack_dl_config_dlsch_pdu_rel8_value(void *tlv, uint8_t **ppRead
|
|||||||
nfapi_dl_config_dlsch_pdu_rel8_t* dlsch_pdu_rel8 = (nfapi_dl_config_dlsch_pdu_rel8_t*)tlv;
|
nfapi_dl_config_dlsch_pdu_rel8_t* dlsch_pdu_rel8 = (nfapi_dl_config_dlsch_pdu_rel8_t*)tlv;
|
||||||
|
|
||||||
if (!(pull16(ppReadPackedMsg, &dlsch_pdu_rel8->length, end) &&
|
if (!(pull16(ppReadPackedMsg, &dlsch_pdu_rel8->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&dlsch_pdu_rel8->pdu_index, end) &&
|
||||||
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->rnti, end) &&
|
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->rnti, end) &&
|
||||||
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->resource_allocation_type, end) &&
|
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->resource_allocation_type, end) &&
|
||||||
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
|
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
|
||||||
@@ -3033,7 +3033,7 @@ static uint8_t unpack_dl_config_pch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
|
|||||||
nfapi_dl_config_pch_pdu_rel8_t* pch_pdu_rel8 = (nfapi_dl_config_pch_pdu_rel8_t*)tlv;
|
nfapi_dl_config_pch_pdu_rel8_t* pch_pdu_rel8 = (nfapi_dl_config_pch_pdu_rel8_t*)tlv;
|
||||||
|
|
||||||
return ( pull16(ppReadPackedMsg, &pch_pdu_rel8->length, end) &&
|
return ( pull16(ppReadPackedMsg, &pch_pdu_rel8->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &pch_pdu_rel8->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&pch_pdu_rel8->pdu_index, end) &&
|
||||||
pull16(ppReadPackedMsg, &pch_pdu_rel8->p_rnti, end) &&
|
pull16(ppReadPackedMsg, &pch_pdu_rel8->p_rnti, end) &&
|
||||||
pull8(ppReadPackedMsg, &pch_pdu_rel8->resource_allocation_type, end) &&
|
pull8(ppReadPackedMsg, &pch_pdu_rel8->resource_allocation_type, end) &&
|
||||||
pull8(ppReadPackedMsg, &pch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
|
pull8(ppReadPackedMsg, &pch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
|
||||||
@@ -3179,7 +3179,7 @@ static uint8_t unpack_dl_config_nbch_pdu_rel13_value(void *tlv, uint8_t **ppRead
|
|||||||
nfapi_dl_config_nbch_pdu_rel13_t* nbch_params_rel13 = (nfapi_dl_config_nbch_pdu_rel13_t*)tlv;
|
nfapi_dl_config_nbch_pdu_rel13_t* nbch_params_rel13 = (nfapi_dl_config_nbch_pdu_rel13_t*)tlv;
|
||||||
|
|
||||||
return ( pull16(ppReadPackedMsg, &nbch_params_rel13->length, end) &&
|
return ( pull16(ppReadPackedMsg, &nbch_params_rel13->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &nbch_params_rel13->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&nbch_params_rel13->pdu_index, end) &&
|
||||||
pull16(ppReadPackedMsg, &nbch_params_rel13->transmission_power, end) &&
|
pull16(ppReadPackedMsg, &nbch_params_rel13->transmission_power, end) &&
|
||||||
pull16(ppReadPackedMsg, &nbch_params_rel13->hyper_sfn_2_lsbs, end));
|
pull16(ppReadPackedMsg, &nbch_params_rel13->hyper_sfn_2_lsbs, end));
|
||||||
}
|
}
|
||||||
@@ -3189,7 +3189,7 @@ static uint8_t unpack_dl_config_npdcch_pdu_rel13_value(void *tlv, uint8_t **ppRe
|
|||||||
nfapi_dl_config_npdcch_pdu_rel13_t* npdcch_params_rel13 = (nfapi_dl_config_npdcch_pdu_rel13_t*)tlv;
|
nfapi_dl_config_npdcch_pdu_rel13_t* npdcch_params_rel13 = (nfapi_dl_config_npdcch_pdu_rel13_t*)tlv;
|
||||||
|
|
||||||
return ( pull16(ppReadPackedMsg, &npdcch_params_rel13->length, end) &&
|
return ( pull16(ppReadPackedMsg, &npdcch_params_rel13->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &npdcch_params_rel13->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&npdcch_params_rel13->pdu_index, end) &&
|
||||||
pull8(ppReadPackedMsg, &npdcch_params_rel13->ncce_index, end) &&
|
pull8(ppReadPackedMsg, &npdcch_params_rel13->ncce_index, end) &&
|
||||||
pull8(ppReadPackedMsg, &npdcch_params_rel13->aggregation_level, end) &&
|
pull8(ppReadPackedMsg, &npdcch_params_rel13->aggregation_level, end) &&
|
||||||
pull8(ppReadPackedMsg, &npdcch_params_rel13->start_symbol, end) &&
|
pull8(ppReadPackedMsg, &npdcch_params_rel13->start_symbol, end) &&
|
||||||
@@ -3218,7 +3218,7 @@ static uint8_t unpack_dl_config_ndlsch_pdu_rel13_value(void *tlv, uint8_t **ppRe
|
|||||||
nfapi_dl_config_ndlsch_pdu_rel13_t* ndlsch_params_rel13 = (nfapi_dl_config_ndlsch_pdu_rel13_t*)tlv;
|
nfapi_dl_config_ndlsch_pdu_rel13_t* ndlsch_params_rel13 = (nfapi_dl_config_ndlsch_pdu_rel13_t*)tlv;
|
||||||
|
|
||||||
return ( pull16(ppReadPackedMsg, &ndlsch_params_rel13->length, end) &&
|
return ( pull16(ppReadPackedMsg, &ndlsch_params_rel13->length, end) &&
|
||||||
pull16(ppReadPackedMsg, &ndlsch_params_rel13->pdu_index, end) &&
|
pull16(ppReadPackedMsg, (uint16_t *)&ndlsch_params_rel13->pdu_index, end) &&
|
||||||
pull8(ppReadPackedMsg, &ndlsch_params_rel13->start_symbol, end) &&
|
pull8(ppReadPackedMsg, &ndlsch_params_rel13->start_symbol, end) &&
|
||||||
pull8(ppReadPackedMsg, &ndlsch_params_rel13->rnti_type, end) &&
|
pull8(ppReadPackedMsg, &ndlsch_params_rel13->rnti_type, end) &&
|
||||||
pull16(ppReadPackedMsg, &ndlsch_params_rel13->rnti, end) &&
|
pull16(ppReadPackedMsg, &ndlsch_params_rel13->rnti, end) &&
|
||||||
@@ -3602,7 +3602,7 @@ static uint8_t unpack_ul_config_ue_info_rel8_value(void *tlv, uint8_t **ppReadPa
|
|||||||
nfapi_ul_config_ue_information_rel8_t* ue_info_rel8 = (nfapi_ul_config_ue_information_rel8_t*)tlv;
|
nfapi_ul_config_ue_information_rel8_t* ue_info_rel8 = (nfapi_ul_config_ue_information_rel8_t*)tlv;
|
||||||
|
|
||||||
return (pull32(ppReadPackedMsg, &ue_info_rel8->handle, end) &&
|
return (pull32(ppReadPackedMsg, &ue_info_rel8->handle, end) &&
|
||||||
pull16(ppReadPackedMsg, &ue_info_rel8->rnti, end));
|
pull16(ppReadPackedMsg, (uint16_t *)&ue_info_rel8->rnti, end));
|
||||||
}
|
}
|
||||||
static uint8_t unpack_ul_config_ue_info_rel11_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
static uint8_t unpack_ul_config_ue_info_rel11_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1089,6 +1089,9 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
|
|||||||
return(9);
|
return(9);
|
||||||
else
|
else
|
||||||
return((n+6)%10);
|
return((n+6)%10);
|
||||||
|
|
||||||
|
LOG_E(PHY, "%s %s:%i pdcch allocation error\n",__FUNCTION__,__FILE__,__LINE__);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n)
|
uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n)
|
||||||
@@ -1099,6 +1102,9 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
|
|||||||
(frame_parms->tdd_config == 1)) {
|
(frame_parms->tdd_config == 1)) {
|
||||||
if ((n==1)||(n==6)||(n==4)||(n==9)) { // tdd_config 0,1 SF 1,5
|
if ((n==1)||(n==6)||(n==4)||(n==9)) { // tdd_config 0,1 SF 1,5
|
||||||
ul_frame = (frame + (n < 5 ? 0 : 1));
|
ul_frame = (frame + (n < 5 ? 0 : 1));
|
||||||
|
} else {
|
||||||
|
LOG_E(PHY, "frame %d subframe %d: PUSCH frame = ?\n", frame, n);
|
||||||
|
ul_frame = 0;
|
||||||
}
|
}
|
||||||
} else if ((frame_parms->frame_type == TDD) &&
|
} else if ((frame_parms->frame_type == TDD) &&
|
||||||
(frame_parms->tdd_config == 6) &&
|
(frame_parms->tdd_config == 6) &&
|
||||||
|
|||||||
@@ -2103,30 +2103,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];//qpsk_table_a1[2],qpsk_table_b1[2]
|
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];//qpsk_table_a1[2],qpsk_table_b1[2]
|
||||||
|
|
||||||
int16_t *qam_table_s0=NULL,*qam_table_s1=NULL;
|
int16_t *qam_table_s0=NULL,*qam_table_s1=NULL;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: variable to be removed? */
|
|
||||||
int (*allocate_REs)(PHY_VARS_eNB*,
|
|
||||||
int **,
|
|
||||||
uint32_t*,
|
|
||||||
uint32_t*,
|
|
||||||
uint16_t,
|
|
||||||
uint32_t,
|
|
||||||
LTE_DL_eNB_HARQ_t *,
|
|
||||||
LTE_DL_eNB_HARQ_t *,
|
|
||||||
uint8_t,
|
|
||||||
int16_t,
|
|
||||||
uint8_t,
|
|
||||||
int16_t *,
|
|
||||||
int16_t *,
|
|
||||||
uint32_t *,
|
|
||||||
uint8_t,
|
|
||||||
uint8_t,
|
|
||||||
uint8_t,
|
|
||||||
uint8_t,
|
|
||||||
uint8_t,
|
|
||||||
int *,
|
|
||||||
int *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int P1_SHIFT[13],P2_SHIFT[13];
|
int P1_SHIFT[13],P2_SHIFT[13];
|
||||||
int offset,nushiftmod3;
|
int offset,nushiftmod3;
|
||||||
@@ -2373,52 +2349,23 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
re_offset = frame_parms->first_carrier_offset;
|
re_offset = frame_parms->first_carrier_offset;
|
||||||
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb));
|
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb));
|
||||||
|
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: remove this code? */
|
|
||||||
allocate_REs = allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (mod_order0) {
|
switch (mod_order0) {
|
||||||
case 2:
|
case 2:
|
||||||
qam_table_s0 = NULL;
|
qam_table_s0 = NULL;
|
||||||
/*if (pilots) {
|
/*if (pilots) {
|
||||||
qam_table_s0 = qpsk_table_b0;
|
qam_table_s0 = qpsk_table_b0;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
// TODO: remove this code? //
|
|
||||||
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
|
|
||||||
allocate_REs_in_RB_pilots_QPSK_siso :
|
|
||||||
allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qam_table_s0 = qpsk_table_a0;
|
qam_table_s0 = qpsk_table_a0;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
// TODO: remove this code? //
|
|
||||||
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
|
|
||||||
allocate_REs_in_RB_no_pilots_QPSK_siso :
|
|
||||||
allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (pilots) {
|
if (pilots) {
|
||||||
qam_table_s0 = qam16_table_b0;
|
qam_table_s0 = qam16_table_b0;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: remove this code? */
|
|
||||||
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
|
|
||||||
allocate_REs_in_RB_pilots_16QAM_siso :
|
|
||||||
allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qam_table_s0 = qam16_table_a0;
|
qam_table_s0 = qam16_table_a0;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: remove this code? */
|
|
||||||
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
|
|
||||||
allocate_REs_in_RB_no_pilots_16QAM_siso :
|
|
||||||
allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2426,21 +2373,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
case 6:
|
case 6:
|
||||||
if (pilots) {
|
if (pilots) {
|
||||||
qam_table_s0 = qam64_table_b0;
|
qam_table_s0 = qam64_table_b0;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: remove this code? */
|
|
||||||
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
|
|
||||||
allocate_REs_in_RB_pilots_64QAM_siso :
|
|
||||||
allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qam_table_s0 = qam64_table_a0;
|
qam_table_s0 = qam64_table_a0;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: remove this code? */
|
|
||||||
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
|
|
||||||
allocate_REs_in_RB_no_pilots_64QAM_siso :
|
|
||||||
allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2449,10 +2384,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
switch (mod_order1) {
|
switch (mod_order1) {
|
||||||
case 2:
|
case 2:
|
||||||
qam_table_s1 = NULL;
|
qam_table_s1 = NULL;
|
||||||
#ifdef NEW_ALLOC_RE
|
|
||||||
/* TODO: remove this code? */
|
|
||||||
allocate_REs = allocate_REs_in_RB;
|
|
||||||
#endif
|
|
||||||
/*if (pilots) {
|
/*if (pilots) {
|
||||||
qam_table_s1 = qpsk_table_b1;
|
qam_table_s1 = qpsk_table_b1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -732,7 +732,6 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
int i;
|
int i;
|
||||||
LTE_eNB_UCI *uci;
|
LTE_eNB_UCI *uci;
|
||||||
uint16_t tdd_multiplexing_mask=0;
|
uint16_t tdd_multiplexing_mask=0;
|
||||||
int res;
|
|
||||||
|
|
||||||
for (i=0;i<NUMBER_OF_UE_MAX;i++) {
|
for (i=0;i<NUMBER_OF_UE_MAX;i++) {
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ void feptx0(RU_t *ru,int slot) {
|
|||||||
//int dummy_tx_b[7680*2] __attribute__((aligned(32)));
|
//int dummy_tx_b[7680*2] __attribute__((aligned(32)));
|
||||||
|
|
||||||
unsigned int aa,slot_offset;
|
unsigned int aa,slot_offset;
|
||||||
int i, tx_offset;
|
|
||||||
int slot_sizeF = (fp->ofdm_symbol_size)*
|
int slot_sizeF = (fp->ofdm_symbol_size)*
|
||||||
((fp->Ncp==1) ? 6 : 7);
|
((fp->Ncp==1) ? 6 : 7);
|
||||||
int subframe = ru->proc.subframe_tx;
|
int subframe = ru->proc.subframe_tx;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "PHY/defs_eNB.h"
|
#include "PHY/defs_eNB.h"
|
||||||
#include "PHY/defs_UE.h"
|
#include "PHY/defs_UE.h"
|
||||||
|
#include "TDD-Config.h"
|
||||||
/*! \brief Function to compute subframe Number(DL and S) as a function of Frame type and TDD Configuration
|
/*! \brief Function to compute subframe Number(DL and S) as a function of Frame type and TDD Configuration
|
||||||
@param frame_parms Pointer to DL frame parameter descriptor
|
@param frame_parms Pointer to DL frame parameter descriptor
|
||||||
@returns Subframe Number (DL,S)
|
@returns Subframe Number (DL,S)
|
||||||
@@ -341,6 +341,12 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf
|
|||||||
|
|
||||||
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
|
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
|
||||||
|
|
||||||
|
|
||||||
|
/* from here: prototype added to remove compilation warnings, doc to be written by the author of the function */
|
||||||
|
|
||||||
|
int ul_ACK_subframe2_dl_frame(LTE_DL_FRAME_PARMS *frame_parms,int frame, unsigned char subframe,unsigned char subframe_tx);
|
||||||
|
|
||||||
|
void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP, sub_frame_t *subframeP);
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3600,7 +3600,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
|||||||
|
|
||||||
LOG_D(PHY," ------ start turbo decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, subframe_rx, harq_pid);
|
LOG_D(PHY," ------ start turbo decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, subframe_rx, harq_pid);
|
||||||
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->nb_rb);
|
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->nb_rb);
|
||||||
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->rb_alloc_even);
|
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, (unsigned int)((intptr_t)dlsch0->harq_processes[harq_pid]->rb_alloc_even));
|
||||||
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Qm);
|
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Qm);
|
||||||
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl);
|
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl);
|
||||||
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G);
|
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G);
|
||||||
@@ -3663,7 +3663,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->nb_rb);
|
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->nb_rb);
|
||||||
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->rb_alloc_even);
|
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, (uint16_t)((intptr_t)dlsch1->harq_processes[harq_pid]->rb_alloc_even));
|
||||||
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Qm);
|
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Qm);
|
||||||
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl);
|
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl);
|
||||||
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G);
|
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "SystemInformationBlockType2.h"
|
#include "SystemInformationBlockType2.h"
|
||||||
|
|
||||||
#include "PHY/extern.h"
|
#include "PHY/phy_extern.h"
|
||||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
#include "RRC_config_tools.h"
|
#include "RRC_config_tools.h"
|
||||||
|
|||||||
@@ -641,8 +641,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int debug_flag=0;
|
static int debug_flag=0;
|
||||||
void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe);
|
void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe)=NULL;
|
||||||
void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag);
|
void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag)=NULL;
|
||||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_DEFAULT){
|
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_DEFAULT){
|
||||||
schedule_ulsch_p = schedule_ulsch;
|
schedule_ulsch_p = schedule_ulsch;
|
||||||
schedule_ue_spec_p = schedule_dlsch;
|
schedule_ue_spec_p = schedule_dlsch;
|
||||||
@@ -672,13 +672,22 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
|||||||
// This schedules SRS in subframeP
|
// This schedules SRS in subframeP
|
||||||
schedule_SRS(module_idP, frameP, subframeP);
|
schedule_SRS(module_idP, frameP, subframeP);
|
||||||
// This schedules ULSCH in subframeP (dci0)
|
// This schedules ULSCH in subframeP (dci0)
|
||||||
schedule_ulsch_p(module_idP, frameP, subframeP);
|
if (schedule_ulsch_p != NULL) {
|
||||||
|
schedule_ulsch_p(module_idP, frameP, subframeP);
|
||||||
|
} else {
|
||||||
|
LOG_E(MAC," %s %d: schedule_ulsch_p is NULL, function not called\n",__FILE__,__LINE__);
|
||||||
|
}
|
||||||
// This schedules UCI_SR in subframeP
|
// This schedules UCI_SR in subframeP
|
||||||
schedule_SR(module_idP, frameP, subframeP);
|
schedule_SR(module_idP, frameP, subframeP);
|
||||||
// This schedules UCI_CSI in subframeP
|
// This schedules UCI_CSI in subframeP
|
||||||
schedule_CSI(module_idP, frameP, subframeP);
|
schedule_CSI(module_idP, frameP, subframeP);
|
||||||
// This schedules DLSCH in subframeP
|
// This schedules DLSCH in subframeP
|
||||||
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
|
if (schedule_ue_spec_p != NULL) {
|
||||||
|
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
|
||||||
|
} else {
|
||||||
|
LOG_E(MAC," %s %d: schedule_ue_spec_p is NULL, function not called\n",__FILE__,__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
|
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
#include "RRC/LTE/rrc_extern.h"
|
#include "RRC/LTE/rrc_extern.h"
|
||||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||||
|
|
||||||
|
#include "SCHED/sched_common.h"
|
||||||
//#include "LAYER2/MAC/pre_processor.c"
|
//#include "LAYER2/MAC/pre_processor.c"
|
||||||
#include "pdcp.h"
|
#include "pdcp.h"
|
||||||
|
|
||||||
@@ -62,6 +63,7 @@
|
|||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|
||||||
#include "common/ran_context.h"
|
#include "common/ran_context.h"
|
||||||
|
#include "LAYER2/MAC/eNB_scheduler_fairRR.h"
|
||||||
|
|
||||||
extern RAN_CONTEXT_t RC;
|
extern RAN_CONTEXT_t RC;
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
extern uint16_t frame_cnt;
|
extern uint16_t frame_cnt;
|
||||||
|
|
||||||
#include "common/ran_context.h"
|
#include "common/ran_context.h"
|
||||||
|
#include "SCHED/sched_common.h"
|
||||||
|
|
||||||
extern RAN_CONTEXT_t RC;
|
extern RAN_CONTEXT_t RC;
|
||||||
|
|
||||||
@@ -1973,7 +1974,6 @@ int rrc_mac_remove_ue(module_id_t mod_idP, rnti_t rntiP)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
|
||||||
int i;
|
|
||||||
int j;
|
int j;
|
||||||
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
|
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
|
||||||
int UE_id = find_UE_id(mod_idP,rntiP);
|
int UE_id = find_UE_id(mod_idP,rntiP);
|
||||||
@@ -3321,7 +3321,7 @@ void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
AssertFatal(2 == 1,
|
AssertFatal(2 == 1,
|
||||||
"Illegal dl subframe %d for tdd config %d\n", *subframeP,
|
"Illegal dl subframe %d for tdd config %ld\n", *subframeP,
|
||||||
tdd_Config->subframeAssignment);
|
tdd_Config->subframeAssignment);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -3350,7 +3350,7 @@ uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, su
|
|||||||
harq_pid = (((frame_cnt*1024 + abs_frameP) * 4) - 1 + get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP))%7;//4 dl subframe in a frame
|
harq_pid = (((frame_cnt*1024 + abs_frameP) * 4) - 1 + get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP))%7;//4 dl subframe in a frame
|
||||||
if(harq_pid < 0)
|
if(harq_pid < 0)
|
||||||
harq_pid += 7;
|
harq_pid += 7;
|
||||||
LOG_D(MAC,"[frame_subframe2_dl_harq_pid] (%d,%d) calculate harq_pid ((( %d * 1024 + %d) *4) - 1 + %d)%7 = %d \n",
|
LOG_D(MAC,"[frame_subframe2_dl_harq_pid] (%d,%d) calculate harq_pid ((( %d * 1024 + %d) *4) - 1 + %d) = %d \n",
|
||||||
(abs_frameP+1024)%1024,subframeP,frame_cnt,abs_frameP,
|
(abs_frameP+1024)%1024,subframeP,frame_cnt,abs_frameP,
|
||||||
get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP),harq_pid);
|
get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP),harq_pid);
|
||||||
return harq_pid;
|
return harq_pid;
|
||||||
|
|||||||
@@ -1242,5 +1242,7 @@ uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs);
|
|||||||
|
|
||||||
int ue_slice_membership(int UE_id, int slice_id);
|
int ue_slice_membership(int UE_id, int slice_id);
|
||||||
|
|
||||||
|
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
|
||||||
|
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
|
||||||
#endif
|
#endif
|
||||||
/** @}*/
|
/** @}*/
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||||
#include "LAYER2/MAC/defs_NB_IoT.h"
|
#include "LAYER2/MAC/defs_NB_IoT.h"
|
||||||
#include "COMMON/platform_types.h"
|
#include "COMMON/platform_types.h"
|
||||||
#include "openair2/RRC/LITE/defs_NB_IoT.h"
|
#include "openair2/RRC/LTE/defs_NB_IoT.h"
|
||||||
/** \addtogroup _mac
|
/** \addtogroup _mac
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7620,7 +7620,6 @@ rrc_eNB_process_SidelinkUEInformation(
|
|||||||
{
|
{
|
||||||
SL_DestinationInfoList_r12_t *destinationInfoList;
|
SL_DestinationInfoList_r12_t *destinationInfoList;
|
||||||
int n_destinations = 0;
|
int n_destinations = 0;
|
||||||
int ue_type = 0;
|
|
||||||
int n_discoveryMessages = 0;
|
int n_discoveryMessages = 0;
|
||||||
|
|
||||||
LOG_I(RRC,
|
LOG_I(RRC,
|
||||||
@@ -7668,7 +7667,6 @@ rrc_eNB_process_SidelinkUEInformation(
|
|||||||
if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) &&(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13 != NULL)) {
|
if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) &&(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13 != NULL)) {
|
||||||
if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count > 0) {
|
if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count > 0) {
|
||||||
n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count;
|
n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count;
|
||||||
ue_type = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13;
|
|
||||||
destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t));
|
destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t));
|
||||||
for (int i=0; i< n_destinations; i++ ){
|
for (int i=0; i< n_destinations; i++ ){
|
||||||
//sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.array[i]);
|
//sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.array[i]);
|
||||||
@@ -7684,7 +7682,6 @@ rrc_eNB_process_SidelinkUEInformation(
|
|||||||
if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) && (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13 != NULL)) {
|
if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) && (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13 != NULL)) {
|
||||||
if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count > 0){
|
if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count > 0){
|
||||||
n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count;
|
n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count;
|
||||||
ue_type = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13;
|
|
||||||
destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t));
|
destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t));
|
||||||
for (int i=0; i< n_destinations; i++ ){
|
for (int i=0; i< n_destinations; i++ ){
|
||||||
//sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.array[i]);
|
//sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.array[i]);
|
||||||
|
|||||||
+126
-623
@@ -275,19 +275,20 @@ void log_getconfig(log_t *g_log) {
|
|||||||
char *glogverbo = NULL;
|
char *glogverbo = NULL;
|
||||||
int level,verbosity;
|
int level,verbosity;
|
||||||
paramdef_t logparams_defaults[] = LOG_GLOBALPARAMS_DESC;
|
paramdef_t logparams_defaults[] = LOG_GLOBALPARAMS_DESC;
|
||||||
paramdef_t logparams_level[MAX_LOG_COMPONENTS];
|
paramdef_t logparams_level[MAX_LOG_PREDEF_COMPONENTS];
|
||||||
paramdef_t logparams_verbosity[MAX_LOG_COMPONENTS];
|
paramdef_t logparams_verbosity[MAX_LOG_PREDEF_COMPONENTS];
|
||||||
paramdef_t logparams_logfile[MAX_LOG_COMPONENTS];
|
paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS];
|
||||||
|
|
||||||
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
||||||
if (ret <0) {
|
if (ret <0) {
|
||||||
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed");
|
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memset(logparams_level, 0, sizeof(paramdef_t)*MAX_LOG_COMPONENTS);
|
|
||||||
memset(logparams_verbosity,0, sizeof(paramdef_t)*MAX_LOG_COMPONENTS);
|
memset(logparams_level, 0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||||
memset(logparams_logfile, 0, sizeof(paramdef_t)*MAX_LOG_COMPONENTS);
|
memset(logparams_verbosity,0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
memset(logparams_logfile, 0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||||
|
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||||
if(g_log->log_component[i].name == NULL) {
|
if(g_log->log_component[i].name == NULL) {
|
||||||
g_log->log_component[i].name = malloc(16);
|
g_log->log_component[i].name = malloc(16);
|
||||||
sprintf((char *)g_log->log_component[i].name,"comp%i?",i);
|
sprintf((char *)g_log->log_component[i].name,"comp%i?",i);
|
||||||
@@ -308,25 +309,61 @@ void log_getconfig(log_t *g_log) {
|
|||||||
logparams_logfile[i].optname[j] = tolower(logparams_logfile[i].optname[j]);
|
logparams_logfile[i].optname[j] = tolower(logparams_logfile[i].optname[j]);
|
||||||
/* */
|
/* */
|
||||||
logparams_level[i].defstrval = gloglevel;
|
logparams_level[i].defstrval = gloglevel;
|
||||||
logparams_verbosity[i].defstrval = glogverbo;
|
logparams_verbosity[i].defstrval = glogverbo;
|
||||||
|
logparams_logfile[i].defstrval = malloc(strlen(g_log->log_component[i].name) + 16);
|
||||||
|
sprintf(logparams_logfile[i].defstrval,"/tmp/oai%s.log",g_log->log_component[i].name);
|
||||||
|
logparams_logfile[i].numelt = 0;
|
||||||
|
logparams_verbosity[i].numelt = 0;
|
||||||
|
logparams_level[i].numelt = 0;
|
||||||
logparams_level[i].type = TYPE_STRING;
|
logparams_level[i].type = TYPE_STRING;
|
||||||
logparams_verbosity[i].type = TYPE_STRING;
|
logparams_verbosity[i].type = TYPE_STRING;
|
||||||
logparams_logfile[i].type = TYPE_UINT;
|
logparams_logfile[i].type = TYPE_UINT;
|
||||||
|
|
||||||
logparams_logfile[i].paramflags = logparams_logfile[i].paramflags|PARAMFLAG_BOOL;
|
logparams_logfile[i].paramflags = logparams_logfile[i].paramflags|PARAMFLAG_BOOL;
|
||||||
}
|
}
|
||||||
config_get( logparams_level, MAX_LOG_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
config_get( logparams_level, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||||
config_get( logparams_verbosity,MAX_LOG_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
config_get( logparams_verbosity,MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||||
config_get( logparams_logfile, MAX_LOG_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
config_get( logparams_logfile, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||||
verbosity = map_str_to_int(log_verbosity_names,*(logparams_verbosity[i].strptr));
|
verbosity = map_str_to_int(log_verbosity_names,*(logparams_verbosity[i].strptr));
|
||||||
level = map_str_to_int(log_level_names, *(logparams_level[i].strptr));
|
level = map_str_to_int(log_level_names, *(logparams_level[i].strptr));
|
||||||
set_comp_log(i, level,verbosity,1);
|
set_comp_log(i, level,verbosity,1);
|
||||||
set_component_filelog(*(logparams_logfile[i].uptr));
|
set_component_filelog(*(logparams_logfile[i].uptr));
|
||||||
|
if ( logparams_logfile[i].defstrval != NULL) {
|
||||||
|
free (logparams_logfile[i].defstrval);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int register_log_component(char *name, char *fext, int compidx)
|
||||||
|
{
|
||||||
|
int computed_compidx=compidx;
|
||||||
|
|
||||||
|
if (strlen(fext) > 3) {
|
||||||
|
fext[3]=0; /* limit log file extension to 3 chars */
|
||||||
|
}
|
||||||
|
if (compidx < 0) { /* this is not a pre-defined component */
|
||||||
|
for (int i = MAX_LOG_PREDEF_COMPONENTS; i< MAX_LOG_COMPONENTS; i++) {
|
||||||
|
if (g_log->log_component[i].name == NULL) {
|
||||||
|
computed_compidx=i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (computed_compidx >= 0 && computed_compidx <MAX_LOG_COMPONENTS) {
|
||||||
|
g_log->log_component[computed_compidx].name = strdup(name);
|
||||||
|
g_log->log_component[computed_compidx].level = LOG_ALERT;
|
||||||
|
g_log->log_component[computed_compidx].flag = LOG_MED;
|
||||||
|
g_log->log_component[computed_compidx].interval = 1;
|
||||||
|
g_log->log_component[computed_compidx].fd = 0;
|
||||||
|
g_log->log_component[computed_compidx].filelog = 0;
|
||||||
|
g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/<name>.%s rounded to ^2 */
|
||||||
|
sprintf(g_log->log_component[computed_compidx].filelog_name,"/tmp/%s.%s",name,fext);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr,"{LOG} %s %d Couldn't register componemt %s\n",__FILE__,__LINE__,name);
|
||||||
|
}
|
||||||
|
return computed_compidx;
|
||||||
|
}
|
||||||
|
|
||||||
int logInit (void)
|
int logInit (void)
|
||||||
{
|
{
|
||||||
@@ -340,287 +377,54 @@ int logInit (void)
|
|||||||
|
|
||||||
|
|
||||||
#if ! defined(CN_BUILD)
|
#if ! defined(CN_BUILD)
|
||||||
g_log->log_component[PHY].name = "PHY";
|
|
||||||
g_log->log_component[PHY].level = LOG_EMERG;
|
|
||||||
g_log->log_component[PHY].flag = LOG_MED;
|
|
||||||
g_log->log_component[PHY].interval = 1;
|
|
||||||
g_log->log_component[PHY].fd = 0;
|
|
||||||
g_log->log_component[PHY].filelog = 0;
|
|
||||||
g_log->log_component[PHY].filelog_name = "/tmp/phy.log";
|
|
||||||
|
|
||||||
g_log->log_component[MAC].name = "MAC";
|
register_log_component("PHY","log",PHY);
|
||||||
g_log->log_component[MAC].level = LOG_EMERG;
|
register_log_component("MAC","log",MAC);
|
||||||
g_log->log_component[MAC].flag = LOG_MED;
|
register_log_component("OPT","log",OPT);
|
||||||
g_log->log_component[MAC].interval = 1;
|
register_log_component("RLC","log",RLC);
|
||||||
g_log->log_component[MAC].fd = 0;
|
register_log_component("PDCP","log",PDCP);
|
||||||
g_log->log_component[MAC].filelog = 0;
|
register_log_component("RRC","log",RRC);
|
||||||
g_log->log_component[MAC].filelog_name = "/tmp/mac.log";
|
register_log_component("EMU","log",EMU);
|
||||||
|
register_log_component("OMG","csv",OMG);
|
||||||
|
register_log_component("OTG","log",OTG);
|
||||||
|
register_log_component("OTG_LATENCY","dat",OTG_LATENCY);
|
||||||
|
register_log_component("OTG_LATENCY_BG","dat",OTG_LATENCY_BG);
|
||||||
|
register_log_component("OTG_GP","dat",OTG_GP);
|
||||||
|
register_log_component("OTG_GP_BG","dat",OTG_GP_BG);
|
||||||
|
register_log_component("OTG_JITTER","dat",OTG_JITTER);
|
||||||
|
register_log_component("OCG","",OCG);
|
||||||
|
register_log_component("PERF","",PERF);
|
||||||
|
register_log_component("OIP","",OIP);
|
||||||
|
register_log_component("CLI","",CLI);
|
||||||
|
register_log_component("MSC","log",MSC);
|
||||||
|
register_log_component("OCM","log",OCM);
|
||||||
|
register_log_component("HW","",HW);
|
||||||
|
register_log_component("OSA","",OSA);
|
||||||
|
register_log_component("eRAL","",RAL_ENB);
|
||||||
|
register_log_component("mRAL","",RAL_UE);
|
||||||
|
register_log_component("ENB_APP","log",ENB_APP);
|
||||||
|
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
||||||
|
register_log_component("TMR","",TMR);
|
||||||
|
register_log_component("USIM","txt",USIM);
|
||||||
|
|
||||||
g_log->log_component[OPT].name = "OPT";
|
|
||||||
g_log->log_component[OPT].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OPT].flag = LOG_MED;
|
|
||||||
g_log->log_component[OPT].interval = 1;
|
|
||||||
g_log->log_component[OPT].fd = 0;
|
|
||||||
g_log->log_component[OPT].filelog = 0;
|
|
||||||
g_log->log_component[OPT].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[RLC].name = "RLC";
|
|
||||||
g_log->log_component[RLC].level = LOG_INFO;
|
|
||||||
g_log->log_component[RLC].flag = LOG_MED;
|
|
||||||
g_log->log_component[RLC].interval = 1;
|
|
||||||
g_log->log_component[RLC].fd = 0;
|
|
||||||
g_log->log_component[RLC].filelog = 0;
|
|
||||||
g_log->log_component[RLC].filelog_name = "/tmp/rlc.log";
|
|
||||||
|
|
||||||
g_log->log_component[PDCP].name = "PDCP";
|
|
||||||
g_log->log_component[PDCP].level = LOG_INFO;
|
|
||||||
g_log->log_component[PDCP].flag = LOG_MED;
|
|
||||||
g_log->log_component[PDCP].interval = 1;
|
|
||||||
g_log->log_component[PDCP].fd = 0;
|
|
||||||
g_log->log_component[PDCP].filelog = 0;
|
|
||||||
g_log->log_component[PDCP].filelog_name = "/tmp/pdcp.log";
|
|
||||||
|
|
||||||
g_log->log_component[RRC].name = "RRC";
|
|
||||||
g_log->log_component[RRC].level = LOG_TRACE;
|
|
||||||
g_log->log_component[RRC].flag = LOG_MED;
|
|
||||||
g_log->log_component[RRC].interval = 1;
|
|
||||||
g_log->log_component[RRC].fd = 0;
|
|
||||||
g_log->log_component[RRC].filelog = 0;
|
|
||||||
g_log->log_component[RRC].filelog_name = "/tmp/rrc.log";
|
|
||||||
|
|
||||||
g_log->log_component[EMU].name = "EMU";
|
|
||||||
g_log->log_component[EMU].level = LOG_EMERG;
|
|
||||||
g_log->log_component[EMU].flag = LOG_MED;
|
|
||||||
g_log->log_component[EMU].interval = 1;
|
|
||||||
g_log->log_component[EMU].fd = 0;
|
|
||||||
g_log->log_component[EMU].filelog = 0;
|
|
||||||
g_log->log_component[EMU].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[OMG].name = "OMG";
|
|
||||||
g_log->log_component[OMG].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OMG].flag = LOG_MED;
|
|
||||||
g_log->log_component[OMG].interval = 1;
|
|
||||||
g_log->log_component[OMG].fd = 0;
|
|
||||||
g_log->log_component[OMG].filelog = 0;
|
|
||||||
g_log->log_component[OMG].filelog_name = "/tmp/omg.csv";
|
|
||||||
|
|
||||||
g_log->log_component[OTG].name = "OTG";
|
|
||||||
g_log->log_component[OTG].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OTG].flag = LOG_MED;
|
|
||||||
g_log->log_component[OTG].interval = 1;
|
|
||||||
g_log->log_component[OTG].fd = 0;
|
|
||||||
g_log->log_component[OTG].filelog = 0;
|
|
||||||
g_log->log_component[OTG].filelog_name = "/tmp/otg.log";
|
|
||||||
|
|
||||||
g_log->log_component[OTG_LATENCY].name = "OTG_LATENCY";
|
|
||||||
g_log->log_component[OTG_LATENCY].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OTG_LATENCY].flag = LOG_MED;
|
|
||||||
g_log->log_component[OTG_LATENCY].interval = 1;
|
|
||||||
g_log->log_component[OTG_LATENCY].fd = 0;
|
|
||||||
g_log->log_component[OTG_LATENCY].filelog = 0;
|
|
||||||
g_log->log_component[OTG_LATENCY].filelog_name = "/tmp/otg_latency.dat";
|
|
||||||
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].name = "OTG_LATENCY_BG";
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].flag = LOG_MED;
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].interval = 1;
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].fd = 0;
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].filelog = 0;
|
|
||||||
g_log->log_component[OTG_LATENCY_BG].filelog_name = "/tmp/otg_latency_bg.dat";
|
|
||||||
|
|
||||||
g_log->log_component[OTG_GP].name = "OTG_GP";
|
|
||||||
g_log->log_component[OTG_GP].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OTG_GP].flag = LOG_MED;
|
|
||||||
g_log->log_component[OTG_GP].interval = 1;
|
|
||||||
g_log->log_component[OTG_GP].fd = 0;
|
|
||||||
g_log->log_component[OTG_GP].filelog = 0;
|
|
||||||
g_log->log_component[OTG_GP].filelog_name = "/tmp/otg_goodput.dat";
|
|
||||||
|
|
||||||
g_log->log_component[OTG_GP_BG].name = "OTG_GP_BG";
|
|
||||||
g_log->log_component[OTG_GP_BG].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OTG_GP_BG].flag = LOG_MED;
|
|
||||||
g_log->log_component[OTG_GP_BG].interval = 1;
|
|
||||||
g_log->log_component[OTG_GP_BG].fd = 0;
|
|
||||||
g_log->log_component[OTG_GP_BG].filelog = 0;
|
|
||||||
g_log->log_component[OTG_GP_BG].filelog_name = "/tmp/otg_goodput_bg.dat";
|
|
||||||
|
|
||||||
g_log->log_component[OTG_JITTER].name = "OTG_JITTER";
|
|
||||||
g_log->log_component[OTG_JITTER].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OTG_JITTER].flag = LOG_MED;
|
|
||||||
g_log->log_component[OTG_JITTER].interval = 1;
|
|
||||||
g_log->log_component[OTG_JITTER].fd = 0;
|
|
||||||
g_log->log_component[OTG_JITTER].filelog = 0;
|
|
||||||
g_log->log_component[OTG_JITTER].filelog_name = "/tmp/otg_jitter.dat";
|
|
||||||
|
|
||||||
g_log->log_component[OCG].name = "OCG";
|
|
||||||
g_log->log_component[OCG].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OCG].flag = LOG_MED;
|
|
||||||
g_log->log_component[OCG].interval = 1;
|
|
||||||
g_log->log_component[OCG].fd = 0;
|
|
||||||
g_log->log_component[OCG].filelog = 0;
|
|
||||||
g_log->log_component[OCG].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[PERF].name = "PERF";
|
|
||||||
g_log->log_component[PERF].level = LOG_EMERG;
|
|
||||||
g_log->log_component[PERF].flag = LOG_MED;
|
|
||||||
g_log->log_component[PERF].interval = 1;
|
|
||||||
g_log->log_component[PERF].fd = 0;
|
|
||||||
g_log->log_component[PERF].filelog = 0;
|
|
||||||
g_log->log_component[PERF].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[OIP].name = "OIP";
|
|
||||||
g_log->log_component[OIP].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OIP].flag = LOG_MED;
|
|
||||||
g_log->log_component[OIP].interval = 1;
|
|
||||||
g_log->log_component[OIP].fd = 0;
|
|
||||||
g_log->log_component[OIP].filelog = 0;
|
|
||||||
g_log->log_component[OIP].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[CLI].name = "CLI";
|
|
||||||
g_log->log_component[CLI].level = LOG_EMERG;
|
|
||||||
g_log->log_component[CLI].flag = LOG_MED;
|
|
||||||
g_log->log_component[CLI].interval = 1;
|
|
||||||
g_log->log_component[CLI].fd = 0;
|
|
||||||
g_log->log_component[CLI].filelog = 0;
|
|
||||||
g_log->log_component[CLI].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[MSC].name = "MSC";
|
|
||||||
g_log->log_component[MSC].level = LOG_EMERG;
|
|
||||||
g_log->log_component[MSC].flag = LOG_MED;
|
|
||||||
g_log->log_component[MSC].interval = 1;
|
|
||||||
g_log->log_component[MSC].fd = 0;
|
|
||||||
g_log->log_component[MSC].filelog = 0;
|
|
||||||
g_log->log_component[MSC].filelog_name = "/tmp/msc.log";
|
|
||||||
|
|
||||||
g_log->log_component[OCM].name = "OCM";
|
|
||||||
g_log->log_component[OCM].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OCM].flag = LOG_MED;
|
|
||||||
g_log->log_component[OCM].interval = 1;
|
|
||||||
g_log->log_component[OCM].fd = 0;
|
|
||||||
g_log->log_component[OCM].filelog = 0;
|
|
||||||
g_log->log_component[OCM].filelog_name = "/tmp/ocm.log";
|
|
||||||
|
|
||||||
g_log->log_component[HW].name = "HW";
|
|
||||||
g_log->log_component[HW].level = LOG_EMERG;
|
|
||||||
g_log->log_component[HW].flag = LOG_MED;
|
|
||||||
g_log->log_component[HW].interval = 1;
|
|
||||||
g_log->log_component[HW].fd = 0;
|
|
||||||
g_log->log_component[HW].filelog = 0;
|
|
||||||
g_log->log_component[HW].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[OSA].name = "OSA";
|
|
||||||
g_log->log_component[OSA].level = LOG_EMERG;
|
|
||||||
g_log->log_component[OSA].flag = LOG_MED;
|
|
||||||
g_log->log_component[OSA].interval = 1;
|
|
||||||
g_log->log_component[OSA].fd = 0;
|
|
||||||
g_log->log_component[OSA].filelog = 0;
|
|
||||||
g_log->log_component[OSA].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[RAL_ENB].name = "eRAL";
|
|
||||||
g_log->log_component[RAL_ENB].level = LOG_EMERG;
|
|
||||||
g_log->log_component[RAL_ENB].flag = LOG_MED;
|
|
||||||
g_log->log_component[RAL_ENB].interval = 1;
|
|
||||||
g_log->log_component[RAL_ENB].fd = 0;
|
|
||||||
g_log->log_component[RAL_ENB].filelog = 0;
|
|
||||||
g_log->log_component[RAL_ENB].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[RAL_UE].name = "mRAL";
|
|
||||||
g_log->log_component[RAL_UE].level = LOG_EMERG;
|
|
||||||
g_log->log_component[RAL_UE].flag = LOG_MED;
|
|
||||||
g_log->log_component[RAL_UE].interval = 1;
|
|
||||||
g_log->log_component[RAL_UE].fd = 0;
|
|
||||||
g_log->log_component[RAL_UE].filelog = 0;
|
|
||||||
g_log->log_component[RAL_UE].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[ENB_APP].name = "ENB_APP";
|
|
||||||
g_log->log_component[ENB_APP].level = LOG_EMERG;
|
|
||||||
g_log->log_component[ENB_APP].flag = LOG_MED;
|
|
||||||
g_log->log_component[ENB_APP].interval = 1;
|
|
||||||
g_log->log_component[ENB_APP].fd = 0;
|
|
||||||
g_log->log_component[ENB_APP].filelog = 0;
|
|
||||||
g_log->log_component[ENB_APP].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].name = "FLEXRAN_AGENT";
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].level = LOG_DEBUG;
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].flag = LOG_MED;
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].interval = 1;
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].fd = 0;
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].filelog = 0;
|
|
||||||
g_log->log_component[FLEXRAN_AGENT].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[TMR].name = "TMR";
|
|
||||||
g_log->log_component[TMR].level = LOG_EMERG;
|
|
||||||
g_log->log_component[TMR].flag = LOG_MED;
|
|
||||||
g_log->log_component[TMR].interval = 1;
|
|
||||||
g_log->log_component[TMR].fd = 0;
|
|
||||||
g_log->log_component[TMR].filelog = 0;
|
|
||||||
g_log->log_component[TMR].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[USIM].name = "USIM";
|
|
||||||
g_log->log_component[USIM].level = LOG_DEBUG;
|
|
||||||
g_log->log_component[USIM].flag = LOG_NONE;
|
|
||||||
g_log->log_component[USIM].interval = 1;
|
|
||||||
g_log->log_component[USIM].fd = 0;
|
|
||||||
g_log->log_component[USIM].filelog = 0;
|
|
||||||
g_log->log_component[USIM].filelog_name = "/tmp/usim.txt";
|
|
||||||
|
|
||||||
/* following log component are used for the localization*/
|
/* following log component are used for the localization*/
|
||||||
g_log->log_component[LOCALIZE].name = "LOCALIZE";
|
register_log_component("LOCALIZE","log",LOCALIZE);
|
||||||
g_log->log_component[LOCALIZE].level = LOG_EMERG;
|
|
||||||
g_log->log_component[LOCALIZE].flag = LOG_MED;
|
|
||||||
g_log->log_component[LOCALIZE].interval = 1;
|
|
||||||
g_log->log_component[LOCALIZE].fd = 0;
|
|
||||||
g_log->log_component[LOCALIZE].filelog = 0;
|
|
||||||
g_log->log_component[LOCALIZE].filelog_name = "/tmp/localize.log";
|
|
||||||
#endif // ! defined(CN_BUILD)
|
#endif // ! defined(CN_BUILD)
|
||||||
|
register_log_component("NAS","log",NAS);
|
||||||
g_log->log_component[NAS].name = "NAS";
|
register_log_component("UDP","",UDP_);
|
||||||
g_log->log_component[NAS].level = LOG_TRACE;
|
|
||||||
g_log->log_component[NAS].flag = LOG_MED;
|
|
||||||
g_log->log_component[NAS].interval = 1;
|
|
||||||
g_log->log_component[NAS].fd = 0;
|
|
||||||
g_log->log_component[NAS].filelog = 0;
|
|
||||||
g_log->log_component[NAS].filelog_name = "/tmp/nas.log";
|
|
||||||
|
|
||||||
g_log->log_component[UDP_].name = "UDP";
|
|
||||||
g_log->log_component[UDP_].level = LOG_EMERG;
|
|
||||||
g_log->log_component[UDP_].flag = LOG_FULL;
|
g_log->log_component[UDP_].flag = LOG_FULL;
|
||||||
g_log->log_component[UDP_].interval = 1;
|
|
||||||
g_log->log_component[UDP_].fd = 0;
|
|
||||||
g_log->log_component[UDP_].filelog = 0;
|
|
||||||
g_log->log_component[UDP_].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[GTPU].name = "GTPV1U";
|
register_log_component("GTPV1U","",GTPU);
|
||||||
g_log->log_component[GTPU].level = LOG_EMERG;
|
|
||||||
g_log->log_component[GTPU].flag = LOG_FULL;
|
g_log->log_component[GTPU].flag = LOG_FULL;
|
||||||
g_log->log_component[GTPU].interval = 1;
|
|
||||||
g_log->log_component[GTPU].fd = 0;
|
|
||||||
g_log->log_component[GTPU].filelog = 0;
|
|
||||||
g_log->log_component[GTPU].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[S1AP].name = "S1AP";
|
register_log_component("S1AP","",S1AP);
|
||||||
g_log->log_component[S1AP].level = LOG_EMERG;
|
|
||||||
g_log->log_component[S1AP].flag = LOG_FULL;
|
g_log->log_component[S1AP].flag = LOG_FULL;
|
||||||
g_log->log_component[S1AP].interval = 1;
|
|
||||||
g_log->log_component[S1AP].fd = 0;
|
|
||||||
g_log->log_component[S1AP].filelog = 0;
|
|
||||||
g_log->log_component[S1AP].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[SCTP].name = "SCTP";
|
register_log_component("SCTP","",SCTP);
|
||||||
g_log->log_component[SCTP].level = LOG_EMERG;
|
register_log_component("RRH","",RRH);
|
||||||
g_log->log_component[SCTP].flag = LOG_MED;
|
|
||||||
g_log->log_component[SCTP].interval = 1;
|
|
||||||
g_log->log_component[SCTP].fd = 0;
|
|
||||||
g_log->log_component[SCTP].filelog = 0;
|
|
||||||
g_log->log_component[SCTP].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->log_component[RRH].name = "RRH";
|
|
||||||
g_log->log_component[RRH].level = LOG_EMERG;
|
|
||||||
g_log->log_component[RRH].flag = LOG_MED;
|
|
||||||
g_log->log_component[RRH].interval = 1;
|
|
||||||
g_log->log_component[RRH].fd = 0;
|
|
||||||
g_log->log_component[RRH].filelog = 0;
|
|
||||||
g_log->log_component[RRH].filelog_name = "";
|
|
||||||
|
|
||||||
g_log->level2string[LOG_EMERG] = "G"; //EMERG
|
g_log->level2string[LOG_EMERG] = "G"; //EMERG
|
||||||
g_log->level2string[LOG_ALERT] = "A"; // ALERT
|
g_log->level2string[LOG_ALERT] = "A"; // ALERT
|
||||||
@@ -666,16 +470,20 @@ int logInit (void)
|
|||||||
O_WRONLY | O_CREAT | O_APPEND, 0666);
|
O_WRONLY | O_CREAT | O_APPEND, 0666);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// set all unused component items to 0, they are for non predefined components
|
||||||
|
for (i=MAX_LOG_PREDEF_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||||
|
memset(&(g_log->log_component[i]),0,sizeof(log_component_t));
|
||||||
|
}
|
||||||
printf("log init done\n");
|
printf("log init done\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int oai_exit;
|
extern int oai_exit;
|
||||||
void * log_mem_write(void)
|
void log_mem_write(void)
|
||||||
{
|
{
|
||||||
int *fp;
|
int fp;
|
||||||
char f_name[1024];
|
char f_name[1024];
|
||||||
struct timespec slp_tm;
|
struct timespec slp_tm;
|
||||||
slp_tm.tv_sec = 0;
|
slp_tm.tv_sec = 0;
|
||||||
@@ -697,7 +505,11 @@ void * log_mem_write(void)
|
|||||||
}
|
}
|
||||||
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
|
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
|
||||||
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
|
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
|
||||||
write(fp, log_mem_d[log_mem_write_side].buf_p, log_mem_d[log_mem_write_side].buf_index);
|
int ret = write(fp, log_mem_d[log_mem_write_side].buf_p, log_mem_d[log_mem_write_side].buf_index);
|
||||||
|
if ( ret < 0) {
|
||||||
|
fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
close(fp);
|
close(fp);
|
||||||
log_mem_file_cnt++;
|
log_mem_file_cnt++;
|
||||||
log_mem_d[log_mem_write_side].buf_index=0;
|
log_mem_d[log_mem_write_side].buf_index=0;
|
||||||
@@ -724,9 +536,9 @@ int logInit_log_mem (void)
|
|||||||
if ((pthread_mutex_init (&log_mem_lock, NULL) != 0)
|
if ((pthread_mutex_init (&log_mem_lock, NULL) != 0)
|
||||||
|| (pthread_cond_init (&log_mem_notify, NULL) != 0)) {
|
|| (pthread_cond_init (&log_mem_notify, NULL) != 0)) {
|
||||||
log_mem_d[1].enable_flag=0;
|
log_mem_d[1].enable_flag=0;
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
pthread_create(&log_mem_thread, NULL, log_mem_write, (void*)NULL);
|
pthread_create(&log_mem_thread, NULL, (void *(*)(void *))log_mem_write, (void*)NULL);
|
||||||
}else{
|
}else{
|
||||||
printf("log-mem single!!!\n");
|
printf("log-mem single!!!\n");
|
||||||
log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE);
|
log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE);
|
||||||
@@ -747,7 +559,7 @@ int logInit_log_mem (void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nfapi_log(char *file, char *func, int line, int comp, int level, const char* format, va_list args)
|
void nfapi_log(const char *file, const char *func, int line, int comp, int level, const char* format,va_list args)
|
||||||
{
|
{
|
||||||
//logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args)
|
//logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args)
|
||||||
int len = 0;
|
int len = 0;
|
||||||
@@ -764,6 +576,7 @@ void nfapi_log(char *file, char *func, int line, int comp, int level, const char
|
|||||||
/* for no gcc warnings */
|
/* for no gcc warnings */
|
||||||
(void)log_start;
|
(void)log_start;
|
||||||
(void)log_end;
|
(void)log_end;
|
||||||
|
|
||||||
|
|
||||||
c = &g_log->log_component[comp];
|
c = &g_log->log_component[comp];
|
||||||
|
|
||||||
@@ -857,20 +670,8 @@ void nfapi_log(char *file, char *func, int line, int comp, int level, const char
|
|||||||
|
|
||||||
// OAI printf compatibility
|
// OAI printf compatibility
|
||||||
if ((g_log->onlinelog == 1) && (level != LOG_FILE))
|
if ((g_log->onlinelog == 1) && (level != LOG_FILE))
|
||||||
#ifdef RTAI
|
fwrite(log_buffer, len, 1, stdout);
|
||||||
if (len > MAX_LOG_TOTAL) {
|
|
||||||
rt_printk ("[OPENAIR] FIFO_PRINTF WROTE OUTSIDE ITS MEMORY BOUNDARY : ERRORS WILL OCCUR\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (len > 0) {
|
|
||||||
rtf_put (FIFO_PRINTF_NO, log_buffer, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
fwrite(log_buffer, len, 1, stdout);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef RTAI
|
|
||||||
|
|
||||||
if (g_log->syslog) {
|
if (g_log->syslog) {
|
||||||
syslog(g_log->level, "%s", log_buffer);
|
syslog(g_log->level, "%s", log_buffer);
|
||||||
@@ -888,14 +689,6 @@ void nfapi_log(char *file, char *func, int line, int comp, int level, const char
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
// online print messges
|
|
||||||
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
|
|
||||||
printf(log_buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
|
|
||||||
@@ -1039,6 +832,13 @@ void nfapi_log(char *file, char *func, int line, int comp, int level, const char
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... )
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, format);
|
||||||
|
nfapi_log(file,func,line,comp,level, format,args);
|
||||||
|
}
|
||||||
|
|
||||||
//log record: add to a list
|
//log record: add to a list
|
||||||
void logRecord(const char *file, const char *func, int line, int comp,
|
void logRecord(const char *file, const char *func, int line, int comp,
|
||||||
int level, const char *format, ...)
|
int level, const char *format, ...)
|
||||||
@@ -1238,315 +1038,7 @@ void *log_thread_function(void *list)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//log record, format, and print: executed in the main thread (mt)
|
|
||||||
void logRecord_mt(const char *file, const char *func, int line, int comp,
|
|
||||||
int level, const char *format, ...)
|
|
||||||
{
|
|
||||||
int len = 0;
|
|
||||||
va_list args;
|
|
||||||
log_component_t *c;
|
|
||||||
char *log_start;
|
|
||||||
char *log_end;
|
|
||||||
/* The main difference with the version above is the use of this local log_buffer.
|
|
||||||
* The other difference is the return value of snprintf which was not used
|
|
||||||
* correctly. It was not a big problem because in practice MAX_LOG_TOTAL is
|
|
||||||
* big enough so that the buffer is never full.
|
|
||||||
*/
|
|
||||||
char log_buffer[MAX_LOG_TOTAL];
|
|
||||||
int temp_index;
|
|
||||||
|
|
||||||
/* for no gcc warnings */
|
|
||||||
(void)log_start;
|
|
||||||
(void)log_end;
|
|
||||||
|
|
||||||
c = &g_log->log_component[comp];
|
|
||||||
|
|
||||||
// do not apply filtering for LOG_F
|
|
||||||
// only log messages which are enabled and are below the global log level and component's level threshold
|
|
||||||
if ((level != LOG_FILE) && ((level > c->level) || (level > g_log->level))) {
|
|
||||||
/* if ((level != LOG_FILE) &&
|
|
||||||
((level > c->level) ||
|
|
||||||
(level > g_log->level) ||
|
|
||||||
( c->level > g_log->level))) {
|
|
||||||
*/
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
|
|
||||||
VCD_FUNCTION_IN);
|
|
||||||
|
|
||||||
va_start(args, format);
|
|
||||||
|
|
||||||
// adjust syslog level for TRACE messages
|
|
||||||
if (g_log->syslog) {
|
|
||||||
if (g_log->level > LOG_DEBUG) {
|
|
||||||
g_log->level = LOG_DEBUG;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// make sure that for log trace the extra info is only printed once, reset when the level changes
|
|
||||||
if ((level == LOG_FILE) || (c->flag == LOG_NONE) || (level == LOG_TRACE)) {
|
|
||||||
log_start = log_buffer;
|
|
||||||
len = vsnprintf(log_buffer, MAX_LOG_TOTAL, format, args);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
log_end = log_buffer + len;
|
|
||||||
} else {
|
|
||||||
if ( (g_log->flag & FLAG_COLOR) || (c->flag & FLAG_COLOR) ) {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s",
|
|
||||||
log_level_highlight_start[level]);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
log_start = log_buffer + len;
|
|
||||||
|
|
||||||
if ( (g_log->flag & FLAG_COMP) || (c->flag & FLAG_COMP) ) {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]",
|
|
||||||
g_log->log_component[comp].name);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( (g_log->flag & FLAG_LEVEL) || (c->flag & FLAG_LEVEL) ) {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]",
|
|
||||||
g_log->level2string[level]);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( (g_log->flag & FLAG_THREAD) || (c->flag & FLAG_THREAD) ) {
|
|
||||||
# define THREAD_NAME_LEN 128
|
|
||||||
char threadname[THREAD_NAME_LEN];
|
|
||||||
if (pthread_getname_np(pthread_self(), threadname, THREAD_NAME_LEN) != 0)
|
|
||||||
{
|
|
||||||
perror("pthread_getname_np : ");
|
|
||||||
} else {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", threadname);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
# undef THREAD_NAME_LEN
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( (g_log->flag & FLAG_FUNCT) || (c->flag & FLAG_FUNCT) ) {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s] ",
|
|
||||||
func);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( (g_log->flag & FLAG_FILE_LINE) || (c->flag & FLAG_FILE_LINE) ) {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s:%d]",
|
|
||||||
file, line);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
len += vsnprintf(&log_buffer[len], MAX_LOG_TOTAL - len, format, args);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
log_end = log_buffer + len;
|
|
||||||
|
|
||||||
if ( (g_log->flag & FLAG_COLOR) || (c->flag & FLAG_COLOR) ) {
|
|
||||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s",
|
|
||||||
log_level_highlight_end[level]);
|
|
||||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
// OAI printf compatibility
|
|
||||||
if ((g_log->onlinelog == 1) && (level != LOG_FILE))
|
|
||||||
if(log_mem_flag==1){
|
|
||||||
if(log_mem_d[log_mem_side].enable_flag==1){
|
|
||||||
temp_index=log_mem_d[log_mem_side].buf_index;
|
|
||||||
if(temp_index+len+1 < LOG_MEM_SIZE){
|
|
||||||
log_mem_d[log_mem_side].buf_index+=len;
|
|
||||||
memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len);
|
|
||||||
}else{
|
|
||||||
log_mem_d[log_mem_side].enable_flag=0;
|
|
||||||
if(log_mem_d[1-log_mem_side].enable_flag==1){
|
|
||||||
temp_index=log_mem_d[1-log_mem_side].buf_index;
|
|
||||||
if(temp_index+len+1 < LOG_MEM_SIZE){
|
|
||||||
log_mem_d[1-log_mem_side].buf_index+=len;
|
|
||||||
log_mem_side=1-log_mem_side;
|
|
||||||
memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len);
|
|
||||||
/* write down !*/
|
|
||||||
if (pthread_mutex_lock(&log_mem_lock) != 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(log_mem_write_flag==0){
|
|
||||||
log_mem_write_side=1-log_mem_side;
|
|
||||||
if(pthread_cond_signal(&log_mem_notify) != 0) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(pthread_mutex_unlock(&log_mem_lock) != 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
log_mem_d[1-log_mem_side].enable_flag=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
fwrite(log_buffer, len, 1, stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_log->syslog) {
|
|
||||||
syslog(g_log->level, "%s", log_buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_log->filelog) {
|
|
||||||
if (write(gfd, log_buffer, len) < len) {
|
|
||||||
// TODO assert ?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
|
|
||||||
if (write(g_log->log_component[comp].fd, log_buffer, len) < len) {
|
|
||||||
// TODO assert ?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
|
||||||
|
|
||||||
if (level <= LOG_DEBUG) {
|
|
||||||
task_id_t origin_task_id = TASK_UNKNOWN;
|
|
||||||
MessagesIds messages_id;
|
|
||||||
MessageDef *message_p;
|
|
||||||
size_t message_string_size;
|
|
||||||
char *message_msg_p;
|
|
||||||
|
|
||||||
message_string_size = log_end - log_start;
|
|
||||||
|
|
||||||
#if !defined(DISABLE_ITTI_DETECT_SUB_TASK_ID)
|
|
||||||
|
|
||||||
/* Try to identify sub task ID from log information (comp, log_instance_type) */
|
|
||||||
switch (comp) {
|
|
||||||
case PHY:
|
|
||||||
switch (log_instance_type) {
|
|
||||||
case LOG_INSTANCE_ENB:
|
|
||||||
origin_task_id = TASK_PHY_ENB;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_INSTANCE_UE:
|
|
||||||
origin_task_id = TASK_PHY_UE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAC:
|
|
||||||
switch (log_instance_type) {
|
|
||||||
case LOG_INSTANCE_ENB:
|
|
||||||
origin_task_id = TASK_MAC_ENB;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_INSTANCE_UE:
|
|
||||||
origin_task_id = TASK_MAC_UE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RLC:
|
|
||||||
switch (log_instance_type) {
|
|
||||||
case LOG_INSTANCE_ENB:
|
|
||||||
origin_task_id = TASK_RLC_ENB;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_INSTANCE_UE:
|
|
||||||
origin_task_id = TASK_RLC_UE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PDCP:
|
|
||||||
switch (log_instance_type) {
|
|
||||||
case LOG_INSTANCE_ENB:
|
|
||||||
origin_task_id = TASK_PDCP_ENB;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_INSTANCE_UE:
|
|
||||||
origin_task_id = TASK_PDCP_UE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (level) {
|
|
||||||
case LOG_EMERG:
|
|
||||||
case LOG_ALERT:
|
|
||||||
case LOG_CRIT:
|
|
||||||
case LOG_ERR:
|
|
||||||
messages_id = ERROR_LOG;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_WARNING:
|
|
||||||
messages_id = WARNING_LOG;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_NOTICE:
|
|
||||||
messages_id = NOTICE_LOG;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_INFO:
|
|
||||||
messages_id = INFO_LOG;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
messages_id = DEBUG_LOG;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
message_p = itti_alloc_new_message_sized(origin_task_id, messages_id, message_string_size);
|
|
||||||
|
|
||||||
switch (level) {
|
|
||||||
case LOG_EMERG:
|
|
||||||
case LOG_ALERT:
|
|
||||||
case LOG_CRIT:
|
|
||||||
case LOG_ERR:
|
|
||||||
message_msg_p = (char *) &message_p->ittiMsg.error_log;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_WARNING:
|
|
||||||
message_msg_p = (char *) &message_p->ittiMsg.warning_log;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_NOTICE:
|
|
||||||
message_msg_p = (char *) &message_p->ittiMsg.notice_log;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOG_INFO:
|
|
||||||
message_msg_p = (char *) &message_p->ittiMsg.info_log;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
message_msg_p = (char *) &message_p->ittiMsg.debug_log;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(message_msg_p, log_start, message_string_size);
|
|
||||||
|
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
|
|
||||||
VCD_FUNCTION_OUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
int set_log(int component, int level, int interval)
|
int set_log(int component, int level, int interval)
|
||||||
{
|
{
|
||||||
@@ -1706,8 +1198,7 @@ void log_set_instance_type (log_instance_type_t instance)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void output_log_mem(void){
|
void output_log_mem(void){
|
||||||
int cnt,cnt2;
|
int fp;
|
||||||
int *fp;
|
|
||||||
char f_name[1024];
|
char f_name[1024];
|
||||||
|
|
||||||
if(log_mem_flag==1){
|
if(log_mem_flag==1){
|
||||||
@@ -1720,18 +1211,30 @@ void output_log_mem(void){
|
|||||||
if(log_mem_multi==1){
|
if(log_mem_multi==1){
|
||||||
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
|
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
|
||||||
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
|
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
|
||||||
write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index);
|
int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index);
|
||||||
|
if ( ret < 0) {
|
||||||
|
fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
close(fp);
|
close(fp);
|
||||||
free(log_mem_d[0].buf_p);
|
free(log_mem_d[0].buf_p);
|
||||||
|
|
||||||
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
|
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
|
||||||
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
|
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
|
||||||
write(fp, log_mem_d[1].buf_p, log_mem_d[1].buf_index);
|
ret = write(fp, log_mem_d[1].buf_p, log_mem_d[1].buf_index);
|
||||||
|
if ( ret < 0) {
|
||||||
|
fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
close(fp);
|
close(fp);
|
||||||
free(log_mem_d[1].buf_p);
|
free(log_mem_d[1].buf_p);
|
||||||
}else{
|
}else{
|
||||||
fp=open(log_mem_filename, O_WRONLY | O_CREAT, 0666);
|
fp=open(log_mem_filename, O_WRONLY | O_CREAT, 0666);
|
||||||
write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index);
|
int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index);
|
||||||
|
if ( ret < 0) {
|
||||||
|
fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,log_mem_filename);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
close(fp);
|
close(fp);
|
||||||
free(log_mem_d[0].buf_p);
|
free(log_mem_d[0].buf_p);
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-23
@@ -186,10 +186,13 @@ typedef enum {
|
|||||||
LOCALIZE,
|
LOCALIZE,
|
||||||
RRH,
|
RRH,
|
||||||
X2AP,
|
X2AP,
|
||||||
MAX_LOG_COMPONENTS,
|
LOADER,
|
||||||
|
MAX_LOG_PREDEF_COMPONENTS,
|
||||||
}
|
}
|
||||||
comp_name_t;
|
comp_name_t;
|
||||||
|
|
||||||
|
#define MAX_LOG_DYNALLOC_COMPONENTS 20
|
||||||
|
#define MAX_LOG_COMPONENTS (MAX_LOG_PREDEF_COMPONENTS + MAX_LOG_DYNALLOC_COMPONENTS)
|
||||||
//#define msg printf
|
//#define msg printf
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -231,6 +234,7 @@ typedef struct {
|
|||||||
int syslog;
|
int syslog;
|
||||||
int filelog;
|
int filelog;
|
||||||
char* filelog_name;
|
char* filelog_name;
|
||||||
|
int async; // asynchronous mode, via dedicated log thread + log buffer
|
||||||
} log_t;
|
} log_t;
|
||||||
|
|
||||||
typedef struct LOG_params {
|
typedef struct LOG_params {
|
||||||
@@ -289,16 +293,15 @@ char *map_int_to_str(mapping *map, int val);
|
|||||||
void logClean (void);
|
void logClean (void);
|
||||||
int is_newline( char *str, int size);
|
int is_newline( char *str, int size);
|
||||||
void *log_thread_function(void * list);
|
void *log_thread_function(void * list);
|
||||||
|
int register_log_component(char *name, char *fext, int compidx);
|
||||||
/** @defgroup _logIt logIt function
|
/** @defgroup _logIt logIt function
|
||||||
* @ingroup _macro
|
* @ingroup _macro
|
||||||
* @brief Macro used to call tr_log_full_ex with file, function and line information
|
* @brief Macro used to call tr_log_full_ex with file, function and line information
|
||||||
* @{*/
|
* @{*/
|
||||||
#ifdef LOG_NO_THREAD
|
|
||||||
#define logIt(component, level, format, args...) (g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
|
#define logIt(component, level, format, args...) (g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
|
||||||
#else //default
|
#define logItS(component, level, format, args...) (g_log->log_component[component].interval?logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
|
||||||
#define logIt(component, level, format, args...) (g_log->log_component[component].interval?logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
|
|
||||||
#endif
|
|
||||||
/* @}*/
|
/* @}*/
|
||||||
|
|
||||||
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
|
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
|
||||||
@@ -323,15 +326,16 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
|||||||
#define LOG_CONFIG_LEVEL_FORMAT "%s_log_level"
|
#define LOG_CONFIG_LEVEL_FORMAT "%s_log_level"
|
||||||
#define LOG_CONFIG_VERBOSITY_FORMAT "%s_log_verbosity"
|
#define LOG_CONFIG_VERBOSITY_FORMAT "%s_log_verbosity"
|
||||||
#define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile"
|
#define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile"
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* LOG globalconfiguration parameters */
|
/* LOG globalconfiguration parameters */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname help paramflags XXXptr defXXXval type numelt */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
#define LOG_GLOBALPARAMS_DESC { \
|
#define LOG_GLOBALPARAMS_DESC { \
|
||||||
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, NULL, 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
|
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, NULL, 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
|
||||||
{LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL, 0, strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name, TYPE_STRING, 0}, \
|
{LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL, 0, strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name, TYPE_STRING, 0}, \
|
||||||
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, NULL, 0, iptr:&(g_log->onlinelog), defintval:1, TYPE_INT, 0, }, \
|
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, NULL, 0, iptr:&(g_log->onlinelog), defintval:1, TYPE_INT, 0}, \
|
||||||
{LOG_CONFIG_STRING_GLOBAL_LOG_INFILE, NULL, 0, iptr:&(g_log->filelog), defintval:0, TYPE_INT, 0, }, \
|
{LOG_CONFIG_STRING_GLOBAL_LOG_INFILE, NULL, 0, iptr:&(g_log->filelog), defintval:0, TYPE_INT, 0}, \
|
||||||
}
|
}
|
||||||
/*----------------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------------*/
|
||||||
/** @defgroup _debugging debugging macros
|
/** @defgroup _debugging debugging macros
|
||||||
@@ -339,20 +343,20 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
|||||||
* @brief Macro used to call logIt function with different message levels
|
* @brief Macro used to call logIt function with different message levels
|
||||||
* @{*/
|
* @{*/
|
||||||
|
|
||||||
// debugging macros
|
// debugging macros(g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
|
||||||
# if T_TRACER
|
# if T_TRACER
|
||||||
# include "T.h"
|
# include "T.h"
|
||||||
# define LOG_I(c, x...) T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x))
|
# define LOG_I(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_W(c, x...) T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x))
|
# define LOG_W(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_E(c, x...) T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x))
|
# define LOG_E(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_D(c, x...) T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x))
|
# define LOG_D(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_T(c, x...) T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x))
|
# define LOG_T(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
||||||
# define LOG_G(c, x...) /* */
|
# define LOG_G(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_EMERG, x) ;}} while (0) /* */
|
||||||
# define LOG_A(c, x...) /* */
|
# define LOG_A(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_ALERT, x) ;}} while (0) /* */
|
||||||
# define LOG_C(c, x...) /* */
|
# define LOG_C(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_CRIT, x) ;}} while (0) /* */
|
||||||
# define LOG_N(c, x...) /* */
|
# define LOG_N(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_NOTICE, x) ;}} while (0) /* */
|
||||||
# define LOG_F(c, x...) /* */
|
# define LOG_F(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_FILE, x) ;}} while (0) /* */
|
||||||
# define LOG_M(file, vector, data, len, dec, format) /* */
|
# define LOG_M(file, vector, data, len, dec, format) write_file_matlab(file, vector, data, len, dec, format)/* */
|
||||||
# else /* T_TRACER */
|
# else /* T_TRACER */
|
||||||
# if DISABLE_LOG_X
|
# if DISABLE_LOG_X
|
||||||
# define LOG_I(c, x...) /* */
|
# define LOG_I(c, x...) /* */
|
||||||
|
|||||||
@@ -266,8 +266,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
|||||||
TICK_TO_US(eNB->phy_proc_tx),
|
TICK_TO_US(eNB->phy_proc_tx),
|
||||||
TICK_TO_US(eNB->phy_proc_rx),
|
TICK_TO_US(eNB->phy_proc_rx),
|
||||||
TICK_TO_US(eNB->rx_prach),
|
TICK_TO_US(eNB->rx_prach),
|
||||||
TICK_TO_US(eNB->ofdm_mod_stats),
|
TICK_TO_US(eNB->ofdm_mod_stats)
|
||||||
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now);
|
);
|
||||||
LOG_D(PHY,
|
LOG_D(PHY,
|
||||||
"dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ",
|
"dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ",
|
||||||
TICK_TO_US(eNB->dlsch_encoding_stats),
|
TICK_TO_US(eNB->dlsch_encoding_stats),
|
||||||
|
|||||||
@@ -912,6 +912,9 @@ void tx_rf(RU_t *ru) {
|
|||||||
flags=2; // start burst
|
flags=2; // start burst
|
||||||
late_control=STATE_BURST_NORMAL;
|
late_control=STATE_BURST_NORMAL;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
LOG_D(PHY,"[TXPATH] RU %d late_control %d not implemented\n",ru->idx, late_control);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* add fail safe for late command end */
|
/* add fail safe for late command end */
|
||||||
@@ -1585,9 +1588,6 @@ static void* ru_thread( void* param ) {
|
|||||||
dlsch_ue_select_tbl_in_use = 1;
|
dlsch_ue_select_tbl_in_use = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct timespec time_req, time_rem;
|
|
||||||
time_req.tv_sec = 0;
|
|
||||||
time_req.tv_nsec = 10000;
|
|
||||||
|
|
||||||
// set default return value
|
// set default return value
|
||||||
thread_top_init("ru_thread",1,400000,500000,500000);
|
thread_top_init("ru_thread",1,400000,500000,500000);
|
||||||
@@ -1796,6 +1796,10 @@ static void* ru_thread( void* param ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
struct timespec time_req, time_rem;
|
||||||
|
time_req.tv_sec = 0;
|
||||||
|
time_req.tv_nsec = 10000;
|
||||||
|
|
||||||
while((!oai_exit)&&(phy_tx_end == 0)){
|
while((!oai_exit)&&(phy_tx_end == 0)){
|
||||||
nanosleep(&time_req,&time_rem);
|
nanosleep(&time_req,&time_rem);
|
||||||
continue;
|
continue;
|
||||||
@@ -2766,7 +2770,7 @@ void init_RU(char *rf_config_file) {
|
|||||||
|
|
||||||
|
|
||||||
void stop_ru(RU_t *ru) {
|
void stop_ru(RU_t *ru) {
|
||||||
int *status;
|
|
||||||
printf("Stopping RU %p processing threads\n",(void*)ru);
|
printf("Stopping RU %p processing threads\n",(void*)ru);
|
||||||
#if defined(PRE_SCD_THREAD)
|
#if defined(PRE_SCD_THREAD)
|
||||||
if(ru){
|
if(ru){
|
||||||
|
|||||||
Reference in New Issue
Block a user