summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManikandanC <Manikandan.Chockalingam@in.bosch.com>2016-10-18 15:43:44 +0530
committerChristoph Lipka <clipka@users.noreply.github.com>2018-12-21 10:16:46 +0100
commite3c2501313d98ff9f4519116e6d2f36314e0240e (patch)
treed1472ee7047b598b4b25bb7c06748eaa6f9f61cf /include
parent2262f8b3406ac903a37f96a63c6250de215d1866 (diff)
downloadDLT-daemon-e3c2501313d98ff9f4519116e6d2f36314e0240e.tar.gz
UnitTest: Updates
Gateway Logstorage Event Handler Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Diffstat (limited to 'include')
-rw-r--r--include/dlt/dlt_user.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h
index f8691d7..997c1c4 100644
--- a/include/dlt/dlt_user.h
+++ b/include/dlt/dlt_user.h
@@ -241,6 +241,9 @@ typedef struct
uint16_t log_buf_len; /**< length of message buffer, by default: DLT_USER_BUF_MAX_SIZE */
} DltUser;
+typedef int (*dlt_injection_callback_id)(uint32_t, void *, uint32_t, void *);
+typedef int (*dlt_injection_callback)(uint32_t, void *, uint32_t);
+
/**************************************************************************************************
* The following API functions define a low level function interface for DLT
**************************************************************************************************/
@@ -534,6 +537,22 @@ DltReturnValue dlt_register_context(DltContext *handle, const char *contextid, c
DltReturnValue dlt_register_context_ll_ts(DltContext *handle, const char *contextid, const char * description, int loglevel, int tracestatus);
/**
+ * Register a context in the daemon with log level changed callback fn.
+ * This function is introduced to avoid missing of LL change callback during registration
+ * @param handle pointer to an object containing information about one special logging context
+ * @param contextid four byte long character array with the context id
+ * @param description long name of the context
+ * @param callback fn This is the fn which will be called when log level is changed
+ * @return Value from DltReturnValue enum
+ */
+DltReturnValue dlt_register_context_llccb(DltContext *handle,
+ const char *contextid,
+ const char * description,
+ void (*dlt_log_level_changed_callback)(char context_id[DLT_ID_SIZE],
+ uint8_t log_level,
+ uint8_t trace_status));
+
+/**
* Unregister a context in the DLT daemon.
* This function has to be called when finishing using a context.
* @param handle pointer to an object containing information about one special logging context
@@ -578,6 +597,16 @@ DltReturnValue dlt_register_injection_callback(DltContext *handle, uint32_t serv
int (*dlt_injection_callback)(uint32_t service_id, void *data, uint32_t length));
/**
+ * Register callback function with private data called when injection message was received
+ * @param handle pointer to an object containing information about one special logging context
+ * @param service_id the service id to be waited for
+ * @param (*dlt_injection_callback) function pointer to callback function
+ * @return Value from DltReturnValue enum
+ */
+DltReturnValue dlt_register_injection_callback_with_id(DltContext *handle, uint32_t service_id,
+ int (*dlt_injection_callback)(uint32_t service_id, void *data, uint32_t length, void *priv_data), void *priv);
+
+/**
* Register callback function called when log level of context was changed
* @param handle pointer to an object containing information about one special logging context
* @param (*dlt_log_level_changed_callback) function pointer to callback function
@@ -798,7 +827,7 @@ DltReturnValue dlt_user_log_resend_buffer(void);
*/
static inline DltReturnValue dlt_user_is_logLevel_enabled(DltContext *handle,DltLogLevelType loglevel)
{
- if (loglevel < DLT_LOG_OFF || loglevel >= DLT_LOG_MAX)
+ if (loglevel < DLT_LOG_DEFAULT || loglevel >= DLT_LOG_MAX)
{
return DLT_RETURN_WRONG_PARAMETER;
}