From 9585f876733b62fb29aaeb163f0f8c408765c9e3 Mon Sep 17 00:00:00 2001 From: Alexander Wenzel Date: Tue, 11 Oct 2011 13:09:24 +0200 Subject: Added new API dlt_set_log_mode to enable/disable internal/external trace. --- include/dlt/dlt_user.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/dlt/dlt_user.h') diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index f2a1400..6f64255 100755 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -149,6 +149,18 @@ typedef enum DLT_NW_TRACE_USER_DEFINED7 = 0x0F } DltNetworkTraceType; +/** + * This are the log modes. + */ +typedef enum +{ + DLT_USER_MODE_UNDEFINED = -1, + DLT_USER_MODE_OFF = 0, + DLT_USER_MODE_EXTERNAL , + DLT_USER_MODE_INTERNAL , + DLT_USER_MODE_BOTH +} DltUserLogMode; + #define DLT_USER_BUF_MAX_SIZE 2048 /**< maximum size of each user buffer, also used for injection buffer */ /* Use a semaphore or mutex from your OS to prevent concurrent access to the DLT buffer. */ @@ -424,6 +436,15 @@ int dlt_register_context_ll_ts(DltContext *handle, const char *contextid, const */ int dlt_unregister_context(DltContext *handle); +/** + * Set the logging mode used by the daemon. + * The logging mode is stored persistantly by the daemon. + * @see DltUserLogMode + * @param mode the new logging mode used by the daemon: off, extern, internal, both. + * @return negative value if there was an error + */ +int dlt_set_log_mode(DltUserLogMode mode); + /** * Register callback function called when injection message was received * @param handle pointer to an object containing information about one special logging context -- cgit v1.2.1