automotive-dlt
DLT Protocol API

Macros

#define DLT_HTYP_UEH   0x01
 
#define DLT_HTYP_MSBF   0x02
 
#define DLT_HTYP_WEID   0x04
 
#define DLT_HTYP_WSID   0x08
 
#define DLT_HTYP_WTMS   0x10
 
#define DLT_HTYP_VERS   0xe0
 
#define DLT_IS_HTYP_UEH(htyp)   ((htyp) & DLT_HTYP_UEH)
 
#define DLT_IS_HTYP_MSBF(htyp)   ((htyp) & DLT_HTYP_MSBF)
 
#define DLT_IS_HTYP_WEID(htyp)   ((htyp) & DLT_HTYP_WEID)
 
#define DLT_IS_HTYP_WSID(htyp)   ((htyp) & DLT_HTYP_WSID)
 
#define DLT_IS_HTYP_WTMS(htyp)   ((htyp) & DLT_HTYP_WTMS)
 
#define DLT_HTYP_PROTOCOL_VERSION1   (1<<5)
 
#define DLT_MSIN_VERB   0x01
 
#define DLT_MSIN_MSTP   0x0e
 
#define DLT_MSIN_MTIN   0xf0
 
#define DLT_MSIN_MSTP_SHIFT   1
 
#define DLT_MSIN_MTIN_SHIFT   4
 
#define DLT_IS_MSIN_VERB(msin)   ((msin) & DLT_MSIN_VERB)
 
#define DLT_GET_MSIN_MSTP(msin)   (((msin) & DLT_MSIN_MSTP) >> DLT_MSIN_MSTP_SHIFT)
 
#define DLT_GET_MSIN_MTIN(msin)   (((msin) & DLT_MSIN_MTIN) >> DLT_MSIN_MTIN_SHIFT)
 
#define DLT_TYPE_LOG   0x00
 
#define DLT_TYPE_APP_TRACE   0x01
 
#define DLT_TYPE_NW_TRACE   0x02
 
#define DLT_TYPE_CONTROL   0x03
 
#define DLT_TRACE_VARIABLE   0x01
 
#define DLT_TRACE_FUNCTION_IN   0x02
 
#define DLT_TRACE_FUNCTION_OUT   0x03
 
#define DLT_TRACE_STATE   0x04
 
#define DLT_TRACE_VFB   0x05
 
#define DLT_CONTROL_REQUEST   0x01
 
#define DLT_CONTROL_RESPONSE   0x02
 
#define DLT_CONTROL_TIME   0x03
 
#define DLT_MSIN_CONTROL_REQUEST   ((DLT_TYPE_CONTROL << DLT_MSIN_MSTP_SHIFT) | (DLT_CONTROL_REQUEST << DLT_MSIN_MTIN_SHIFT))
 
#define DLT_MSIN_CONTROL_RESPONSE   ((DLT_TYPE_CONTROL << DLT_MSIN_MSTP_SHIFT) | (DLT_CONTROL_RESPONSE << DLT_MSIN_MTIN_SHIFT))
 
#define DLT_MSIN_CONTROL_TIME   ((DLT_TYPE_CONTROL << DLT_MSIN_MSTP_SHIFT) | (DLT_CONTROL_TIME << DLT_MSIN_MTIN_SHIFT))
 
#define DLT_TYPE_INFO_TYLE   0x0000000f
 
#define DLT_TYPE_INFO_BOOL   0x00000010
 
#define DLT_TYPE_INFO_SINT   0x00000020
 
#define DLT_TYPE_INFO_UINT   0x00000040
 
#define DLT_TYPE_INFO_FLOA   0x00000080
 
#define DLT_TYPE_INFO_ARAY   0x00000100
 
#define DLT_TYPE_INFO_STRG   0x00000200
 
#define DLT_TYPE_INFO_RAWD   0x00000400
 
#define DLT_TYPE_INFO_VARI   0x00000800
 
#define DLT_TYPE_INFO_FIXP   0x00001000
 
#define DLT_TYPE_INFO_TRAI   0x00002000
 
#define DLT_TYPE_INFO_STRU   0x00004000
 
