automotive-dlt
|
Data Structures | |
struct | DltClient |
Enumerations | |
enum | DltClientMode { DLT_CLIENT_MODE_UNDEFINED = -1, DLT_CLIENT_MODE_TCP, DLT_CLIENT_MODE_SERIAL, DLT_CLIENT_MODE_UNIX } |
enum DltClientMode |
Enumerator | |
---|---|
DLT_CLIENT_MODE_UNDEFINED | |
DLT_CLIENT_MODE_TCP | |
DLT_CLIENT_MODE_SERIAL | |
DLT_CLIENT_MODE_UNIX |
Definition at line 81 of file dlt_client.h.
DltReturnValue dlt_client_cleanup | ( | DltClient * | client, |
int | verbose | ||
) |
Cleanup dlt client structure
client | pointer to dlt client structure |
verbose | if set to true verbose information is printed out. |
Definition at line 301 of file dlt_client.c.
References dlt_receiver_free(), DLT_RETURN_ERROR, DLT_RETURN_OK, DltClient::receiver, and DltClient::sock.
Referenced by dlt_control_deinit(), dlt_control_init(), dlt_gateway_deinit(), dlt_gateway_process_on_demand_request(), dlt_receive_message_callback(), main(), and receive().
DltReturnValue dlt_client_connect | ( | DltClient * | client, |
int | verbose | ||
) |
Connect to dlt daemon using the information from the dlt client structure
client | pointer to dlt client structure |
verbose | if set to true verbose information is printed out. |
Definition at line 168 of file dlt_client.c.
References DltClient::baudrate, DLT_CLIENT_MODE_SERIAL, DLT_CLIENT_MODE_TCP, DLT_CLIENT_MODE_UNIX, DLT_CLIENT_RCVBUFSIZE, DLT_CLIENT_TEXTBUFSIZE, dlt_log(), dlt_receiver_init(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_setup_serial(), DltClient::mode, NULL, DltClient::port, DltClient::receiver, DltClient::serialDevice, DltClient::servIP, DltClient::sock, DltClient::socketPath, and str.
Referenced by dlt_control_init_connection(), dlt_gateway_establish_connections(), dlt_gateway_process_on_demand_request(), and main().
int dlt_client_get_log_info | ( | DltClient * | client | ) |
Send an request to get log info message to the dlt daemon
client | pointer to dlt client structure |
Definition at line 603 of file dlt_client.c.
References dlt_client_main_loop(), dlt_client_send_ctrl_msg(), DLT_SERVICE_ID_GET_LOG_INFO, dlt_set_id(), and NULL.
Referenced by dlt_process_get_log_info().
DltReturnValue dlt_client_init | ( | DltClient * | client, |
int | verbose | ||
) |
Initialising dlt client structure
client | pointer to dlt client structure |
verbose | if set to true verbose information is printed out. |
Definition at line 133 of file dlt_client.c.
References DLT_CLIENT_ENV_DAEMON_TCP_PORT, dlt_client_init_port(), DLT_DAEMON_TCP_PORT, DLT_RETURN_ERROR, dlt_vlog(), and NULL.
Referenced by dlt_control_init_connection(), and main().
int dlt_client_init_port | ( | DltClient * | client, |
int | port, | ||
int | verbose | ||
) |
Initialising dlt client structure with a specific port
client | pointer to dlt client structure |
port | The port for the tcp connection |
verbose | if set to true verbose information is printed out. |
Definition at line 109 of file dlt_client.c.
References DltClient::baudrate, DltReceiver::buffer, DLT_CLIENT_INITIAL_BAUDRATE, DLT_CLIENT_MODE_TCP, DLT_DAEMON_TCP_PORT, DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_vlog(), DltClient::mode, NULL, DltClient::port, DltClient::receiver, DltClient::serialDevice, DltClient::servIP, DltClient::sock, and DltClient::socketPath.
Referenced by dlt_client_init(), and dlt_gateway_store_connection().
DltReturnValue dlt_client_main_loop | ( | DltClient * | client, |
void * | data, | ||
int | verbose | ||
) |
Main Loop of dlt client application
client | pointer to dlt client structure |
data | pointer to data to be provided to the main loop |
verbose | if set to true verbose information is printed out. |
Definition at line 326 of file dlt_client.c.
References DltReceiver::buf, DltReceiver::bytesRcvd, data, sDltMessage::datasize, DLT_MESSAGE_ERROR_OK, dlt_message_free(), dlt_message_init(), dlt_message_read(), dlt_receiver_move_to_begin(), dlt_receiver_receive_fd(), dlt_receiver_receive_socket(), dlt_receiver_remove(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_RETURN_TRUE, dltSerialHeader, sDltMessage::found_serialheader, sDltMessage::headersize, message_callback_function, DltClient::mode, and DltClient::receiver.
Referenced by dlt_client_get_log_info(), dlt_control_listen_to_daemon(), and main().
void dlt_client_register_message_callback | ( | int(*)(DltMessage *message, void *data) | registerd_callback | ) |
Definition at line 105 of file dlt_client.c.
References message_callback_function.
Referenced by dlt_control_init_connection(), and main().
int dlt_client_send_all_log_level | ( | DltClient * | client, |
uint8_t | LogLevel | ||
) |
Send the log level to all contexts registered with dlt daemon
client | pointer to dlt client structure |
LogLevel | Log Level to be set |
Definition at line 708 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_SET_ALL_LOG_LEVEL, and dlt_set_id().
Referenced by main().
DltReturnValue dlt_client_send_ctrl_msg | ( | DltClient * | client, |
char * | apid, | ||
char * | ctid, | ||
uint8_t * | payload, | ||
uint32_t | size | ||
) |
Send ancontrol message to the dlt daemon
client | pointer to dlt client structure |
apid | application id |
ctid | context id |
payload | Buffer filled with control message data |
size | Size of control message data |
Definition at line 409 of file dlt_client.c.
References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, DLT_CLIENT_DUMMY_APP_ID, DLT_CLIENT_DUMMY_CON_ID, DLT_CLIENT_MODE_SERIAL, DLT_CLIENT_MODE_TCP, DLT_HTOBE_16, DLT_HTYP_MSBF, DLT_HTYP_PROTOCOL_VERSION1, DLT_HTYP_UEH, DLT_HTYP_WEID, DLT_HTYP_WTMS, dlt_message_free(), dlt_message_init(), dlt_message_set_extraparameters(), DLT_MSIN_CONTROL_REQUEST, DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_set_id(), dlt_set_storageheader(), DLT_STANDARD_HEADER_EXTRA_SIZE, dlt_uptime(), DltClient::ecuid, sDltMessage::extendedheader, sDltMessage::headerbuffer, sDltMessage::headerextra, sDltMessage::headersize, DltClient::mode, DltClient::sock, sDltMessage::standardheader, and sDltMessage::storageheader.
Referenced by dlt_client_get_log_info(), dlt_client_send_all_log_level(), dlt_client_send_default_log_level(), dlt_client_send_default_trace_status(), dlt_client_send_inject_msg(), dlt_client_send_log_level(), dlt_client_send_reset_to_factory_default(), dlt_client_send_store_config(), dlt_client_send_timing_pakets(), and dlt_client_send_trace_status().
DltReturnValue dlt_client_send_default_log_level | ( | DltClient * | client, |
uint8_t | defaultLogLevel | ||
) |
Send the default log level to the dlt daemon
client | pointer to dlt client structure |
defaultLogLevel | Default Log Level |
Definition at line 678 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_SET_DEFAULT_LOG_LEVEL, and dlt_set_id().
Referenced by main().
DltReturnValue dlt_client_send_default_trace_status | ( | DltClient * | client, |
uint8_t | defaultTraceStatus | ||
) |
Send the default trace status to the dlt daemon
client | pointer to dlt client structure |
defaultTraceStatus | Default Trace Status |
Definition at line 738 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_SET_DEFAULT_TRACE_STATUS, and dlt_set_id().
Referenced by main().
DltReturnValue dlt_client_send_inject_msg | ( | DltClient * | client, |
char * | apid, | ||
char * | ctid, | ||
uint32_t | serviceID, | ||
uint8_t * | buffer, | ||
uint32_t | size | ||
) |
Send an injection message to the dlt daemon
client | pointer to dlt client structure |
apid | application id |
ctid | context id |
serviceID | service id |
buffer | Buffer filled with injection message data |
size | Size of injection data within buffer |
Definition at line 539 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, and DLT_RETURN_OK.
Referenced by main().
DltReturnValue dlt_client_send_log_level | ( | DltClient * | client, |
char * | apid, | ||
char * | ctid, | ||
uint8_t | logLevel | ||
) |
Send an set log level message to the dlt daemon
client | pointer to dlt client structure |
apid | application id |
ctid | context id |
SendLogLevel | Log Level |
Definition at line 571 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_SET_LOG_LEVEL, and dlt_set_id().
Referenced by main().
DltReturnValue dlt_client_send_reset_to_factory_default | ( | DltClient * | client | ) |
Send the reset to factory default command to the dlt daemon
client | pointer to dlt client structure |
Definition at line 812 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_RESET_TO_FACTORY_DEFAULT, and service_id.
Referenced by main().
DltReturnValue dlt_client_send_store_config | ( | DltClient * | client | ) |
Send the store config command to the dlt daemon
client | pointer to dlt client structure |
Definition at line 797 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_STORE_CONFIG, and service_id.
Referenced by main().
DltReturnValue dlt_client_send_timing_pakets | ( | DltClient * | client, |
uint8_t | timingPakets | ||
) |
Send the timing pakets status to the dlt daemon
client | pointer to dlt client structure |
timingPakets | Timing pakets enabled |
Definition at line 768 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, and DLT_SERVICE_ID_SET_TIMING_PACKETS.
Referenced by main().
DltReturnValue dlt_client_send_trace_status | ( | DltClient * | client, |
char * | apid, | ||
char * | ctid, | ||
uint8_t | traceStatus | ||
) |
Send a set trace status message to the dlt daemon
client | pointer to dlt client structure |
apid | application id |
ctid | context id |
defaultTraceStatus | Default Trace Status |
Definition at line 646 of file dlt_client.c.
References dlt_client_send_ctrl_msg(), DLT_RETURN_ERROR, DLT_RETURN_OK, DLT_SERVICE_ID_SET_TRACE_STATUS, and dlt_set_id().
Referenced by main().
int dlt_client_set_serial_device | ( | DltClient * | client, |
char * | serial_device | ||
) |
Set serial device pointer to dlt client structure
param | pointer to command line argument |
Definition at line 850 of file dlt_client.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, NULL, and DltClient::serialDevice.
Referenced by init_dlt_connect(), and main().
int dlt_client_set_server_ip | ( | DltClient * | client, |
char * | ipaddr | ||
) |
Set server ip
client | pointer to dlt client structure |
pointer | to command line argument |
Definition at line 839 of file dlt_client.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, NULL, and DltClient::servIP.
Referenced by dlt_gateway_store_connection(), init_dlt_connect(), and main().
int dlt_client_set_socket_path | ( | DltClient * | client, |
char * | socket_path | ||
) |
Set socket path pointer to dlt client structure
param | pointer to socket path string |
Definition at line 861 of file dlt_client.c.
References dlt_log(), DLT_RETURN_ERROR, DLT_RETURN_OK, NULL, and DltClient::socketPath.
Referenced by dlt_control_init_connection().
DltReturnValue dlt_client_setbaudrate | ( | DltClient * | client, |
int | baudrate | ||
) |
Set baudrate within dlt client structure
client | pointer to dlt client structure |
baudrate | Baudrate |
Definition at line 827 of file dlt_client.c.
References DltClient::baudrate, dlt_convert_serial_speed(), DLT_RETURN_ERROR, and DLT_RETURN_OK.
Referenced by init_dlt_connect(), and main().
void dlt_getloginfo_free | ( | void | ) |
To free the memory allocated for app description in get log info
void |
Definition at line 798 of file dlt-control.c.
References DltLoginfoDetail::apid_desc, DltLoginfoDetail::ctid_desc, DLT_GLOGINFO_DATA_MAX, and DltLoginfo::info.
Referenced by dlt_process_get_log_info().
void dlt_getloginfo_init | ( | void | ) |
Initialise get log info structure
void |
Definition at line 786 of file dlt-control.c.
References DltLoginfoDetail::apid_desc, DltLoginfo::count, DltLoginfoDetail::ctid_desc, DLT_GLOGINFO_DATA_MAX, DltLoginfo::info, and NULL.
Referenced by dlt_process_get_log_info().