From 3272e8e16749b58d13e72e9a3fcadab16550ea71 Mon Sep 17 00:00:00 2001 From: Alexander Wenzel Date: Wed, 12 Oct 2011 13:51:03 +0200 Subject: Implemented new DLT user library function dlt_get_log_state. --- include/dlt/dlt_user.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/dlt/dlt_user.h') diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index 6f64255..6fb95a3 100755 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -238,6 +238,8 @@ typedef struct int8_t enable_local_print; /**< Local printing of log messages: 1 enabled, 0 disabled */ int8_t local_print_mode; /**< Local print mode, controlled by environment variable */ + int8_t log_state; /**< Log state of external connection: 1 client connected, 0 not connected, -1 unknown */ + DltShm dlt_shm; } DltUser; @@ -445,6 +447,16 @@ int dlt_unregister_context(DltContext *handle); */ int dlt_set_log_mode(DltUserLogMode mode); +/** + * Get the state of the connected client to the daemon. + * The user application gets a message, when client is connected or disconnected. + * This value contains the last state. + * It needs some time until the application gets state from the daemon. + * Until then the state is "unknown state". + * @return -1 = unknown state, 0 = client not connected, 1 = client connected + */ +int dlt_get_log_state(); + /** * Register callback function called when injection message was received * @param handle pointer to an object containing information about one special logging context -- cgit v1.2.1