#define DLT_TYPE_INFO_SCOD   0x00038000
 
#define DLT_TYLE_8BIT   0x00000001
 
#define DLT_TYLE_16BIT   0x00000002
 
#define DLT_TYLE_32BIT   0x00000003
 
#define DLT_TYLE_64BIT   0x00000004
 
#define DLT_TYLE_128BIT   0x00000005
 
#define DLT_SCOD_ASCII   0x00000000
 
#define DLT_SCOD_UTF8   0x00008000
 
#define DLT_SCOD_HEX   0x00010000
 
#define DLT_SCOD_BIN   0x00018000
 
#define DLT_SERVICE_ID_SET_LOG_LEVEL   0x01
 
#define DLT_SERVICE_ID_SET_TRACE_STATUS   0x02
 
#define DLT_SERVICE_ID_GET_LOG_INFO   0x03
 
#define DLT_SERVICE_ID_GET_DEFAULT_LOG_LEVEL   0x04
 
#define DLT_SERVICE_ID_STORE_CONFIG   0x05
 
#define DLT_SERVICE_ID_RESET_TO_FACTORY_DEFAULT   0x06
 
#define DLT_SERVICE_ID_SET_COM_INTERFACE_STATUS   0x07
 
#define DLT_SERVICE_ID_SET_COM_INTERFACE_MAX_BANDWIDTH   0x08
 
#define DLT_SERVICE_ID_SET_VERBOSE_MODE   0x09
 
#define DLT_SERVICE_ID_SET_MESSAGE_FILTERING   0x0A
 
#define DLT_SERVICE_ID_SET_TIMING_PACKETS   0x0B
 
#define DLT_SERVICE_ID_GET_LOCAL_TIME   0x0C
 
#define DLT_SERVICE_ID_USE_ECU_ID   0x0D
 
#define DLT_SERVICE_ID_USE_SESSION_ID   0x0E
 
#define DLT_SERVICE_ID_USE_TIMESTAMP   0x0F
 
#define DLT_SERVICE_ID_USE_EXTENDED_HEADER   0x10
 
#define DLT_SERVICE_ID_SET_DEFAULT_LOG_LEVEL   0x11
 
#define DLT_SERVICE_ID_SET_DEFAULT_TRACE_STATUS   0x12
 
#define DLT_SERVICE_ID_GET_SOFTWARE_VERSION   0x13
 
#define DLT_SERVICE_ID_MESSAGE_BUFFER_OVERFLOW   0x14
 
#define DLT_SERVICE_ID_LAST_ENTRY   0x15
 
#define DLT_SERVICE_ID_UNREGISTER_CONTEXT   0xf01
 
#define DLT_SERVICE_ID_CONNECTION_INFO   0xf02
 
#define DLT_SERVICE_ID_TIMEZONE   0xf03
 
#define DLT_SERVICE_ID_MARKER   0xf04
 
#define DLT_SERVICE_ID_OFFLINE_LOGSTORAGE   0xf05
 
#define DLT_SERVICE_ID_PASSIVE_NODE_CONNECT   0xf0E
 
#define DLT_SERVICE_ID_PASSIVE_NODE_CONNECTION_STATUS   0xf0F
 
#define DLT_SERVICE_ID_SET_ALL_LOG_LEVEL   0xf10
 
#define DLT_SERVICE_ID_CALLSW_CINJECTION   0xFFF
 
#define DLT_SERVICE_RESPONSE_OK   0x00
 
#define DLT_SERVICE_RESPONSE_NOT_SUPPORTED   0x01
 
#define DLT_SERVICE_RESPONSE_ERROR   0x02
 
#define DLT_CONNECTION_STATUS_DISCONNECTED   0x01
 
#define DLT_CONNECTION_STATUS_CONNECTED   0x02
 

Detailed Description

Macro Definition Documentation

#define DLT_CONNECTION_STATUS_CONNECTED   0x02

Client is connected

Definition at line 218 of file dlt_protocol.h.

Referenced by dlt_daemon_process_client_connect().

#define DLT_CONNECTION_STATUS_DISCONNECTED   0x01

Client is disconnected

Definition at line 217 of file dlt_protocol.h.

