Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
#include <memory>
#include <cstdint>
#include <cinttypes>
#include <cstring>
#include <string>
#include <cstdio>
#include <cstdarg>
#include <errno.h>
#include <jau/environment.hpp>
#include <jau/backtrace.hpp>
Go to the source code of this file.
Namespaces | |
namespace | jau |
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros. | |
Macros | |
#define | ABORT(...) { jau::ABORT_impl(__func__, __FILE__, __LINE__, __VA_ARGS__); } |
Use for unconditional ::abort() call with given messages, prefix '[elapsed_time] ABORT @ file:line func: '. More... | |
#define | COND_PRINT(C, ...) { if( C ) { jau::COND_PRINT_impl(__VA_ARGS__); } } |
Use for conditional plain messages, prefix '[elapsed_time] '. More... | |
#define | DBG_JNI_PRINT(...) { if( jau::environment::get().debug_jni ) { jau::DBG_PRINT_impl(__VA_ARGS__); } } |
Use for environment-variable environment::DEBUG_JNI conditional debug messages, prefix '[elapsed_time] Debug: '. More... | |
#define | DBG_PRINT(...) { if( jau::environment::get().debug ) { jau::DBG_PRINT_impl(__VA_ARGS__); } } |
Use for environment-variable environment::DEBUG conditional debug messages, prefix '[elapsed_time] Debug: '. More... | |
#define | DBG_WARN_PRINT(...) { if( jau::environment::get().debug ) { jau::WARN_PRINT_impl(__func__, __FILE__, __LINE__, __VA_ARGS__); } } |
Use for environment-variable environment::DEBUG conditional warning messages, prefix '[elapsed_time] Warning @ FILE:LINE FUNC: '. More... | |
#define | ERR_PRINT(...) { jau::ERR_PRINT_impl("Error", true /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); } |
Use for unconditional error messages, prefix '[elapsed_time] Error @ FILE:LINE FUNC: '. More... | |
#define | ERR_PRINT2(...) { jau::ERR_PRINT_impl("Error", false /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); } |
Use for unconditional error messages, prefix '[elapsed_time] Error @ FILE:LINE FUNC: '. More... | |
#define | IRQ_PRINT(...) { jau::ERR_PRINT_impl("Interrupted", false /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); } |
Use for unconditional interruption messages, prefix '[elapsed_time] Interrupted @ FILE:LINE FUNC: '. More... | |
#define | PERF2_TS_T0() |
#define | PERF2_TS_TD(m) |
#define | PERF3_TS_T0() |
#define | PERF3_TS_TD(m) |
#define | PERF_TS_T0() |
#define | PERF_TS_T0_BASE() const uint64_t _t0 = jau::getCurrentMilliseconds() |
#define | PERF_TS_TD(m) |
#define | PERF_TS_TD_BASE(m) |
#define | WARN_PRINT(...) { jau::WARN_PRINT_impl(__func__, __FILE__, __LINE__, __VA_ARGS__); } |
Use for unconditional warning messages, prefix '[elapsed_time] Warning @ FILE:LINE FUNC: '. More... | |
#define | WORDY_PRINT(...) { if( jau::environment::get().verbose ) { jau::WORDY_PRINT_impl(__VA_ARGS__); } } |
Use for environment-variable environment::VERBOSE conditional verbose messages, prefix '[elapsed_time] Wordy: '. More... | |
Functions | |
void | jau::ABORT_impl (const char *func, const char *file, const int line, const char *format,...) noexcept |
Use for unconditional ::abort() call with given messages, prefix '[elapsed_time] ABORT @ file:line func: '. More... | |
void | jau::COND_PRINT_impl (const char *format,...) noexcept |
void | jau::DBG_PRINT_impl (const char *format,...) noexcept |
void | jau::ERR_PRINT_impl (const char *prefix, const bool backtrace, const char *func, const char *file, const int line, const char *format,...) noexcept |
void | jau::ERR_PRINTv (const char *func, const char *file, const int line, const char *format, va_list args) noexcept |
Use for unconditional error messages, prefix '[elapsed_time] Error @ file:line func: '. More... | |
int | jau::fprintf_td (const uint64_t elapsed_ms, FILE *stream, const char *format,...) noexcept |
Convenient fprintf() invocation, prepending the given elapsed_ms timestamp. More... | |
int | jau::fprintf_td (FILE *stream, const char *format,...) noexcept |
Convenient fprintf() invocation, prepending the environment::getElapsedMillisecond() timestamp. More... | |
void | jau::INFO_PRINT (const char *format,...) noexcept |
Use for unconditional informal messages, prefix '[elapsed_time] Info: '. More... | |
void | jau::PLAIN_PRINT (const bool printPrefix, const char *format,...) noexcept |
Use for unconditional plain messages, prefix '[elapsed_time] ' if printPrefix == true. More... | |
template<class List > | |
void | jau::printSharedPtrList (const std::string &prefix, List &list) noexcept |
void | jau::WARN_PRINT_impl (const char *func, const char *file, const int line, const char *format,...) noexcept |
void | jau::WARN_PRINTv (const char *func, const char *file, const int line, const char *format, va_list args) noexcept |
Use for unconditional warning messages, prefix '[elapsed_time] Warning @ file:line func: '. More... | |
void | jau::WORDY_PRINT_impl (const char *format,...) noexcept |
#define DBG_PRINT | ( | ... | ) | { if( jau::environment::get().debug ) { jau::DBG_PRINT_impl(__VA_ARGS__); } } |
#define DBG_WARN_PRINT | ( | ... | ) | { if( jau::environment::get().debug ) { jau::WARN_PRINT_impl(__func__, __FILE__, __LINE__, __VA_ARGS__); } } |
#define DBG_JNI_PRINT | ( | ... | ) | { if( jau::environment::get().debug_jni ) { jau::DBG_PRINT_impl(__VA_ARGS__); } } |
#define WORDY_PRINT | ( | ... | ) | { if( jau::environment::get().verbose ) { jau::WORDY_PRINT_impl(__VA_ARGS__); } } |
#define PERF_TS_T0_BASE | ( | ) | const uint64_t _t0 = jau::getCurrentMilliseconds() |
#define PERF_TS_TD_BASE | ( | m | ) |
#define ABORT | ( | ... | ) | { jau::ABORT_impl(__func__, __FILE__, __LINE__, __VA_ARGS__); } |
#define ERR_PRINT | ( | ... | ) | { jau::ERR_PRINT_impl("Error", true /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); } |
#define ERR_PRINT2 | ( | ... | ) | { jau::ERR_PRINT_impl("Error", false /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); } |
#define IRQ_PRINT | ( | ... | ) | { jau::ERR_PRINT_impl("Interrupted", false /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); } |
#define WARN_PRINT | ( | ... | ) | { jau::WARN_PRINT_impl(__func__, __FILE__, __LINE__, __VA_ARGS__); } |
#define COND_PRINT | ( | C, | |
... | |||
) | { if( C ) { jau::COND_PRINT_impl(__VA_ARGS__); } } |