|
|
@ -48,7 +48,7 @@ SRSLTE_API void get_time_interval(struct timeval * tdata);
|
|
|
|
#define SRSLTE_DEBUG_ENABLED 1
|
|
|
|
#define SRSLTE_DEBUG_ENABLED 1
|
|
|
|
|
|
|
|
|
|
|
|
SRSLTE_API extern int srslte_verbose;
|
|
|
|
SRSLTE_API extern int srslte_verbose;
|
|
|
|
SRSLTE_API extern int srslte_is_example;
|
|
|
|
SRSLTE_API extern int handler_registered;
|
|
|
|
|
|
|
|
|
|
|
|
#define SRSLTE_VERBOSE_ISINFO() (srslte_verbose>=SRSLTE_VERBOSE_INFO)
|
|
|
|
#define SRSLTE_VERBOSE_ISINFO() (srslte_verbose>=SRSLTE_VERBOSE_INFO)
|
|
|
|
#define SRSLTE_VERBOSE_ISDEBUG() (srslte_verbose>=SRSLTE_VERBOSE_DEBUG)
|
|
|
|
#define SRSLTE_VERBOSE_ISDEBUG() (srslte_verbose>=SRSLTE_VERBOSE_DEBUG)
|
|
|
@ -58,21 +58,21 @@ SRSLTE_API extern int srslte_is_example;
|
|
|
|
#define PRINT_INFO srslte_verbose=SRSLTE_VERBOSE_INFO
|
|
|
|
#define PRINT_INFO srslte_verbose=SRSLTE_VERBOSE_INFO
|
|
|
|
#define PRINT_NONE srslte_verbose=SRSLTE_VERBOSE_NONE
|
|
|
|
#define PRINT_NONE srslte_verbose=SRSLTE_VERBOSE_NONE
|
|
|
|
|
|
|
|
|
|
|
|
#define DEBUG(_fmt, ...) if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_DEBUG && srslte_is_example)\
|
|
|
|
#define DEBUG(_fmt, ...) if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_DEBUG && !handler_registered)\
|
|
|
|
{ fprintf(stdout, "[DEBUG]: " _fmt, ##__VA_ARGS__); }\
|
|
|
|
{ fprintf(stdout, "[DEBUG]: " _fmt, ##__VA_ARGS__); }\
|
|
|
|
else{ srslte_phy_log_print(LOG_LEVEL_DEBUG, _fmt, ##__VA_ARGS__); }
|
|
|
|
else{ srslte_phy_log_print(LOG_LEVEL_DEBUG, _fmt, ##__VA_ARGS__); }
|
|
|
|
|
|
|
|
|
|
|
|
#define INFO(_fmt, ...) if (SRSLTE_DEBUG_ENABLED && ((srslte_verbose >= SRSLTE_VERBOSE_INFO)) && srslte_is_example)\
|
|
|
|
#define INFO(_fmt, ...) if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO && !handler_registered) \
|
|
|
|
{ fprintf(stdout, "[INFO]: " _fmt, ##__VA_ARGS__); }\
|
|
|
|
{ fprintf(stdout, "[INFO]: " _fmt, ##__VA_ARGS__); }\
|
|
|
|
else{ srslte_phy_log_print(LOG_LEVEL_INFO, _fmt, ##__VA_ARGS__); }
|
|
|
|
else{ srslte_phy_log_print(LOG_LEVEL_INFO, _fmt, ##__VA_ARGS__); }
|
|
|
|
|
|
|
|
|
|
|
|
#if CMAKE_BUILD_TYPE==Debug
|
|
|
|
#if CMAKE_BUILD_TYPE==Debug
|
|
|
|
/* In debug mode, it prints out the */
|
|
|
|
/* In debug mode, it prints out the */
|
|
|
|
#define ERROR(_fmt, ...) if (srslte_is_example)\
|
|
|
|
#define ERROR(_fmt, ...) if (!handler_registered)\
|
|
|
|
{ fprintf(stderr, "\e[31m%s.%d: " _fmt "\e[0m\n", __FILE__, __LINE__, ##__VA_ARGS__);}\
|
|
|
|
{ fprintf(stderr, "\e[31m%s.%d: " _fmt "\e[0m\n", __FILE__, __LINE__, ##__VA_ARGS__);}\
|
|
|
|
else {srslte_phy_log_print(LOG_LEVEL_ERROR, _fmt, ##__VA_ARGS__);} //
|
|
|
|
else {srslte_phy_log_print(LOG_LEVEL_ERROR, _fmt, ##__VA_ARGS__);} //
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#define ERROR(_fmt, ...) if (srslte_is_example)\
|
|
|
|
#define ERROR(_fmt, ...) if (!handler_registered)\
|
|
|
|
{ fprintf(stderr, "[ERROR in %s]:" _fmt "\n", __FUNCTION__, ##__VA_ARGS__);}\
|
|
|
|
{ fprintf(stderr, "[ERROR in %s]:" _fmt "\n", __FUNCTION__, ##__VA_ARGS__);}\
|
|
|
|
else{srslte_phy_log_print(LOG_LEVEL_ERROR, _fmt, ##__VA_ARGS__);} //
|
|
|
|
else{srslte_phy_log_print(LOG_LEVEL_ERROR, _fmt, ##__VA_ARGS__);} //
|
|
|
|
#endif /* CMAKE_BUILD_TYPE==Debug */
|
|
|
|
#endif /* CMAKE_BUILD_TYPE==Debug */
|
|
|
|