summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dlt_user.c11
-rw-r--r--src/lib/dlt_user_cfg.h12
2 files changed, 20 insertions, 3 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index 6cadb1f..5a84430 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -519,6 +519,7 @@ DltReturnValue dlt_init_common(void)
uint32_t buffer_max = DLT_USER_RINGBUFFER_MAX_SIZE;
char *env_buffer_step;
uint32_t buffer_step = DLT_USER_RINGBUFFER_STEP_SIZE;
+ char *env_nonverbose_extended_header;
char *env_log_buffer_len;
uint32_t buffer_max_configured = 0;
@@ -545,6 +546,16 @@ DltReturnValue dlt_init_common(void)
/* Use extended header for non verbose is enabled by default */
dlt_user.use_extende_header_for_non_verbose = DLT_USER_USE_EXTENDED_HEADER_FOR_NONVERBOSE;
+ /* Use extended header for non verbose is modified as per environment variable */
+ env_nonverbose_extended_header = getenv(DLT_USER_ENV_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE);
+ if (env_nonverbose_extended_header)
+ {
+ if (strcmp(env_nonverbose_extended_header, "1") == 0)
+ {
+ dlt_user.use_extende_header_for_non_verbose = DLT_USER_NO_USE_EXTENDED_HEADER_FOR_NONVERBOSE;
+ }
+ }
+
/* WIth session id is enabled by default */
dlt_user.with_session_id = DLT_USER_WITH_SESSION_ID;
diff --git a/src/lib/dlt_user_cfg.h b/src/lib/dlt_user_cfg.h
index b256eda..9f3cc92 100644
--- a/src/lib/dlt_user_cfg.h
+++ b/src/lib/dlt_user_cfg.h
@@ -111,9 +111,6 @@
/* Initial trace status */
#define DLT_USER_INITIAL_TRACE_STATUS DLT_TRACE_STATUS_OFF
-/* use extended header for non-verbose mode: 0 - don't use, 1 - use */
-#define DLT_USER_USE_EXTENDED_HEADER_FOR_NONVERBOSE 1
-
/* send always session id: 0 - don't use, 1 - use */
#define DLT_USER_WITH_SESSION_ID 1
@@ -138,6 +135,15 @@
/* Sleeps between resending user buffer at exit in nsec (1000000 nsec = 1ms)*/
#define DLT_USER_ATEXIT_RESEND_BUFFER_SLEEP 100000000
+/* Name of environment variable to disable extended header in non verbose mode */
+#define DLT_USER_ENV_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE "DLT_DISABLE_EXTENDED_HEADER_FOR_NONVERBOSE"
+
+typedef enum
+{
+ DLT_USER_NO_USE_EXTENDED_HEADER_FOR_NONVERBOSE = 0,
+ DLT_USER_USE_EXTENDED_HEADER_FOR_NONVERBOSE
+} DltExtHeaderNonVer;
+
/* Retry interval for mq error in usec */
#define DLT_USER_MQ_ERROR_RETRY_INTERVAL 100000