63#define U_STR_NO_NULL(NAME, TYPE) \
64 static inline const char *NAME(TYPE enumerate) \
66 const char *str = NAME##_or_null(enumerate); \
67 return str != NULL ? str : "UNKNOWN"; \
197u_pp_small_array_f64(struct
u_pp_delegate dg, const
double *arr,
size_t n);
200u_pp_small_array2d_f64(struct
u_pp_delegate dg, const
double *arr,
size_t n,
size_t m);
247 char buffer[1024 * 8];
void u_pp_small_vec3(u_pp_delegate_t dg, const struct xrt_vec3 *vec)
Printers for math structs.
Definition: u_pretty_print.c:362
void u_pp_array_f64(u_pp_delegate_t dg, const double *arr, size_t n, const char *name, const char *indent)
Pretty prints double arr[n]
Definition: u_pretty_print.c:510
void u_pp_array2d_f64(u_pp_delegate_t dg, const double *arr, size_t n, size_t m, const char *name, const char *indent)
Pretty prints double arr[n][m]
Definition: u_pretty_print.c:517
const char * u_str_xrt_output_name_or_null(enum xrt_output_name name)
Returns a string of the output name, or NULL if invalid.
Definition: u_pretty_print.c:107
const char * u_str_xrt_device_name_or_null(enum xrt_device_name name)
Returns a string of the device name, or NULL if invalid.
Definition: u_pretty_print.c:123
void u_pp_xrt_output_name(struct u_pp_delegate dg, enum xrt_output_name name)
Pretty prints the xrt_output_name.
Definition: u_pretty_print.c:201
void(* u_pp_delegate_func_t)(void *ptr, const char *str, size_t length)
Function prototype for receiving pretty printed strings.
Definition: u_pretty_print.h:85
void u_pp(struct u_pp_delegate dg, const char *fmt,...) XRT_PRINTF_FORMAT(2
Formats a string and sends to the delegate.
void u_pp_xrt_result(struct u_pp_delegate dg, xrt_result_t xret)
Pretty prints the xrt_result_t.
Definition: u_pretty_print.c:221
const char * u_str_xrt_input_name_or_null(enum xrt_input_name name)
Returns a string of the input name, or NULL if invalid.
Definition: u_pretty_print.c:91
void void u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
Pretty prints the xrt_input_name.
Definition: u_pretty_print.c:181
void u_pp_xrt_reference_space_type(struct u_pp_delegate dg, enum xrt_reference_space_type type)
Pretty prints the xrt_reference_space_type.
Definition: u_pretty_print.c:287
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1356
enum xrt_result xrt_result_t
Result type used across Monado.
xrt_reference_space_type
Type of a OpenXR mapped reference space, maps to the semantic spaces on the xrt_space_overseer struct...
Definition: xrt_defines.h:612
xrt_output_name
Name of a output with a baked in type.
Definition: xrt_defines.h:1591
Helper struct to hold a function pointer and data pointer.
Definition: u_pretty_print.h:93
u_pp_delegate_func_t func
String receiving function.
Definition: u_pretty_print.h:98
void * ptr
Userdata pointer, placed first to match D/Volt delegates.
Definition: u_pretty_print.h:95
Stack only pretty printer sink, no need to free, must be inited before use.
Definition: u_pretty_print.h:242
size_t used
How much of the buffer is used.
Definition: u_pretty_print.h:244
A tightly packed 3x3 matrix of floats.
Definition: xrt_defines.h:546
A tightly packed 4x4 matrix of double.
Definition: xrt_defines.h:583
A tightly packed 4x4 matrix of floats.
Definition: xrt_defines.h:573
A pose composed of a position and orientation.
Definition: xrt_defines.h:479
A 3 element vector with single floats.
Definition: xrt_defines.h:289
void u_pp_padded_pretty_ms(u_pp_delegate_t dg, uint64_t value_ns)
Pretty prints a milliseconds padded to be at least 16 characters, the formatting is meant to be human...
Definition: u_pretty_print.c:312
Common defines and enums for XRT.
xrt_device_name
A enum that is used to name devices so that the state trackers can reason about the devices easier.
Definition: xrt_defines.h:801