From 3bb7eb24092ff771ccfd1119f8c1088f3f78f981 Mon Sep 17 00:00:00 2001 From: Martin Willers Date: Mon, 31 May 2021 07:45:48 +0200 Subject: Add missing string functions (#309) Signed-off-by: Martin Willers --- src/lib/dlt_user.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/lib') diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index 98c896e..20392a6 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -2367,6 +2367,30 @@ DltReturnValue dlt_user_log_write_sized_utf8_string_attr(DltContextData *log, co return dlt_user_log_write_sized_string_utils_attr(log, text, length, UTF8_STRING, name, true); } +DltReturnValue dlt_user_log_write_constant_utf8_string(DltContextData *log, const char *text) +{ + /* Send parameter only in verbose mode */ + return is_verbose_mode(dlt_user.verbose_mode, log) ? dlt_user_log_write_utf8_string(log, text) : DLT_RETURN_OK; +} + +DltReturnValue dlt_user_log_write_constant_utf8_string_attr(DltContextData *log, const char *text, const char *name) +{ + /* Send parameter only in verbose mode */ + return is_verbose_mode(dlt_user.verbose_mode, log) ? dlt_user_log_write_utf8_string_attr(log, text, name) : DLT_RETURN_OK; +} + +DltReturnValue dlt_user_log_write_sized_constant_utf8_string(DltContextData *log, const char *text, uint16_t length) +{ + /* Send parameter only in verbose mode */ + return is_verbose_mode(dlt_user.verbose_mode, log) ? dlt_user_log_write_sized_utf8_string(log, text, length) : DLT_RETURN_OK; +} + +DltReturnValue dlt_user_log_write_sized_constant_utf8_string_attr(DltContextData *log, const char *text, uint16_t length, const char *name) +{ + /* Send parameter only in verbose mode */ + return is_verbose_mode(dlt_user.verbose_mode, log) ? dlt_user_log_write_sized_utf8_string_attr(log, text, length, name) : DLT_RETURN_OK; +} + static DltReturnValue dlt_user_log_write_sized_string_utils_attr(DltContextData *log, const char *text, uint16_t length, const enum StringType type, const char *name, bool with_var_info) { if ((log == NULL) || (text == NULL)) -- cgit v1.2.1