log_write_start

Function log_write_start 

pub unsafe extern "C" fn log_write_start(
    handle: &Context,
    log: &mut ContextData,
    level: LogLevel,
    buffer: *mut c_char,
    size: usize,
    args_num: i32,
) -> ReturnValue
Expand description

Initialize the generation of a DLT log message with given buffer from DLT application.

This can be considered as replacement of dlt_user_log_write_start/dlt_user_log_write_start_id and other data functions like dlt_user_log_write_string. The fourth, fifth, and sixth arguments shall be prepared by DLT application; this function is only responsible for checking log level and setting the given values to context data. This function has to be called first, when an application is ready to send a new log message with given buffer. This function only works with combination of dlt_user_log_write_finish_w_given_buffer and the function must only be called, when return value is bigger than zero. The function only supports verbose mode as of now.

  • @param handle pointer to an object containing information about one special logging context
  • @param log pointer to an object containing information about logging context data
  • @param level this is the current log level of the log message to be sent
  • @param buffer data with log message
  • @param size buffer size
  • @param args_num number of arguments in buffer
  • @return Value from DltReturnValue enum, DLT_RETURN_TRUE if log level is matching