Referenced by dlt_daemon_close_socket().

#define DLT_CONTROL_REQUEST   0x01

Request message

Definition at line 137 of file dlt_protocol.h.

#define DLT_CONTROL_RESPONSE   0x02

Response to request message

Definition at line 138 of file dlt_protocol.h.

#define DLT_CONTROL_TIME   0x03

keep-alive message

Definition at line 139 of file dlt_protocol.h.

#define DLT_GET_MSIN_MSTP (   msin)    (((msin) & DLT_MSIN_MSTP) >> DLT_MSIN_MSTP_SHIFT)

Definition at line 108 of file dlt_protocol.h.

Referenced by dlt_message_header_flags(), and dlt_testclient_message_callback().

#define DLT_GET_MSIN_MTIN (   msin)    (((msin) & DLT_MSIN_MTIN) >> DLT_MSIN_MTIN_SHIFT)
#define DLT_HTYP_VERS   0xe0

version number, 0x1

Definition at line 87 of file dlt_protocol.h.

#define DLT_HTYP_WSID   0x08

with session ID

Definition at line 85 of file dlt_protocol.h.

Referenced by dlt_daemon_log_internal(), and dlt_user_log_send_log().

#define DLT_IS_HTYP_MSBF (   htyp)    ((htyp) & DLT_HTYP_MSBF)

Definition at line 90 of file dlt_protocol.h.

#define DLT_IS_HTYP_WSID (   htyp)    ((htyp) & DLT_HTYP_WSID)
#define DLT_IS_HTYP_WTMS (   htyp)    ((htyp) & DLT_HTYP_WTMS)
#define DLT_IS_MSIN_VERB (   msin)    ((msin) & DLT_MSIN_VERB)

Definition at line 107 of file dlt_protocol.h.

Referenced by dlt_message_header_flags(), and dlt_testclient_message_callback().

#define DLT_MSIN_CONTROL_RESPONSE   ((DLT_TYPE_CONTROL << DLT_MSIN_MSTP_SHIFT) | (DLT_CONTROL_RESPONSE << DLT_MSIN_MTIN_SHIFT))

Definition at line 142 of file dlt_protocol.h.

Referenced by dlt_daemon_client_send_control_message().

#define DLT_MSIN_CONTROL_TIME   ((DLT_TYPE_CONTROL << DLT_MSIN_MSTP_SHIFT) | (DLT_CONTROL_TIME << DLT_MSIN_MTIN_SHIFT))

Definition at line 143 of file dlt_protocol.h.

Referenced by dlt_daemon_control_message_time().

#define DLT_MSIN_MSTP   0x0e

message type

Definition at line 101 of file dlt_protocol.h.

#define DLT_MSIN_MSTP_SHIFT   1

shift right offset to get mstp value

Definition at line 104 of file dlt_protocol.h.

Referenced by dlt_daemon_log_internal(), and dlt_user_log_send_log().

#define DLT_MSIN_MTIN   0xf0

message type info

Definition at line 102 of file dlt_protocol.h.

Referenced by dlt_daemon_log_internal(), and dlt_user_log_send_log().

#define DLT_MSIN_MTIN_SHIFT   4

shift right offset to get mtin value

Definition at line 105 of file dlt_protocol.h.

Referenced by dlt_daemon_log_internal(), and dlt_user_log_send_log().

#define DLT_MSIN_VERB   0x01

verbose

Definition at line 100 of file dlt_protocol.h.

Referenced by dlt_daemon_log_internal(), and dlt_user_log_send_log().

#define DLT_SCOD_ASCII   0x00000000
#define DLT_SCOD_UTF8   0x00008000
#define DLT_SERVICE_ID_CALLSW_CINJECTION   0xFFF

Service ID: Message Injection (minimal ID)

Definition at line 205 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_CONNECTION_INFO   0xf02

Service ID: Message connection info

Definition at line 198 of file dlt_protocol.h.

Referenced by dlt_daemon_control_message_connection_info().

#define DLT_SERVICE_ID_GET_DEFAULT_LOG_LEVEL   0x04

Service ID: Get dafault log level

