Files | |
file | unibase.h |
unibase general global header | |
Data Structures | |
struct | unibase_cb_set_t |
a set of callback functions to process platform specific tasks More... | |
struct | unibase_init_para_t |
initialization parameters More... | |
Functions | |
int | unibase_init (unibase_init_para_t *ub_init_para) |
initialize unibase More... | |
void | unibase_close (void) |
claose unibase More... | |
void | ub_fatal (const char *mes1, const char *mes2) |
process a fatal error More... | |
bool | ub_fatalerror (void) |
return the fatal error status More... | |
static bool | ub_assert_fatal (bool cond, const char *mes1, const char *mes2) |
conditinal ub_fatal More... | |
uint64_t | ub_rt_gettime64 (void) |
get 64-bit REALTIME clock value More... | |
uint64_t | ub_mt_gettime64 (void) |
get 64-bit MONOTONIC clock value More... | |
uint64_t | ub_gptp_gettime64 (void) |
get 64-bit PTP clock value More... | |
Typedefs | |
typedef int(* | ub_console_out) (bool flush, const char *str) |
console output function More... | |
typedef int(* | ub_debug_out) (bool flush, const char *str) |
debug output function More... | |
typedef void *(* | ub_mutex_init) (void) |
mutex initialization function More... | |
typedef int(* | ub_mutex_close) (void *mutex) |
mutex de-initialization function More... | |
typedef int(* | ub_mutex_lock) (void *mutex) |
mutex lock function More... | |
typedef int(* | ub_mutex_unlock) (void *mutex) |
mutex unlock function More... | |
typedef void(* | ub_fatal_func) (void) |
function to process a fatal error event More... | |
typedef uint64_t(* | ub_gettime64) (ub_clocktype_t ctype) |
64-bit timestamp function More... | |
Enumerations | |
enum | ub_clocktype_t { UB_CLOCK_DEFAULT =0, UB_CLOCK_REALTIME, UB_CLOCK_MONOTONIC, UB_CLOCK_GPTP } |
clock type which provides timestamp More... | |
Macros | |
#define | CLOCK_MONOTONIC CLOCK_REALTIME |
#define | UB_UNIBASE_LOGCAT 0 |
#define CLOCK_MONOTONIC CLOCK_REALTIME |
#define UB_UNIBASE_LOGCAT 0 |
typedef int(* ub_console_out) (bool flush, const char *str) |
console output function
typedef int(* ub_debug_out) (bool flush, const char *str) |
debug output function
typedef void*(* ub_mutex_init) (void) |
mutex initialization function
typedef int(* ub_mutex_close) (void *mutex) |
mutex de-initialization function
typedef int(* ub_mutex_lock) (void *mutex) |
mutex lock function
typedef int(* ub_mutex_unlock) (void *mutex) |
mutex unlock function
typedef void(* ub_fatal_func) (void) |
function to process a fatal error event
typedef uint64_t(* ub_gettime64) (ub_clocktype_t ctype) |
64-bit timestamp function
enum ub_clocktype_t |
int unibase_init | ( | unibase_init_para_t * | ub_init_para | ) |
initialize unibase
ub_init_para | a set of callback functions to support platfrom specific functions, and a string to initialize logging functions |
void unibase_close | ( | void | ) |
claose unibase
void ub_fatal | ( | const char * | mes1, |
const char * | mes2 | ||
) |
process a fatal error
mes1 | printing message 1 |
mes2 | printing message 2 |
bool ub_fatalerror | ( | void | ) |
return the fatal error status
|
inlinestatic |
conditinal ub_fatal
uint64_t ub_rt_gettime64 | ( | void | ) |
get 64-bit REALTIME clock value
uint64_t ub_mt_gettime64 | ( | void | ) |
get 64-bit MONOTONIC clock value
uint64_t ub_gptp_gettime64 | ( | void | ) |
get 64-bit PTP clock value