summaryrefslogtreecommitdiff
path: root/src/lib/dlt_user.c
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2014-09-11 16:14:07 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2014-09-11 16:24:43 +0200
commitc8d990b893838b3263ac020b095f1a520908e815 (patch)
treedbc8f21021a6c478b4f0e5ddcf79afcd8c700646 /src/lib/dlt_user.c
parent406f947a0f8dca7ac1fbdc6b1df2bbe37af1b669 (diff)
downloadDLT-daemon-c8d990b893838b3263ac020b095f1a520908e815.tar.gz
Added new API to send marker message from application.
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/lib/dlt_user.c')
-rw-r--r--src/lib/dlt_user.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index 1ad4335..7dfc913 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -97,6 +97,7 @@ static int dlt_user_log_send_register_context(DltContextData *log);
static int dlt_user_log_send_unregister_context(DltContextData *log);
static int dlt_send_app_ll_ts_limit(const char *appid, DltLogLevelType loglevel, DltTraceStatusType tracestatus);
static int dlt_user_log_send_log_mode(DltUserLogMode mode);
+static int dlt_user_log_send_marker();
static int dlt_user_print_msg(DltMessage *msg, DltContextData *log);
static int dlt_user_log_check_user_message(void);
static void dlt_user_log_reattach_to_daemon(void);
@@ -2758,6 +2759,19 @@ int dlt_log_raw(DltContext *handle,DltLogLevelType loglevel, void *data,uint16_t
return 0;
}
+int dlt_log_marker()
+{
+ if (dlt_user_initialised==0)
+ {
+ if (dlt_init()<0)
+ {
+ return -1;
+ }
+ }
+
+ return dlt_user_log_send_marker();
+}
+
int dlt_verbose_mode(void)
{
if (dlt_user_initialised==0)
@@ -3575,6 +3589,28 @@ int dlt_user_log_send_log_mode(DltUserLogMode mode)
return ((ret==DLT_RETURN_OK)?0:-1);
}
+int dlt_user_log_send_marker()
+{
+ DltUserHeader userheader;
+
+ DltReturnValue ret;
+
+ /* set userheader */
+ if (dlt_user_set_userheader(&userheader, DLT_USER_MESSAGE_MARKER)==-1)
+ {
+ return -1;
+ }
+
+ if (dlt_user.dlt_is_file)
+ {
+ return 0;
+ }
+
+ /* log to FIFO */
+ ret=dlt_user_log_out2(dlt_user.dlt_log_handle, &(userheader), sizeof(DltUserHeader), 0, 0);
+ return ((ret==DLT_RETURN_OK)?0:-1);
+}
+
int dlt_user_print_msg(DltMessage *msg, DltContextData *log)
{
uint8_t *databuffer_tmp;