Definition at line 179 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control(), and dlt_daemon_control_get_default_log_level().

#define DLT_SERVICE_ID_GET_LOCAL_TIME   0x0C

Service ID: Get local time

Definition at line 187 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_GET_SOFTWARE_VERSION   0x13

Service ID: Get software version

Definition at line 194 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control(), dlt_daemon_control_get_software_version(), and dlt_gateway_send_control_message().

#define DLT_SERVICE_ID_LAST_ENTRY   0x15

Service ID: Last entry to avoid any further modifications in dependent code

Definition at line 196 of file dlt_protocol.h.

Referenced by dlt_gateway_check_control_messages(), and dlt_message_payload().

#define DLT_SERVICE_ID_MARKER   0xf04

Service ID: Marker

Definition at line 200 of file dlt_protocol.h.

Referenced by dlt_daemon_control_message_marker().

#define DLT_SERVICE_ID_MESSAGE_BUFFER_OVERFLOW   0x14

Service ID: Message buffer overflow

Definition at line 195 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control(), and dlt_daemon_control_message_buffer_overflow().

#define DLT_SERVICE_ID_OFFLINE_LOGSTORAGE   0xf05

Service ID: Offline log storage

Definition at line 201 of file dlt_protocol.h.

Referenced by analyze_response(), dlt_daemon_client_process_control(), dlt_daemon_control_service_logstorage(), and prepare_message_body().

#define DLT_SERVICE_ID_PASSIVE_NODE_CONNECT   0xf0E
#define DLT_SERVICE_ID_PASSIVE_NODE_CONNECTION_STATUS   0xf0F
#define DLT_SERVICE_ID_RESET_TO_FACTORY_DEFAULT   0x06

Service ID: Reset to factory defaults

Definition at line 181 of file dlt_protocol.h.

Referenced by dlt_client_send_reset_to_factory_default(), and dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_SET_ALL_LOG_LEVEL   0xf10

Service ID: set all log level

Definition at line 204 of file dlt_protocol.h.

Referenced by dlt_client_send_all_log_level(), dlt_daemon_client_process_control(), and dlt_daemon_control_set_all_log_level().

#define DLT_SERVICE_ID_SET_COM_INTERFACE_MAX_BANDWIDTH   0x08

Service ID: Set communication interface maximum bandwidth

Definition at line 183 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_SET_COM_INTERFACE_STATUS   0x07

Service ID: Set communication interface status

Definition at line 182 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_SET_DEFAULT_LOG_LEVEL   0x11

Service ID: Set default log level

Definition at line 192 of file dlt_protocol.h.

Referenced by dlt_client_send_default_log_level(), dlt_daemon_client_process_control(), and dlt_daemon_control_set_default_log_level().

#define DLT_SERVICE_ID_SET_DEFAULT_TRACE_STATUS   0x12

Service ID: Set default trace status

Definition at line 193 of file dlt_protocol.h.

Referenced by dlt_client_send_default_trace_status(), dlt_daemon_client_process_control(), and dlt_daemon_control_set_default_trace_status().

#define DLT_SERVICE_ID_SET_LOG_LEVEL   0x01
#define DLT_SERVICE_ID_SET_MESSAGE_FILTERING   0x0A

Service ID: Set message filtering

Definition at line 185 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_SET_TIMING_PACKETS   0x0B

Service ID: Set timing packets

Definition at line 186 of file dlt_protocol.h.

Referenced by dlt_client_send_timing_pakets(), dlt_daemon_client_process_control(), and dlt_daemon_control_set_timing_packets().

#define DLT_SERVICE_ID_SET_TRACE_STATUS   0x02

Service ID: Set trace status

Definition at line 177 of file dlt_protocol.h.

Referenced by dlt_client_send_trace_status(), dlt_daemon_client_process_control(), and dlt_daemon_control_set_trace_status().

#define DLT_SERVICE_ID_SET_VERBOSE_MODE   0x09

Service ID: Set verbose mode

Definition at line 184 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_STORE_CONFIG   0x05

Service ID: Store configuration

Definition at line 180 of file dlt_protocol.h.

Referenced by dlt_client_send_store_config(), and dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_TIMEZONE   0xf03

