automotive-dlt
|
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <sys/uio.h>
#include <sys/stat.h>
#include "dlt_client.h"
#include "dlt_protocol.h"
#include "dlt_user.h"
#include "dlt-test-multi-process.h"
Go to the source code of this file.
Data Structures | |
struct | s_parameters |
struct | s_statistics |
Functions | |
int | receive (DltMessage *msg, void *data) |
void | usage (char *name) |
void | init_params (s_parameters *params) |
int | read_params (s_parameters *params, int argc, char *argv[]) |
int | init_dlt_connect (DltClient *client, const s_parameters *params, int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
void | print_stats (s_statistics stats, s_parameters params) |
Definition in file dlt-test-multi-process-client.c.
int init_dlt_connect | ( | DltClient * | client, |
const s_parameters * | params, | ||
int | argc, | ||
char * | argv[] | ||
) |
Set the connection parameters for dlt client
Definition at line 163 of file dlt-test-multi-process-client.c.
References s_parameters::baudrate, dlt_client_set_serial_device(), dlt_client_set_server_ip(), dlt_client_setbaudrate(), dlt_set_id(), ECUID, DltClient::mode, and s_parameters::serial.
Referenced by main().
void init_params | ( | s_parameters * | params | ) |
Initialize reasonable default parameters.
Set nice default values for parameters
Definition at line 108 of file dlt-test-multi-process-client.c.
References s_parameters::baudrate, s_parameters::max_messages, NULL, s_parameters::output, s_parameters::output_handle, s_parameters::serial, and s_parameters::verbose.
Referenced by read_params().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Entry point
Definition at line 192 of file dlt-test-multi-process-client.c.
References client, s_parameters::client_ref, dlt_client_connect(), dlt_client_init(), dlt_client_main_loop(), dlt_client_register_message_callback(), DLT_RETURN_OK, init_dlt_connect(), s_parameters::max_messages, s_parameters::messages_left, DltClient::mode, s_parameters::output, s_parameters::output_handle, read_params(), receive(), DltClient::serialDevice, DltClient::servIP, usage(), and s_parameters::verbose.
void print_stats | ( | s_statistics | stats, |
s_parameters | params | ||
) |
Print current test statistics
Definition at line 243 of file dlt-test-multi-process-client.c.
References s_statistics::broken_messages_received, s_statistics::bytes_received, s_statistics::first_message_time, s_parameters::messages_left, s_statistics::messages_received, and NULL.
Referenced by receive().
int read_params | ( | s_parameters * | params, |
int | argc, | ||
char * | argv[] | ||
) |
Read the command line parameters
Definition at line 120 of file dlt-test-multi-process-client.c.
References s_parameters::baudrate, init_params(), s_parameters::max_messages, s_parameters::output, s_parameters::serial, and s_parameters::verbose.
Referenced by main().
int receive | ( | DltMessage * | msg, |
void * | data | ||
) |
Callback for dlt client
Definition at line 275 of file dlt-test-multi-process-client.c.
References s_statistics::broken_messages_received, s_statistics::bytes_received, sDltMessage::databuffer, sDltMessage::datasize, dlt_client_cleanup(), dlt_message_payload(), DLT_OUTPUT_ASCII, sDltMessage::extendedheader, s_statistics::first_message_time, sDltMessage::headerbuffer, sDltMessage::headersize, s_statistics::messages_received, NULL, s_statistics::output_bytes, PAYLOAD_DATA, and print_stats().
Referenced by main().
void usage | ( | char * | name | ) |
Print usage information
Definition at line 90 of file dlt-test-multi-process-client.c.
References dlt_get_version().
Referenced by main().