NewLang Project
Yet another programm language
Loading...
Searching...
No Matches
logger.cpp File Reference
#include "logger.h"
#include <stdarg.h>
#include <string.h>
#include <linux/limits.h>
Include dependency graph for logger.cpp:

Go to the source code of this file.

Functions

uint8_t HexToByte (const char c)
 
size_t HexToBin (const char *str, uint8_t *buf, const size_t size)
 
int HexToBinEq (const char *str, const uint8_t *buf, size_t size)
 
std::string BinToHex (const uint8_t *buf, const size_t size)
 
std::string HexStrToBinStr (std::string &hex_str)
 
size_t BinToHexBuffer (const uint8_t *buf, const size_t size, char *str, const size_t str_size)
 
 __attribute__ ((weak)) std
 

Variables

static const char bin_to_hex_chars [] = "0123456789ABCDEF"
 

Function Documentation

◆ HexToByte()

uint8_t HexToByte ( const char c)

Definition at line 117 of file logger.cpp.

References LOG_RUNTIME.

Referenced by HexToBin(), and HexToBinEq().

◆ HexToBin()

size_t HexToBin ( const char * str,
uint8_t * buf,
const size_t size )

Definition at line 130 of file logger.cpp.

References ASSERT, and HexToByte().

◆ HexToBinEq()

int HexToBinEq ( const char * str,
const uint8_t * buf,
size_t size )

Definition at line 147 of file logger.cpp.

References ASSERT, and HexToByte().

◆ BinToHex()

std::string BinToHex ( const uint8_t * buf,
const size_t size )

Definition at line 168 of file logger.cpp.

References bin_to_hex_chars, and result.

◆ HexStrToBinStr()

std::string HexStrToBinStr ( std::string & hex_str)

Definition at line 179 of file logger.cpp.

References LOG_ERROR, and result.

◆ BinToHexBuffer()

size_t BinToHexBuffer ( const uint8_t * buf,
const size_t size,
char * str,
const size_t str_size )

Definition at line 249 of file logger.cpp.

References ASSERT, and bin_to_hex_chars.

◆ __attribute__()

__attribute__ ( (weak) )
new

Definition at line 264 of file logger.cpp.

Variable Documentation

◆ bin_to_hex_chars

const char bin_to_hex_chars[] = "0123456789ABCDEF"
static

Definition at line 166 of file logger.cpp.

Referenced by BinToHex(), and BinToHexBuffer().