From 49ef927f7d3e6c9be4e6a0b81ee3bea28960db11 Mon Sep 17 00:00:00 2001 From: Martin Willers Date: Mon, 17 May 2021 02:51:06 +0200 Subject: Make nonverbose mode non exclusive (#300) * Make Non-Verbose mode non-exclusive Switching to global Non-Verbose mode now does not force Verbose messages to also be sent as Non-Verbose ones anymore. That would not make any sense, because Verbose messages don't have a MessageId and thus are all getting the same MessageId of 65535. Instead, setting global "Non-Verbose" mode will allow both Verbose and Non-Verbose messages to be sent in a single session. The "Verbose-APIs" (e.g. dlt_user_log_write_start()) will then only write Verbose messages, whereas the "Non-Verbose APIs" (e.g. dlt_user_log_write_start_id()) will then only write Non-Verbose messages. Signed-off-by: Martin Willers --- include/dlt/dlt_user.h.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/dlt/dlt_user.h.in b/include/dlt/dlt_user.h.in index 817cf11..e4a1f06 100644 --- a/include/dlt/dlt_user.h.in +++ b/include/dlt/dlt_user.h.in @@ -136,6 +136,7 @@ typedef struct char *context_description; /**< description of context */ DltTimestampType use_timestamp; /**< whether to use user-supplied timestamps */ uint32_t user_timestamp; /**< user-supplied timestamp to use */ + int8_t verbose_mode; /**< verbose mode: 1 enabled, 0 disabled */ } DltContextData; typedef struct @@ -940,6 +941,9 @@ DltReturnValue dlt_user_check_library_version(const char *user_major_version, co /** * Switch to non-verbose mode * + * This does not force all messages to be sent as Non-Verbose ones, as that does not make much sense. + * Instead, it +allows+ the sending of both Verbose and Non-Verbose messages, depending on which APIs + * are being called. */ DltReturnValue dlt_nonverbose_mode(void); -- cgit v1.2.1