Service ID: Timezone

Definition at line 199 of file dlt_protocol.h.

Referenced by dlt_daemon_control_message_timezone().

#define DLT_SERVICE_ID_UNREGISTER_CONTEXT   0xf01

Service ID: Message unregister context

Definition at line 197 of file dlt_protocol.h.

Referenced by dlt_daemon_control_message_unregister_context().

#define DLT_SERVICE_ID_USE_ECU_ID   0x0D

Service ID: Use ECU id

Definition at line 188 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_USE_EXTENDED_HEADER   0x10

Service ID: Use extended header

Definition at line 191 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_USE_SESSION_ID   0x0E

Service ID: Use session id

Definition at line 189 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_ID_USE_TIMESTAMP   0x0F

Service ID: Use timestamp

Definition at line 190 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control().

#define DLT_SERVICE_RESPONSE_NOT_SUPPORTED   0x01

Control message response: Not supported

Definition at line 211 of file dlt_protocol.h.

Referenced by dlt_daemon_client_process_control(), and dlt_daemon_control_callsw_cinjection().

#define DLT_TRACE_FUNCTION_IN   0x02

tracing of function calls

Definition at line 123 of file dlt_protocol.h.

#define DLT_TRACE_FUNCTION_OUT   0x03

tracing of function return values

Definition at line 124 of file dlt_protocol.h.

#define DLT_TRACE_STATE   0x04

tracing of states of a state machine

Definition at line 125 of file dlt_protocol.h.

#define DLT_TRACE_VARIABLE   0x01

tracing of a variable

Definition at line 122 of file dlt_protocol.h.

#define DLT_TRACE_VFB   0x05

tracing of virtual function bus

Definition at line 126 of file dlt_protocol.h.

#define DLT_TYLE_128BIT   0x00000005

Definition at line 166 of file dlt_protocol.h.

Referenced by dlt_message_argument_print(), and dlt_testclient_message_callback().

#define DLT_TYPE_APP_TRACE   0x01

Application trace message type

Definition at line 115 of file dlt_protocol.h.

Referenced by dlt_message_header_flags().

#define DLT_TYPE_CONTROL   0x03

Control message type

Definition at line 117 of file dlt_protocol.h.

Referenced by dlt_message_header_flags(), and dlt_user_log_send_log().

#define DLT_TYPE_INFO_ARAY   0x00000100

Array of standard types

Definition at line 153 of file dlt_protocol.h.

#define DLT_TYPE_INFO_BOOL   0x00000010
#define DLT_TYPE_INFO_FIXP   0x00001000

Set, if quantization and offset are added

Definition at line 157 of file dlt_protocol.h.

Referenced by dlt_message_argument_print().

#define DLT_TYPE_INFO_FLOA   0x00000080
#define DLT_TYPE_INFO_RAWD   0x00000400
#define DLT_TYPE_INFO_SCOD   0x00038000

coding of the type string: 0 = ASCII, 1 = UTF-8

Definition at line 160 of file dlt_protocol.h.

Referenced by dlt_message_argument_print(), and dlt_testclient_message_callback().

#define DLT_TYPE_INFO_SINT   0x00000020
#define DLT_TYPE_INFO_STRG   0x00000200
#define DLT_TYPE_INFO_STRU   0x00004000

Struct

Definition at line 159 of file dlt_protocol.h.

#define DLT_TYPE_INFO_TRAI   0x00002000

Set, if additional trace information is added

Definition at line 158 of file dlt_protocol.h.

Referenced by dlt_message_argument_print().

#define DLT_TYPE_INFO_TYLE   0x0000000f

Length of standard data: 1 = 8bit, 2 = 16bit, 3 = 32 bit, 4 = 64 bit, 5 = 128 bit

Definition at line 148 of file dlt_protocol.h.

Referenced by dlt_message_argument_print(), and dlt_testclient_message_callback().

#define DLT_TYPE_INFO_VARI   0x00000800

Set, if additional information to a variable is available

Definition at line 156 of file dlt_protocol.h.

Referenced by dlt_message_argument_print().

#define DLT_TYPE_LOG   0x00