summaryrefslogtreecommitdiff
path: root/include/dlt/dlt_user_macros.h
diff options
context:
space:
mode:
authorMartin Willers <M.Willers@gmx.net>2021-05-31 07:45:48 +0200
committerGitHub <noreply@github.com>2021-05-31 14:45:48 +0900
commit3bb7eb24092ff771ccfd1119f8c1088f3f78f981 (patch)
tree58ef9ed71736b72f929eaa508c088184654e4701 /include/dlt/dlt_user_macros.h
parentd40ecef57050a48ca2abf9c307793d183972658e (diff)
downloadDLT-daemon-3bb7eb24092ff771ccfd1119f8c1088f3f78f981.tar.gz
Add missing string functions (#309)
Signed-off-by: Martin Willers <M.Willers@gmx.net>
Diffstat (limited to 'include/dlt/dlt_user_macros.h')
-rw-r--r--include/dlt/dlt_user_macros.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h
index 24b7b7a..f7d8033 100644
--- a/include/dlt/dlt_user_macros.h
+++ b/include/dlt/dlt_user_macros.h
@@ -369,6 +369,24 @@
(void)dlt_user_log_write_sized_utf8_string(&log_local, TEXT, LEN)
/**
+ * Add constant utf8-encoded string parameter to the log messsage.
+ * @param TEXT Constant UTF8-encoded string
+ */
+#define DLT_CUTF8(TEXT) \
+ (void)dlt_user_log_write_constant_utf8_string(&log_local, TEXT)
+
+/**
+ * Add constant utf8-encoded string parameter with given length to the log messsage.
+ * The string in @a TEXT does not need to be null-terminated, but
+ * the copied string will be null-terminated at its destination
+ * in the message buffer.
+ * @param TEXT Constant UTF8-encoded string
+ * @param LEN length in bytes to take from @a TEXT
+ */
+#define DLT_SIZED_CUTF8(TEXT, LEN) \
+ (void)dlt_user_log_write_sized_constant_utf8_string(&log_local, TEXT, LEN)
+
+/**
* Add string parameter with "name" attribute to the log messsage.
* @param TEXT ASCII string
* @param NAME "name" attribute
@@ -429,6 +447,26 @@
(void)dlt_user_log_write_sized_utf8_string_attr(&log_local, TEXT, LEN, ATTR)
/**
+ * Add constant utf8-encoded string parameter with "name" attribute to the log messsage.
+ * @param TEXT Constant UTF8-encoded string
+ * @param NAME "name" attribute
+ */
+#define DLT_CUTF8_ATTR(TEXT, NAME) \
+ (void)dlt_user_log_write_constant_utf8_string_attr(&log_local, TEXT, NAME)
+
+/**
+ * Add constant utf8-encoded string parameter with given length and "name" attribute to the log messsage.
+ * The string in @a TEXT does not need to be null-terminated, but
+ * the copied string will be null-terminated at its destination
+ * in the message buffer.
+ * @param TEXT Constant UTF8-encoded string
+ * @param LEN length in bytes to take from @a TEXT
+ * @param NAME "name" attribute
+ */
+#define DLT_SIZED_CUTF8_ATTR(TEXT, LEN, NAME) \
+ (void)dlt_user_log_write_sized_constant_utf8_string_attr(&log_local, TEXT, LEN, NAME)
+
+/**
* Add boolean parameter to the log messsage.
* @param BOOL_VAR Boolean value (mapped to uint8)
*/