80 #if !defined (__WIN32__) 81 #include <semaphore.h> 92 #define DLT_USER_BUF_MAX_SIZE 1390 94 #define DLT_USER_RESENDBUF_MAX_SIZE (DLT_USER_BUF_MAX_SIZE + 100) 97 #define DLT_SEM_LOCK() { sem_wait(&dlt_mutex); } 98 #define DLT_SEM_FREE() { sem_post(&dlt_mutex); } 137 void (*log_level_changed_callback) (
char context_id[
DLT_ID_SIZE],uint8_t log_level,uint8_t trace_status);
155 void (*log_level_changed_callback) (
char context_id[
DLT_ID_SIZE],uint8_t log_level,uint8_t trace_status);
230 #ifdef DLT_SHM_ENABLE 233 #ifdef DLT_TEST_ENABLE 234 int corrupt_user_header;
235 int corrupt_message_size;
236 int16_t corrupt_message_size_size;
567 int (*dlt_injection_callback)(uint32_t service_id,
void *
data, uint32_t length));
576 void (*dlt_log_level_changed_callback)(
char context_id[
DLT_ID_SIZE],uint8_t log_level, uint8_t trace_status));
803 #ifdef DLT_TEST_ENABLE 804 void dlt_user_test_corrupt_user_header(
int enable);
805 void dlt_user_test_corrupt_message_size(
int enable,int16_t size);
int dlt_set_resend_timeout_atexit(uint32_t timeout_in_milliseconds)
DltReturnValue dlt_user_log_write_float32(DltContextData *log, float32_t data)
DltReturnValue dlt_user_log_write_int16(DltContextData *log, int16_t data)
DltReturnValue dlt_user_log_write_string(DltContextData *log, const char *text)
int dlt_user_atexit_blow_out_user_buffer(void)
dlt_ll_ts_type * dlt_ll_ts
DltReturnValue dlt_verbose_mode(void)
DltReturnValue dlt_user_log_write_int(DltContextData *log, int data)
mqd_t dlt_segmented_queue_read_handle
DltReturnValue dlt_unregister_app(void)
pthread_t dlt_segmented_nwt_handle
DltReturnValue dlt_register_context_ll_ts(DltContext *handle, const char *contextid, const char *description, int loglevel, int tracestatus)
DltReturnValue dlt_free()
DltReturnValue dlt_register_app(const char *appid, const char *description)
DltReturnValue dlt_register_context(DltContext *handle, const char *contextid, const char *description)
DltReturnValue dlt_user_log_write_uint64_formatted(DltContextData *log, uint64_t data, DltFormatType type)
DltReturnValue dlt_use_extended_header_for_non_verbose(int8_t use_extende_header_for_non_verbose)
DltReturnValue dlt_user_log_write_int32(DltContextData *log, int32_t data)
DltReturnValue dlt_with_session_id(int8_t with_session_id)
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
DltReturnValue dlt_user_log_write_uint16_formatted(DltContextData *log, uint16_t data, DltFormatType type)
DltReturnValue dlt_init_file(const char *name)
uint32_t dlt_ll_ts_max_num_entries
mqd_t dlt_segmented_queue_write_handle
DltReturnValue dlt_enable_local_print(void)
char * context_description
DltReturnValue dlt_register_log_level_changed_callback(DltContext *handle, void(*dlt_log_level_changed_callback)(char context_id[DLT_ID_SIZE], uint8_t log_level, uint8_t trace_status))
uint32_t overflow_counter
int dlt_env_extract_ll_set(char **const env, dlt_env_ll_set *const ll_set)
extract log-level settings from given string
char * application_description
dlt_env_ll_set initial_ll_set
uint32_t timeout_at_exit_handler
static char * service_id[]
DltReturnValue dlt_check_library_version(const char *user_major_version, const char *user_minor_version)
DltReturnValue dlt_log_uint(DltContext *handle, DltLogLevelType loglevel, unsigned int data)
static char data[kDataSize]
DltReturnValue dlt_user_log_write_raw_formatted(DltContextData *log, void *data, uint16_t length, DltFormatType type)
int8_t enable_local_print
DltReturnValue dlt_user_log_write_ptr(DltContextData *log, void *data)
DltReturnValue dlt_user_log_write_utf8_string(DltContextData *log, const char *text)
DltReturnValue dlt_user_check_buffer(int *total_size, int *used_size)
DltReturnValue dlt_user_log_write_int64(DltContextData *log, int64_t data)
unsigned char buffer[BUFFER_SIZE]
Buffer for dlt file transfer. The size is defined by BUFFER_SIZE.
DltReturnValue dlt_init()
DltReturnValue dlt_user_log_write_uint8(DltContextData *log, uint8_t data)
DltReturnValue dlt_log_int(DltContext *handle, DltLogLevelType loglevel, int data)
DltReturnValue dlt_user_log_write_uint32_formatted(DltContextData *log, uint32_t data, DltFormatType type)
DltReturnValue dlt_disable_local_print(void)
DltReturnValue dlt_user_log_write_uint(DltContextData *log, unsigned int data)
DltReturnValue dlt_user_log_write_uint32(DltContextData *log, uint32_t data)
DltReturnValue dlt_user_trace_network_segmented(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload)
int8_t use_extende_header_for_non_verbose
DltReturnValue dlt_user_log_write_start_id(DltContext *handle, DltContextData *log, DltLogLevelType loglevel, uint32_t messageid)
DltReturnValue dlt_user_check_library_version(const char *user_major_version, const char *user_minor_version)
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)
DltReturnValue dlt_log_string(DltContext *handle, DltLogLevelType loglevel, const char *text)
DltReturnValue dlt_with_timestamp(int8_t with_timestamp)
DltReturnValue dlt_set_application_ll_ts_limit(DltLogLevelType loglevel, DltTraceStatusType tracestatus)
#define DLT_USER_RESENDBUF_MAX_SIZE
DltReturnValue dlt_log_string_int(DltContext *handle, DltLogLevelType loglevel, const char *text, int data)
void dlt_env_free_ll_set(dlt_env_ll_set *const ll_set)
release ll_set
DltReturnValue dlt_user_log_write_int8(DltContextData *log, int8_t data)
DltReturnValue dlt_log_marker()
static DltReturnValue dlt_user_is_logLevel_enabled(DltContext *handle, DltLogLevelType loglevel)
#define DLT_USER_BUF_MAX_SIZE
DltReturnValue dlt_user_log_write_uint8_formatted(DltContextData *log, uint8_t data, DltFormatType type)
holds all initial log-levels given via environment variable DLT_INITIAL_LOG_LEVEL ...
DltReturnValue dlt_log_string_uint(DltContext *handle, DltLogLevelType loglevel, const char *text, unsigned int data)
DltReturnValue dlt_register_injection_callback(DltContext *handle, uint32_t service_id, int(*dlt_injection_callback)(uint32_t service_id, void *data, uint32_t length))
int8_t * trace_status_ptr
DltReturnValue dlt_set_log_mode(DltUserLogMode mode)
DltReturnValue dlt_user_log_write_uint64(DltContextData *log, uint64_t data)
DltReturnValue dlt_user_log_write_uint16(DltContextData *log, uint16_t data)
DltReturnValue dlt_nonverbose_mode(void)
char * context_description
holds initial log-level for given appId:ctxId pair
uint32_t dlt_ll_ts_num_entries
DltReturnValue dlt_user_log_write_constant_string(DltContextData *log, const char *text)
DltReturnValue dlt_user_trace_network(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload)
DltReturnValue dlt_unregister_context(DltContext *handle)
DltReturnValue dlt_log_raw(DltContext *handle, DltLogLevelType loglevel, void *data, uint16_t length)
DltUserInjectionCallback * injection_table
DltReturnValue dlt_user_log_write_bool(DltContextData *log, uint8_t data)
DltReturnValue dlt_user_log_write_raw(DltContextData *log, void *data, uint16_t length)
DltReturnValue dlt_user_log_write_finish(DltContextData *log)
DltReturnValue dlt_user_log_write_float64(DltContextData *log, double data)
DltReturnValue dlt_user_log_resend_buffer(void)
DltReturnValue dlt_with_ecu_id(int8_t with_ecu_id)
DltReturnValue dlt_user_log_write_start(DltContext *handle, DltContextData *log, DltLogLevelType loglevel)
int8_t * trace_status_ptr
DltReturnValue dlt_forward_msg(void *msgdata, size_t size)