automotive-dlt
|
Data Structures | |
struct | PACKED |
struct | sDltMessage |
struct | DltFilter |
struct | sDltFile |
struct | DltReceiver |
struct | DltBuffer |
struct | DltBufferHead |
struct | DltBufferBlockHead |
Macros | |
#define | PACKED __attribute__((aligned(1),packed)) |
#define | DLT_SWAP_64(value) ((((uint64_t)DLT_SWAP_32((value)&0xffffffffull))<<32) | (DLT_SWAP_32((value)>>32))) |
#define | DLT_SWAP_16(value) ((((value) >> 8)&0xff) | (((value) << 8)&0xff00)) |
#define | DLT_SWAP_32(value) ((((value) >> 24)&0xff) | (((value) << 8)&0xff0000) | (((value) >> 8)&0xff00) | (((value) << 24)&0xff000000)) |
#define | LITTLE_ENDIAN 1234 |
#define | BIG_ENDIAN 4321 |
#define | BYTE_ORDER LITTLE_ENDIAN |
#define | DLT_HTOBE_16(x) DLT_SWAP_16((x)) |
#define | DLT_HTOLE_16(x) ((x)) |
#define | DLT_BETOH_16(x) DLT_SWAP_16((x)) |
#define | DLT_LETOH_16(x) ((x)) |
#define | DLT_HTOBE_32(x) DLT_SWAP_32((x)) |
#define | DLT_HTOLE_32(x) ((x)) |
#define | DLT_BETOH_32(x) DLT_SWAP_32((x)) |
#define | DLT_LETOH_32(x) ((x)) |
#define | DLT_HTOBE_64(x) DLT_SWAP_64((x)) |
#define | DLT_HTOLE_64(x) ((x)) |
#define | DLT_BETOH_64(x) DLT_SWAP_64((x)) |
#define | DLT_LETOH_64(x) ((x)) |
#define | DLT_ENDIAN_GET_16(htyp, x) ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_16(x):DLT_LETOH_16(x)) |
#define | DLT_ENDIAN_GET_32(htyp, x) ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_32(x):DLT_LETOH_32(x)) |
#define | DLT_ENDIAN_GET_64(htyp, x) ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_64(x):DLT_LETOH_64(x)) |
#define | DLT_DAEMON_TCP_PORT 3490 |
#define | DLT_FD_INIT -1 |
#define | DLT_FD_MINIMUM 3 |
#define | DLT_ID_SIZE 4 |
#define | DLT_SIZE_WEID DLT_ID_SIZE |
#define | DLT_SIZE_WSID (sizeof(uint32_t)) |
#define | DLT_SIZE_WTMS (sizeof(uint32_t)) |
#define | DLT_STANDARD_HEADER_EXTRA_SIZE(htyp) ( (DLT_IS_HTYP_WEID(htyp) ? DLT_SIZE_WEID : 0) + (DLT_IS_HTYP_WSID(htyp) ? DLT_SIZE_WSID : 0) + (DLT_IS_HTYP_WTMS(htyp) ? DLT_SIZE_WTMS : 0) ) |
#define | PRINT_FUNCTION_VERBOSE(_verbose) |
#define | NULL (char*)0 |
#define | DLT_MSG_IS_CONTROL(MSG) |
#define | DLT_MSG_IS_CONTROL_REQUEST(MSG) |
#define | DLT_MSG_IS_CONTROL_RESPONSE(MSG) |
#define | DLT_MSG_IS_CONTROL_TIME(MSG) |
#define | DLT_MSG_IS_NW_TRACE(MSG) |
#define | DLT_MSG_IS_TRACE_MOST(MSG) |
#define | DLT_MSG_IS_NONVERBOSE(MSG) |
#define | DLT_MESSAGE_BUFFER_NO_OVERFLOW 0x00 |
#define | DLT_MESSAGE_BUFFER_OVERFLOW 0x01 |
#define | DLT_OUTPUT_HEX 1 |
#define | DLT_OUTPUT_ASCII 2 |
#define | DLT_OUTPUT_MIXED_FOR_PLAIN 3 |
#define | DLT_OUTPUT_MIXED_FOR_HTML 4 |
#define | DLT_OUTPUT_ASCII_LIMITED 5 |
#define | DLT_FILTER_MAX 30 |
#define | DLT_MSG_READ_VALUE(dst, src, length, type) |
#define | DLT_MSG_READ_ID(dst, src, length) |
#define | DLT_MSG_READ_STRING(dst, src, maxlength, length) |
#define | DLT_MSG_READ_NULL(src, maxlength, length) |
#define | DLT_HEADER_SHOW_NONE 0x0000 |
#define | DLT_HEADER_SHOW_TIME 0x0001 |
#define | DLT_HEADER_SHOW_TMSTP 0x0002 |
#define | DLT_HEADER_SHOW_MSGCNT 0x0004 |
#define | DLT_HEADER_SHOW_ECUID 0x0008 |
#define | DLT_HEADER_SHOW_APID 0x0010 |
#define | DLT_HEADER_SHOW_CTID 0x0020 |
#define | DLT_HEADER_SHOW_MSGTYPE 0x0040 |
#define | DLT_HEADER_SHOW_MSGSUBTYPE 0x0080 |
#define | DLT_HEADER_SHOW_VNVSTATUS 0x0100 |
#define | DLT_HEADER_SHOW_NOARG 0x0200 |
#define | DLT_HEADER_SHOW_ALL 0xFFFF |
#define | DLT_RCV_NONE 0 |
#define | DLT_RCV_SKIP_HEADER (1 << 0) |
#define | DLT_RCV_REMOVE (1 << 1) |
#define | DLT_MOUNT_PATH_MAX 1024 |
#define | DLT_ENTRY_MAX 100 |
#define | STATIC static |
#define | DLT_BUFFER_HEAD "SHM" |
#define | DLT_MESSAGE_ERROR_OK 0 |
#define | DLT_MESSAGE_ERROR_UNKNOWN -1 |
#define | DLT_MESSAGE_ERROR_SIZE -2 |
#define | DLT_MESSAGE_ERROR_CONTENT -3 |
Typedefs | |
typedef char | ID4[DLT_ID_SIZE] |
typedef struct sDltMessage | DltMessage |
typedef struct sDltFile | DltFile |
Enumerations | |
enum | { DLT_LOG_TO_CONSOLE =0, DLT_LOG_TO_SYSLOG =1, DLT_LOG_TO_FILE =2, DLT_LOG_DROPPED =3 } |
Functions | |
void | dlt_print_hex (uint8_t *ptr, int size) |
DltReturnValue | dlt_print_hex_string (char *text, int textlength, uint8_t *ptr, int size) |
DltReturnValue | dlt_print_mixed_string (char *text, int textlength, uint8_t *ptr, int size, int html) |
DltReturnValue | dlt_print_char_string (char **text, int textlength, uint8_t *ptr, int size) |
void | dlt_print_id (char *text, const char *id) |
void | dlt_set_id (char *id, const char *text) |
void | dlt_clean_string (char *text, int length) |
DltReturnValue | dlt_filter_init (DltFilter *filter, int verbose) |
DltReturnValue | dlt_filter_free (DltFilter *filter, int verbose) |
DltReturnValue | dlt_filter_load (DltFilter *filter, const char *filename, int verbose) |
DltReturnValue | dlt_filter_save (DltFilter *filter, const char *filename, int verbose) |
int | dlt_filter_find (DltFilter *filter, const char *apid, const char *ctid, int verbose) |
DltReturnValue | dlt_filter_add (DltFilter *filter, const char *apid, const char *ctid, int verbose) |
DltReturnValue | dlt_filter_delete (DltFilter *filter, const char *apid, const char *ctid, int verbose) |
DltReturnValue | dlt_message_init (DltMessage *msg, int verbose) |
DltReturnValue | dlt_message_free (DltMessage *msg, int verbose) |
DltReturnValue | dlt_message_header (DltMessage *msg, char *text, int textlength, int verbose) |
DltReturnValue | dlt_message_header_flags (DltMessage *msg, char *text, int textlength, int flags, int verbose) |
DltReturnValue | dlt_message_payload (DltMessage *msg, char *text, int textlength, int type, int verbose) |
DltReturnValue | dlt_message_filter_check (DltMessage *msg, DltFilter *filter, int verbose) |
int | dlt_message_read (DltMessage *msg, uint8_t *buffer, unsigned int length, int resync, int verbose) |
DltReturnValue | dlt_message_get_extraparameters (DltMessage *msg, int verbose) |
DltReturnValue | dlt_message_set_extraparameters (DltMessage *msg, int verbose) |
DltReturnValue | dlt_file_init (DltFile *file, int verbose) |
DltReturnValue | dlt_file_set_filter (DltFile *file, DltFilter *filter, int verbose) |
DltReturnValue | dlt_file_open (DltFile *file, const char *filename, int verbose) |
DltReturnValue | dlt_file_read (DltFile *file, int verbose) |
DltReturnValue | dlt_file_read_raw (DltFile *file, int resync, int verbose) |
DltReturnValue | dlt_file_close (DltFile *file, int verbose) |
DltReturnValue | dlt_file_read_header (DltFile *file, int verbose) |
DltReturnValue | dlt_file_read_header_raw (DltFile *file, int resync, int verbose) |
DltReturnValue | dlt_file_read_header_extended (DltFile *file, int verbose) |
DltReturnValue | dlt_file_read_data (DltFile *file, int verbose) |
DltReturnValue | dlt_file_message (DltFile *file, int index, int verbose) |
DltReturnValue | dlt_file_free (DltFile *file, int verbose) |
void | dlt_log_set_filename (const char *filename) |
void | dlt_log_set_level (int level) |
void | dlt_log_init (int mode) |
DltReturnValue | dlt_log (int prio, char *s) |
DltReturnValue | dlt_vlog (int prio, const char *format,...) |
DltReturnValue | dlt_vnlog (int prio, size_t size, const char *format,...) |
void | dlt_log_free (void) |
DltReturnValue | dlt_receiver_init (DltReceiver *receiver, int _fd, int _buffersize) |
DltReturnValue | dlt_receiver_free (DltReceiver *receiver) |
int | dlt_receiver_receive_socket (DltReceiver *receiver) |
int | dlt_receiver_receive_fd (DltReceiver *receiver) |
DltReturnValue | dlt_receiver_remove (DltReceiver *receiver, int size) |
DltReturnValue | dlt_receiver_move_to_begin (DltReceiver *receiver) |
int | dlt_receiver_check_and_get (DltReceiver *receiver, void *dest, unsigned int to_get, unsigned int skip_header) |
DltReturnValue | dlt_set_storageheader (DltStorageHeader *storageheader, const char *ecu) |
DltReturnValue | dlt_check_storageheader (DltStorageHeader *storageheader) |
DltReturnValue | dlt_buffer_init_static_server (DltBuffer *buf, const unsigned char *ptr, uint32_t size) |
DltReturnValue | dlt_buffer_init_static_client (DltBuffer *buf, const unsigned char *ptr, uint32_t size) |
DltReturnValue | dlt_buffer_init_dynamic (DltBuffer *buf, uint32_t min_size, uint32_t max_size, uint32_t step_size) |
DltReturnValue | dlt_buffer_free_static (DltBuffer *buf) |
DltReturnValue | dlt_buffer_free_dynamic (DltBuffer *buf) |
DltReturnValue | dlt_buffer_push (DltBuffer *buf, const unsigned char *data, unsigned int size) |
DltReturnValue | dlt_buffer_push3 (DltBuffer *buf, const unsigned char *data1, unsigned int size1, const unsigned char *data2, unsigned int size2, const unsigned char *data3, unsigned int size3) |
int | dlt_buffer_pull (DltBuffer *buf, unsigned char *data, int max_size) |
int | dlt_buffer_copy (DltBuffer *buf, unsigned char *data, int max_size) |
int | dlt_buffer_remove (DltBuffer *buf) |
void | dlt_buffer_info (DltBuffer *buf) |
void | dlt_buffer_status (DltBuffer *buf) |
uint32_t | dlt_buffer_get_total_size (DltBuffer *buf) |
int | dlt_buffer_get_used_size (DltBuffer *buf) |
int | dlt_buffer_get_message_count (DltBuffer *buf) |
DltReturnValue | dlt_setup_serial (int fd, speed_t speed) |
speed_t | dlt_convert_serial_speed (int baudrate) |
void | dlt_get_version (char *buf, size_t size) |
void | dlt_get_major_version (char *buf, size_t size) |
void | dlt_get_minor_version (char *buf, size_t size) |
DltReturnValue | dlt_init_common (void) |
uint32_t | dlt_uptime (void) |
DltReturnValue | dlt_message_print_header (DltMessage *message, char *text, uint32_t size, int verbose) |
DltReturnValue | dlt_message_print_hex (DltMessage *message, char *text, uint32_t size, int verbose) |
DltReturnValue | dlt_message_print_ascii (DltMessage *message, char *text, uint32_t size, int verbose) |
DltReturnValue | dlt_message_print_mixed_plain (DltMessage *message, char *text, uint32_t size, int verbose) |
DltReturnValue | dlt_message_print_mixed_html (DltMessage *message, char *text, uint32_t size, int verbose) |
DltReturnValue | dlt_message_argument_print (DltMessage *msg, uint32_t type_info, uint8_t **ptr, int32_t *datalength, char *text, int textlength, int byteLength, int verbose) |
void | dlt_check_envvar () |
int | dlt_mkdir_recursive (const char *dir) |
Variables | |
const char | dltSerialHeader [DLT_ID_SIZE] |
char | dltSerialHeaderChar [DLT_ID_SIZE] |
char | dltFifoBaseDir [PATH_MAX+1] |
#define BIG_ENDIAN 4321 |
Definition at line 118 of file dlt_common.h.
#define BYTE_ORDER LITTLE_ENDIAN |
Definition at line 125 of file dlt_common.h.
#define DLT_BETOH_16 | ( | x | ) | DLT_SWAP_16((x)) |
Definition at line 150 of file dlt_common.h.
Referenced by dlt_file_read_header(), dlt_file_read_header_raw(), dlt_message_read(), and dlt_user_print_msg().
#define DLT_BETOH_32 | ( | x | ) | DLT_SWAP_32((x)) |
Definition at line 155 of file dlt_common.h.
Referenced by dlt_daemon_process_user_message_log(), and dlt_message_get_extraparameters().
#define DLT_BETOH_64 | ( | x | ) | DLT_SWAP_64((x)) |
Definition at line 160 of file dlt_common.h.
#define DLT_BUFFER_HEAD "SHM" |
Definition at line 701 of file dlt_common.h.
Referenced by dlt_buffer_get(), and dlt_buffer_push3().
#define DLT_DAEMON_TCP_PORT 3490 |
The standard TCP Port used for DLT daemon, can be overwritten via -p <port> when starting dlt-daemon
Definition at line 192 of file dlt_common.h.
Referenced by dlt_client_init(), dlt_client_init_port(), dlt_gateway_configure(), and option_handling().
#define DLT_ENDIAN_GET_16 | ( | htyp, | |
x | |||
) | ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_16(x):DLT_LETOH_16(x)) |
Definition at line 164 of file dlt_common.h.
Referenced by dlt_message_argument_print(), and dlt_testclient_message_callback().
#define DLT_ENDIAN_GET_32 | ( | htyp, | |
x | |||
) | ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_32(x):DLT_LETOH_32(x)) |
Definition at line 165 of file dlt_common.h.
Referenced by dlt_daemon_client_process_control(), dlt_daemon_control_callsw_cinjection(), dlt_message_argument_print(), dlt_message_payload(), and dlt_testclient_message_callback().
#define DLT_ENDIAN_GET_64 | ( | htyp, | |
x | |||
) | ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_64(x):DLT_LETOH_64(x)) |
Definition at line 166 of file dlt_common.h.
Referenced by dlt_message_argument_print().
#define DLT_ENTRY_MAX 100 |
Maximal length of an entry
Definition at line 337 of file dlt_common.h.
Referenced by dlt_daemon_control_passive_node_connect_status().
#define DLT_FD_INIT -1 |
Definition at line 196 of file dlt_common.h.
Referenced by dlt_daemon_application_add(), dlt_daemon_application_del(), dlt_daemon_applications_invalidate_fd(), dlt_daemon_contexts_invalidate_fd(), dlt_daemon_control_callsw_cinjection(), dlt_daemon_user_send_log_level(), dlt_daemon_user_send_log_state(), dlt_free(), dlt_init(), dlt_init_common(), and dlt_user_log_check_user_message().
#define DLT_FD_MINIMUM 3 |
Definition at line 199 of file dlt_common.h.
Referenced by dlt_daemon_application_del(), dlt_daemon_control_set_trace_status(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_send_log_level(), dlt_daemon_user_send_all_log_state(), dlt_daemon_user_send_all_update(), and dlt_daemon_user_send_default_update().
#define DLT_FILTER_MAX 30 |
Maximum number of filters
Definition at line 276 of file dlt_common.h.
Referenced by dlt_filter_add(), and dlt_filter_load().
#define DLT_HEADER_SHOW_ALL 0xFFFF |
Definition at line 322 of file dlt_common.h.
Referenced by dlt_message_header(), and dlt_message_header_flags().
#define DLT_HEADER_SHOW_APID 0x0010 |
Definition at line 316 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_CTID 0x0020 |
Definition at line 317 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_ECUID 0x0008 |
Definition at line 315 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_MSGCNT 0x0004 |
Definition at line 314 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_MSGSUBTYPE 0x0080 |
Definition at line 319 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_MSGTYPE 0x0040 |
Definition at line 318 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_NOARG 0x0200 |
Definition at line 321 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_NONE 0x0000 |
Definition at line 311 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_TIME 0x0001 |
Definition at line 312 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_TMSTP 0x0002 |
Definition at line 313 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HEADER_SHOW_VNVSTATUS 0x0100 |
Definition at line 320 of file dlt_common.h.
Referenced by dlt_message_header_flags().
#define DLT_HTOBE_16 | ( | x | ) | DLT_SWAP_16((x)) |
Definition at line 148 of file dlt_common.h.
Referenced by dlt_client_send_ctrl_msg(), dlt_daemon_client_send_control_message(), dlt_daemon_control_message_time(), dlt_daemon_log_internal(), dlt_gateway_send_control_message(), dlt_user_log_send_log(), dlt_user_print_msg(), and prepare_headers().
#define DLT_HTOBE_32 | ( | x | ) | DLT_SWAP_32((x)) |
Definition at line 153 of file dlt_common.h.
Referenced by dlt_daemon_log_internal(), and dlt_message_set_extraparameters().
#define DLT_HTOBE_64 | ( | x | ) | DLT_SWAP_64((x)) |
Definition at line 158 of file dlt_common.h.
#define DLT_HTOLE_16 | ( | x | ) | ((x)) |
Definition at line 149 of file dlt_common.h.
#define DLT_HTOLE_32 | ( | x | ) | ((x)) |
Definition at line 154 of file dlt_common.h.
#define DLT_HTOLE_64 | ( | x | ) | ((x)) |
Definition at line 159 of file dlt_common.h.
#define DLT_ID_SIZE 4 |
The size of a DLT ID
Definition at line 204 of file dlt_common.h.
Referenced by dlt_daemon_application_find(), dlt_daemon_applications_save(), dlt_daemon_cmp_apid(), dlt_daemon_cmp_apid_ctid(), dlt_daemon_context_find(), dlt_daemon_contexts_save(), dlt_daemon_control_callsw_cinjection(), dlt_daemon_control_get_log_info(), dlt_daemon_control_passive_node_connect_status(), dlt_daemon_control_set_log_level(), dlt_daemon_control_set_trace_status(), dlt_daemon_find_multiple_context_and_send(), DLT_DECLARE_CONTEXT(), dlt_file_read_header_raw(), dlt_filter_delete(), dlt_filter_find(), dlt_filter_load(), dlt_gateway_process_on_demand_request(), dlt_getloginfo_make_loginfo(), dlt_logstorage_get_config(), dlt_logstorage_split_key(), dlt_logstorage_update_all_contexts(), dlt_logstorage_update_context_loglevel(), dlt_logstorage_write(), dlt_message_filter_check(), dlt_message_get_extraparameters(), dlt_message_set_extraparameters(), dlt_passive_node_prepare_message_body(), dlt_print_id(), dlt_print_passive_node_status(), dlt_process_get_log_info(), dlt_user_log_check_user_message(), main(), and set_node_id().
#define DLT_LETOH_16 | ( | x | ) | ((x)) |
Definition at line 151 of file dlt_common.h.
#define DLT_LETOH_32 | ( | x | ) | ((x)) |
Definition at line 156 of file dlt_common.h.
#define DLT_LETOH_64 | ( | x | ) | ((x)) |
Definition at line 161 of file dlt_common.h.
#define DLT_MESSAGE_BUFFER_NO_OVERFLOW 0x00 |
Buffer overflow has not occured
Definition at line 264 of file dlt_common.h.
#define DLT_MESSAGE_BUFFER_OVERFLOW 0x01 |
Buffer overflow has occured
Definition at line 265 of file dlt_common.h.
Referenced by dlt_daemon_control_message_buffer_overflow().
#define DLT_MESSAGE_ERROR_CONTENT -3 |
Definition at line 713 of file dlt_common.h.
Referenced by dlt_message_read().
#define DLT_MESSAGE_ERROR_OK 0 |
Definition at line 710 of file dlt_common.h.
Referenced by dlt_client_main_loop(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_messages(), dlt_daemon_process_user_message_log(), dlt_gateway_process_passive_node_messages(), and dlt_message_read().
#define DLT_MESSAGE_ERROR_SIZE -2 |
Definition at line 712 of file dlt_common.h.
Referenced by dlt_daemon_process_user_message_log(), and dlt_message_read().
#define DLT_MESSAGE_ERROR_UNKNOWN -1 |
Definition at line 711 of file dlt_common.h.
Referenced by dlt_message_read().
#define DLT_MOUNT_PATH_MAX 1024 |
Maximal length of mounted path
Definition at line 332 of file dlt_common.h.
Referenced by dlt_logstorage_device_connected(), dlt_logstorage_device_disconnected(), dlt_logstorage_log_file_name(), dlt_logstorage_open_log_file(), logstorage_find_dev_info(), logstorage_store_dev_info(), parse_args(), prepare_message_body(), and set_default_path().
#define DLT_MSG_IS_CONTROL | ( | MSG | ) |
Definition at line 235 of file dlt_common.h.
Referenced by dlt_message_payload().
#define DLT_MSG_IS_CONTROL_REQUEST | ( | MSG | ) |
Definition at line 238 of file dlt_common.h.
Referenced by dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), and dlt_daemon_process_control_messages().
#define DLT_MSG_IS_CONTROL_RESPONSE | ( | MSG | ) |
Definition at line 242 of file dlt_common.h.
Referenced by dlt_message_payload().
#define DLT_MSG_IS_CONTROL_TIME | ( | MSG | ) |
Definition at line 246 of file dlt_common.h.
Referenced by dlt_message_payload().
#define DLT_MSG_IS_NONVERBOSE | ( | MSG | ) |
Definition at line 257 of file dlt_common.h.
Referenced by dlt_message_payload(), and dlt_testclient_message_callback().
#define DLT_MSG_IS_NW_TRACE | ( | MSG | ) |
Definition at line 250 of file dlt_common.h.
#define DLT_MSG_IS_TRACE_MOST | ( | MSG | ) |
Definition at line 253 of file dlt_common.h.
#define DLT_MSG_READ_ID | ( | dst, | |
src, | |||
length | |||
) |
Definition at line 286 of file dlt_common.h.
#define DLT_MSG_READ_NULL | ( | src, | |
maxlength, | |||
length | |||
) |
Definition at line 303 of file dlt_common.h.
#define DLT_MSG_READ_STRING | ( | dst, | |
src, | |||
maxlength, | |||
length | |||
) |
Definition at line 294 of file dlt_common.h.
Referenced by dlt_message_argument_print(), and dlt_testclient_message_callback().
#define DLT_MSG_READ_VALUE | ( | dst, | |
src, | |||
length, | |||
type | |||
) |
Definition at line 278 of file dlt_common.h.
Referenced by dlt_daemon_control_callsw_cinjection(), dlt_message_argument_print(), dlt_message_payload(), and dlt_testclient_message_callback().
#define DLT_OUTPUT_ASCII 2 |
Definition at line 271 of file dlt_common.h.
Referenced by dlt_control_callback(), dlt_message_print_ascii(), dlt_receive_message_callback(), dlt_testclient_message_callback(), main(), and receive().
#define DLT_OUTPUT_ASCII_LIMITED 5 |
Definition at line 274 of file dlt_common.h.
Referenced by dlt_message_payload().
#define DLT_OUTPUT_HEX 1 |
Definition at line 270 of file dlt_common.h.
Referenced by dlt_message_payload(), and dlt_message_print_hex().
#define DLT_OUTPUT_MIXED_FOR_HTML 4 |
Definition at line 273 of file dlt_common.h.
Referenced by dlt_message_payload(), and dlt_message_print_mixed_html().
#define DLT_OUTPUT_MIXED_FOR_PLAIN 3 |
Definition at line 272 of file dlt_common.h.
Referenced by dlt_message_payload(), and dlt_message_print_mixed_plain().
#define DLT_RCV_NONE 0 |
Definition at line 325 of file dlt_common.h.
Referenced by dlt_daemon_process_user_message_register_application(), and dlt_daemon_process_user_message_register_context().
#define DLT_RCV_REMOVE (1 << 1) |
Definition at line 327 of file dlt_common.h.
Referenced by dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_log_mode(), dlt_daemon_process_user_message_overflow(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_process_user_message_unregister_application(), dlt_daemon_process_user_message_unregister_context(), and dlt_receiver_check_and_get().
#define DLT_RCV_SKIP_HEADER (1 << 0) |
Definition at line 326 of file dlt_common.h.
Referenced by dlt_daemon_process_user_message_log_mode(), dlt_daemon_process_user_message_overflow(), dlt_daemon_process_user_message_register_application(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_process_user_message_unregister_application(), dlt_daemon_process_user_message_unregister_context(), and dlt_receiver_check_and_get().
#define DLT_SIZE_WEID DLT_ID_SIZE |
Definition at line 206 of file dlt_common.h.
Referenced by dlt_message_get_extraparameters(), and dlt_message_set_extraparameters().
#define DLT_SIZE_WSID (sizeof(uint32_t)) |
Definition at line 207 of file dlt_common.h.
Referenced by dlt_logstorage_write(), dlt_message_get_extraparameters(), and dlt_message_set_extraparameters().
#define DLT_SIZE_WTMS (sizeof(uint32_t)) |
Definition at line 208 of file dlt_common.h.
Referenced by dlt_logstorage_write(), dlt_message_get_extraparameters(), and dlt_message_set_extraparameters().
#define DLT_STANDARD_HEADER_EXTRA_SIZE | ( | htyp | ) | ( (DLT_IS_HTYP_WEID(htyp) ? DLT_SIZE_WEID : 0) + (DLT_IS_HTYP_WSID(htyp) ? DLT_SIZE_WSID : 0) + (DLT_IS_HTYP_WTMS(htyp) ? DLT_SIZE_WTMS : 0) ) |
Get the size of extra header parameters, depends on htyp.
Definition at line 213 of file dlt_common.h.
Referenced by dlt_client_send_ctrl_msg(), dlt_daemon_client_send_control_message(), dlt_daemon_control_message_time(), dlt_daemon_log_internal(), dlt_file_read_header(), dlt_file_read_header_extended(), dlt_file_read_header_raw(), dlt_gateway_send_control_message(), dlt_message_read(), dlt_user_log_send_log(), prepare_extra_headers(), and prepare_headers().
#define DLT_SWAP_16 | ( | value | ) | ((((value) >> 8)&0xff) | (((value) << 8)&0xff00)) |
Definition at line 108 of file dlt_common.h.
#define DLT_SWAP_32 | ( | value | ) | ((((value) >> 24)&0xff) | (((value) << 8)&0xff0000) | (((value) >> 8)&0xff00) | (((value) << 24)&0xff000000)) |
Definition at line 109 of file dlt_common.h.
#define DLT_SWAP_64 | ( | value | ) | ((((uint64_t)DLT_SWAP_32((value)&0xffffffffull))<<32) | (DLT_SWAP_32((value)>>32))) |
Definition at line 106 of file dlt_common.h.
#define LITTLE_ENDIAN 1234 |
Definition at line 114 of file dlt_common.h.
#define NULL (char*)0 |
Definition at line 232 of file dlt_common.h.
Referenced by analyze_response(), check_mountpoint_from_partition(), CityHash128(), clean_core_tmp_dir(), compress_file_to(), core_locks(), create_timer_fd(), dlt_buffer_free_dynamic(), dlt_buffer_free_static(), dlt_buffer_get(), dlt_buffer_get_message_count(), dlt_buffer_get_total_size(), dlt_buffer_get_used_size(), dlt_buffer_increase_size(), dlt_buffer_info(), dlt_buffer_init_dynamic(), dlt_buffer_init_static_client(), dlt_buffer_init_static_server(), dlt_buffer_minimize_size(), dlt_buffer_push3(), dlt_buffer_read_block(), dlt_buffer_reset(), dlt_buffer_status(), dlt_buffer_write_block(), dlt_check_envvar(), dlt_check_storageheader(), dlt_clean_string(), dlt_client_connect(), dlt_client_get_log_info(), dlt_client_init(), dlt_client_init_port(), dlt_client_set_serial_device(), dlt_client_set_server_ip(), dlt_client_set_socket_path(), dlt_config_file_find_section(), dlt_config_file_get_key_value(), dlt_config_file_get_num_sections(), dlt_config_file_get_section_name(), dlt_config_file_get_section_name_from_string(), dlt_config_file_get_value(), dlt_config_file_init(), dlt_config_file_is_section_name(), dlt_config_file_read_file(), dlt_config_file_read_line(), dlt_config_file_release(), dlt_config_file_set_section(), dlt_config_file_set_section_data(), dlt_config_file_trim_line(), dlt_connection_check_activate(), dlt_connection_create(), dlt_connection_destroy_receiver(), dlt_connection_get_callback(), dlt_connection_get_receiver(), dlt_connection_send(), dlt_connection_send_multiple(), dlt_control_callback(), dlt_control_init(), dlt_control_init_connection(), dlt_control_listen_to_daemon(), dlt_control_prepare_message(), dlt_control_send_message(), dlt_daemon_add_connection(), dlt_daemon_application_add(), dlt_daemon_application_del(), dlt_daemon_application_find(), dlt_daemon_applications_clear(), dlt_daemon_applications_invalidate_fd(), dlt_daemon_applications_load(), dlt_daemon_applications_save(), dlt_daemon_client_process_control(), dlt_daemon_client_send_all(), dlt_daemon_client_send_all_multiple(), dlt_daemon_close_socket(), dlt_daemon_cmp_apid(), dlt_daemon_cmp_apid_ctid(), dlt_daemon_configuration_load(), dlt_daemon_configuration_save(), dlt_daemon_context_add(), dlt_daemon_context_del(), dlt_daemon_context_find(), dlt_daemon_contexts_clear(), dlt_daemon_contexts_invalidate_fd(), dlt_daemon_contexts_load(), dlt_daemon_contexts_save(), dlt_daemon_control_callsw_cinjection(), dlt_daemon_control_get_log_info(), dlt_daemon_control_message_timezone(), dlt_daemon_control_passive_node_connect(), dlt_daemon_control_passive_node_connect_status(), dlt_daemon_control_reset_to_factory_default(), dlt_daemon_control_service_logstorage(), dlt_daemon_control_set_all_log_level(), dlt_daemon_control_set_default_log_level(), dlt_daemon_control_set_default_trace_status(), dlt_daemon_control_set_log_level(), dlt_daemon_control_set_timing_packets(), dlt_daemon_control_set_trace_status(), dlt_daemon_find_multiple_context_and_send(), dlt_daemon_free(), dlt_daemon_handle_event(), dlt_daemon_init(), dlt_daemon_local_cleanup(), dlt_daemon_local_connection_init(), dlt_daemon_local_ecu_version_init(), dlt_daemon_local_init_p2(), dlt_daemon_logstorage_cleanup(), dlt_daemon_logstorage_get_device(), dlt_daemon_logstorage_get_loglevel(), dlt_daemon_logstorage_reset_application_loglevel(), dlt_daemon_logstorage_setup_internal_storage(), dlt_daemon_logstorage_sync_cache(), dlt_daemon_logstorage_update_application_loglevel(), dlt_daemon_logstorage_write(), dlt_daemon_prepare_event_handling(), dlt_daemon_process_client_connect(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_connect(), dlt_daemon_process_control_messages(), dlt_daemon_process_one_s_timer(), dlt_daemon_process_sixty_s_timer(), dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_marker(), dlt_daemon_process_user_message_overflow(), dlt_daemon_process_user_message_register_application(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_process_user_message_unregister_application(), dlt_daemon_process_user_message_unregister_context(), dlt_daemon_process_user_messages(), dlt_daemon_remove_connection(), dlt_daemon_setup_filter_properties(), dlt_daemon_socket_open(), dlt_daemon_socket_send(), dlt_daemon_unix_socket_open(), dlt_daemon_user_send_all_log_state(), dlt_daemon_user_send_all_update(), dlt_daemon_user_send_default_update(), dlt_daemon_user_send_log_level(), dlt_daemon_user_send_log_state(), DLT_DECLARE_CONTEXT(), dlt_env_free_ll_set(), dlt_event_handler_cleanup_connections(), dlt_event_handler_find_connection(), dlt_event_handler_find_connection_by_id(), dlt_event_handler_register_connection(), dlt_event_handler_unregister_connection(), dlt_file_close(), dlt_file_free(), dlt_file_init(), dlt_file_message(), dlt_file_open(), dlt_file_read(), dlt_file_read_data(), dlt_file_read_header(), dlt_file_read_header_extended(), dlt_file_read_header_raw(), dlt_file_read_raw(), dlt_file_set_filter(), dlt_filter_add(), dlt_filter_delete(), dlt_filter_find(), dlt_filter_free(), dlt_filter_init(), dlt_filter_load(), dlt_filter_save(), dlt_forward_msg(), dlt_free(), dlt_gateway_check_connect_trigger(), dlt_gateway_check_control_messages(), dlt_gateway_check_ecu(), dlt_gateway_check_ip(), dlt_gateway_check_param(), dlt_gateway_check_port(), dlt_gateway_check_send_serial(), dlt_gateway_check_timeout(), dlt_gateway_configure(), dlt_gateway_deinit(), dlt_gateway_establish_connections(), dlt_gateway_forward_control_message(), dlt_gateway_get_connection_receiver(), dlt_gateway_init(), dlt_gateway_process_gateway_timer(), dlt_gateway_process_on_demand_request(), dlt_gateway_process_passive_node_messages(), dlt_gateway_send_control_message(), dlt_gateway_store_connection(), dlt_get_major_version(), dlt_get_minor_version(), dlt_get_version(), dlt_getloginfo_conv_ascii_to_id(), dlt_getloginfo_conv_ascii_to_int16_t(), dlt_getloginfo_conv_ascii_to_uint16_t(), dlt_getloginfo_init(), dlt_getloginfo_make_loginfo(), DLT_IMPORT_CONTEXT(), dlt_init(), dlt_init_common(), dlt_kpi_add_process_after_cursor(), dlt_kpi_add_process_at_start(), dlt_kpi_add_process_before_cursor(), dlt_kpi_clone_process(), dlt_kpi_create_process(), dlt_kpi_create_process_list(), dlt_kpi_decrement_cursor(), dlt_kpi_free_process(), dlt_kpi_free_process_list(), dlt_kpi_free_process_list_soft(), dlt_kpi_get_msg_process_commandline(), dlt_kpi_get_msg_process_new(), dlt_kpi_get_msg_process_stop(), dlt_kpi_get_msg_process_update(), dlt_kpi_get_process_at_cursor(), dlt_kpi_increment_cursor(), dlt_kpi_init(), dlt_kpi_init_process_lists(), dlt_kpi_init_sigterm_handler(), dlt_kpi_log_interrupts(), dlt_kpi_log_list(), dlt_kpi_print_process(), dlt_kpi_process_update_cpu_time(), dlt_kpi_process_update_ctx_switches(), dlt_kpi_process_update_io_bytes(), dlt_kpi_process_update_io_wait(), dlt_kpi_process_update_rss(), dlt_kpi_read_command_line(), dlt_kpi_read_configuration_file(), dlt_kpi_read_cpu_count(), dlt_kpi_read_file(), dlt_kpi_read_file_compact(), dlt_kpi_read_process_file_to_str(), dlt_kpi_read_process_stat_cmdline(), dlt_kpi_read_process_stat_to_ulong(), dlt_kpi_remove_process_at_cursor(), dlt_kpi_remove_process_at_cursor_soft(), dlt_kpi_reset_cursor(), dlt_kpi_set_cursor_at_end(), dlt_kpi_start_check_thread(), dlt_kpi_start_irq_thread(), dlt_kpi_start_process_thread(), dlt_kpi_update_process(), dlt_kpi_update_process_list(), dlt_log(), dlt_log_init(), dlt_log_int(), dlt_log_raw(), dlt_log_set_filename(), dlt_log_string(), dlt_log_string_int(), dlt_log_string_uint(), dlt_log_uint(), dlt_logstorage_check_config_file(), dlt_logstorage_check_directory_permission(), dlt_logstorage_count_ids(), dlt_logstorage_create_keys(), dlt_logstorage_device_connected(), dlt_logstorage_device_disconnected(), dlt_logstorage_filter(), dlt_logstorage_filter_set_strategy(), dlt_logstorage_free(), dlt_logstorage_get_config(), dlt_logstorage_get_idx_of_log_file(), dlt_logstorage_get_loglevel_by_key(), dlt_logstorage_hash_find(), dlt_logstorage_load_config(), dlt_logstorage_log_file_name(), dlt_logstorage_open_log_file(), dlt_logstorage_prepare_msg_cache(), dlt_logstorage_prepare_on_msg(), dlt_logstorage_prepare_table(), dlt_logstorage_read_file_name(), dlt_logstorage_read_list_of_names(), dlt_logstorage_read_log_level(), dlt_logstorage_read_number(), dlt_logstorage_rearrange_file_name(), dlt_logstorage_send_event(), dlt_logstorage_set_ecuid(), dlt_logstorage_set_sync_strategy(), dlt_logstorage_sort_file_name(), dlt_logstorage_split_key(), dlt_logstorage_storage_dir_info(), dlt_logstorage_store_filters(), dlt_logstorage_sync_caches(), dlt_logstorage_sync_msg_cache(), dlt_logstorage_sync_on_msg(), dlt_logstorage_udev_check_mounted(), dlt_logstorage_udev_deinit(), dlt_logstorage_udev_get_mount_point(), dlt_logstorage_udev_init(), dlt_logstorage_update_all_contexts(), dlt_logstorage_update_context(), dlt_logstorage_update_context_loglevel(), dlt_logstorage_validate_filter_name(), dlt_logstorage_write(), dlt_logstorage_write_msg_cache(), dlt_logstorage_write_on_msg(), dlt_message_argument_print(), dlt_message_filter_check(), dlt_message_free(), dlt_message_get_extraparameters(), dlt_message_header_flags(), dlt_message_init(), dlt_message_payload(), dlt_message_print_ascii(), dlt_message_print_header(), dlt_message_print_hex(), dlt_message_print_mixed_html(), dlt_message_print_mixed_plain(), dlt_message_read(), dlt_message_set_extraparameters(), dlt_mkdir_recursive(), dlt_offline_trace_create_new_file(), dlt_offline_trace_delete_oldest_file(), dlt_offline_trace_get_idx_of_log_file(), dlt_offline_trace_get_total_size(), dlt_offline_trace_storage_dir_info(), dlt_parse_config_param(), dlt_passive_node_analyze_response(), dlt_passive_node_ctrl_single_request(), dlt_passive_node_destroy_message_body(), dlt_passive_node_prepare_message_body(), dlt_print_char_string(), dlt_print_hex(), dlt_print_hex_string(), dlt_print_id(), dlt_print_mixed_string(), dlt_print_passive_node_status(), dlt_receive_message_callback(), dlt_receive_open_output_file(), dlt_receiver_check_and_get(), dlt_receiver_free(), dlt_receiver_init(), dlt_receiver_move_to_begin(), dlt_receiver_receive_fd(), dlt_receiver_receive_socket(), dlt_receiver_remove(), dlt_register_app(), dlt_register_context(), dlt_register_context_ll_ts(), dlt_register_injection_callback(), dlt_register_log_level_changed_callback(), dlt_send_app_ll_ts_limit(), dlt_set_application_ll_ts_limit(), dlt_set_id(), dlt_set_loginfo_parse_service_id(), dlt_set_storageheader(), dlt_shm_free_server(), dlt_shm_init_client(), dlt_shm_init_server(), dlt_start_threads(), dlt_stop_threads(), dlt_unregister_app(), dlt_unregister_context(), dlt_user_check_buffer(), dlt_user_is_logLevel_enabled(), dlt_user_log_check_user_message(), dlt_user_log_file_data(), dlt_user_log_init(), dlt_user_log_send_log(), dlt_user_log_send_register_application(), dlt_user_log_send_register_context(), dlt_user_log_send_unregister_context(), dlt_user_log_write_bool(), dlt_user_log_write_finish(), dlt_user_log_write_float32(), dlt_user_log_write_float64(), dlt_user_log_write_int(), dlt_user_log_write_int16(), dlt_user_log_write_int32(), dlt_user_log_write_int64(), dlt_user_log_write_int8(), dlt_user_log_write_ptr(), dlt_user_log_write_raw_formatted(), dlt_user_log_write_start_id(), dlt_user_log_write_string(), dlt_user_log_write_uint(), 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_print_msg(), dlt_user_queue_resend(), dlt_user_trace_network_segmented(), dlt_user_trace_network_segmented_end(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_start(), dlt_user_trace_network_segmented_thread(), dlt_user_trace_network_segmented_thread_segmenter(), dlt_user_trace_network_truncated(), dlt_vlog(), dlt_vnlog(), dump_file_to(), exec(), flush_dir_compress(), flush_dir_original(), flush_dir_send(), get_exec_name(), get_phdr_num(), init_configuration(), init_coredump(), init_params(), init_proc_info(), install_signal_handler(), join_threads(), list_dircontent_to(), logstorage_delete_dev_info(), logstorage_find_dev_info(), logstorage_store_dev_info(), logstorage_udev_udevd_callback(), main(), move_to_core_directory(), option_file_parser(), parse_args(), prepare_message_body(), print_list(), print_stats(), read_configuration_file(), read_elf_headers(), read_notes(), receive(), remove_unusual_chars(), run_threads(), send_dumped_file(), send_one(), set_default_path(), set_ecuid(), stream_close(), stream_finish(), stream_get_offset(), stream_init(), stream_move_ahead(), stream_move_to_offest(), stream_read(), stress2(), strmode(), unique_name(), write_crashid_to_filesystem(), and write_proc_context().
#define PACKED __attribute__((aligned(1),packed)) |
Definition at line 94 of file dlt_common.h.
#define PRINT_FUNCTION_VERBOSE | ( | _verbose | ) |
Definition at line 220 of file dlt_common.h.
Referenced by dlt_daemon_application_del(), dlt_daemon_application_find(), dlt_daemon_applications_clear(), dlt_daemon_applications_invalidate_fd(), dlt_daemon_applications_load(), dlt_daemon_applications_save(), dlt_daemon_client_process_control(), dlt_daemon_client_send_control_message(), dlt_daemon_close_socket(), dlt_daemon_configuration_load(), dlt_daemon_configuration_save(), dlt_daemon_context_add(), dlt_daemon_context_del(), dlt_daemon_context_find(), dlt_daemon_contexts_clear(), dlt_daemon_contexts_invalidate_fd(), dlt_daemon_contexts_load(), dlt_daemon_contexts_save(), dlt_daemon_control_callsw_cinjection(), dlt_daemon_control_get_default_log_level(), dlt_daemon_control_get_log_info(), dlt_daemon_control_get_software_version(), dlt_daemon_control_message_buffer_overflow(), dlt_daemon_control_message_connection_info(), dlt_daemon_control_message_marker(), dlt_daemon_control_message_time(), dlt_daemon_control_message_timezone(), dlt_daemon_control_message_unregister_context(), dlt_daemon_control_passive_node_connect(), dlt_daemon_control_passive_node_connect_status(), dlt_daemon_control_reset_to_factory_default(), dlt_daemon_control_service_logstorage(), dlt_daemon_control_service_response(), dlt_daemon_control_set_all_log_level(), dlt_daemon_control_set_default_log_level(), dlt_daemon_control_set_default_trace_status(), dlt_daemon_control_set_log_level(), dlt_daemon_control_set_timing_packets(), dlt_daemon_control_set_trace_status(), dlt_daemon_daemonize(), dlt_daemon_find_multiple_context_and_send(), dlt_daemon_free(), dlt_daemon_init(), dlt_daemon_local_cleanup(), dlt_daemon_local_connection_init(), dlt_daemon_local_ecu_version_init(), dlt_daemon_local_init_p1(), dlt_daemon_local_init_p2(), dlt_daemon_log_internal(), dlt_daemon_logstorage_cleanup(), dlt_daemon_logstorage_get_device(), dlt_daemon_logstorage_reset_application_loglevel(), dlt_daemon_logstorage_sync_cache(), dlt_daemon_logstorage_update_application_loglevel(), dlt_daemon_process_client_connect(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_connect(), dlt_daemon_process_control_messages(), dlt_daemon_process_one_s_timer(), dlt_daemon_process_sixty_s_timer(), dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_log_mode(), dlt_daemon_process_user_message_marker(), dlt_daemon_process_user_message_not_sup(), dlt_daemon_process_user_message_overflow(), dlt_daemon_process_user_message_register_application(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_process_user_message_unregister_application(), dlt_daemon_process_user_message_unregister_context(), dlt_daemon_process_user_messages(), dlt_daemon_send_log_level(), dlt_daemon_send_message_overflow(), dlt_daemon_send_ringbuffer_to_client(), dlt_daemon_user_send_all_log_state(), dlt_daemon_user_send_all_update(), dlt_daemon_user_send_default_update(), dlt_daemon_user_send_log_level(), dlt_daemon_user_send_log_state(), dlt_file_close(), dlt_file_free(), dlt_file_init(), dlt_file_message(), dlt_file_open(), dlt_file_read_data(), dlt_file_read_header(), dlt_file_read_header_extended(), dlt_file_read_header_raw(), dlt_file_set_filter(), dlt_filter_add(), dlt_filter_delete(), dlt_filter_find(), dlt_filter_free(), dlt_filter_init(), dlt_filter_load(), dlt_filter_save(), dlt_gateway_configure(), dlt_gateway_deinit(), dlt_gateway_establish_connections(), dlt_gateway_forward_control_message(), dlt_gateway_init(), dlt_gateway_process_gateway_timer(), dlt_gateway_process_on_demand_request(), dlt_gateway_process_passive_node_messages(), dlt_gateway_send_control_message(), dlt_gateway_store_connection(), dlt_logstorage_update_context_loglevel(), dlt_message_filter_check(), dlt_message_free(), dlt_message_get_extraparameters(), dlt_message_header_flags(), dlt_message_init(), dlt_message_payload(), dlt_message_read(), dlt_message_set_extraparameters(), and main().
#define STATIC static |
Provision to test static function
Definition at line 343 of file dlt_common.h.
The structure to organise the access to DLT files. This structure is used by the corresponding functions.
typedef struct sDltMessage DltMessage |
The structure to organise the DLT messages. This structure is used by the corresponding functions.
typedef char ID4[DLT_ID_SIZE] |
The type of a DLT ID (context id, application id, etc.)
Definition at line 365 of file dlt_common.h.
anonymous enum |
Enumerator | |
---|---|
DLT_LOG_TO_CONSOLE | |
DLT_LOG_TO_SYSLOG | |
DLT_LOG_TO_FILE | |
DLT_LOG_DROPPED |
Definition at line 182 of file dlt_common.h.
int dlt_buffer_copy | ( | DltBuffer * | buf, |
unsigned char * | data, | ||
int | max_size | ||
) |
Read one entry from ringbuffer. Do not remove it from ringbuffer.
buf | Pointer to ringbuffer structure |
data | Pointer to data read from ringbuffer |
max_size | Max size of read data in bytes from ringbuffer |
Definition at line 2889 of file dlt_common.c.
References dlt_buffer_get().
Referenced by dlt_daemon_send_ringbuffer_to_client(), dlt_shm_copy(), and dlt_user_log_resend_buffer().
DltReturnValue dlt_buffer_free_dynamic | ( | DltBuffer * | buf | ) |
Release and free memory used by dynamic ringbuffer
buf | Pointer to ringbuffer structure |
Definition at line 2494 of file dlt_common.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DltBuffer::mem, NULL, and DltBuffer::shm.
Referenced by dlt_daemon_free(), and dlt_free().
DltReturnValue dlt_buffer_free_static | ( | DltBuffer * | buf | ) |
Deinitilaise usage of static ringbuffer
buf | Pointer to ringbuffer structure |
Definition at line 2479 of file dlt_common.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DltBuffer::mem, and NULL.
Referenced by dlt_shm_free_client(), and dlt_shm_free_server().
int dlt_buffer_get_message_count | ( | DltBuffer * | buf | ) |
Get number of entries in ringbuffer.
buf | Pointer to ringbuffer structure |
Definition at line 2977 of file dlt_common.c.
References NULL, and DltBuffer::shm.
Referenced by dlt_daemon_send_ringbuffer_to_client(), dlt_shm_get_message_count(), dlt_user_atexit_blow_out_user_buffer(), and dlt_user_log_resend_buffer().
uint32_t dlt_buffer_get_total_size | ( | DltBuffer * | buf | ) |
Get total size in bytes of ringbuffer. If buffer is dynamic, max size is returned.
buf | Pointer to ringbuffer structure |
Definition at line 2943 of file dlt_common.c.
References DltBuffer::max_size, and NULL.
Referenced by dlt_shm_get_total_size(), and dlt_user_check_buffer().
int dlt_buffer_get_used_size | ( | DltBuffer * | buf | ) |
Get used size in bytes of ringbuffer.
buf | Pointer to ringbuffer structure |
Definition at line 2952 of file dlt_common.c.
References NULL, DltBuffer::shm, and DltBuffer::size.
Referenced by dlt_shm_get_used_size(), and dlt_user_check_buffer().
void dlt_buffer_info | ( | DltBuffer * | buf | ) |
Print information about buffer and log to internal DLT log.
buf | Pointer to ringbuffer structure |
Definition at line 2899 of file dlt_common.c.
References dlt_log(), DltBuffer::mem, NULL, DltBuffer::shm, DltBuffer::size, and str.
Referenced by dlt_shm_info().
DltReturnValue dlt_buffer_init_dynamic | ( | DltBuffer * | buf, |
uint32_t | min_size, | ||
uint32_t | max_size, | ||
uint32_t | step_size | ||
) |
Initialize dynamic ringbuffer with a size of size. Initialise as a client. Do not change counters. Memory will be allocated starting with min_size. If more memory is needed size is increased wit step_size. The maximum size is max_size.
buf | Pointer to ringbuffer structure |
min_size | Minimum size of buffer in bytes |
max_size | Maximum size of buffer in bytes |
step_size | size of which ringbuffer is increased |
Definition at line 2430 of file dlt_common.c.
References DltBufferHead::count, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DltBuffer::max_size, DltBuffer::mem, DltBuffer::min_size, NULL, DltBufferHead::read, DltBuffer::shm, DltBuffer::size, DltBuffer::step_size, str, and DltBufferHead::write.
Referenced by dlt_daemon_init(), and dlt_init_common().
DltReturnValue dlt_buffer_init_static_client | ( | DltBuffer * | buf, |
const unsigned char * | ptr, | ||
uint32_t | size | ||
) |
Initialize static ringbuffer with a size of size. Initialise as a client. Do not change counters. Memory is already allocated.
buf | Pointer to ringbuffer structure |
ptr | Ptr to ringbuffer memory |
size | Maximum size of buffer in bytes |
Definition at line 2407 of file dlt_common.c.
References dlt_log(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DltBuffer::max_size, DltBuffer::mem, DltBuffer::min_size, NULL, DltBuffer::shm, DltBuffer::size, DltBuffer::step_size, and str.
Referenced by dlt_shm_init_client().
DltReturnValue dlt_buffer_init_static_server | ( | DltBuffer * | buf, |
const unsigned char * | ptr, | ||
uint32_t | size | ||
) |
Initialise static ringbuffer with a size of size. Initialise as server. Init counters. Memory is already allocated.
buf | Pointer to ringbuffer structure |
ptr | Ptr to ringbuffer memory |
size | Maximum size of buffer in bytes |
Definition at line 2376 of file dlt_common.c.
References DltBufferHead::count, dlt_log(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DltBuffer::max_size, DltBuffer::mem, DltBuffer::min_size, NULL, DltBufferHead::read, DltBuffer::shm, DltBuffer::size, DltBuffer::step_size, str, and DltBufferHead::write.
Referenced by dlt_shm_init_server().
int dlt_buffer_pull | ( | DltBuffer * | buf, |
unsigned char * | data, | ||
int | max_size | ||
) |
Read one entry from ringbuffer. Remove it from ringbuffer.
buf | Pointer to ringbuffer structure |
data | Pointer to data read from ringbuffer |
max_size | Max size of read data in bytes from ringbuffer |
Definition at line 2884 of file dlt_common.c.
References dlt_buffer_get().
Referenced by dlt_shm_pull().
DltReturnValue dlt_buffer_push | ( | DltBuffer * | buf, |
const unsigned char * | data, | ||
unsigned int | size | ||
) |
Write one entry to ringbuffer
buf | Pointer to ringbuffer structure |
data | Pointer to data to be written to ringbuffer |
size | Size of data in bytes to be written to ringbuffer |
Definition at line 2686 of file dlt_common.c.
References dlt_buffer_push3().
DltReturnValue dlt_buffer_push3 | ( | DltBuffer * | buf, |
const unsigned char * | data1, | ||
unsigned int | size1, | ||
const unsigned char * | data2, | ||
unsigned int | size2, | ||
const unsigned char * | data3, | ||
unsigned int | size3 | ||
) |
Write up to three entries to ringbuffer. Entries are joined to one block.
dlt | Pointer to ringbuffer structure |
data1 | Pointer to data to be written to ringbuffer |
size1 | Size of data in bytes to be written to ringbuffer |
data2 | Pointer to data to be written to ringbuffer |
size2 | Size of data in bytes to be written to ringbuffer |
data3 | Pointer to data to be written to ringbuffer |
size3 | Size of data in bytes to be written to ringbuffer |
Definition at line 2691 of file dlt_common.c.
References DLT_BUFFER_HEAD, dlt_buffer_increase_size(), dlt_buffer_reset(), dlt_buffer_write_block(), dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DltBufferBlockHead::head, NULL, DltBuffer::shm, DltBuffer::size, DltBufferBlockHead::size, and DltBufferBlockHead::status.
Referenced by dlt_buffer_push(), dlt_daemon_client_send(), dlt_forward_msg(), dlt_shm_push(), dlt_user_log_send_log(), dlt_user_log_send_register_application(), and dlt_user_log_send_register_context().
int dlt_buffer_remove | ( | DltBuffer * | buf | ) |
Remove entry from ringbuffer.
buf | Pointer to ringbuffer structure |
Definition at line 2894 of file dlt_common.c.
References dlt_buffer_get().
Referenced by dlt_daemon_send_ringbuffer_to_client(), dlt_shm_remove(), and dlt_user_log_resend_buffer().
void dlt_buffer_status | ( | DltBuffer * | buf | ) |
Print status of buffer and log to internal DLT log.
buf | Pointer to ringbuffer structure |
Definition at line 2916 of file dlt_common.c.
References dlt_log(), NULL, DltBuffer::shm, and str.
Referenced by dlt_shm_status().
void dlt_check_envvar | ( | ) |
Check environment variables.
Definition at line 3867 of file dlt_common.c.
References dlt_log_init(), dlt_log_set_fifo_basedir(), dlt_log_set_filename(), dlt_log_set_level(), and NULL.
Referenced by dlt_init().
DltReturnValue dlt_check_storageheader | ( | DltStorageHeader * | storageheader | ) |
Check if a storage header contains its marker
storageheader | pointer to storage header of a dlt message |
Definition at line 2353 of file dlt_common.c.
References DLT_RETURN_OK, DLT_RETURN_TRUE, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_file_read_header().
void dlt_clean_string | ( | char * | text, |
int | length | ||
) |
Helper function to remove not nice to print characters, e.g. NULL or carage return.
text | pointer to string to be cleaned. |
length | length of string excluding terminating zero. |
Definition at line 372 of file dlt_common.c.
References NULL.
speed_t dlt_convert_serial_speed | ( | int | baudrate | ) |
Helper function: Convert serial line baudrate (as number) to line speed (as defined in termios.h)
baudrate | Serial line baudrate (as number) |
Definition at line 3067 of file dlt_common.c.
Referenced by dlt_client_setbaudrate(), and dlt_daemon_init_serial().
DltReturnValue dlt_file_close | ( | DltFile * | file, |
int | verbose | ||
) |
Closing loading a DLT file.
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1876 of file dlt_common.c.
References DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, sDltFile::handle, NULL, and PRINT_FUNCTION_VERBOSE.
DltReturnValue dlt_file_free | ( | DltFile * | file, |
int | verbose | ||
) |
Free the used memory by the organising structure of file.
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1942 of file dlt_common.c.
References dlt_message_free(), DLT_RETURN_WRONG_PARAMETER, sDltFile::handle, sDltFile::index, sDltFile::msg, NULL, and PRINT_FUNCTION_VERBOSE.
Referenced by dlt_daemon_local_cleanup(), dlt_daemon_local_init_p1(), and main().
DltReturnValue dlt_file_init | ( | DltFile * | file, |
int | verbose | ||
) |
Initialise the structure used to access a DLT file. This function must be called before using further dlt_file functions.
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1305 of file dlt_common.c.
References sDltFile::counter, sDltFile::counter_total, dlt_message_init(), DLT_RETURN_WRONG_PARAMETER, sDltFile::error_messages, sDltFile::file_position, sDltFile::filter, sDltFile::filter_counter, sDltFile::handle, sDltFile::index, sDltFile::msg, NULL, sDltFile::position, and PRINT_FUNCTION_VERBOSE.
Referenced by dlt_daemon_local_init_p1(), and main().
DltReturnValue dlt_file_message | ( | DltFile * | file, |
int | index, | ||
int | verbose | ||
) |
Load headers and payload of a message selected by the index. If filters are set, index is based on the filtered list.
file | pointer to structure of organising access to DLT file |
index | position of message in the files beginning from zero |
verbose | if set to true verbose information is printed out. |
Definition at line 1895 of file dlt_common.c.
References sDltFile::counter, DLT_COMMON_BUFFER_LENGTH, dlt_file_read_data(), dlt_file_read_header(), dlt_file_read_header_extended(), dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, sDltFile::handle, sDltFile::index, NULL, sDltFile::position, PRINT_FUNCTION_VERBOSE, and str.
Referenced by main().
DltReturnValue dlt_file_open | ( | DltFile * | file, |
const char * | filename, | ||
int | verbose | ||
) |
Initialising loading a DLT file.
file | pointer to structure of organising access to DLT file |
filename | filename of DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1594 of file dlt_common.c.
References sDltFile::counter, sDltFile::counter_total, DLT_COMMON_BUFFER_LENGTH, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, sDltFile::error_messages, sDltFile::file_length, sDltFile::file_position, sDltFile::handle, NULL, sDltFile::position, PRINT_FUNCTION_VERBOSE, and str.
Referenced by main().
DltReturnValue dlt_file_read | ( | DltFile * | file, |
int | verbose | ||
) |
Find next message in the DLT file and parse them. This function finds the next message in the DLT file. If a filter is set, the filter list is used.
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1647 of file dlt_common.c.
References sDltFile::counter, sDltFile::counter_total, sDltMessage::datasize, DLT_COMMON_BUFFER_LENGTH, DLT_COMMON_INDEX_ALLOC, dlt_file_read_header(), dlt_file_read_header_extended(), dlt_log(), dlt_message_filter_check(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_TRUE, DLT_RETURN_WRONG_PARAMETER, sDltFile::file_position, sDltFile::filter, sDltFile::handle, sDltMessage::headersize, sDltFile::index, sDltFile::msg, NULL, sDltFile::position, and str.
Referenced by main().
DltReturnValue dlt_file_read_data | ( | DltFile * | file, |
int | verbose | ||
) |
Load payload of a message from file (dlt_file_read_header() must have been called before this call!)
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1551 of file dlt_common.c.
References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, DLT_COMMON_BUFFER_LENGTH, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, sDltFile::handle, sDltFile::msg, NULL, PRINT_FUNCTION_VERBOSE, and str.
Referenced by dlt_file_message(), and dlt_file_read_raw().
DltReturnValue dlt_file_read_header | ( | DltFile * | file, |
int | verbose | ||
) |
Load standard header of a message from file
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1346 of file dlt_common.c.
References sDltMessage::datasize, DLT_BETOH_16, dlt_check_storageheader(), DLT_COMMON_BUFFER_LENGTH, DLT_IS_HTYP_UEH, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_TRUE, DLT_RETURN_WRONG_PARAMETER, DLT_STANDARD_HEADER_EXTRA_SIZE, sDltFile::handle, sDltMessage::headerbuffer, sDltMessage::headersize, sDltFile::msg, NULL, PRINT_FUNCTION_VERBOSE, sDltMessage::standardheader, sDltMessage::storageheader, and str.
Referenced by dlt_file_message(), and dlt_file_read().
DltReturnValue dlt_file_read_header_extended | ( | DltFile * | file, |
int | verbose | ||
) |
Load, if available in message, extra standard header fields and extended header of a message from file (dlt_file_read_header() must have been called before this call!)
file | pointer to structure of organising access to DLT file |
verbose | if set to true verbose information is printed out. |
Definition at line 1499 of file dlt_common.c.
References DLT_IS_HTYP_UEH, dlt_log(), dlt_message_get_extraparameters(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_STANDARD_HEADER_EXTRA_SIZE, sDltMessage::extendedheader, sDltFile::handle, sDltMessage::headerbuffer, sDltFile::msg, NULL, PRINT_FUNCTION_VERBOSE, and sDltMessage::standardheader.
Referenced by dlt_file_message(), dlt_file_read(), and dlt_file_read_raw().
DltReturnValue dlt_file_read_header_raw | ( | DltFile * | file, |
int | resync, | ||
int | verbose | ||
) |
Load standard header of a message from file in RAW format (without storage header)
file | pointer to structure of organising access to DLT file |
resync | Resync to serial header when set to true |
verbose | if set to true verbose information is printed out. |
Definition at line 1397 of file dlt_common.c.
References sDltMessage::datasize, DLT_BETOH_16, DLT_COMMON_BUFFER_LENGTH, DLT_COMMON_DUMMY_ECUID, DLT_ID_SIZE, DLT_IS_HTYP_UEH, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_set_storageheader(), DLT_STANDARD_HEADER_EXTRA_SIZE, dltSerialHeader, sDltFile::error_messages, sDltFile::file_position, sDltFile::handle, sDltMessage::headerbuffer, sDltMessage::headersize, sDltFile::msg, NULL, PRINT_FUNCTION_VERBOSE, sDltMessage::standardheader, sDltMessage::storageheader, and str.
Referenced by dlt_file_read_raw().
DltReturnValue dlt_file_read_raw | ( | DltFile * | file, |
int | resync, | ||
int | verbose | ||
) |
Find next message in the DLT file in RAW format (without storage header) and parse them. This function finds the next message in the DLT file. If a filter is set, the filter list is used.
file | pointer to structure of organising access to DLT file |
resync | Resync to serial header when set to true |
verbose | if set to true verbose information is printed out. |
Definition at line 1782 of file dlt_common.c.
References sDltFile::counter, sDltFile::counter_total, DLT_COMMON_BUFFER_LENGTH, DLT_COMMON_INDEX_ALLOC, dlt_file_read_data(), dlt_file_read_header_extended(), dlt_file_read_header_raw(), dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_TRUE, DLT_RETURN_WRONG_PARAMETER, sDltFile::file_position, sDltFile::handle, sDltFile::index, NULL, sDltFile::position, and str.
DltReturnValue dlt_file_set_filter | ( | DltFile * | file, |
DltFilter * | filter, | ||
int | verbose | ||
) |
Set a list to filters. This function should be called before loading a DLT file, if filters should be used. A filter list is an array of filters. Several filters are combined logically by or operation. The filter list is not copied, so take care to keep list in memory.
file | pointer to structure of organising access to DLT file |
filter | pointer to filter list array |
verbose | if set to true verbose information is printed out. |
Definition at line 1331 of file dlt_common.c.
References DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, sDltFile::filter, NULL, and PRINT_FUNCTION_VERBOSE.
Referenced by main().
DltReturnValue dlt_filter_add | ( | DltFilter * | filter, |
const char * | apid, | ||
const char * | ctid, | ||
int | verbose | ||
) |
Add new filter to filter list.
filter | pointer to structure of organising DLT filter |
apid | application id to be added to filter list (must always be set). |
ctid | context id to be added to filter list. empty equals don't care. |
verbose | if set to true verbose information is printed out. |
Definition at line 583 of file dlt_common.c.
References DltFilter::apid, DltFilter::counter, DltFilter::ctid, dlt_filter_find(), DLT_FILTER_MAX, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_set_id(), NULL, PRINT_FUNCTION_VERBOSE, and str.
Referenced by dlt_filter_load().
DltReturnValue dlt_filter_delete | ( | DltFilter * | filter, |
const char * | apid, | ||
const char * | ctid, | ||
int | verbose | ||
) |
Delete filter from filter list
filter | pointer to structure of organising DLT filter |
apid | application id to be deleted from filter list |
ctid | context id to be deleted from filter list |
verbose | if set to true verbose information is printed out. |
Definition at line 617 of file dlt_common.c.
References DltFilter::apid, DltFilter::counter, DltFilter::ctid, DLT_ID_SIZE, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_set_id(), NULL, and PRINT_FUNCTION_VERBOSE.
int dlt_filter_find | ( | DltFilter * | filter, |
const char * | apid, | ||
const char * | ctid, | ||
int | verbose | ||
) |
Find index of filter in filter list
filter | pointer to structure of organising DLT filter |
apid | application id to be found in filter list |
ctid | context id to be found in filter list |
verbose | if set to true verbose information is printed out. |
Definition at line 544 of file dlt_common.c.
References DltFilter::apid, DltFilter::counter, DltFilter::ctid, DLT_ID_SIZE, NULL, and PRINT_FUNCTION_VERBOSE.
Referenced by dlt_filter_add().
DltReturnValue dlt_filter_free | ( | DltFilter * | filter, |
int | verbose | ||
) |
Free the used memory by the organising structure of filter.
filter | pointer to structure of organising DLT filter |
verbose | if set to true verbose information is printed out. |
Definition at line 404 of file dlt_common.c.
References DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, and PRINT_FUNCTION_VERBOSE.
Referenced by main().
DltReturnValue dlt_filter_init | ( | DltFilter * | filter, |
int | verbose | ||
) |
Initialise the filter list. This function must be called before using further dlt filter.
filter | pointer to structure of organising DLT filter |
verbose | if set to true verbose information is printed out. |
Definition at line 390 of file dlt_common.c.
References DltFilter::counter, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, and PRINT_FUNCTION_VERBOSE.
Referenced by main().
DltReturnValue dlt_filter_load | ( | DltFilter * | filter, |
const char * | filename, | ||
int | verbose | ||
) |
Load filter list from file.
filter | pointer to structure of organising DLT filter |
filename | filename to load filters from |
verbose | if set to true verbose information is printed out. |
Definition at line 416 of file dlt_common.c.
References DltFilter::counter, DLT_COMMON_BUFFER_LENGTH, dlt_filter_add(), DLT_FILTER_MAX, DLT_ID_SIZE, dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_set_id(), NULL, PRINT_FUNCTION_VERBOSE, and str.
Referenced by main().
DltReturnValue dlt_filter_save | ( | DltFilter * | filter, |
const char * | filename, | ||
int | verbose | ||
) |
Save filter list to file.
filter | pointer to structure of organising DLT filter |
filename | filename to load filters from |
verbose | if set to true verbose information is printed out. |
Definition at line 496 of file dlt_common.c.
References DltFilter::apid, DltFilter::counter, DltFilter::ctid, DLT_COMMON_BUFFER_LENGTH, dlt_log(), dlt_print_id(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, PRINT_FUNCTION_VERBOSE, and str.
void dlt_get_major_version | ( | char * | buf, |
size_t | size | ||
) |
Print dlt major version to buffer
buf | Pointer to buffer |
size | size of buffer |
Definition at line 3251 of file dlt_common.c.
References _DLT_PACKAGE_MAJOR_VERSION, dlt_log(), and NULL.
Referenced by dlt_user_check_library_version().
void dlt_get_minor_version | ( | char * | buf, |
size_t | size | ||
) |
Print dlt minor version to buffer
buf | Pointer to buffer |
size | size of buffer |
Definition at line 3262 of file dlt_common.c.
References _DLT_PACKAGE_MINOR_VERSION, dlt_log(), and NULL.
Referenced by dlt_user_check_library_version().
void dlt_get_version | ( | char * | buf, |
size_t | size | ||
) |
Print dlt version and dlt svn version to buffer
buf | Pointer to buffer |
size | size of buffer |
Definition at line 3239 of file dlt_common.c.
References _DLT_PACKAGE_REVISION, _DLT_PACKAGE_VERSION, _DLT_PACKAGE_VERSION_STATE, _DLT_SHM_ENABLE, _DLT_SYSTEMD_ENABLE, _DLT_SYSTEMD_WATCHDOG_ENABLE, _DLT_TEST_ENABLE, dlt_log(), and NULL.
Referenced by dlt_daemon_local_init_p2(), DLT_DECLARE_CONTEXT(), main(), and usage().
DltReturnValue dlt_init_common | ( | void | ) |
Common part of initialisation
Definition at line 443 of file dlt_user.c.
References DltUser::appID, DltUser::application_description, atexit_registered, dlt_buffer_init_dynamic(), dlt_env_extract_ll_set(), DLT_FD_INIT, DltUser::dlt_ll_ts, DltUser::dlt_ll_ts_max_num_entries, DltUser::dlt_ll_ts_num_entries, dlt_log(), DltUser::dlt_log_handle, dlt_mutex, DLT_PM_AUTOMATIC, DLT_PM_FORCE_OFF, DLT_PM_FORCE_ON, DLT_PM_UNSET, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SEM_FREE, DLT_SEM_LOCK, dlt_set_id(), dlt_user_atexit_handler(), DLT_USER_ATEXIT_RESEND_BUFFER_EXIT_TIMEOUT, DLT_USER_BUFFER_LENGTH, DLT_USER_DEFAULT_ECU_ID, DLT_USER_ENV_BUFFER_MAX_SIZE, DLT_USER_ENV_BUFFER_MIN_SIZE, DLT_USER_ENV_BUFFER_STEP_SIZE, DLT_USER_ENV_LOCAL_PRINT_MODE, DltUser::dlt_user_handle, dlt_user_initialised, DLT_USER_RINGBUFFER_MAX_SIZE, DLT_USER_RINGBUFFER_MIN_SIZE, DLT_USER_RINGBUFFER_STEP_SIZE, DLT_USER_USE_EXTENDED_HEADER_FOR_NONVERBOSE, DLT_USER_WITH_ECU_ID, DLT_USER_WITH_SESSION_ID, DLT_USER_WITH_TIMESTAMP, dlt_vlog(), DltUser::ecuID, DltUser::enable_local_print, DltUser::initial_ll_set, DltUser::local_print_mode, DltUser::log_state, NULL, DltUser::startup_buffer, str, DltUser::timeout_at_exit_handler, DltUser::use_extende_header_for_non_verbose, DltUser::verbose_mode, DltUser::with_ecu_id, DltUser::with_session_id, and DltUser::with_timestamp.
Referenced by dlt_init(), and dlt_init_file().
DltReturnValue dlt_log | ( | int | prio, |
char * | s | ||
) |
Log ASCII string with null-termination to (external) logging facility
prio | priority (see syslog() call) |
s | Pointer to ASCII string with null-termination |
Definition at line 2029 of file dlt_common.c.
References DLT_LOG_DROPPED, DLT_LOG_TO_CONSOLE, DLT_LOG_TO_FILE, DLT_LOG_TO_SYSLOG, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, logging_handle, logging_level, logging_mode, and NULL.
Referenced by convert_arg_to_byte_size(), create_timer_fd(), dlt_buffer_free_dynamic(), dlt_buffer_free_static(), dlt_buffer_get(), dlt_buffer_increase_size(), dlt_buffer_info(), dlt_buffer_init_dynamic(), dlt_buffer_init_static_client(), dlt_buffer_init_static_server(), dlt_buffer_minimize_size(), dlt_buffer_push3(), dlt_buffer_read_block(), dlt_buffer_reset(), dlt_buffer_status(), dlt_buffer_write_block(), dlt_client_connect(), dlt_client_set_serial_device(), dlt_client_set_server_ip(), dlt_client_set_socket_path(), dlt_config_file_find_section(), dlt_config_file_get_value(), dlt_config_file_init(), dlt_config_file_read_file(), dlt_config_file_set_section(), dlt_config_file_set_section_data(), dlt_connection_check_activate(), dlt_connection_create(), dlt_daemon_application_add(), dlt_daemon_applications_load(), dlt_daemon_change_state(), dlt_daemon_client_send(), dlt_daemon_client_send_all(), dlt_daemon_client_send_all_multiple(), dlt_daemon_client_send_control_message(), dlt_daemon_close_socket(), dlt_daemon_configuration_load(), dlt_daemon_context_add(), dlt_daemon_contexts_load(), dlt_daemon_control_get_log_info(), dlt_daemon_control_message_time(), dlt_daemon_control_passive_node_connect(), dlt_daemon_control_passive_node_connect_status(), dlt_daemon_control_reset_to_factory_default(), dlt_daemon_control_service_logstorage(), dlt_daemon_control_set_log_level(), dlt_daemon_daemonize(), dlt_daemon_handle_event(), dlt_daemon_init(), dlt_daemon_init_fifo(), dlt_daemon_init_serial(), dlt_daemon_local_cleanup(), dlt_daemon_local_connection_init(), dlt_daemon_local_ecu_version_init(), dlt_daemon_local_init_p1(), dlt_daemon_local_init_p2(), dlt_daemon_log_internal(), dlt_daemon_logstorage_reset_application_loglevel(), dlt_daemon_logstorage_setup_internal_storage(), dlt_daemon_logstorage_update_application_loglevel(), dlt_daemon_logstorage_write(), dlt_daemon_prepare_event_handling(), dlt_daemon_process_client_connect(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_connect(), dlt_daemon_process_control_messages(), dlt_daemon_process_one_s_timer(), dlt_daemon_process_sixty_s_timer(), dlt_daemon_process_systemd_timer(), dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_log_mode(), dlt_daemon_process_user_message_marker(), dlt_daemon_process_user_message_not_sup(), dlt_daemon_process_user_message_overflow(), dlt_daemon_process_user_message_register_application(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_process_user_message_unregister_application(), dlt_daemon_process_user_message_unregister_context(), dlt_daemon_process_user_messages(), dlt_daemon_remove_connection(), dlt_daemon_send_log_level(), dlt_daemon_send_message_overflow(), dlt_daemon_send_ringbuffer_to_client(), dlt_daemon_setup_filter_properties(), dlt_daemon_signal_handler(), dlt_daemon_socket_open(), dlt_daemon_unix_socket_close(), dlt_daemon_unix_socket_open(), dlt_daemon_user_send_all_log_state(), dlt_daemon_user_send_default_update(), dlt_event_handler_register_connection(), dlt_event_handler_unregister_connection(), dlt_file_message(), dlt_file_open(), dlt_file_read(), dlt_file_read_data(), dlt_file_read_header(), dlt_file_read_header_extended(), dlt_file_read_header_raw(), dlt_file_read_raw(), dlt_filter_add(), dlt_filter_load(), dlt_filter_save(), dlt_fork_parent_fork_handler(), dlt_forward_msg(), dlt_gateway_check_connect_trigger(), dlt_gateway_check_control_messages(), dlt_gateway_check_ip(), dlt_gateway_check_port(), dlt_gateway_configure(), dlt_gateway_establish_connections(), dlt_gateway_forward_control_message(), dlt_gateway_init(), dlt_gateway_process_gateway_timer(), dlt_gateway_process_on_demand_request(), dlt_gateway_process_passive_node_messages(), dlt_gateway_send_control_message(), dlt_gateway_store_connection(), dlt_get_major_version(), dlt_get_minor_version(), dlt_get_version(), dlt_init_common(), dlt_init_message_queue(), dlt_kpi_update_process_list(), dlt_lock_mutex(), dlt_log_set_filename(), dlt_logstorage_create_keys(), dlt_logstorage_device_connected(), dlt_logstorage_get_idx_of_log_file(), dlt_logstorage_load_config(), dlt_logstorage_open_log_file(), dlt_logstorage_prepare_msg_cache(), dlt_logstorage_prepare_on_msg(), dlt_logstorage_prepare_table(), dlt_logstorage_read_file_name(), dlt_logstorage_read_log_level(), dlt_logstorage_read_number(), dlt_logstorage_set_sync_strategy(), dlt_logstorage_storage_dir_info(), dlt_logstorage_store_filters(), dlt_logstorage_sync_caches(), dlt_logstorage_sync_msg_cache(), dlt_logstorage_sync_on_msg(), dlt_logstorage_update_all_contexts(), dlt_logstorage_update_context(), dlt_logstorage_update_context_loglevel(), dlt_logstorage_validate_filter_value(), dlt_logstorage_write(), dlt_logstorage_write_msg_cache(), dlt_logstorage_write_on_msg(), dlt_message_argument_print(), dlt_message_payload(), dlt_message_read(), dlt_print_char_string(), dlt_print_hex_string(), dlt_print_mixed_string(), dlt_receive_open_output_file(), dlt_receiver_check_and_get(), dlt_shm_free_client(), dlt_shm_free_server(), dlt_shm_init_client(), dlt_shm_init_server(), dlt_shm_pv(), dlt_start_threads(), dlt_stop_threads(), dlt_user_log_check_user_message(), dlt_user_log_reattach_to_daemon(), dlt_user_log_send_log(), dlt_user_log_send_register_application(), dlt_user_log_send_register_context(), dlt_user_queue_resend(), dlt_user_receiverthread_function(), dlt_user_trace_network_segmented(), dlt_user_trace_network_segmented_thread(), dlt_user_trace_network_segmented_thread_segmenter(), dlt_vlog(), dlt_vnlog(), and main().
void dlt_log_free | ( | void | ) |
De-Initialize (external) logging facility
Definition at line 2022 of file dlt_common.c.
References DLT_LOG_TO_FILE, logging_handle, and logging_mode.
Referenced by dlt_fork_child_fork_handler(), dlt_fork_parent_fork_handler(), and dlt_user_atexit_handler().
void dlt_log_init | ( | int | mode | ) |
Initialize (external) logging facility
mode | positive, 0 = log to stdout, 1 = log to syslog, 2 = log to file |
Definition at line 2000 of file dlt_common.c.
References DLT_LOG_DROPPED, DLT_LOG_TO_FILE, dlt_vlog(), logging_filename, logging_handle, logging_mode, and NULL.
Referenced by dlt_check_envvar(), and main().
void dlt_log_set_filename | ( | const char * | filename | ) |
Set internal logging filename if mode 2
filename | the filename |
Definition at line 1981 of file dlt_common.c.
References dlt_log(), logging_filename, and NULL.
Referenced by dlt_check_envvar(), and main().
void dlt_log_set_level | ( | int | level | ) |
Set internal logging level
level | the level |
Definition at line 1968 of file dlt_common.c.
References dlt_vlog(), and logging_level.
Referenced by dlt_check_envvar(), and main().
DltReturnValue dlt_message_argument_print | ( | DltMessage * | msg, |
uint32_t | type_info, | ||
uint8_t ** | ptr, | ||
int32_t * | datalength, | ||
char * | text, | ||
int | textlength, | ||
int | byteLength, | ||
int | verbose | ||
) |
Decode and print a argument of a DLT message
msg | pointer to structure of organising access to DLT messages |
type_info | Type of argument |
ptr | pointer to pointer to data (pointer to data is changed within this function) |
datalength | pointer to datalength (datalength is changed within this function) |
text | pointer to a ASCII string, in which the output is written |
textlength | maximal size of text buffer |
byteLength | If argument is a string, and this value is 0 or greater, this value will be taken as string length |
verbose | if set to true verbose information is printed out. |
DltReturnValue dlt_message_filter_check | ( | DltMessage * | msg, |
DltFilter * | filter, | ||
int | verbose | ||
) |
Check if message is filtered or not. All filters are applied (logical OR).
msg | pointer to structure of organising access to DLT messages |
filter | pointer to filter |
verbose | if set to true verbose information is printed out. |
Definition at line 1057 of file dlt_common.c.
References DltFilter::apid, DltFilter::counter, DltFilter::ctid, DLT_ID_SIZE, DLT_IS_HTYP_UEH, DLT_RETURN_OK, DLT_RETURN_TRUE, DLT_RETURN_WRONG_PARAMETER, sDltMessage::extendedheader, NULL, PRINT_FUNCTION_VERBOSE, and sDltMessage::standardheader.
Referenced by dlt_file_read(), dlt_receive_message_callback(), and dlt_testclient_message_callback().
DltReturnValue dlt_message_free | ( | DltMessage * | msg, |
int | verbose | ||
) |
Free the used memory by the organising structure of file.
msg | pointer to structure of organising access to DLT messages |
verbose | if set to true verbose information is printed out. |
Definition at line 691 of file dlt_common.c.
References sDltMessage::databuffer, sDltMessage::databuffersize, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, and PRINT_FUNCTION_VERBOSE.
Referenced by dlt_client_main_loop(), dlt_client_send_ctrl_msg(), dlt_control_prepare_message(), dlt_control_send_message(), dlt_daemon_control_get_default_log_level(), dlt_daemon_control_get_log_info(), dlt_daemon_control_get_software_version(), dlt_daemon_control_message_buffer_overflow(), dlt_daemon_control_message_connection_info(), dlt_daemon_control_message_marker(), dlt_daemon_control_message_time(), dlt_daemon_control_message_timezone(), dlt_daemon_control_message_unregister_context(), dlt_daemon_control_passive_node_connect_status(), dlt_daemon_control_service_response(), dlt_daemon_local_cleanup(), dlt_daemon_process_user_message_register_context(), dlt_file_free(), dlt_gateway_process_passive_node_messages(), and dlt_gateway_send_control_message().
DltReturnValue dlt_message_get_extraparameters | ( | DltMessage * | msg, |
int | verbose | ||
) |
Get standard header extra parameters
msg | pointer to structure of organising access to DLT messages |
verbose | if set to true verbose information is printed out. |
Definition at line 1241 of file dlt_common.c.
References DLT_BETOH_32, DLT_ID_SIZE, DLT_IS_HTYP_WEID, DLT_IS_HTYP_WSID, DLT_IS_HTYP_WTMS, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_SIZE_WEID, DLT_SIZE_WSID, DLT_SIZE_WTMS, sDltMessage::headerbuffer, sDltMessage::headerextra, NULL, PRINT_FUNCTION_VERBOSE, and sDltMessage::standardheader.
Referenced by dlt_file_read_header_extended(), dlt_message_read(), and dlt_user_print_msg().
DltReturnValue dlt_message_header | ( | DltMessage * | msg, |
char * | text, | ||
int | textlength, | ||
int | verbose | ||
) |
Print Header into an ASCII string. This function calls dlt_message_header_flags() with flags=DLT_HEADER_SHOW_ALL
msg | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the header is written |
textlength | maximal size of text buffer |
verbose | if set to true verbose information is printed out. |
Definition at line 710 of file dlt_common.c.
References DLT_HEADER_SHOW_ALL, and dlt_message_header_flags().
Referenced by dlt_control_callback(), dlt_message_print_ascii(), dlt_message_print_header(), dlt_message_print_hex(), dlt_message_print_mixed_html(), dlt_message_print_mixed_plain(), dlt_receive_message_callback(), dlt_testclient_message_callback(), and main().
DltReturnValue dlt_message_header_flags | ( | DltMessage * | msg, |
char * | text, | ||
int | textlength, | ||
int | flags, | ||
int | verbose | ||
) |
Print Header into an ASCII string, selective.
msg | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the header is written |
textlength | maximal size of text buffer |
flags | select, bit-field to select, what should be printed (DLT_HEADER_SHOW_...) |
verbose | if set to true verbose information is printed out. |
Definition at line 715 of file dlt_common.c.
References buffer, control_type, DLT_COMMON_BUFFER_LENGTH, DLT_GET_MSIN_MSTP, DLT_GET_MSIN_MTIN, DLT_HEADER_SHOW_ALL, DLT_HEADER_SHOW_APID, DLT_HEADER_SHOW_CTID, DLT_HEADER_SHOW_ECUID, DLT_HEADER_SHOW_MSGCNT, DLT_HEADER_SHOW_MSGSUBTYPE, DLT_HEADER_SHOW_MSGTYPE, DLT_HEADER_SHOW_NOARG, DLT_HEADER_SHOW_NONE, DLT_HEADER_SHOW_TIME, DLT_HEADER_SHOW_TMSTP, DLT_HEADER_SHOW_VNVSTATUS, DLT_IS_HTYP_UEH, DLT_IS_HTYP_WEID, DLT_IS_HTYP_WTMS, DLT_IS_MSIN_VERB, dlt_print_id(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_TYPE_APP_TRACE, DLT_TYPE_CONTROL, DLT_TYPE_LOG, DLT_TYPE_NW_TRACE, sDltMessage::extendedheader, sDltMessage::headerextra, log_info, message_type, NULL, nw_trace_type, PRINT_FUNCTION_VERBOSE, sDltMessage::standardheader, sDltMessage::storageheader, and trace_type.
Referenced by dlt_message_header().
DltReturnValue dlt_message_init | ( | DltMessage * | msg, |
int | verbose | ||
) |
Initialise the structure used to access a DLT message. This function must be called before using further dlt_message functions.
msg | pointer to structure of organising access to DLT messages |
verbose | if set to true verbose information is printed out. |
Definition at line 666 of file dlt_common.c.
References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, sDltMessage::extendedheader, sDltMessage::found_serialheader, sDltMessage::headersize, NULL, PRINT_FUNCTION_VERBOSE, sDltMessage::standardheader, and sDltMessage::storageheader.
Referenced by dlt_client_main_loop(), dlt_client_send_ctrl_msg(), dlt_control_prepare_message(), dlt_daemon_control_get_default_log_level(), dlt_daemon_control_get_log_info(), dlt_daemon_control_get_software_version(), dlt_daemon_control_message_buffer_overflow(), dlt_daemon_control_message_connection_info(), dlt_daemon_control_message_marker(), dlt_daemon_control_message_time(), dlt_daemon_control_message_timezone(), dlt_daemon_control_message_unregister_context(), dlt_daemon_control_passive_node_connect_status(), dlt_daemon_control_service_response(), dlt_daemon_local_init_p2(), dlt_daemon_process_user_message_register_context(), dlt_file_init(), dlt_gateway_process_passive_node_messages(), dlt_gateway_send_control_message(), and dlt_user_log_send_log().
DltReturnValue dlt_message_payload | ( | DltMessage * | msg, |
char * | text, | ||
int | textlength, | ||
int | type, | ||
int | verbose | ||
) |
Print Payload into an ASCII string.
msg | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the header is written |
textlength | maximal size of text buffer |
type | 1 = payload as hex, 2 = payload as ASCII. |
verbose | if set to true verbose information is printed out. |
Definition at line 891 of file dlt_common.c.
References sDltMessage::databuffer, sDltMessage::datasize, DLT_COMMON_ASCII_LIMIT_MAX_CHARS, DLT_ENDIAN_GET_32, dlt_log(), dlt_message_argument_print(), DLT_MSG_IS_CONTROL, DLT_MSG_IS_CONTROL_RESPONSE, DLT_MSG_IS_CONTROL_TIME, DLT_MSG_IS_NONVERBOSE, DLT_MSG_READ_VALUE, DLT_OUTPUT_ASCII_LIMITED, DLT_OUTPUT_HEX, DLT_OUTPUT_MIXED_FOR_HTML, DLT_OUTPUT_MIXED_FOR_PLAIN, dlt_print_hex_string(), dlt_print_mixed_string(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_SERVICE_ID_LAST_ENTRY, sDltMessage::extendedheader, NULL, PRINT_FUNCTION_VERBOSE, return_type, service_id, sDltMessage::standardheader, and str.
Referenced by dlt_control_callback(), dlt_message_print_ascii(), dlt_message_print_hex(), dlt_message_print_mixed_html(), dlt_message_print_mixed_plain(), dlt_receive_message_callback(), dlt_testclient_message_callback(), main(), and receive().
DltReturnValue dlt_message_print_ascii | ( | DltMessage * | message, |
char * | text, | ||
uint32_t | size, | ||
int | verbose | ||
) |
Print payload of a DLT message as ASCII-Output
message | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the output is written |
size | maximal size of text buffer |
verbose | if set to true verbose information is printed out. |
Definition at line 3325 of file dlt_common.c.
References dlt_message_header(), dlt_message_payload(), DLT_OUTPUT_ASCII, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_daemon_process_user_message_log(), and dlt_user_print_msg().
DltReturnValue dlt_message_print_header | ( | DltMessage * | message, |
char * | text, | ||
uint32_t | size, | ||
int | verbose | ||
) |
Print header of a DLT message
message | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the header is written |
size | maximal size of text buffer |
verbose | if set to true verbose information is printed out. |
Definition at line 3297 of file dlt_common.c.
References dlt_message_header(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_daemon_process_user_message_log(), and dlt_testclient_message_callback().
DltReturnValue dlt_message_print_hex | ( | DltMessage * | message, |
char * | text, | ||
uint32_t | size, | ||
int | verbose | ||
) |
Print payload of a DLT message as Hex-Output
message | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the output is written |
size | maximal size of text buffer |
verbose | if set to true verbose information is printed out. |
Definition at line 3310 of file dlt_common.c.
References dlt_message_header(), dlt_message_payload(), DLT_OUTPUT_HEX, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_daemon_process_user_message_log(), dlt_receive_message_callback(), dlt_testclient_message_callback(), and main().
DltReturnValue dlt_message_print_mixed_html | ( | DltMessage * | message, |
char * | text, | ||
uint32_t | size, | ||
int | verbose | ||
) |
Print payload of a DLT message as Mixed-Ouput (Hex and ASCII), for HTML text output
message | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the output is written |
size | maximal size of text buffer |
verbose | if set to true verbose information is printed out. |
Definition at line 3355 of file dlt_common.c.
References dlt_message_header(), dlt_message_payload(), DLT_OUTPUT_MIXED_FOR_HTML, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
DltReturnValue dlt_message_print_mixed_plain | ( | DltMessage * | message, |
char * | text, | ||
uint32_t | size, | ||
int | verbose | ||
) |
Print payload of a DLT message as Mixed-Ouput (Hex and ASCII), for plain text output
message | pointer to structure of organising access to DLT messages |
text | pointer to a ASCII string, in which the output is written |
size | maximal size of text buffer |
verbose | if set to true verbose information is printed out. |
Definition at line 3340 of file dlt_common.c.
References dlt_message_header(), dlt_message_payload(), DLT_OUTPUT_MIXED_FOR_PLAIN, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_receive_message_callback(), dlt_testclient_message_callback(), and main().
int dlt_message_read | ( | DltMessage * | msg, |
uint8_t * | buffer, | ||
unsigned int | length, | ||
int | resync, | ||
int | verbose | ||
) |
Read message from memory buffer. Message in buffer has no storage header.
msg | pointer to structure of organising access to DLT messages |
buffer | pointer to memory buffer |
length | length of message in buffer |
resync | if set to true resync to serial header is enforced |
verbose | if set to true verbose information is printed out. |
Definition at line 1091 of file dlt_common.c.
References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, DLT_BETOH_16, DLT_COMMON_BUFFER_LENGTH, DLT_IS_HTYP_UEH, dlt_log(), DLT_MESSAGE_ERROR_CONTENT, DLT_MESSAGE_ERROR_OK, DLT_MESSAGE_ERROR_SIZE, DLT_MESSAGE_ERROR_UNKNOWN, dlt_message_get_extraparameters(), DLT_STANDARD_HEADER_EXTRA_SIZE, dltSerialHeader, sDltMessage::extendedheader, sDltMessage::found_serialheader, sDltMessage::headerbuffer, sDltMessage::headersize, NULL, PRINT_FUNCTION_VERBOSE, sDltMessage::resync_offset, sDltMessage::standardheader, sDltMessage::storageheader, and str.
Referenced by dlt_client_main_loop(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_messages(), dlt_daemon_process_user_message_log(), and dlt_gateway_process_passive_node_messages().
DltReturnValue dlt_message_set_extraparameters | ( | DltMessage * | msg, |
int | verbose | ||
) |
Set standard header extra parameters
msg | pointer to structure of organising access to DLT messages |
verbose | if set to true verbose information is printed out. |
Definition at line 1273 of file dlt_common.c.
References DLT_HTOBE_32, DLT_ID_SIZE, DLT_IS_HTYP_WEID, DLT_IS_HTYP_WSID, DLT_IS_HTYP_WTMS, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DLT_SIZE_WEID, DLT_SIZE_WSID, DLT_SIZE_WTMS, sDltMessage::headerbuffer, sDltMessage::headerextra, NULL, PRINT_FUNCTION_VERBOSE, and sDltMessage::standardheader.
Referenced by dlt_client_send_ctrl_msg(), dlt_daemon_client_send_control_message(), dlt_daemon_control_message_time(), dlt_daemon_process_user_message_log(), dlt_gateway_send_control_message(), dlt_user_log_send_log(), and prepare_extra_headers().
int dlt_mkdir_recursive | ( | const char * | dir | ) |
Create the specified path, recursive if necessary behaves like calling mkdir -p <dir> on the console
Definition at line 3905 of file dlt_common.c.
References NULL.
Referenced by dlt_init(), and main().
DltReturnValue dlt_print_char_string | ( | char ** | text, |
int | textlength, | ||
uint8_t * | ptr, | ||
int | size | ||
) |
Helper function to print a byte array in ascii into a string.
text | pointer to a ASCII string, in which the text is written |
textlength | maximal size of text buffer |
ptr | pointer to the byte array. |
size | number of bytes to be printed. |
Definition at line 260 of file dlt_common.c.
References DLT_COMMON_ASCII_CHAR_LT, DLT_COMMON_ASCII_CHAR_SPACE, DLT_COMMON_ASCII_CHAR_TILDE, dlt_log(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, and str.
Referenced by dlt_print_mixed_string().
void dlt_print_hex | ( | uint8_t * | ptr, |
int | size | ||
) |
Helper function to print a byte array in hex.
ptr | pointer to the byte array. |
size | number of bytes to be printed. |
Definition at line 100 of file dlt_common.c.
References NULL.
DltReturnValue dlt_print_hex_string | ( | char * | text, |
int | textlength, | ||
uint8_t * | ptr, | ||
int | size | ||
) |
Helper function to print a byte array in hex into a string.
text | pointer to a ASCII string, in which the text is written |
textlength | maximal size of text buffer |
ptr | pointer to the byte array. |
size | number of bytes to be printed. |
Definition at line 120 of file dlt_common.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, and str.
Referenced by dlt_message_argument_print(), dlt_message_payload(), and dlt_print_mixed_string().
void dlt_print_id | ( | char * | text, |
const char * | id | ||
) |
Helper function to print an id.
text | pointer to ASCII string where to write the id |
id | four byte char array as used in DLT mesages as IDs. |
Definition at line 301 of file dlt_common.c.
References DLT_ID_SIZE, and NULL.
Referenced by dlt_daemon_control_get_log_info(), dlt_filter_save(), and dlt_message_header_flags().
DltReturnValue dlt_print_mixed_string | ( | char * | text, |
int | textlength, | ||
uint8_t * | ptr, | ||
int | size, | ||
int | html | ||
) |
Helper function to print a byte array in hex and ascii into a string.
text | pointer to a ASCII string, in which the text is written |
textlength | maximal size of text buffer |
ptr | pointer to the byte array. |
size | number of bytes to be printed. |
html | output is html? 0 - false, 1 - true |
Definition at line 153 of file dlt_common.c.
References DLT_COMMON_BUFFER_LENGTH, DLT_COMMON_CHARLEN, DLT_COMMON_HEX_CHARS, DLT_COMMON_HEX_LINELEN, dlt_log(), dlt_print_char_string(), dlt_print_hex_string(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, NULL, and str.
Referenced by dlt_message_payload(), dlt_user_injection_callback(), test_injection_function_callback(), and test_injection_macro_callback().
int dlt_receiver_check_and_get | ( | DltReceiver * | receiver, |
void * | dest, | ||
unsigned int | to_get, | ||
unsigned int | skip_header | ||
) |
Check whether to_get amount of data is available in receiver and copy it to dest. Skip the DltUserHeader if skip_header is set to 1.
receiver | pointer to dlt receiver structure |
dest | pointer to the destination buffer |
to_get | size of the data to copy in dest whether if the DltUserHeader must be skipped. |
Definition at line 2277 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::bytesRcvd, dlt_log(), DLT_RCV_REMOVE, DLT_RCV_SKIP_HEADER, dlt_receiver_remove(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_log_mode(), dlt_daemon_process_user_message_marker(), dlt_daemon_process_user_message_overflow(), dlt_daemon_process_user_message_register_application(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), dlt_daemon_process_user_message_unregister_application(), and dlt_daemon_process_user_message_unregister_context().
DltReturnValue dlt_receiver_free | ( | DltReceiver * | receiver | ) |
De-Initialize a dlt receiver structure
receiver | pointer to dlt receiver structure |
Definition at line 2153 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::buffer, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_client_cleanup(), dlt_connection_destroy_receiver(), and dlt_free().
DltReturnValue dlt_receiver_init | ( | DltReceiver * | receiver, |
int | _fd, | ||
int | _buffersize | ||
) |
Initialising a dlt receiver structure
receiver | pointer to dlt receiver structure |
_fd | handle to file/socket/fifo, fram which the data should be received |
_buffersize | size of data buffer for storing the received data |
Definition at line 2126 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::buffer, DltReceiver::buffersize, DltReceiver::bytesRcvd, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, DltReceiver::fd, DltReceiver::lastBytesRcvd, NULL, and DltReceiver::totalBytesRcvd.
Referenced by dlt_client_connect(), dlt_connection_get_receiver(), dlt_gateway_store_connection(), and dlt_init().
DltReturnValue dlt_receiver_move_to_begin | ( | DltReceiver * | receiver | ) |
Move data from last receive call to front of receive buffer
receiver | pointer to dlt receiver structure |
Definition at line 2257 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::buffer, DltReceiver::bytesRcvd, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_client_main_loop(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_messages(), dlt_daemon_process_user_messages(), dlt_gateway_process_passive_node_messages(), and dlt_user_log_check_user_message().
int dlt_receiver_receive_fd | ( | DltReceiver * | receiver | ) |
Receive data from file/fifo using the dlt receiver structure
receiver | pointer to dlt receiver structure |
Definition at line 2203 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::buffer, DltReceiver::buffersize, DltReceiver::bytesRcvd, DltReceiver::fd, DltReceiver::lastBytesRcvd, NULL, and DltReceiver::totalBytesRcvd.
Referenced by dlt_client_main_loop(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_user_messages(), and dlt_user_log_check_user_message().
int dlt_receiver_receive_socket | ( | DltReceiver * | receiver | ) |
Receive data from socket using the dlt receiver structure
receiver | pointer to dlt receiver structure |
Definition at line 2173 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::buffer, DltReceiver::buffersize, DltReceiver::bytesRcvd, DltReceiver::fd, DltReceiver::lastBytesRcvd, NULL, and DltReceiver::totalBytesRcvd.
Referenced by dlt_client_main_loop(), dlt_daemon_process_client_messages(), dlt_daemon_process_control_messages(), and dlt_gateway_process_passive_node_messages().
DltReturnValue dlt_receiver_remove | ( | DltReceiver * | receiver, |
int | size | ||
) |
Remove a specific size of bytes from the received data
receiver | pointer to dlt receiver structure |
size | amount of bytes to be removed |
Definition at line 2232 of file dlt_common.c.
References DltReceiver::buf, DltReceiver::bytesRcvd, DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, and NULL.
Referenced by dlt_client_main_loop(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_messages(), dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_not_sup(), dlt_daemon_process_user_message_register_application(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_messages(), dlt_gateway_process_passive_node_messages(), dlt_receiver_check_and_get(), and dlt_user_log_check_user_message().
void dlt_set_id | ( | char * | id, |
const char * | text | ||
) |
Helper function to set an ID parameter.
id | four byte char array as used in DLT mesages as IDs. |
text | string to be copied into char array. |
Definition at line 324 of file dlt_common.c.
References NULL.
Referenced by dlt_client_get_log_info(), dlt_client_send_all_log_level(), dlt_client_send_ctrl_msg(), dlt_client_send_default_log_level(), dlt_client_send_default_trace_status(), dlt_client_send_log_level(), dlt_client_send_trace_status(), dlt_daemon_application_add(), dlt_daemon_application_find(), dlt_daemon_applications_load(), dlt_daemon_applications_save(), dlt_daemon_client_send_control_message(), dlt_daemon_context_add(), dlt_daemon_context_find(), dlt_daemon_contexts_load(), dlt_daemon_contexts_save(), dlt_daemon_control_callsw_cinjection(), dlt_daemon_control_get_log_info(), dlt_daemon_control_message_connection_info(), dlt_daemon_control_message_time(), dlt_daemon_control_message_unregister_context(), dlt_daemon_control_set_log_level(), dlt_daemon_control_set_trace_status(), dlt_daemon_init(), dlt_daemon_local_init_p2(), dlt_daemon_log_internal(), dlt_daemon_process_user_message_log(), dlt_daemon_process_user_message_register_context(), DLT_DECLARE_CONTEXT(), dlt_filter_add(), dlt_filter_delete(), dlt_filter_load(), dlt_gateway_send_control_message(), dlt_getloginfo_make_loginfo(), dlt_init_common(), dlt_logstorage_update_all_contexts(), dlt_process_get_log_info(), dlt_register_app(), dlt_register_context_ll_ts(), dlt_send_app_ll_ts_limit(), dlt_set_storageheader(), dlt_unregister_app(), dlt_unregister_context(), dlt_user_log_reattach_to_daemon(), dlt_user_log_resend_buffer(), dlt_user_log_send_log(), dlt_user_log_send_overflow(), dlt_user_log_send_register_application(), dlt_user_log_send_register_context(), dlt_user_log_send_unregister_application(), dlt_user_log_send_unregister_context(), init_dlt_connect(), main(), and prepare_extra_headers().
DltReturnValue dlt_set_storageheader | ( | DltStorageHeader * | storageheader, |
const char * | ecu | ||
) |
Fill out storage header of a dlt message
storageheader | pointer to storage header of a dlt message |
ecu | name of ecu to be set in storage header |
Definition at line 2315 of file dlt_common.c.
References DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, dlt_set_id(), and NULL.
Referenced by dlt_client_send_ctrl_msg(), dlt_control_callback(), dlt_daemon_client_send_control_message(), dlt_daemon_control_message_time(), dlt_daemon_log_internal(), dlt_daemon_process_user_message_log(), dlt_file_read_header_raw(), dlt_gateway_send_control_message(), dlt_receive_message_callback(), dlt_testclient_message_callback(), dlt_user_log_send_log(), and prepare_headers().
DltReturnValue dlt_setup_serial | ( | int | fd, |
speed_t | speed | ||
) |
Helper function: Setup serial connection
fd | File descriptor of serial tty device |
speed | Serial line speed, as defined in termios.h |
Definition at line 2992 of file dlt_common.c.
References DLT_RETURN_ERROR, and DLT_RETURN_OK.
Referenced by dlt_client_connect(), and dlt_daemon_init_serial().
uint32_t dlt_uptime | ( | void | ) |
Return the uptime of the system in 0.1 ms resolution
Definition at line 3274 of file dlt_common.c.
Referenced by dlt_client_send_ctrl_msg(), dlt_daemon_client_send_control_message(), dlt_daemon_control_message_time(), dlt_daemon_log_internal(), dlt_daemon_send_ringbuffer_to_client(), dlt_gateway_send_control_message(), dlt_testclient_message_callback(), dlt_user_atexit_blow_out_user_buffer(), dlt_user_log_send_log(), main(), and prepare_extra_headers().
DltReturnValue dlt_vlog | ( | int | prio, |
const char * | format, | ||
... | |||
) |
Log with variable arguments to (external) logging facility (like printf)
prio | priority (see syslog() call) |
format | format string for log message |
Definition at line 2078 of file dlt_common.c.
References dlt_log(), DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, logging_level, and NULL.
Referenced by dlt_client_init(), dlt_client_init_port(), dlt_daemon_process_user_message_register_context(), dlt_daemon_socket_open(), dlt_daemon_socket_sendreliable(), dlt_daemon_user_send_log_level(), dlt_disable_local_print(), dlt_enable_local_print(), dlt_init_common(), dlt_log_init(), dlt_log_int(), dlt_log_marker(), dlt_log_raw(), dlt_log_set_level(), dlt_log_string(), dlt_log_string_int(), dlt_log_string_uint(), dlt_log_uint(), dlt_nonverbose_mode(), dlt_offline_trace_check_size(), dlt_register_app(), dlt_register_context(), dlt_register_context_ll_ts(), dlt_send_app_ll_ts_limit(), dlt_set_application_ll_ts_limit(), dlt_set_log_mode(), dlt_unregister_app(), dlt_use_extended_header_for_non_verbose(), dlt_user_atexit_handler(), dlt_user_log_init(), dlt_user_log_send_log(), dlt_user_log_send_log_mode(), dlt_user_log_write_bool(), dlt_user_log_write_float32(), dlt_user_log_write_float64(), dlt_user_log_write_int(), dlt_user_log_write_int16(), dlt_user_log_write_int32(), dlt_user_log_write_int64(), dlt_user_log_write_int8(), dlt_user_log_write_ptr(), dlt_user_log_write_raw_formatted(), dlt_user_log_write_start_id(), dlt_user_log_write_string(), dlt_user_log_write_uint(), 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_end(), dlt_user_trace_network_segmented_segment(), dlt_user_trace_network_segmented_start(), dlt_user_trace_network_truncated(), dlt_verbose_mode(), dlt_with_ecu_id(), dlt_with_session_id(), and dlt_with_timestamp().
DltReturnValue dlt_vnlog | ( | int | prio, |
size_t | size, | ||
const char * | format, | ||
... | |||
) |
Log size bytes with variable arguments to (external) logging facility (similar to snprintf)
prio | priority (see syslog() call) |
size | number of bytes to log |
format | format string for log message |
Definition at line 2099 of file dlt_common.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_WRONG_PARAMETER, logging_level, and NULL.
Referenced by dlt_forward_msg(), dlt_init(), dlt_init_file(), dlt_init_message_queue(), dlt_user_atexit_blow_out_user_buffer(), dlt_user_atexit_handler(), dlt_user_check_library_version(), dlt_user_log_reattach_to_daemon(), dlt_user_log_send_log(), dlt_user_queue_resend(), and dlt_user_trace_network_segmented().
char dltFifoBaseDir[PATH_MAX+1] |
The common base-path of the dlt-daemon-fifo and application-generated fifos
Definition at line 72 of file dlt_common.c.
Referenced by dlt_daemon_application_add(), dlt_daemon_daemonize(), dlt_daemon_signal_handler(), dlt_init(), dlt_log_set_fifo_basedir(), main(), option_file_parser(), and option_handling().
const char dltSerialHeader[DLT_ID_SIZE] |
The definition of the serial header containing the characters "DLS" + 0x01.
Definition at line 70 of file dlt_common.c.
Referenced by dlt_client_main_loop(), dlt_connection_send_multiple(), dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), dlt_daemon_process_control_messages(), dlt_daemon_process_user_message_log(), dlt_daemon_serial_send(), dlt_daemon_socket_send(), dlt_file_read_header_raw(), dlt_gateway_forward_control_message(), dlt_gateway_process_passive_node_messages(), and dlt_message_read().
char dltSerialHeaderChar[DLT_ID_SIZE] |
The definition of the serial header containing the characters "DLS" + 0x01 as char.
Definition at line 71 of file dlt_common.c.