diff options
author | Stefan Vacek <stefan.vacek@intel.com> | 2015-08-31 09:29:07 +0200 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2015-10-07 10:38:19 +0200 |
commit | 0d330db31f5df337cbb5780a0f6621a7b2cb6396 (patch) | |
tree | 7463ff88ee504cdeaf12f0627c53a05ad2250b70 /include | |
parent | ed412acac8e9f8a5745e55adeed9652b34b9ee4f (diff) | |
download | DLT-daemon-0d330db31f5df337cbb5780a0f6621a7b2cb6396.tar.gz |
Make timeout on exit configurable
- make timeout in at_exit handler configurable (was hardcoded to 10s), new api:
int dlt_set_resend_timeout_atexit(uint32_t timeout_in_milliseconds);
- add option -t to dlt-adaptor-stdin to set timeout in at_exit_handler
- add option -t to dlt-example-user to set timeout in at_exit_handler
Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/dlt/dlt_user.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index 05bd6b9..df41259 100644 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -300,6 +300,7 @@ typedef struct // Buffer used for resending, locked by DLT semaphore uint8_t resend_buffer[DLT_USER_RESENDBUF_MAX_SIZE]; + uint32_t timeout_at_exit_handler; /**< timeout used in dlt_user_atexit_blow_out_user_buffer, in 0.1 milliseconds */ dlt_env_ll_set initial_ll_set; #ifdef DLT_SHM_ENABLE @@ -313,11 +314,11 @@ typedef struct } DltUser; /************************************************************************************************** -* The folowing API functions define a low level function interface for DLT +* The following API functions define a low level function interface for DLT **************************************************************************************************/ /** - * Initialise the generation of a DLT log message (intended for usage in non-verbose mode) + * Initialize the generation of a DLT log message (intended for usage in non-verbose mode) * This function has to be called first, when an application wants to send a new log messages. * Following functions like dlt_user_log_write_string and dlt_user_log_write_finish must only be called, * when return value is bigger than zero. @@ -329,7 +330,7 @@ typedef struct int dlt_user_log_write_start(DltContext *handle, DltContextData *log, DltLogLevelType loglevel); /** - * Initialise the generation of a DLT log message (intended for usage in verbose mode) + * Initialize the generation of a DLT log message (intended for usage in verbose mode) * This function has to be called first, when an application wants to send a new log messages. * Following functions like dlt_user_log_write_string and dlt_user_log_write_finish must only be called, * when return value is bigger than zero. @@ -519,14 +520,14 @@ int dlt_user_trace_network_segmented(DltContext *handle, DltNetworkTraceType nw_ **************************************************************************************************/ /** - * Initialise the user lib communication with daemon. + * Initialize the user lib communication with daemon. * This function has to be called first, before using any DLT user lib functions. * @return negative value if there was an error */ int dlt_init(); /** - * Initialise the user lib writing only to file. + * Initialize the user lib writing only to file. * This function has to be called first, before using any DLT user lib functions. * @param name name of an optional log file * @return negative value if there was an error @@ -595,6 +596,13 @@ int dlt_register_context_ll_ts(DltContext *handle, const char *contextid, const */ int dlt_unregister_context(DltContext *handle); + +/** + * Set maximum timeout for re-sending at exit + * @param timeout_in_milliseconds maximum time to wait until giving up re-sending, default 10000 (equals to 10 seconds) + */ +int dlt_set_resend_timeout_atexit(uint32_t timeout_in_milliseconds); + /** * Set the logging mode used by the daemon. * The logging mode is stored persistantly by the daemon. |