Function register_context
pub unsafe extern "C" fn register_context(
handle: &Context,
context_id: &Id,
description: *const c_char,
desc_len: usize,
level: LogLevel,
trace_status: TraceStatus,
level_changed_cb: Option<LogLevelChangedCallback>,
) -> ReturnValueExpand description
Register a context in the daemon with pre-defined log level and pre-defined trace status.
This function has to be called before first usage of the context.
- @param handle pointer to an object containing information about one special logging context
- @param contextid four byte long character array with the context id
- @param description long name of the context
- @param desc_len strlen of the description
- @param level This is the log level to be pre-set for this context (DLT_LOG_DEFAULT is not allowed here)
- @param status This is the trace status to be pre-set for this context (DLT_TRACE_STATUS_DEFAULT is not allowed here)
- @param level_changed_cb This is the fn which will be called when log level is changed
- @return Value from DltReturnValue enum