[][src]Type Definition linuxcnc_hal_sys::rtapi_msg_handler_t

type rtapi_msg_handler_t = Option<unsafe extern "C" fn(level: msg_level_t, fmt: *const c_char, ap: *mut __va_list_tag)>;

'rtapi_get_msg_handler' and 'rtapi_set_msg_handler' access the function pointer used by rtapi_print and rtapi_print_msg. By default, messages appear in the kernel log, but by replacing the handler a user of the rtapi library can send the messages to another destination. Calling rtapi_set_msg_handler with NULL restores the default handler. Call from real-time init/cleanup code only. When called from rtapi_print(), 'level' is RTAPI_MSG_ALL, a level which should not normally be used with rtapi_print_msg().