automotive-dlt
|
Data Structures | |
struct | DltContext |
struct | DltContextData |
struct | DltUserInjectionCallback |
struct | DltUserLogLevelChangedCallback |
struct | dlt_ll_ts_type |
struct | dlt_env_ll_item |
holds initial log-level for given appId:ctxId pair More... | |
struct | dlt_env_ll_set |
holds all initial log-levels given via environment variable DLT_INITIAL_LOG_LEVEL More... | |
struct | DltUser |
Macros | |
#define | DLT_USER_BUF_MAX_SIZE 1390 |
#define | DLT_USER_RESENDBUF_MAX_SIZE (DLT_USER_BUF_MAX_SIZE + 100) |
#define | DLT_SEM_LOCK() { sem_wait(&dlt_mutex); } |
#define | DLT_SEM_FREE() { sem_post(&dlt_mutex); } |
#define | DLT_DECLARE_CONTEXT(CONTEXT) DltContext CONTEXT; |
#define | DLT_IMPORT_CONTEXT(CONTEXT) extern DltContext CONTEXT; |
#define | DLT_REGISTER_APP(APPID, DESCRIPTION) |
#define | DLT_UNREGISTER_APP() |
#define | DLT_REGISTER_CONTEXT(CONTEXT, CONTEXTID, DESCRIPTION) |
#define | DLT_REGISTER_CONTEXT_LL_TS(CONTEXT, CONTEXTID, DESCRIPTION, LOGLEVEL, TRACESTATUS) |
#define | DLT_UNREGISTER_CONTEXT(CONTEXT) |
#define | DLT_REGISTER_INJECTION_CALLBACK(CONTEXT, SERVICEID, CALLBACK) |
#define | DLT_REGISTER_LOG_LEVEL_CHANGED_CALLBACK(CONTEXT, CALLBACK) |
#define | DLT_LOG(CONTEXT, LOGLEVEL, ARGS...) |
#define | DLT_LOG_ID(CONTEXT, LOGLEVEL, MSGID, ARGS...) |
#define | DLT_STRING(TEXT) (void)dlt_user_log_write_string(&log_local,TEXT) |
#define | DLT_CSTRING(TEXT) (void)dlt_user_log_write_constant_string(&log_local,TEXT) |
#define | DLT_UTF8(TEXT) (void)dlt_user_log_write_utf8_string(&log_local,TEXT) |
#define | DLT_BOOL(BOOL_VAR) (void)dlt_user_log_write_bool(&log_local,BOOL_VAR) |
#define | DLT_FLOAT32(FLOAT32_VAR) (void)dlt_user_log_write_float32(&log_local,FLOAT32_VAR) |
#define | DLT_FLOAT64(FLOAT64_VAR) (void)dlt_user_log_write_float64(&log_local,FLOAT64_VAR) |
#define | DLT_INT(INT_VAR) (void)dlt_user_log_write_int(&log_local,INT_VAR) |
#define | DLT_INT8(INT_VAR) (void)dlt_user_log_write_int8(&log_local,INT_VAR) |
#define | DLT_INT16(INT_VAR) (void)dlt_user_log_write_int16(&log_local,INT_VAR) |
#define | DLT_INT32(INT_VAR) (void)dlt_user_log_write_int32(&log_local,INT_VAR) |
#define | DLT_INT64(INT_VAR) (void)dlt_user_log_write_int64(&log_local,INT_VAR) |
#define | DLT_UINT(UINT_VAR) (void)dlt_user_log_write_uint(&log_local,UINT_VAR) |
#define | DLT_UINT8(UINT_VAR) (void)dlt_user_log_write_uint8(&log_local,UINT_VAR) |
#define | DLT_UINT16(UINT_VAR) (void)dlt_user_log_write_uint16(&log_local,UINT_VAR) |
#define | DLT_UINT32(UINT_VAR) (void)dlt_user_log_write_uint32(&log_local,UINT_VAR) |
#define | DLT_UINT64(UINT_VAR) (void)dlt_user_log_write_uint64(&log_local,UINT_VAR) |
#define | DLT_RAW(BUF, LEN) (void)dlt_user_log_write_raw(&log_local,BUF,LEN) |
#define | DLT_HEX8(UINT_VAR) (void)dlt_user_log_write_uint8_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX8) |
#define | DLT_HEX16(UINT_VAR) (void)dlt_user_log_write_uint16_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX16) |
#define | DLT_HEX32(UINT_VAR) (void)dlt_user_log_write_uint32_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX32) |
#define | DLT_HEX64(UINT_VAR) (void)dlt_user_log_write_uint64_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX64) |
#define | DLT_BIN8(UINT_VAR) (void)dlt_user_log_write_uint8_formatted(&log_local,UINT_VAR,DLT_FORMAT_BIN8) |
#define | DLT_BIN16(UINT_VAR) (void)dlt_user_log_write_uint16_formatted(&log_local,UINT_VAR,DLT_FORMAT_BIN16) |
#define | DLT_PTR(PTR_VAR) (void)dlt_user_log_write_ptr(&log_local, PTR_VAR) |
#define | DLT_TRACE_NETWORK(CONTEXT, TYPE, HEADERLEN, HEADER, PAYLOADLEN, PAYLOAD) |
#define | DLT_TRACE_NETWORK_TRUNCATED(CONTEXT, TYPE, HEADERLEN, HEADER, PAYLOADLEN, PAYLOAD) |
#define | DLT_TRACE_NETWORK_SEGMENTED(CONTEXT, TYPE, HEADERLEN, HEADER, PAYLOADLEN, PAYLOAD) |
#define | DLT_LOG_STRING(CONTEXT, LOGLEVEL, TEXT) |
#define | DLT_LOG_STRING_INT(CONTEXT, LOGLEVEL, TEXT, INT_VAR) |
#define | DLT_LOG_STRING_UINT(CONTEXT, LOGLEVEL, TEXT, UINT_VAR) |
#define | DLT_LOG_UINT(CONTEXT, LOGLEVEL, UINT_VAR) |
#define | DLT_LOG_INT(CONTEXT, LOGLEVEL, INT_VAR) |
#define | DLT_LOG_RAW(CONTEXT, LOGLEVEL, BUF, LEN) |
#define | DLT_LOG_MARKER() |
#define | DLT_VERBOSE_MODE() |
#define | DLT_NONVERBOSE_MODE() |
#define | DLT_SET_APPLICATION_LL_TS_LIMIT(LOGLEVEL, TRACESTATUS) |
#define | DLT_ENABLE_LOCAL_PRINT() |
#define | DLT_DISABLE_LOCAL_PRINT() |
#define | DLT_IS_LOG_LEVEL_ENABLED(CONTEXT, LOGLEVEL) (dlt_user_is_logLevel_enabled(&CONTEXT,LOGLEVEL) == DLT_RETURN_TRUE) |
#define DLT_BIN16 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint16_formatted(&log_local,UINT_VAR,DLT_FORMAT_BIN16) |
Definition at line 327 of file dlt_user_macros.h.
#define DLT_BIN8 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint8_formatted(&log_local,UINT_VAR,DLT_FORMAT_BIN8) |
Definition at line 325 of file dlt_user_macros.h.
#define DLT_BOOL | ( | BOOL_VAR | ) | (void)dlt_user_log_write_bool(&log_local,BOOL_VAR) |
Add boolean parameter to the log messsage.
BOOL_VAR | Boolean value (mapped to uint8) |
Definition at line 255 of file dlt_user_macros.h.
#define DLT_CSTRING | ( | TEXT | ) | (void)dlt_user_log_write_constant_string(&log_local,TEXT) |
Add constant string parameter to the log messsage.
TEXT | Constant ASCII string |
Definition at line 241 of file dlt_user_macros.h.
#define DLT_DECLARE_CONTEXT | ( | CONTEXT | ) | DltContext CONTEXT; |
Create an object for a new context. This macro has to be called first for every.
CONTEXT | object containing information about one special logging context |
Definition at line 93 of file dlt_user_macros.h.
Referenced by stress3(), and thread_function().
#define DLT_DISABLE_LOCAL_PRINT | ( | ) |
Disable local printing of messages
Definition at line 516 of file dlt_user_macros.h.
Referenced by test6m().
#define DLT_ENABLE_LOCAL_PRINT | ( | ) |
Enable local printing of messages
Definition at line 509 of file dlt_user_macros.h.
#define DLT_FLOAT32 | ( | FLOAT32_VAR | ) | (void)dlt_user_log_write_float32(&log_local,FLOAT32_VAR) |
Add float32 parameter to the log messsage.
FLOAT32_VAR | Float32 value (mapped to float) |
Definition at line 262 of file dlt_user_macros.h.
#define DLT_FLOAT64 | ( | FLOAT64_VAR | ) | (void)dlt_user_log_write_float64(&log_local,FLOAT64_VAR) |
Add float64 parameter to the log messsage.
FLOAT64_VAR | Float64 value (mapped to double) |
Definition at line 269 of file dlt_user_macros.h.
#define DLT_HEX16 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint16_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX16) |
Definition at line 319 of file dlt_user_macros.h.
#define DLT_HEX32 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint32_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX32) |
Definition at line 321 of file dlt_user_macros.h.
#define DLT_HEX64 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint64_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX64) |
Definition at line 323 of file dlt_user_macros.h.
#define DLT_HEX8 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint8_formatted(&log_local,UINT_VAR,DLT_FORMAT_HEX8) |
Definition at line 317 of file dlt_user_macros.h.
#define DLT_IMPORT_CONTEXT | ( | CONTEXT | ) | extern DltContext CONTEXT; |
Use an object of a new context created in another module. This macro has to be called first for every.
CONTEXT | object containing information about one special logging context |
Definition at line 104 of file dlt_user_macros.h.
#define DLT_INT | ( | INT_VAR | ) | (void)dlt_user_log_write_int(&log_local,INT_VAR) |
Add integer parameter to the log messsage.
INT_VAR | integer value |
Definition at line 276 of file dlt_user_macros.h.
Referenced by DLT_IMPORT_CONTEXT(), dlt_system_signal_handler(), dlt_user_log_file_data(), dlt_user_log_file_errorMessage(), dlt_user_log_file_packagesCount(), init_filetransfer_dirs(), join_threads(), main(), stress3(), test2m(), test3m(), testall(), and wait_for_files().
#define DLT_INT16 | ( | INT_VAR | ) | (void)dlt_user_log_write_int16(&log_local,INT_VAR) |
Definition at line 282 of file dlt_user_macros.h.
#define DLT_INT32 | ( | INT_VAR | ) | (void)dlt_user_log_write_int32(&log_local,INT_VAR) |
Definition at line 285 of file dlt_user_macros.h.
#define DLT_INT64 | ( | INT_VAR | ) | (void)dlt_user_log_write_int64(&log_local,INT_VAR) |
Definition at line 288 of file dlt_user_macros.h.
#define DLT_INT8 | ( | INT_VAR | ) | (void)dlt_user_log_write_int8(&log_local,INT_VAR) |
Definition at line 279 of file dlt_user_macros.h.
#define DLT_IS_LOG_LEVEL_ENABLED | ( | CONTEXT, | |
LOGLEVEL | |||
) | (dlt_user_is_logLevel_enabled(&CONTEXT,LOGLEVEL) == DLT_RETURN_TRUE) |
Check if log level is enabled
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
Definition at line 525 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_LOG | ( | CONTEXT, | |
LOGLEVEL, | |||
ARGS... | |||
) |
Send log message with variable list of messages (intended for verbose mode)
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
ARGS | variable list of arguments |
Definition at line 182 of file dlt_user_macros.h.
Referenced by compress_file_to(), DLT_DECLARE_CONTEXT(), DLT_IMPORT_CONTEXT(), dlt_kpi_log_interrupts(), dlt_kpi_log_list(), dlt_system_signal_handler(), dlt_user_injection_callback(), dlt_user_log_file_data(), dlt_user_log_file_end(), dlt_user_log_file_errorMessage(), dlt_user_log_file_header(), dlt_user_log_file_header_alias(), dlt_user_log_file_infoAbout(), dlt_user_log_file_packagesCount(), do_logging(), filetransfer_thread(), flush_dir(), flush_dir_compress(), flush_dir_original(), flush_dir_send(), init_filetransfer_dirs(), init_shell(), join_threads(), logfile_thread(), logprocess_thread(), main(), read_socket(), register_contexts(), send_dumped_file(), send_one(), start_filetransfer(), start_logfile(), start_logprocess(), start_syslog(), start_threads(), stress3(), syslog_thread(), test1m(), test2m(), test3m(), test4m(), test5m(), test6m(), test7m(), test8m(), test9m(), test_injection_function_callback(), test_injection_macro_callback(), testall(), testFile1Run1(), testFile1Run2(), testFile2Run1(), testFile2Run2(), testFile3Run1(), testFile3Run2(), testFile3Run3(), thread_function(), unique_name(), and wait_for_files().
#define DLT_LOG_ID | ( | CONTEXT, | |
LOGLEVEL, | |||
MSGID, | |||
ARGS... | |||
) |
Send log message with variable list of messages (intended for non-verbose mode)
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
MSGID | the message id of log message |
ARGS | variable list of arguments: calls to DLT_STRING(), DLT_BOOL(), DLT_FLOAT32(), DLT_FLOAT64(), DLT_INT(), DLT_UINT(), DLT_RAW() |
Definition at line 214 of file dlt_user_macros.h.
#define DLT_LOG_INT | ( | CONTEXT, | |
LOGLEVEL, | |||
INT_VAR | |||
) |
Send log message with integer parameter.
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
INT_VAR | integer value |
Definition at line 451 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_LOG_MARKER | ( | ) |
Send log message with marker.
Definition at line 477 of file dlt_user_macros.h.
Referenced by main().
#define DLT_LOG_RAW | ( | CONTEXT, | |
LOGLEVEL, | |||
BUF, | |||
LEN | |||
) |
Send log message with binary memory block.
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
BUF | pointer to memory block |
LEN | length of memory block |
Definition at line 466 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_LOG_STRING | ( | CONTEXT, | |
LOGLEVEL, | |||
TEXT | |||
) |
Send log message with string parameter.
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
TEXT | ASCII string |
Definition at line 393 of file dlt_user_macros.h.
Referenced by test5m(), test6m(), test7m(), test8m(), and test9m().
#define DLT_LOG_STRING_INT | ( | CONTEXT, | |
LOGLEVEL, | |||
TEXT, | |||
INT_VAR | |||
) |
Send log message with string parameter and integer parameter.
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log messages |
TEXT | ASCII string |
INT_VAR | integer value |
Definition at line 408 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_LOG_STRING_UINT | ( | CONTEXT, | |
LOGLEVEL, | |||
TEXT, | |||
UINT_VAR | |||
) |
Send log message with string parameter and unsigned integer parameter.
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
TEXT | ASCII string |
UINT_VAR | unsigned integer value |
Definition at line 423 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_LOG_UINT | ( | CONTEXT, | |
LOGLEVEL, | |||
UINT_VAR | |||
) |
Send log message with unsigned integer parameter.
CONTEXT | object containing information about one special logging context |
LOGLEVEL | the log level of the log message |
UINT_VAR | unsigned integer value |
Definition at line 437 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_NONVERBOSE_MODE | ( | ) |
Switch to non-verbose mode
Definition at line 493 of file dlt_user_macros.h.
#define DLT_PTR | ( | PTR_VAR | ) | (void)dlt_user_log_write_ptr(&log_local, PTR_VAR) |
Architecture independent macro to print pointers
Definition at line 333 of file dlt_user_macros.h.
Referenced by test5m().
#define DLT_RAW | ( | BUF, | |
LEN | |||
) | (void)dlt_user_log_write_raw(&log_local,BUF,LEN) |
Add binary memory block to the log messages.
BUF | pointer to memory block |
LEN | length of memory block |
Definition at line 315 of file dlt_user_macros.h.
Referenced by dlt_user_log_file_data(), main(), stress3(), test2m(), test3m(), test4m(), and testall().
#define DLT_REGISTER_APP | ( | APPID, | |
DESCRIPTION | |||
) |
Register application.
APPID | application id with maximal four characters |
DESCRIPTION | ASCII string containing description |
Definition at line 112 of file dlt_user_macros.h.
Referenced by DLT_DECLARE_CONTEXT(), main(), and run_threads().
#define DLT_REGISTER_CONTEXT | ( | CONTEXT, | |
CONTEXTID, | |||
DESCRIPTION | |||
) |
Register context (with default log level and default trace status)
CONTEXT | object containing information about one special logging context |
CONTEXTID | context id with maximal four characters |
DESCRIPTION | ASCII string containing description |
Definition at line 129 of file dlt_user_macros.h.
Referenced by DLT_DECLARE_CONTEXT(), do_logging(), filetransfer_thread(), init_shell(), logprocess_thread(), main(), register_contexts(), stress3(), syslog_thread(), and thread_function().
#define DLT_REGISTER_CONTEXT_LL_TS | ( | CONTEXT, | |
CONTEXTID, | |||
DESCRIPTION, | |||
LOGLEVEL, | |||
TRACESTATUS | |||
) |
Register context with pre-defined log level and pre-defined trace status.
CONTEXT | object containing information about one special logging context |
CONTEXTID | context id with maximal four characters |
DESCRIPTION | ASCII string containing description |
LOGLEVEL | log level to be pre-set for this context (DLT_LOG_DEFAULT is not allowed here) |
TRACESTATUS | trace status to be pre-set for this context (DLT_TRACE_STATUS_DEFAULT is not allowed here) |
Definition at line 142 of file dlt_user_macros.h.
Referenced by main().
#define DLT_REGISTER_INJECTION_CALLBACK | ( | CONTEXT, | |
SERVICEID, | |||
CALLBACK | |||
) |
Register callback function called when injection message was received
CONTEXT | object containing information about one special logging context |
SERVICEID | service id of the injection message |
CALLBACK | function pointer to callback function |
Definition at line 158 of file dlt_user_macros.h.
Referenced by init_shell(), and main().
#define DLT_REGISTER_LOG_LEVEL_CHANGED_CALLBACK | ( | CONTEXT, | |
CALLBACK | |||
) |
Register callback function called when log level of context was changed
CONTEXT | object containing information about one special logging context |
CALLBACK | function pointer to callback function |
Definition at line 166 of file dlt_user_macros.h.
Referenced by main().
#define DLT_SEM_FREE | ( | ) | { sem_post(&dlt_mutex); } |
Definition at line 98 of file dlt_user.h.
Referenced by dlt_forward_msg(), dlt_free(), dlt_init_common(), dlt_register_app(), dlt_register_context(), dlt_register_context_ll_ts(), dlt_register_injection_callback(), dlt_register_log_level_changed_callback(), dlt_set_application_ll_ts_limit(), dlt_unregister_app(), dlt_unregister_context(), dlt_user_atexit_blow_out_user_buffer(), dlt_user_check_buffer(), dlt_user_log_check_user_message(), dlt_user_log_reattach_to_daemon(), dlt_user_log_resend_buffer(), dlt_user_log_send_log(), dlt_user_log_send_register_application(), and dlt_user_log_send_register_context().
#define DLT_SEM_LOCK | ( | ) | { sem_wait(&dlt_mutex); } |
Definition at line 97 of file dlt_user.h.
Referenced by dlt_forward_msg(), dlt_free(), dlt_init_common(), dlt_register_app(), dlt_register_context(), dlt_register_context_ll_ts(), dlt_register_injection_callback(), dlt_register_log_level_changed_callback(), dlt_set_application_ll_ts_limit(), dlt_unregister_app(), dlt_unregister_context(), dlt_user_atexit_blow_out_user_buffer(), dlt_user_check_buffer(), dlt_user_log_check_user_message(), dlt_user_log_reattach_to_daemon(), dlt_user_log_resend_buffer(), dlt_user_log_send_log(), dlt_user_log_send_register_application(), and dlt_user_log_send_register_context().
#define DLT_SET_APPLICATION_LL_TS_LIMIT | ( | LOGLEVEL, | |
TRACESTATUS | |||
) |
Set maximum logged log level and trace status of application
LOGLEVEL | This is the log level to be set for the whole application |
TRACESTATUS | This is the trace status to be set for the whole application |
Definition at line 502 of file dlt_user_macros.h.
#define DLT_STRING | ( | TEXT | ) | (void)dlt_user_log_write_string(&log_local,TEXT) |
Add string parameter to the log messsage.
TEXT | ASCII string |
Definition at line 234 of file dlt_user_macros.h.
Referenced by compress_file_to(), DLT_DECLARE_CONTEXT(), DLT_IMPORT_CONTEXT(), dlt_kpi_log_interrupts(), dlt_kpi_log_list(), dlt_system_signal_handler(), dlt_user_injection_callback(), dlt_user_log_file_data(), dlt_user_log_file_end(), dlt_user_log_file_errorMessage(), dlt_user_log_file_header(), dlt_user_log_file_header_alias(), dlt_user_log_file_infoAbout(), dlt_user_log_file_packagesCount(), do_logging(), filetransfer_thread(), flush_dir(), flush_dir_compress(), flush_dir_original(), flush_dir_send(), init_filetransfer_dirs(), init_shell(), join_threads(), logfile_thread(), logprocess_thread(), main(), read_socket(), register_contexts(), send_dumped_file(), send_one(), start_filetransfer(), start_logfile(), start_logprocess(), start_syslog(), start_threads(), syslog_thread(), test1m(), test2m(), test3m(), test4m(), test5m(), test6m(), test7m(), test8m(), test9m(), test_injection_function_callback(), test_injection_macro_callback(), testFile1Run1(), testFile1Run2(), testFile2Run1(), testFile2Run2(), testFile3Run1(), testFile3Run2(), testFile3Run3(), thread_function(), unique_name(), and wait_for_files().
#define DLT_TRACE_NETWORK | ( | CONTEXT, | |
TYPE, | |||
HEADERLEN, | |||
HEADER, | |||
PAYLOADLEN, | |||
PAYLOAD | |||
) |
Trace network message
CONTEXT | object containing information about one special logging context |
TYPE | type of network trace message |
HEADERLEN | length of network message header |
HEADER | pointer to network message header |
PAYLOADLEN | length of network message payload |
PAYLOAD | pointer to network message payload |
Definition at line 345 of file dlt_user_macros.h.
Referenced by test7m().
#define DLT_TRACE_NETWORK_SEGMENTED | ( | CONTEXT, | |
TYPE, | |||
HEADERLEN, | |||
HEADER, | |||
PAYLOADLEN, | |||
PAYLOAD | |||
) |
Trace network message, segment large messages
CONTEXT | object containing information about one special logging context |
TYPE | type of network trace message |
HEADERLEN | length of network message header |
HEADER | pointer to network message header |
PAYLOADLEN | length of network message payload |
PAYLOAD | pointer to network message payload |
Definition at line 379 of file dlt_user_macros.h.
Referenced by DLT_DECLARE_CONTEXT(), and test9m().
#define DLT_TRACE_NETWORK_TRUNCATED | ( | CONTEXT, | |
TYPE, | |||
HEADERLEN, | |||
HEADER, | |||
PAYLOADLEN, | |||
PAYLOAD | |||
) |
Trace network message, allow truncation
CONTEXT | object containing information about one special logging context |
TYPE | type of network trace message |
HEADERLEN | length of network message header |
HEADER | pointer to network message header |
PAYLOADLEN | length of network message payload |
PAYLOAD | pointer to network message payload |
Definition at line 362 of file dlt_user_macros.h.
Referenced by test8m().
#define DLT_UINT | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint(&log_local,UINT_VAR) |
Add unsigned integer parameter to the log messsage.
UINT_VAR | unsigned integer value |
Definition at line 295 of file dlt_user_macros.h.
Referenced by dlt_user_log_file_data(), dlt_user_log_file_end(), dlt_user_log_file_errorMessage(), dlt_user_log_file_header(), dlt_user_log_file_header_alias(), dlt_user_log_file_infoAbout(), main(), test2m(), and test3m().
#define DLT_UINT16 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint16(&log_local,UINT_VAR) |
Definition at line 301 of file dlt_user_macros.h.
#define DLT_UINT32 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint32(&log_local,UINT_VAR) |
Definition at line 304 of file dlt_user_macros.h.
Referenced by DLT_IMPORT_CONTEXT(), dlt_user_injection_callback(), main(), test2m(), test3m(), test_injection_function_callback(), and test_injection_macro_callback().
#define DLT_UINT64 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint64(&log_local,UINT_VAR) |
Definition at line 307 of file dlt_user_macros.h.
#define DLT_UINT8 | ( | UINT_VAR | ) | (void)dlt_user_log_write_uint8(&log_local,UINT_VAR) |
Definition at line 298 of file dlt_user_macros.h.
#define DLT_UNREGISTER_APP | ( | ) |
Unregister application.
Definition at line 120 of file dlt_user_macros.h.
Referenced by DLT_DECLARE_CONTEXT(), main(), and run_threads().
#define DLT_UNREGISTER_CONTEXT | ( | CONTEXT | ) |
Unregister context.
CONTEXT | object containing information about one special logging context |
Definition at line 149 of file dlt_user_macros.h.
Referenced by DLT_DECLARE_CONTEXT(), do_logging(), main(), stress1(), and thread_function().
#define DLT_USER_BUF_MAX_SIZE 1390 |
maximum size of each user buffer, also used for injection buffer
Definition at line 92 of file dlt_user.h.
Referenced by dlt_testclient_message_callback(), dlt_user_log_write_bool(), dlt_user_log_write_float32(), dlt_user_log_write_float64(), dlt_user_log_write_int16(), dlt_user_log_write_int32(), dlt_user_log_write_int64(), dlt_user_log_write_int8(), dlt_user_log_write_raw_formatted(), dlt_user_log_write_start_id(), dlt_user_log_write_string(), dlt_user_log_write_uint16(), dlt_user_log_write_uint16_formatted(), dlt_user_log_write_uint32(), dlt_user_log_write_uint32_formatted(), dlt_user_log_write_uint64(), dlt_user_log_write_uint64_formatted(), dlt_user_log_write_uint8(), dlt_user_log_write_uint8_formatted(), dlt_user_log_write_utf8_string(), dlt_user_trace_network_segmented(), dlt_user_trace_network_truncated(), and test5f().
#define DLT_USER_RESENDBUF_MAX_SIZE (DLT_USER_BUF_MAX_SIZE + 100) |
Size of resend buffer; Max DLT message size is 1390 bytes plus some extra header space
Definition at line 94 of file dlt_user.h.
#define DLT_UTF8 | ( | TEXT | ) | (void)dlt_user_log_write_utf8_string(&log_local,TEXT) |
Add utf8-encoded string parameter to the log messsage.
TEXT | UTF8-encoded string |
Definition at line 248 of file dlt_user_macros.h.
#define DLT_VERBOSE_MODE | ( | ) |
Switch to verbose mode
Definition at line 486 of file dlt_user_macros.h.
Referenced by test3m().
DltReturnValue dlt_check_library_version | ( | const char * | user_major_version, |
const char * | user_minor_version | ||
) |
Check the library version of DLT library.
user_major_version | the major version to be compared |
user_minor_version | the minor version to be compared |
Definition at line 795 of file dlt_user.c.
References dlt_user_check_library_version().
DltReturnValue dlt_disable_local_print | ( | void | ) |
Disable local printing of messages
Definition at line 3296 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::enable_local_print.
Referenced by test6f().
DltReturnValue dlt_enable_local_print | ( | void | ) |
Enable local printing of messages
Definition at line 3280 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::enable_local_print.
int dlt_env_adjust_ll_from_env | ( | dlt_env_ll_set const *const | ll_set, |
char const *const | apid, | ||
char const *const | ctid, | ||
int const | ll | ||
) |
adjust log-level based on values given through environment
Iterate over the set of items, and find the best match. For any item that matches, the one with the highest priority is selected and that log-level is returned.
Priorities are determined as follows:
If no item matches or in case of error, the original log-level (
ll) | is returned |
Iterate over the set of items, and find the best match (
If no item matches or in case of error, the original log-level (
ll) | is returned |
Definition at line 537 of file dlt_env_ll.c.
References dlt_env_ll_item_get_matching_prio(), dlt_env_ll_set::item, dlt_env_ll_item::ll, and dlt_env_ll_set::num_elem.
Referenced by dlt_register_context_ll_ts().
int dlt_env_extract_ll_set | ( | char **const | env, |
dlt_env_ll_set *const | ll_set | ||
) |
extract log-level settings from given string
Scan
env | for setttings like apid:ctid:log-level and store them in given |
ll_set | |
env | reference to a string to be parsed, after parsing env will point after the last parse character |
ll_set | set of log-level extracted from given string |
extract log-level settings from given string
The given set is initialized within this function (memory is allocated). Make sure, that the caller frees this memory when it is no longer needed!
Definition at line 408 of file dlt_env_ll.c.
References dlt_env_ll_set::array_size, dlt_env_extract_ll_item(), dlt_env_increase_ll_set(), dlt_env_init_ll_set(), dlt_env_ll_set::item, and dlt_env_ll_set::num_elem.
Referenced by dlt_init_common().
void dlt_env_free_ll_set | ( | dlt_env_ll_set *const | ll_set | ) |
release ll_set
Definition at line 350 of file dlt_env_ll.c.
References dlt_env_ll_set::array_size, dlt_env_ll_set::item, NULL, and dlt_env_ll_set::num_elem.
Referenced by dlt_free().
DltReturnValue dlt_forward_msg | ( | void * | msgdata, |
size_t | size | ||
) |
Forward a complete DLT message to the DLT daemon
msgdata | Message data of DLT message |
size | Size of DLT message |
Definition at line 1315 of file dlt_user.c.
References dlt_buffer_push3(), DltUser::dlt_is_file, dlt_log(), DltUser::dlt_log_handle, DLT_RETURN_BUFFER_FULL, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_PIPE_ERROR, DLT_RETURN_PIPE_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, DLT_USER_BUFFER_LENGTH, dlt_user_log_out2(), dlt_user_log_out3(), dlt_user_log_reattach_to_daemon(), dlt_user_log_send_overflow(), DLT_USER_MESSAGE_LOG, dlt_user_queue_resend(), dlt_user_set_userheader(), dlt_vnlog(), NULL, DltUser::overflow_counter, and DltUser::startup_buffer.
DltReturnValue dlt_free | ( | ) |
Terminate the user lib. This function has to be called when finishing using the DLT user lib.
Ignore errors from these, to not to spam user if dlt_free is accidentally called multiple times.
Definition at line 676 of file dlt_user.c.
References dlt_ll_ts_type::context_description, dlt_buffer_free_dynamic(), dlt_env_free_ll_set(), DLT_FD_INIT, DltUser::dlt_ll_ts, DltUser::dlt_ll_ts_max_num_entries, DltUser::dlt_ll_ts_num_entries, DltUser::dlt_log_handle, DLT_MESSAGE_QUEUE_NAME, dlt_mutex, dlt_receiver_free(), DLT_RETURN_ERROR, DLT_RETURN_OK, DltUser::dlt_segmented_queue_read_handle, DltUser::dlt_segmented_queue_write_handle, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_shm_free_client(), dlt_stop_threads(), dlt_user_dir, dlt_user_freeing, DltUser::dlt_user_handle, dlt_user_initialised, DLT_USER_MAX_FILENAME_LENGTH, DltUser::initial_ll_set, dlt_ll_ts_type::injection_table, dlt_ll_ts_type::log_level_changed_callback, dlt_ll_ts_type::log_level_ptr, mq_init_condition, mq_mutex, dlt_ll_ts_type::nrcallbacks, NULL, DltUser::receiver, DltUser::startup_buffer, and dlt_ll_ts_type::trace_status_ptr.
Referenced by dlt_fork_child_fork_handler(), dlt_fork_parent_fork_handler(), dlt_user_atexit_handler(), and do_dlt_test().
int dlt_get_log_state | ( | ) |
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".
Definition at line 1276 of file dlt_user.c.
References DltUser::log_state.
Referenced by main(), and send_dumped_file().
DltReturnValue dlt_init | ( | ) |
Initialize the user lib communication with daemon. This function has to be called first, before using any DLT user lib functions.
Definition at line 188 of file dlt_user.c.
References atfork_registered, dlt_check_envvar(), dlt_daemon_fifo, DLT_FD_INIT, dlt_fork_child_fork_handler(), dlt_fork_parent_fork_handler(), dlt_fork_pre_fork_handler(), dlt_init_common(), DltUser::dlt_is_file, DltUser::dlt_log_handle, dlt_mkdir_recursive(), dlt_receiver_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, DltUser::dlt_segmented_queue_read_handle, DltUser::dlt_segmented_queue_write_handle, dlt_shm_init_client(), DLT_SHM_KEY, dlt_start_threads(), DLT_USER_BUFFER_LENGTH, dlt_user_dir, dlt_user_freeing, DltUser::dlt_user_handle, dlt_user_initialised, DLT_USER_MAX_FILENAME_LENGTH, DLT_USER_RCVBUF_MAX_SIZE, dlt_vnlog(), dltFifoBaseDir, mq_init_condition, mq_mutex, NULL, DltUser::overflow, DltUser::overflow_counter, and DltUser::receiver.
Referenced by dlt_disable_local_print(), dlt_enable_local_print(), dlt_log_marker(), dlt_nonverbose_mode(), dlt_register_app(), dlt_register_context(), dlt_set_application_ll_ts_limit(), dlt_set_log_mode(), dlt_set_resend_timeout_atexit(), dlt_use_extended_header_for_non_verbose(), dlt_user_log_init(), dlt_verbose_mode(), dlt_with_ecu_id(), dlt_with_session_id(), dlt_with_timestamp(), and do_dlt_test().
DltReturnValue dlt_init_file | ( | const char * | name | ) |
Initialize the user lib writing only to file. This function has to be called first, before using any DLT user lib functions.
name | name of an optional log file |
Definition at line 350 of file dlt_user.c.
References dlt_init_common(), DltUser::dlt_is_file, DltUser::dlt_log_handle, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_USER_BUFFER_LENGTH, dlt_user_initialised, and dlt_vnlog().
Referenced by main().
DltReturnValue dlt_log_int | ( | DltContext * | handle, |
DltLogLevelType | loglevel, | ||
int | data | ||
) |
Write an integer value into a DLT log message.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
data | integer value written into the log message |
Definition at line 3056 of file dlt_user.c.
References DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_log_write_finish(), dlt_user_log_write_int(), dlt_user_log_write_start(), dlt_vlog(), NULL, and DltUser::verbose_mode.
Referenced by test5f().
DltReturnValue dlt_log_marker | ( | ) |
Write marker message to DLT.
Definition at line 3164 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_user_log_send_marker(), and dlt_vlog().
DltReturnValue dlt_log_raw | ( | DltContext * | handle, |
DltLogLevelType | loglevel, | ||
void * | data, | ||
uint16_t | length | ||
) |
Write an unsigned integer value into a DLT log message.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
data | pointer to the parameter written into log message. |
length | length in bytes of the parameter written into log message. |
Definition at line 3128 of file dlt_user.c.
References DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_log_write_finish(), dlt_user_log_write_raw(), dlt_user_log_write_start(), dlt_vlog(), NULL, and DltUser::verbose_mode.
Referenced by test5f().
DltReturnValue dlt_log_string | ( | DltContext * | handle, |
DltLogLevelType | loglevel, | ||
const char * | text | ||
) |
Write a null terminated ASCII string into a DLT log message.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
text | pointer to the ASCII string written into log message containing null termination. |
Definition at line 2940 of file dlt_user.c.
References DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_log_write_finish(), dlt_user_log_write_start(), dlt_user_log_write_string(), dlt_vlog(), NULL, and DltUser::verbose_mode.
Referenced by test5f().
DltReturnValue dlt_log_string_int | ( | DltContext * | handle, |
DltLogLevelType | loglevel, | ||
const char * | text, | ||
int | data | ||
) |
Write a null terminated ASCII string and an integer value into a DLT log message.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
text | pointer to the ASCII string written into log message containing null termination. |
data | integer value written into the log message |
Definition at line 2976 of file dlt_user.c.
References DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_log_write_finish(), dlt_user_log_write_int(), dlt_user_log_write_start(), dlt_user_log_write_string(), dlt_vlog(), NULL, and DltUser::verbose_mode.
Referenced by test5f().
DltReturnValue dlt_log_string_uint | ( | DltContext * | handle, |
DltLogLevelType | loglevel, | ||
const char * | text, | ||
unsigned int | data | ||
) |
Write a null terminated ASCII string and an unsigned integer value into a DLT log message.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
text | pointer to the ASCII string written into log message containing null termination. |
data | unsigned integer value written into the log message |
Definition at line 3016 of file dlt_user.c.
References DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_log_write_finish(), dlt_user_log_write_start(), dlt_user_log_write_string(), dlt_user_log_write_uint(), dlt_vlog(), NULL, and DltUser::verbose_mode.
Referenced by test5f().
DltReturnValue dlt_log_uint | ( | DltContext * | handle, |
DltLogLevelType | loglevel, | ||
unsigned int | data | ||
) |
Write an unsigned integer value into a DLT log message.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
data | unsigned integer value written into the log message |
Definition at line 3092 of file dlt_user.c.
References DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_log_write_finish(), dlt_user_log_write_start(), dlt_user_log_write_uint(), dlt_vlog(), NULL, and DltUser::verbose_mode.
Referenced by test5f().
DltReturnValue dlt_nonverbose_mode | ( | void | ) |
Switch to non-verbose mode
Definition at line 3195 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::verbose_mode.
DltReturnValue dlt_register_app | ( | const char * | appid, |
const char * | description | ||
) |
Register an application in the daemon.
appid | four byte long character array with the application id |
description | long name of the application |
Definition at line 800 of file dlt_user.c.
References DltUser::appID, DltUser::application_description, dlt_init(), DltUser::dlt_log_handle, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_set_id(), dlt_user_initialised, dlt_user_log_resend_buffer(), dlt_user_log_send_register_application(), dlt_vlog(), and NULL.
Referenced by main().
DltReturnValue dlt_register_context | ( | DltContext * | handle, |
const char * | contextid, | ||
const char * | description | ||
) |
Register a context in the daemon. This function has to be called before first usage of the context.
handle | pointer to an object containing information about one special logging context |
contextid | four byte long character array with the context id |
description | long name of the context |
Definition at line 883 of file dlt_user.c.
References dlt_init(), dlt_register_context_ll_ts(), DLT_RETURN_ERROR, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_user_initialised, DLT_USER_LOG_LEVEL_NOT_SET, DLT_USER_TRACE_STATUS_NOT_SET, dlt_vlog(), and NULL.
DltReturnValue dlt_register_context_ll_ts | ( | DltContext * | handle, |
const char * | contextid, | ||
const char * | description, | ||
int | loglevel, | ||
int | tracestatus | ||
) |
Register a context in the daemon with pre-defined log level and pre-defined trace status. This function has to be called before first usage of the context.
handle | pointer to an object containing information about one special logging context |
contextid | four byte long character array with the context id |
description | long name of the context |
loglevel | This is the log level to be pre-set for this context (DLT_LOG_DEFAULT is not allowed here) |
tracestatus | This is the trace status to be pre-set for this context (DLT_TRACE_STATUS_DEFAULT is not allowed here) |
Definition at line 911 of file dlt_user.c.
References DltUser::appID, DltContextData::context_description, dlt_ll_ts_type::context_description, DltContext::contextID, dlt_ll_ts_type::contextID, dlt_env_adjust_ll_from_env(), DltUser::dlt_ll_ts, DltUser::dlt_ll_ts_max_num_entries, DltUser::dlt_ll_ts_num_entries, DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_set_id(), DLT_TRACE_STATUS_MAX, DLT_USER_CONTEXT_ALLOC_SIZE, DLT_USER_INITIAL_LOG_LEVEL, DLT_USER_INITIAL_TRACE_STATUS, dlt_user_log_init(), DLT_USER_LOG_LEVEL_NOT_SET, dlt_user_log_send_register_context(), DLT_USER_TRACE_STATUS_NOT_SET, dlt_vlog(), DltUser::initial_ll_set, dlt_ll_ts_type::injection_table, DltContextData::log_level, dlt_ll_ts_type::log_level, dlt_ll_ts_type::log_level_changed_callback, DltContext::log_level_pos, DltContext::log_level_ptr, dlt_ll_ts_type::log_level_ptr, DltContext::mcnt, dlt_ll_ts_type::nrcallbacks, NULL, DltContextData::trace_status, dlt_ll_ts_type::trace_status, DltContext::trace_status_ptr, and dlt_ll_ts_type::trace_status_ptr.
Referenced by dlt_register_context().
DltReturnValue dlt_register_injection_callback | ( | DltContext * | handle, |
uint32_t | service_id, | ||
int(*)(uint32_t service_id, void *data, uint32_t length) | dlt_injection_callback | ||
) |
Register callback function called when injection message was received
handle | pointer to an object containing information about one special logging context |
service_id | the service id to be waited for |
(*dlt_injection_callback) | function pointer to callback function |
Definition at line 2377 of file dlt_user.c.
References DltUser::dlt_is_file, DltUser::dlt_ll_ts, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, DLT_USER_INJECTION_MIN, dlt_user_log_init(), DltUserInjectionCallback::injection_callback, dlt_ll_ts_type::injection_table, DltContext::log_level_pos, dlt_ll_ts_type::nrcallbacks, NULL, service_id, and DltUserInjectionCallback::service_id.
Referenced by main().
DltReturnValue dlt_register_log_level_changed_callback | ( | DltContext * | handle, |
void(*)(char context_id[DLT_ID_SIZE], uint8_t log_level, uint8_t trace_status) | dlt_log_level_changed_callback | ||
) |
Register callback function called when log level of context was changed
handle | pointer to an object containing information about one special logging context |
(*dlt_log_level_changed_callback) | function pointer to callback function |
Definition at line 2463 of file dlt_user.c.
References DltUser::dlt_is_file, DltUser::dlt_ll_ts, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_user_log_init(), dlt_ll_ts_type::log_level_changed_callback, DltContext::log_level_pos, and NULL.
DltReturnValue dlt_set_application_ll_ts_limit | ( | DltLogLevelType | loglevel, |
DltTraceStatusType | tracestatus | ||
) |
Set maximum logged log level and trace status of application
loglevel | This is the log level to be set for the whole application |
tracestatus | This is the trace status to be set for the whole application |
Definition at line 1208 of file dlt_user.c.
References DltUser::appID, dlt_init(), DltUser::dlt_ll_ts, DltUser::dlt_ll_ts_num_entries, DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_send_app_ll_ts_limit(), DLT_TRACE_STATUS_MAX, dlt_user_initialised, dlt_vlog(), dlt_ll_ts_type::log_level, dlt_ll_ts_type::log_level_ptr, NULL, dlt_ll_ts_type::trace_status, and dlt_ll_ts_type::trace_status_ptr.
DltReturnValue dlt_set_log_mode | ( | DltUserLogMode | mode | ) |
Set the logging mode used by the daemon. The logging mode is stored persistantly by the daemon.
mode | the new logging mode used by the daemon: off, extern, internal, both. |
Definition at line 1281 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_WRONG_PARAMETER, dlt_user_initialised, dlt_user_log_send_log_mode(), DLT_USER_MODE_MAX, and dlt_vlog().
Referenced by main().
int dlt_set_resend_timeout_atexit | ( | uint32_t | timeout_in_milliseconds | ) |
Set maximum timeout for re-sending at exit
timeout_in_milliseconds | maximum time to wait until giving up re-sending, default 10000 (equals to 10 seconds) |
Definition at line 1301 of file dlt_user.c.
References dlt_init(), dlt_user_initialised, and DltUser::timeout_at_exit_handler.
Referenced by DLT_DECLARE_CONTEXT(), and main().
DltReturnValue dlt_unregister_app | ( | void | ) |
Unregister an application in the daemon. This function has to be called when finishing using an application.
Definition at line 1118 of file dlt_user.c.
References DltUser::appID, DltUser::application_description, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_set_id(), dlt_user_initialised, dlt_user_log_send_unregister_application(), dlt_vlog(), and NULL.
Referenced by dlt_user_atexit_handler(), and main().
DltReturnValue dlt_unregister_context | ( | DltContext * | handle | ) |
Unregister a context in the DLT daemon. This function has to be called when finishing using a context.
handle | pointer to an object containing information about one special logging context |
Definition at line 1148 of file dlt_user.c.
References DltContextData::context_description, dlt_ll_ts_type::context_description, dlt_ll_ts_type::contextID, DltUser::dlt_ll_ts, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_set_id(), DLT_USER_INITIAL_LOG_LEVEL, DLT_USER_INITIAL_TRACE_STATUS, dlt_user_log_init(), dlt_user_log_send_unregister_context(), DltContextData::handle, dlt_ll_ts_type::injection_table, dlt_ll_ts_type::log_level, dlt_ll_ts_type::log_level_changed_callback, DltContext::log_level_pos, DltContext::log_level_ptr, dlt_ll_ts_type::log_level_ptr, dlt_ll_ts_type::nrcallbacks, NULL, dlt_ll_ts_type::trace_status, DltContext::trace_status_ptr, and dlt_ll_ts_type::trace_status_ptr.
Referenced by main().
DltReturnValue dlt_use_extended_header_for_non_verbose | ( | int8_t | use_extende_header_for_non_verbose | ) |
Use extended header in non verbose mode. Enabled by default.
use_extende_header_for_non_verbose | Use extended header for non verbose mode if true |
Definition at line 3212 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::use_extende_header_for_non_verbose.
int dlt_user_atexit_blow_out_user_buffer | ( | void | ) |
Try to resend log message in the user buffer. Stops if the dlt_uptime is bigger than dlt_uptime() + DLT_USER_ATEXIT_RESEND_BUFFER_EXIT_TIMEOUT. A pause between the resending attempts can be defined with DLT_USER_ATEXIT_RESEND_BUFFER_SLEEP
Definition at line 621 of file dlt_user.c.
References dlt_buffer_get_message_count(), DltUser::dlt_log_handle, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_uptime(), DLT_USER_ATEXIT_RESEND_BUFFER_SLEEP, DLT_USER_BUFFER_LENGTH, dlt_user_log_reattach_to_daemon(), dlt_user_log_resend_buffer(), dlt_user_log_send_overflow(), dlt_vnlog(), DltUser::overflow_counter, DltUser::startup_buffer, and DltUser::timeout_at_exit_handler.
Referenced by dlt_user_atexit_handler().
DltReturnValue dlt_user_check_buffer | ( | int * | total_size, |
int * | used_size | ||
) |
Get the total size and available size of the shared memory buffer between daemon and applications. This information is useful to control the flow control between applications and daemon. For example only 50% of the buffer should be used for file transfer.
total_size | total size of buffer in bytes |
used_size | used size of buffer in bytes |
Definition at line 4512 of file dlt_user.c.
References dlt_buffer_get_total_size(), dlt_buffer_get_used_size(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_shm_get_total_size(), dlt_shm_get_used_size(), NULL, and DltUser::startup_buffer.
Referenced by check_buffer(), checkUserBufferForFreeSpace(), send_dumped_file(), testFile1Run2(), and testFile2Run2().
DltReturnValue dlt_user_check_library_version | ( | const char * | user_major_version, |
const char * | user_minor_version | ||
) |
Check the version of dlt library with library version used of the application.
Major | version number of application - see dlt_version.h |
Minor | version number of application - see dlt_version.h |
Definition at line 165 of file dlt_user.c.
References dlt_get_major_version(), dlt_get_minor_version(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_USER_BUFFER_LENGTH, DLT_USER_MAX_LIB_VERSION_LENGTH, and dlt_vnlog().
Referenced by dlt_check_library_version().
|
inlinestatic |
Checks the log level passed by the log function if enabled for that context or not. This function can be called by applications before generating their logs. Also called before writing new log messages.
handle | pointer to an object containing information about one special logging context |
loglevel | this is the current log level of the log message to be sent |
Definition at line 788 of file dlt_user.h.
References DLT_LOG_OFF, DLT_RETURN_LOGGING_DISABLED, DLT_RETURN_TRUE, DLT_RETURN_WRONG_PARAMETER, DltContext::log_level_ptr, and NULL.
Referenced by dlt_user_log_write_start_id(), and test5f().
DltReturnValue dlt_user_log_resend_buffer | ( | void | ) |
Try to resend log message in the user buffer.
Definition at line 4321 of file dlt_user.c.
References DltUser::appID, dlt_buffer_copy(), dlt_buffer_get_message_count(), dlt_buffer_remove(), DltUser::dlt_log_handle, DLT_RETURN_OK, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_set_id(), dlt_shm_push(), dlt_user_check_userheader(), dlt_user_log_out3(), DLT_USER_MESSAGE_LOG, DLT_USER_MESSAGE_REGISTER_CONTEXT, DltUser::resend_buffer, and DltUser::startup_buffer.
Referenced by dlt_register_app(), dlt_user_atexit_blow_out_user_buffer(), dlt_user_log_reattach_to_daemon(), dlt_user_log_send_log(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_thread(), and send_dumped_file().
DltReturnValue dlt_user_log_write_bool | ( | DltContextData * | log, |
uint8_t | data | ||
) |
Write a boolean parameter into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | boolean parameter written into log message (mapped to uint8) |
Definition at line 2245 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYPE_INFO_BOOL, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_constant_string | ( | DltContextData * | log, |
const char * | text | ||
) |
Write a constant null terminated ASCII string into a DLT log message. In non verbose mode DLT parameter will not be send at all. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
text | pointer to the parameter written into log message containing null termination. |
Definition at line 2326 of file dlt_user.c.
References DLT_RETURN_OK, dlt_user_log_write_string(), and DltUser::verbose_mode.
DltReturnValue dlt_user_log_write_finish | ( | DltContextData * | log | ) |
Finishing the generation of a DLT log message and sending it to the DLT daemon. This function has to be called after writing all the log attributes of a log message.
log | pointer to an object containing information about logging context data |
Definition at line 1482 of file dlt_user.c.
References DLT_RETURN_WRONG_PARAMETER, DLT_TYPE_LOG, dlt_user_log_send_log(), and NULL.
Referenced by dlt_kpi_log_interrupts(), dlt_kpi_log_list(), dlt_log_int(), dlt_log_raw(), dlt_log_string(), dlt_log_string_int(), dlt_log_string_uint(), dlt_log_uint(), main(), test1f(), test2f(), test3f(), test4f(), test6f(), test7f(), test8f(), and test9f().
DltReturnValue dlt_user_log_write_float32 | ( | DltContextData * | log, |
float32_t | data | ||
) |
Write a float parameter into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | float32_t parameter written into log message. |
Definition at line 1559 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_32BIT, DLT_TYPE_INFO_FLOA, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by logToDlt(), main(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_float64 | ( | DltContextData * | log, |
double | data | ||
) |
Write a double parameter into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | float64_t parameter written into log message. |
Definition at line 1599 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_64BIT, DLT_TYPE_INFO_FLOA, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_int | ( | DltContextData * | log, |
int | data | ||
) |
Write a int parameter into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | int parameter written into log message. |
Definition at line 2062 of file dlt_user.c.
References DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_initialised, dlt_user_log_write_int16(), dlt_user_log_write_int32(), dlt_user_log_write_int64(), dlt_user_log_write_int8(), dlt_vlog(), and NULL.
Referenced by dlt_log_int(), dlt_log_string_int(), main(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_int16 | ( | DltContextData * | log, |
int16_t | data | ||
) |
Definition at line 2140 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_16BIT, DLT_TYPE_INFO_SINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_int(), logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_int32 | ( | DltContextData * | log, |
int32_t | data | ||
) |
Definition at line 2175 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_32BIT, DLT_TYPE_INFO_SINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_int(), logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_int64 | ( | DltContextData * | log, |
int64_t | data | ||
) |
Definition at line 2210 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_64BIT, DLT_TYPE_INFO_SINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_int(), logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_int8 | ( | DltContextData * | log, |
int8_t | data | ||
) |
Definition at line 2105 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_8BIT, DLT_TYPE_INFO_SINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_int(), logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_ptr | ( | DltContextData * | log, |
void * | data | ||
) |
Write a pointer value architecture independent. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | void* parameter written into log message. |
Definition at line 2030 of file dlt_user.c.
References DLT_FORMAT_HEX32, DLT_FORMAT_HEX64, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_initialised, dlt_user_log_write_uint32_formatted(), dlt_user_log_write_uint64_formatted(), dlt_vlog(), and NULL.
DltReturnValue dlt_user_log_write_raw | ( | DltContextData * | log, |
void * | data, | ||
uint16_t | length | ||
) |
Write a binary memory block into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | pointer to the parameter written into log message. |
length | length in bytes of the parameter written into log message. |
Definition at line 1490 of file dlt_user.c.
References DLT_FORMAT_DEFAULT, and dlt_user_log_write_raw_formatted().
Referenced by dlt_log_raw(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_start(), dlt_user_trace_network_truncated(), test2f(), test3f(), and test4f().
DltReturnValue dlt_user_log_write_raw_formatted | ( | DltContextData * | log, |
void * | data, | ||
uint16_t | length, | ||
DltFormatType | type | ||
) |
Write a binary memory block into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | pointer to the parameter written into log message. |
length | length in bytes of the parameter written into log message. |
type | the format information. |
Definition at line 1495 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_FORMAT_BIN16, DLT_FORMAT_BIN8, DLT_FORMAT_HEX64, DLT_FORMAT_HEX8, DLT_FORMAT_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_BIN, DLT_SCOD_HEX, DLT_TYPE_INFO_RAWD, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_raw().
|
inline |
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.
handle | pointer to an object containing information about one special logging context |
log | pointer to an object containing information about logging context data |
loglevel | this is the current log level of the log message to be sent |
Definition at line 1428 of file dlt_user.c.
References DLT_USER_DEFAULT_MSGID, and dlt_user_log_write_start_id().
Referenced by dlt_kpi_log_interrupts(), dlt_kpi_log_list(), dlt_log_int(), dlt_log_raw(), dlt_log_string(), dlt_log_string_int(), dlt_log_string_uint(), dlt_log_uint(), main(), test1f(), test2f(), test3f(), test4f(), test6f(), test7f(), test8f(), and test9f().
DltReturnValue dlt_user_log_write_start_id | ( | DltContext * | handle, |
DltContextData * | log, | ||
DltLogLevelType | loglevel, | ||
uint32_t | messageid | ||
) |
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.
handle | pointer to an object containing information about one special logging context |
log | pointer to an object containing information about logging context data |
loglevel | this is the current log level of the log message to be sent |
messageid | message id of message |
Definition at line 1433 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DltUser::dlt_ll_ts, DLT_LOG_FATAL_RESET_TRAP, DLT_LOG_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_TRUE, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_USER_BUF_MAX_SIZE, dlt_user_is_logLevel_enabled(), dlt_user_log_init(), dlt_vlog(), DltContextData::log_level, NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_start(), main(), and test3f().
DltReturnValue dlt_user_log_write_string | ( | DltContextData * | log, |
const char * | text | ||
) |
Write a null terminated ASCII string into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
text | pointer to the parameter written into log message containing null termination. |
Definition at line 2280 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_ASCII, DLT_TYPE_INFO_STRG, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_kpi_log_interrupts(), dlt_kpi_log_list(), dlt_log_string(), dlt_log_string_int(), dlt_log_string_uint(), dlt_user_log_write_constant_string(), dlt_user_trace_network_segmented_end(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_start(), dlt_user_trace_network_truncated(), main(), test1f(), test2f(), test3f(), test4f(), test6f(), test7f(), test8f(), and test9f().
DltReturnValue dlt_user_log_write_uint | ( | DltContextData * | log, |
unsigned int | data | ||
) |
Write a uint parameter into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | unsigned int parameter written into log message. |
Definition at line 1639 of file dlt_user.c.
References DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_user_initialised, dlt_user_log_write_uint16(), dlt_user_log_write_uint32(), dlt_user_log_write_uint64(), dlt_user_log_write_uint8(), dlt_vlog(), and NULL.
Referenced by dlt_log_string_uint(), dlt_log_uint(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_uint16 | ( | DltContextData * | log, |
uint16_t | data | ||
) |
Definition at line 1717 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_16BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_uint(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_start(), logToDlt(), main(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_uint16_formatted | ( | DltContextData * | log, |
uint16_t | data, | ||
DltFormatType | type | ||
) |
Definition at line 1874 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_FORMAT_BIN16, DLT_FORMAT_BIN8, DLT_FORMAT_HEX64, DLT_FORMAT_HEX8, DLT_FORMAT_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_BIN, DLT_SCOD_HEX, DLT_TYLE_16BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
DltReturnValue dlt_user_log_write_uint32 | ( | DltContextData * | log, |
uint32_t | data | ||
) |
Definition at line 1752 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_32BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_uint(), dlt_user_trace_network_segmented_end(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_start(), dlt_user_trace_network_truncated(), logToDlt(), main(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_uint32_formatted | ( | DltContextData * | log, |
uint32_t | data, | ||
DltFormatType | type | ||
) |
Definition at line 1926 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_FORMAT_BIN16, DLT_FORMAT_BIN8, DLT_FORMAT_HEX64, DLT_FORMAT_HEX8, DLT_FORMAT_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_BIN, DLT_SCOD_HEX, DLT_TYLE_32BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_ptr().
DltReturnValue dlt_user_log_write_uint64 | ( | DltContextData * | log, |
uint64_t | data | ||
) |
Definition at line 1787 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_64BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_uint(), logToDlt(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_uint64_formatted | ( | DltContextData * | log, |
uint64_t | data, | ||
DltFormatType | type | ||
) |
Definition at line 1978 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_FORMAT_BIN16, DLT_FORMAT_BIN8, DLT_FORMAT_HEX64, DLT_FORMAT_HEX8, DLT_FORMAT_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_BIN, DLT_SCOD_HEX, DLT_TYLE_64BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_ptr().
DltReturnValue dlt_user_log_write_uint8 | ( | DltContextData * | log, |
uint8_t | data | ||
) |
Definition at line 1682 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_TYLE_8BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by dlt_user_log_write_uint(), logToDlt(), main(), test2f(), and test3f().
DltReturnValue dlt_user_log_write_uint8_formatted | ( | DltContextData * | log, |
uint8_t | data, | ||
DltFormatType | type | ||
) |
Write a uint parameter into a DLT log message. The output will be formatted as given by the parameter type. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
data | unsigned int parameter written into log message. |
type | The formatting type of the string output. |
Definition at line 1822 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_FORMAT_BIN16, DLT_FORMAT_BIN8, DLT_FORMAT_HEX64, DLT_FORMAT_HEX8, DLT_FORMAT_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_BIN, DLT_SCOD_HEX, DLT_TYLE_8BIT, DLT_TYPE_INFO_UINT, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
DltReturnValue dlt_user_log_write_utf8_string | ( | DltContextData * | log, |
const char * | text | ||
) |
Write a null terminated UTF8 string into a DLT log message. dlt_user_log_write_start has to be called before adding any attributes to the log message. Finish sending log message by calling dlt_user_log_write_finish.
log | pointer to an object containing information about logging context data |
text | pointer to the parameter written into log message containing null termination. |
Definition at line 2332 of file dlt_user.c.
References DltContextData::args_num, DltContextData::buffer, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_USER_BUFFER_FULL, DLT_RETURN_WRONG_PARAMETER, DLT_SCOD_UTF8, DLT_TYPE_INFO_STRG, DLT_USER_BUF_MAX_SIZE, dlt_user_initialised, dlt_vlog(), NULL, DltContextData::size, and DltUser::verbose_mode.
Referenced by logToDlt().
DltReturnValue dlt_user_trace_network | ( | DltContext * | handle, |
DltNetworkTraceType | nw_trace_type, | ||
uint16_t | header_len, | ||
void * | header, | ||
uint16_t | payload_len, | ||
void * | payload | ||
) |
Trace network message
handle | pointer to an object containing information about one special logging context |
nw_trace_type | type of network trace (DLT_NW_TRACE_IPC, DLT_NW_TRACE_CAN, DLT_NW_TRACE_FLEXRAY, or DLT_NW_TRACE_MOST) |
header_len | length of network message header |
header | pointer to network message header |
payload_len | length of network message payload |
payload | pointer to network message payload |
Definition at line 2850 of file dlt_user.c.
References dlt_user_trace_network_truncated().
Referenced by dlt_user_trace_network_segmented(), and test7f().
DltReturnValue dlt_user_trace_network_segmented | ( | DltContext * | handle, |
DltNetworkTraceType | nw_trace_type, | ||
uint16_t | header_len, | ||
void * | header, | ||
uint16_t | payload_len, | ||
void * | payload | ||
) |
Trace network message in segmented asynchronous mode. The sending of the data is done in a separate thread. Please note that handle must exist for the lifetime of the application, because data chunks are sent asynchronously in undetermined future time.
handle | pointer to an object containing information about logging context |
nw_trace_type | type of network trace (DLT_NW_TRACE_IPC, DLT_NW_TRACE_CAN, DLT_NW_TRACE_FLEXRAY, or DLT_NW_TRACE_MOST) |
header_len | length of network message header |
header | pointer to network message header |
payload_len | length of network message payload |
payload | pointer to network message payload |
Definition at line 2770 of file dlt_user.c.
References dlt_init_message_queue(), dlt_log(), DLT_RETURN_BUFFER_FULL, DLT_RETURN_ERROR, DLT_RETURN_OK, DltUser::dlt_segmented_queue_write_handle, DLT_USER_BUF_MAX_SIZE, dlt_user_trace_network(), dlt_user_trace_network_segmented_start(), dlt_vnlog(), s_segmented_data::handle, s_segmented_data::header, s_segmented_data::header_len, s_segmented_data::id, NULL, nw_trace_type, s_segmented_data::nw_trace_type, s_segmented_data::payload, and s_segmented_data::payload_len.
Referenced by test9f().
DltReturnValue dlt_user_trace_network_truncated | ( | DltContext * | handle, |
DltNetworkTraceType | nw_trace_type, | ||
uint16_t | header_len, | ||
void * | header, | ||
uint16_t | payload_len, | ||
void * | payload, | ||
int | allow_truncate | ||
) |
Trace network message, truncated if necessary.
handle | pointer to an object containing information about logging context |
nw_trace_type | type of network trace (DLT_NW_TRACE_IPC, DLT_NW_TRACE_CAN, DLT_NW_TRACE_FLEXRAY, or DLT_NW_TRACE_MOST) |
header_len | length of network message header |
header | pointer to network message header |
payload_len | length of network message payload |
payload | pointer to network message payload |
allow_truncate | Set to > 0 to allow truncating of the message if it is too large. |
Calculate maximum available space in sending buffer after headers.
Definition at line 2855 of file dlt_user.c.
References DltContextData::args_num, DltUser::dlt_ll_ts, DLT_NW_TRACE_MAX, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_TRACE_STATUS_ON, DLT_TYPE_NW_TRACE, DLT_USER_BUF_MAX_SIZE, dlt_user_log_init(), dlt_user_log_send_log(), dlt_user_log_write_raw(), dlt_user_log_write_string(), dlt_user_log_write_uint32(), dlt_vlog(), NULL, nw_trace_type, DltContextData::size, DltContextData::trace_status, and DltContext::trace_status_ptr.
Referenced by dlt_user_trace_network(), and test8f().
DltReturnValue dlt_verbose_mode | ( | void | ) |
Switch to verbose mode
Definition at line 3178 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::verbose_mode.
DltReturnValue dlt_with_ecu_id | ( | int8_t | with_ecu_id | ) |
Send ecu id configuration. Enabled by default.
with_ecu_id | Send ecu id in each message if enabled |
Definition at line 3263 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::with_ecu_id.
Referenced by main().
DltReturnValue dlt_with_session_id | ( | int8_t | with_session_id | ) |
Send session id configuration. Enabled by default.
with_session_id | Send session id in each message if enabled |
Definition at line 3229 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::with_session_id.
Referenced by main().
DltReturnValue dlt_with_timestamp | ( | int8_t | with_timestamp | ) |
Send timestamp configuration. Enabled by default.
with_timestamp | Send timestamp id in each message if enabled |
Definition at line 3246 of file dlt_user.c.
References dlt_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_initialised, dlt_vlog(), and DltUser::with_timestamp.
Referenced by main().