automotive-dlt
|
#include <ctype.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/uio.h>
#include <string.h>
#include "dlt_client.h"
#include "dlt_user.h"
#include "dlt-control-common.h"
Go to the source code of this file.
Data Structures | |
struct | DltLoginfoDetail |
struct | DltLoginfo |
struct | PACKED |
struct | DltReceiveData |
Macros | |
#define | DLT_RECEIVE_TEXTBUFSIZE 10024 /* Size of buffer for text output */ |
#define | DLT_GLOGINFO_APID_NUM_MAX 150 |
#define | DLT_GLOGINFO_DATA_MAX 800 |
#define | DLT_GET_LOG_INFO_HEADER 18 /*Get log info header size in response text */ |
#define | DLT_INVALID_LOG_LEVEL 0xF |
#define | DLT_SERVICE_GET_LOG_INFO_OPT7 7 /* get Apid, ApDescription, Ctid, CtDescription, loglevel, tracestatus */ |
Functions | |
int | dlt_receive_message_callback (DltMessage *message, void *data) |
void | hexAsciiToBinary (const char *ptr, uint8_t *binary, int *size) |
void | usage () |
void | dlt_process_get_log_info (void) |
int | main (int argc, char *argv[]) |
void | dlt_getloginfo_conv_ascii_to_id (char *rp, int *rp_count, char *wp, int len) |
uint16_t | dlt_getloginfo_conv_ascii_to_uint16_t (char *rp, int *rp_count) |
int16_t | dlt_getloginfo_conv_ascii_to_int16_t (char *rp, int *rp_count) |
void | dlt_getloginfo_init (void) |
void | dlt_getloginfo_free (void) |
int | dlt_set_loginfo_parse_service_id (char *resp_text, int *service_id, int *service_opt, char *cb_result) |
int | dlt_getloginfo_make_loginfo (char *resp_text, int service_opt) |
Variables | |
DltClient | g_dltclient |
DltLoginfo | g_get_loginfo |
#define DLT_GET_LOG_INFO_HEADER 18 /*Get log info header size in response text */ |
Definition at line 73 of file dlt-control.c.
Referenced by dlt_getloginfo_make_loginfo().
#define DLT_GLOGINFO_APID_NUM_MAX 150 |
Definition at line 71 of file dlt-control.c.
Referenced by dlt_getloginfo_make_loginfo().
#define DLT_GLOGINFO_DATA_MAX 800 |
Definition at line 72 of file dlt-control.c.
Referenced by dlt_getloginfo_free(), dlt_getloginfo_init(), and dlt_getloginfo_make_loginfo().
#define DLT_INVALID_LOG_LEVEL 0xF |
Definition at line 74 of file dlt-control.c.
Referenced by main().
#define DLT_RECEIVE_TEXTBUFSIZE 10024 /* Size of buffer for text output */ |
Definition at line 68 of file dlt-control.c.
Referenced by dlt_receive_message_callback().
#define DLT_SERVICE_GET_LOG_INFO_OPT7 7 /* get Apid, ApDescription, Ctid, CtDescription, loglevel, tracestatus */ |
Definition at line 76 of file dlt-control.c.
Referenced by dlt_getloginfo_make_loginfo().
void dlt_getloginfo_conv_ascii_to_id | ( | char * | rp, |
int * | rp_count, | ||
char * | wp, | ||
int | len | ||
) |
Definition at line 713 of file dlt-control.c.
References NULL.
Referenced by dlt_getloginfo_make_loginfo().
int16_t dlt_getloginfo_conv_ascii_to_int16_t | ( | char * | rp, |
int * | rp_count | ||
) |
Definition at line 764 of file dlt-control.c.
References NULL.
Referenced by dlt_getloginfo_make_loginfo().
uint16_t dlt_getloginfo_conv_ascii_to_uint16_t | ( | char * | rp, |
int * | rp_count | ||
) |
Definition at line 740 of file dlt-control.c.
References NULL.
Referenced by dlt_getloginfo_make_loginfo().
int dlt_getloginfo_make_loginfo | ( | char * | resp_text, |
int | service_opt | ||
) |
Main function to convert the response text in to proper get log info data and filling it in the DltLoginfo structure.
Definition at line 850 of file dlt-control.c.
References DltLoginfoDetail::apid, DltLoginfoDetail::apid_desc, DltLoginfo::count, DltLoginfoDetail::ctid, DltLoginfoDetail::ctid_desc, DLT_GET_LOG_INFO_HEADER, dlt_getloginfo_conv_ascii_to_id(), dlt_getloginfo_conv_ascii_to_int16_t(), dlt_getloginfo_conv_ascii_to_uint16_t(), DLT_GLOGINFO_APID_NUM_MAX, DLT_GLOGINFO_DATA_MAX, DLT_ID_SIZE, DLT_SERVICE_GET_LOG_INFO_OPT7, dlt_set_id(), DltLoginfo::info, DltLoginfoDetail::log_level, NULL, and DltLoginfoDetail::trace_status.
Referenced by dlt_receive_message_callback().
void dlt_process_get_log_info | ( | void | ) |
Function for sending get log info ctrl msg and printing the response.
Definition at line 232 of file dlt-control.c.
References DltLoginfoDetail::apid, DltLoginfoDetail::apid_desc, DltLoginfo::count, DltLoginfoDetail::ctid, DltLoginfoDetail::ctid_desc, dlt_client_get_log_info(), dlt_getloginfo_free(), dlt_getloginfo_init(), DLT_ID_SIZE, dlt_set_id(), DltLoginfo::info, DltLoginfoDetail::log_level, and DltLoginfoDetail::trace_status.
Referenced by main().
int dlt_receive_message_callback | ( | DltMessage * | message, |
void * | data | ||
) |
Definition at line 967 of file dlt-control.c.
References data, dlt_client_cleanup(), dlt_getloginfo_make_loginfo(), DLT_IS_HTYP_WEID, dlt_message_header(), dlt_message_payload(), DLT_OUTPUT_ASCII, DLT_RECEIVE_TEXTBUFSIZE, DLT_SERVICE_ID_GET_LOG_INFO, dlt_set_loginfo_parse_service_id(), dlt_set_storageheader(), sDltMessage::headerextra, NULL, service_id, sDltMessage::standardheader, and sDltMessage::storageheader.
Referenced by main().
int dlt_set_loginfo_parse_service_id | ( | char * | resp_text, |
int * | service_id, | ||
int * | service_opt, | ||
char * | cb_result | ||
) |
Function to parse the response text and identifying service id and its options.
Definition at line 818 of file dlt-control.c.
References DLT_SERVICE_ID_GET_LOG_INFO, and NULL.
Referenced by dlt_receive_message_callback().
void hexAsciiToBinary | ( | const char * | ptr, |
uint8_t * | binary, | ||
int * | size | ||
) |
Definition at line 133 of file dlt-control.c.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function of tool.
Definition at line 276 of file dlt-control.c.
References DltReceiveData::avalue, buffer, DltReceiveData::bvalue, DltReceiveData::cvalue, dlt_client_cleanup(), dlt_client_connect(), dlt_client_init(), DLT_CLIENT_MODE_SERIAL, DLT_CLIENT_MODE_TCP, DLT_CLIENT_MODE_UNIX, dlt_client_register_message_callback(), 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(), dlt_client_send_trace_status(), dlt_client_set_serial_device(), dlt_client_set_server_ip(), dlt_client_setbaudrate(), dlt_file_free(), dlt_file_init(), dlt_filter_free(), dlt_filter_init(), DLT_ID_SIZE, DLT_INVALID_LOG_LEVEL, DLT_LOG_DEFAULT, DLT_LOG_VERBOSE, dlt_parse_config_param(), dlt_process_get_log_info(), dlt_receive_message_callback(), DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_set_id(), DltReceiveData::dvalue, DltClient::ecuid, DltReceiveData::ecuid, DltReceiveData::evalue, DltReceiveData::file, DltReceiveData::filter, DltReceiveData::fvalue, DltReceiveData::gflag, hexAsciiToBinary(), DltReceiveData::ivalue, DltReceiveData::jvalue, DltReceiveData::lvalue, DltClient::mode, DltReceiveData::mvalue, NULL, DltReceiveData::oflag, pr_error, DltReceiveData::rvalue, DltClient::serialDevice, DltClient::servIP, DltClient::socketPath, DltReceiveData::svalue, DltReceiveData::tvalue, usage(), DltReceiveData::vflag, DltReceiveData::xvalue, and DltReceiveData::yflag.
void usage | ( | void | ) |
Print usage information of tool.
Definition at line 190 of file dlt-control.c.
References dlt_get_version().
Referenced by main().
DltClient g_dltclient |
Definition at line 101 of file dlt-control.c.
DltLoginfo g_get_loginfo |
Definition at line 102 of file dlt-control.c.