71#define U_STR_NO_NULL(NAME, TYPE) \
72 static inline const char *NAME(TYPE enumerate) \
74 const char *str = NAME##_or_null(enumerate); \
75 return str != NULL ? str : "UNKNOWN"; \
206u_pp_small_array_f64(struct
u_pp_delegate dg, const
double *arr,
size_t n);
209u_pp_small_array2d_f64(struct
u_pp_delegate dg, const
double *arr,
size_t n,
size_t m);
256 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:317
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:465
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:472
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:118
const char * u_str_xrt_result_or_null(xrt_result_t xret)
Returns a string of the result, or NULL if invalid.
Definition: u_pretty_print.c:129
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:202
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:94
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:222
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:96
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:182
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:242
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:911
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:1553
Helper struct to hold a function pointer and data pointer.
Definition: u_pretty_print.h:102
u_pp_delegate_func_t func
String receiving function.
Definition: u_pretty_print.h:107
void * ptr
Userdata pointer, placed first to match D/Volt delegates.
Definition: u_pretty_print.h:104
Stack only pretty printer sink, no need to free, must be inited before use.
Definition: u_pretty_print.h:251
size_t used
How much of the buffer is used.
Definition: u_pretty_print.h:253
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:267
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:724