From b38a8d1631cf7fc8eec6d1e88b60d5db340ee376 Mon Sep 17 00:00:00 2001 From: Vo Trung Chi Date: Thu, 14 Nov 2019 14:10:23 +0700 Subject: Provide DLT_GET_APPID macro (#187) (#188) Signed-off-by: Christoph Lipka --- include/dlt/dlt_user.h | 7 +++++++ include/dlt/dlt_user_macros.h | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index 85656d9..69cb854 100644 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -536,6 +536,13 @@ DltReturnValue dlt_unregister_app(void); */ DltReturnValue dlt_unregister_app_flush_buffered_logs(void); +/** + * Get the application id + * @param four byte long character array to store the application id + * @return Value from DltReturnValue enum + */ +DltReturnValue dlt_get_appid(char *appid); + /** * Register a context in the daemon. * This function has to be called before first usage of the context. diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h index 4ad6854..1b386bf 100644 --- a/include/dlt/dlt_user_macros.h +++ b/include/dlt/dlt_user_macros.h @@ -125,6 +125,13 @@ #define DLT_UNREGISTER_APP_FLUSH_BUFFERED_LOGS() do { \ (void)dlt_unregister_app_flush_buffered_logs(); } while (0) +/** + * To Get application ID. + * @Param APPID character pointer of minimum 4 bytes + */ +#define DLT_GET_APPID(APPID) do{\ + dlt_get_appid(APPID);} while(0) + /** * Register context (with default log level and default trace status) * @param CONTEXT object containing information about one special logging context -- cgit v1.2.1