summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManikandan C <mchockalingam@de.adit-jv.com>2018-11-29 11:15:54 +0100
committerChristoph Lipka <clipka@users.noreply.github.com>2018-12-21 10:16:46 +0100
commitaff2511aa2a34fe91c02753f2d6f7b0044c82d80 (patch)
tree06bfaa6c6cfd4e3fdd99bd4cdb9be4043d1afa72 /include
parent83516bb6bd95d1a865c44bc7f33f70426e1143dc (diff)
downloadDLT-daemon-aff2511aa2a34fe91c02753f2d6f7b0044c82d80.tar.gz
Logging: avoided missing of log level change callback Added new context registration Macro and API which has option to register log level change callback along with it. This will avoid missing of initial log level change callback when daemon sends the log level change control msg during context registration
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Diffstat (limited to 'include')
-rw-r--r--include/dlt/dlt_user_macros.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h
index 74dea64..7455811 100644
--- a/include/dlt/dlt_user_macros.h
+++ b/include/dlt/dlt_user_macros.h
@@ -149,6 +149,16 @@
(void)dlt_register_context_ll_ts(&(CONTEXT), CONTEXTID, DESCRIPTION, LOGLEVEL, TRACESTATUS);} while(0)
/**
+ * Register context (with default log level and default trace status and log level change callback)
+ * @param CONTEXT object containing information about one special logging context
+ * @param CONTEXTID context id with maximal four characters
+ * @param DESCRIPTION ASCII string containing description
+ * @param CBK log level change callback to be registered
+ */
+#define DLT_REGISTER_CONTEXT_LLCCB(CONTEXT, CONTEXTID, DESCRIPTION, CBK) do{\
+ (void)dlt_register_context_llccb(&(CONTEXT), CONTEXTID, DESCRIPTION, CBK);} while(0)
+
+/**
* Unregister context.
* @param CONTEXT object containing information about one special logging context
*/