You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#pragma once
#include <stdint.h>
#include <string>
void zos_log(const char* fmt, ...); uint32_t zos_get_ticket();
std::string zhex2str(const uint8_t* hex, size_t len); std::string zhex2binary(uint8_t hex); std::string zhex32ToBinary(uint32_t hex);
#define ZLOGI(TAG, fmt, ...) zos_log("%08lu INFO [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__);
#define ZLOGD(TAG, fmt, ...) zos_log("%08lu DEBU [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__);
#define ZLOGE(TAG, fmt, ...) zos_log("%08lu ERRO [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__);
#define ZLOGW(TAG, fmt, ...) zos_log("%08lu WARN [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__);
#define ZASSERT(cond) \
if (!(cond)) { \ ZLOGE("ASSERT", "condition: %s", #cond); \ exit(-1); \ }
#define ZARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
|