set msg and hex buf to const *

master
Joseph Giovatto 7 years ago committed by Andre Puschmann
parent 4e05266ea8
commit 802f8b716f

@ -63,10 +63,10 @@ public:
void info(const char * message, ...);
void debug(const char * message, ...);
void error_hex(uint8_t *hex, int size, const char * message, ...);
void warning_hex(uint8_t *hex, int size, const char * message, ...);
void info_hex(uint8_t *hex, int size, const char * message, ...);
void debug_hex(uint8_t *hex, int size, const char * message, ...);
void error_hex(const uint8_t *hex, int size, const char * message, ...);
void warning_hex(const uint8_t *hex, int size, const char * message, ...);
void info_hex(const uint8_t *hex, int size, const char * message, ...);
void debug_hex(const uint8_t *hex, int size, const char * message, ...);
class time_itf {
public:
@ -89,11 +89,11 @@ private:
logger_stdout def_logger_stdout;
void all_log(srslte::LOG_LEVEL_ENUM level, uint32_t tti, char *msg);
void all_log(srslte::LOG_LEVEL_ENUM level, uint32_t tti, char *msg, uint8_t *hex, int size);
void all_log(srslte::LOG_LEVEL_ENUM level, uint32_t tti, const char *msg);
void all_log(srslte::LOG_LEVEL_ENUM level, uint32_t tti, const char *msg, const uint8_t *hex, int size);
void all_log_line(srslte::LOG_LEVEL_ENUM level, uint32_t tti, std::string file, int line, char *msg);
std::string now_time();
std::string hex_string(uint8_t *hex, int size);
std::string hex_string(const uint8_t *hex, int size);
};
} // namespace srsue

@ -68,7 +68,7 @@ void log_filter::init(std::string layer, logger *logger_, bool tti)
void log_filter::all_log(srslte::LOG_LEVEL_ENUM level,
uint32_t tti,
char *msg)
const char *msg)
{
if(logger_h) {
std::stringstream ss;
@ -97,8 +97,8 @@ void log_filter::all_log(srslte::LOG_LEVEL_ENUM level,
void log_filter::all_log(srslte::LOG_LEVEL_ENUM level,
uint32_t tti,
char *msg,
uint8_t *hex,
const char *msg,
const uint8_t *hex,
int size)
{
if(logger_h) {
@ -190,7 +190,7 @@ void log_filter::debug(const char * message, ...) {
}
}
void log_filter::error_hex(uint8_t *hex, int size, const char * message, ...) {
void log_filter::error_hex(const uint8_t *hex, int size, const char * message, ...) {
if (level >= LOG_LEVEL_ERROR) {
char *args_msg;
va_list args;
@ -201,7 +201,7 @@ void log_filter::error_hex(uint8_t *hex, int size, const char * message, ...) {
free(args_msg);
}
}
void log_filter::warning_hex(uint8_t *hex, int size, const char * message, ...) {
void log_filter::warning_hex(const uint8_t *hex, int size, const char * message, ...) {
if (level >= LOG_LEVEL_WARNING) {
char *args_msg;
va_list args;
@ -212,7 +212,7 @@ void log_filter::warning_hex(uint8_t *hex, int size, const char * message, ...)
free(args_msg);
}
}
void log_filter::info_hex(uint8_t *hex, int size, const char * message, ...) {
void log_filter::info_hex(const uint8_t *hex, int size, const char * message, ...) {
if (level >= LOG_LEVEL_INFO) {
char *args_msg;
va_list args;
@ -223,7 +223,7 @@ void log_filter::info_hex(uint8_t *hex, int size, const char * message, ...) {
free(args_msg);
}
}
void log_filter::debug_hex(uint8_t *hex, int size, const char * message, ...) {
void log_filter::debug_hex(const uint8_t *hex, int size, const char * message, ...) {
if (level >= LOG_LEVEL_DEBUG) {
char *args_msg;
va_list args;
@ -277,7 +277,7 @@ std::string log_filter::now_time()
return std::string(buffer);
}
std::string log_filter::hex_string(uint8_t *hex, int size)
std::string log_filter::hex_string(const uint8_t *hex, int size)
{
std::stringstream ss;
int c = 0;

Loading…
Cancel
Save