rtapi_msg_handler_t

Type Alias rtapi_msg_handler_t 

Source
pub type rtapi_msg_handler_t = Option<unsafe extern "C" fn(level: msg_level_t, fmt: *const c_char, ap: va_list)>;
Expand description

‘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().

Aliased Type§

pub enum rtapi_msg_handler_t {
    None,
    Some(unsafe extern "C" fn(u32, *const i8, [u64; 4])),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(u32, *const i8, [u64; 4]))

Some value of type T.