automotive-dlt
dlt_daemon_client.c File Reference
#include <netdb.h>
#include <ctype.h>
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <syslog.h>
#include <errno.h>
#include <pthread.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "dlt_types.h"
#include "dlt-daemon.h"
#include "dlt-daemon_cfg.h"
#include "dlt_daemon_common_cfg.h"
#include "dlt_daemon_socket.h"
#include "dlt_daemon_serial.h"
#include "dlt_daemon_client.h"
#include "dlt_daemon_connection.h"
#include "dlt_daemon_offline_logstorage.h"
#include "dlt_gateway.h"
Include dependency graph for dlt_daemon_client.c:

Go to the source code of this file.

Macros

#define DLT_CHECK_RCV_DATA_SIZE(received, required)
 

Functions

static int dlt_daemon_client_send_all_multiple (DltDaemon *daemon, DltDaemonLocal *daemon_local, void *data1, int size1, void *data2, int size2, int verbose)
 Sends up to 2 messages to all the clients. More...
 
int dlt_daemon_client_send_all (DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 Send out message to all the clients. More...
 
int dlt_daemon_client_send (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, void *storage_header, int storage_header_size, void *data1, int size1, void *data2, int size2, int verbose)
 
int dlt_daemon_client_send_control_message (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, char *appid, char *ctid, int verbose)
 
int dlt_daemon_client_process_control (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_get_software_version (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 
void dlt_daemon_control_get_default_log_level (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 
void dlt_daemon_control_get_log_info (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
int dlt_daemon_control_message_buffer_overflow (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, unsigned int overflow_counter, char *apid, int verbose)
 
void dlt_daemon_control_service_response (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, uint32_t service_id, int8_t status, int verbose)
 
int dlt_daemon_control_message_unregister_context (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, char *apid, char *ctid, char *comid, int verbose)
 
int dlt_daemon_control_message_connection_info (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, uint8_t state, char *comid, int verbose)
 
int dlt_daemon_control_message_timezone (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 
int dlt_daemon_control_message_marker (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 
void dlt_daemon_control_callsw_cinjection (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_send_log_level (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltDaemonContext *context, int8_t loglevel, int verbose)
 
void dlt_daemon_find_multiple_context_and_send (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int8_t app_flag, char *str, int8_t len, int8_t loglevel, int verbose)
 
void dlt_daemon_control_set_log_level (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_set_trace_status (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_set_default_log_level (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_set_all_log_level (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_set_default_trace_status (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_set_timing_packets (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_message_time (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 
int dlt_daemon_process_one_s_timer (DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
 
int dlt_daemon_process_sixty_s_timer (DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
 
int dlt_daemon_process_systemd_timer (DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
 
void dlt_daemon_control_service_logstorage (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_passive_node_connect (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, DltMessage *msg, int verbose)
 
void dlt_daemon_control_passive_node_connect_status (int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
 

Variables

static char str [DLT_DAEMON_TEXTBUFSIZE]
 

Detailed Description

Author
Alexander Wenzel alexa.nosp@m.nder.nosp@m..aw.w.nosp@m.enze.nosp@m.l@bmw.nosp@m..de Markus Klein Marku.nosp@m.s.Kl.nosp@m.ein@e.nosp@m.sk.f.nosp@m.raunh.nosp@m.ofer.nosp@m..de Mikko Rapeli mikko.nosp@m..rap.nosp@m.eli@b.nosp@m.mw.d.nosp@m.e

Definition in file dlt_daemon_client.c.

Macro Definition Documentation

#define DLT_CHECK_RCV_DATA_SIZE (   received,
  required 
)

Function Documentation

int dlt_daemon_client_process_control ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process received control message from dlt client

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 422 of file dlt_daemon_client.c.

References DltDaemonFlags::contextLogLevel, DltDaemonFlags::contextTraceStatus, sDltMessage::databuffer, sDltMessage::datasize, dlt_daemon_applications_save(), 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_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_ENDIAN_GET_32, dlt_gateway_forward_control_message(), DLT_SERVICE_ID_CALLSW_CINJECTION, DLT_SERVICE_ID_GET_DEFAULT_LOG_LEVEL, DLT_SERVICE_ID_GET_LOCAL_TIME, DLT_SERVICE_ID_GET_LOG_INFO, DLT_SERVICE_ID_GET_SOFTWARE_VERSION, DLT_SERVICE_ID_MESSAGE_BUFFER_OVERFLOW, DLT_SERVICE_ID_OFFLINE_LOGSTORAGE, DLT_SERVICE_ID_PASSIVE_NODE_CONNECT, DLT_SERVICE_ID_PASSIVE_NODE_CONNECTION_STATUS, DLT_SERVICE_ID_RESET_TO_FACTORY_DEFAULT, DLT_SERVICE_ID_SET_ALL_LOG_LEVEL, DLT_SERVICE_ID_SET_COM_INTERFACE_MAX_BANDWIDTH, DLT_SERVICE_ID_SET_COM_INTERFACE_STATUS, DLT_SERVICE_ID_SET_DEFAULT_LOG_LEVEL, DLT_SERVICE_ID_SET_DEFAULT_TRACE_STATUS, DLT_SERVICE_ID_SET_LOG_LEVEL, DLT_SERVICE_ID_SET_MESSAGE_FILTERING, DLT_SERVICE_ID_SET_TIMING_PACKETS, DLT_SERVICE_ID_SET_TRACE_STATUS, DLT_SERVICE_ID_SET_VERBOSE_MODE, DLT_SERVICE_ID_STORE_CONFIG, DLT_SERVICE_ID_USE_ECU_ID, DLT_SERVICE_ID_USE_EXTENDED_HEADER, DLT_SERVICE_ID_USE_SESSION_ID, DLT_SERVICE_ID_USE_TIMESTAMP, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_NOT_SUPPORTED, DLT_SERVICE_RESPONSE_OK, DltDaemonFlags::enforceContextLLAndTS, DltDaemonFlags::evalue, DltDaemonLocal::flags, DltDaemonFlags::gatewayMode, sDltMessage::headerextra, NULL, DltDaemon::overflow_counter, DltDaemonLocal::pGateway, PRINT_FUNCTION_VERBOSE, DltDaemon::runtime_application_cfg, DltDaemon::runtime_context_cfg, and sDltMessage::standardheader.

Referenced by dlt_daemon_process_client_messages(), dlt_daemon_process_client_messages_serial(), and dlt_daemon_process_control_messages().

int dlt_daemon_client_send ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
void *  storage_header,
int  storage_header_size,
void *  data1,
int  size1,
void *  data2,
int  size2,
int  verbose 
)

Send out message to client or store message in offline trace.

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
storage_headerpointer to data
storage_header_sizesize of data
data1pointer to data
size1size of data
data2pointer to data
size2size of data
verboseif set to true verbose information is printed out.
Returns
unequal 0 if there is an error or buffer is full

Definition at line 225 of file dlt_daemon_client.c.

References DltDaemon::client_ringbuffer, dlt_buffer_push3(), dlt_daemon_change_state(), dlt_daemon_client_send_all_multiple(), DLT_DAEMON_ERROR_BUFFER_FULL, DLT_DAEMON_ERROR_OK, DLT_DAEMON_ERROR_SEND_FAILED, dlt_daemon_logstorage_write(), DLT_DAEMON_SEM_FREE, DLT_DAEMON_SEM_LOCK, DLT_DAEMON_SEND_FORCE, DLT_DAEMON_SEND_TO_ALL, dlt_daemon_serial_send(), dlt_daemon_socket_send(), DLT_DAEMON_STATE_BUFFER, DLT_DAEMON_STATE_BUFFER_FULL, DLT_DAEMON_STATE_SEND_BUFFER, DLT_DAEMON_STATE_SEND_DIRECT, dlt_log(), dlt_offline_trace_write(), DLT_RETURN_OK, DLT_USER_MODE_BOTH, DLT_USER_MODE_EXTERNAL, DLT_USER_MODE_INTERNAL, DltDaemonLocal::flags, DltDaemon::mode, DltDaemonFlags::offlineLogstorageMaxDevices, DltDaemonLocal::offlineTrace, DltDaemonFlags::offlineTraceDirectory, DltDaemon::sendserialheader, and DltDaemon::state.

Referenced by dlt_daemon_client_send_control_message(), dlt_daemon_control_message_time(), dlt_daemon_log_internal(), dlt_daemon_process_user_message_log(), dlt_daemon_send_ringbuffer_to_client(), and dlt_gateway_process_passive_node_messages().

int dlt_daemon_client_send_all ( DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)

Send out message to all the clients.

Parameters
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.
Returns
1 if transfer succeed, 0 otherwise.

Definition at line 185 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, dlt_daemon_client_send_all_multiple(), DLT_DAEMON_SEM_FREE, DLT_DAEMON_SEM_LOCK, DLT_DAEMON_TEXTBUFSIZE, dlt_log(), sDltMessage::headerbuffer, sDltMessage::headersize, DltDaemonLocal::msg, and NULL.

Referenced by dlt_daemon_process_user_message_log().

static int dlt_daemon_client_send_all_multiple ( DltDaemon daemon,
DltDaemonLocal daemon_local,
void *  data1,
int  size1,
void *  data2,
int  size2,
int  verbose 
)
static

Sends up to 2 messages to all the clients.

Runs through the client list and sends the messages to them. If the message transfer fails and the connection is a socket connection, the socket is closed. Takes and release dlt_daemon_mutex.

Parameters
daemonDaemon structure needed for socket closure.
daemon_localDaemon local structure
data1The first message to be sent.
size1The size of the first message.
data2The second message to be send.
size2The second message size.
verboseNeeded for socket closure.
Returns
The amount of data transfered.

Definition at line 101 of file dlt_daemon_client.c.

References DltDaemonLocal::client_connections, DltEventHandler::connections, DLT_CON_MASK_CLIENT_MSG_SERIAL, DLT_CON_MASK_CLIENT_MSG_TCP, DLT_CONNECTION_CLIENT_MSG_TCP, dlt_connection_get_next(), dlt_connection_send_multiple(), dlt_daemon_close_socket(), DLT_DAEMON_ERROR_OK, DLT_DAEMON_SEM_FREE, DLT_DAEMON_SEM_LOCK, DLT_DAEMON_TEXTBUFSIZE, dlt_log(), DltReceiver::fd, DltConnection::next, NULL, DltDaemonLocal::pEvent, DltConnection::receiver, DltDaemon::sendserialheader, and DltConnection::type.

Referenced by dlt_daemon_client_send(), and dlt_daemon_client_send_all().

int dlt_daemon_client_send_control_message ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
char *  appid,
char *  contid,
int  verbose 
)

Send out response message to dlt client

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to response message
appidpointer to application id to be used in response message
contidpointer to context id to be used in response message
verboseif set to true verbose information is printed out.
Returns
-1 if there is an error or buffer is full

Definition at line 339 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, dlt_daemon_client_send(), DLT_DAEMON_CTRL_APID, DLT_DAEMON_CTRL_CTID, DLT_DAEMON_ERROR_OK, DLT_DAEMON_ERROR_UNKNOWN, DLT_HTOBE_16, DLT_HTYP_MSBF, DLT_HTYP_PROTOCOL_VERSION1, DLT_HTYP_UEH, DLT_HTYP_WEID, DLT_HTYP_WTMS, dlt_log(), dlt_message_set_extraparameters(), DLT_MSIN_CONTROL_RESPONSE, DLT_RETURN_ERROR, dlt_set_id(), dlt_set_storageheader(), DLT_STANDARD_HEADER_EXTRA_SIZE, dlt_uptime(), DltDaemon::ecuid, sDltMessage::extendedheader, sDltMessage::headerbuffer, sDltMessage::headerextra, sDltMessage::headersize, PRINT_FUNCTION_VERBOSE, sDltMessage::standardheader, and sDltMessage::storageheader.

Referenced by 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_timezone(), dlt_daemon_control_message_unregister_context(), dlt_daemon_control_passive_node_connect_status(), and dlt_daemon_control_service_response().

void dlt_daemon_control_callsw_cinjection ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received sw injection control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received sw injection control message
verboseif set to true verbose information is printed out.

Definition at line 1425 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_context_find(), dlt_daemon_control_service_response(), DLT_DAEMON_INJECTION_MAX, DLT_DAEMON_INJECTION_MIN, DLT_ENDIAN_GET_32, DLT_FD_INIT, DLT_ID_SIZE, DLT_IS_HTYP_UEH, DLT_MSG_READ_VALUE, DLT_RETURN_OK, DLT_RETURN_PIPE_ERROR, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_NOT_SUPPORTED, DLT_SERVICE_RESPONSE_OK, dlt_set_id(), dlt_user_log_out3(), DLT_USER_MESSAGE_INJECTION, dlt_user_set_userheader(), sDltMessage::extendedheader, DltDaemonContext::log_level_pos, NULL, PRINT_FUNCTION_VERBOSE, sDltMessage::standardheader, and DltDaemonContext::user_handle.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_get_default_log_level ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)

Process and generate response to received get default log level control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.

Definition at line 674 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, DltDaemon::default_log_level, dlt_daemon_client_send_control_message(), dlt_daemon_control_service_response(), dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_GET_DEFAULT_LOG_LEVEL, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_get_software_version ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)

Process and generate response to received get software version control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.

Definition at line 622 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_daemon_control_service_response(), dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_GET_SOFTWARE_VERSION, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, DltDaemon::ECUVersionString, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control(), dlt_daemon_process_client_connect(), and dlt_daemon_process_sixty_s_timer().

int dlt_daemon_control_message_buffer_overflow ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
unsigned int  overflow_counter,
char *  apid,
int  verbose 
)

Process and generate response to message buffer overflow control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.
Returns
-1 if there is an error or buffer overflow, else 0

Definition at line 1108 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_daemon_control_service_response(), DLT_DAEMON_ERROR_OK, DLT_DAEMON_ERROR_UNKNOWN, DLT_MESSAGE_BUFFER_OVERFLOW, dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_MESSAGE_BUFFER_OVERFLOW, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control(), dlt_daemon_process_user_message_overflow(), and dlt_daemon_send_message_overflow().

int dlt_daemon_control_message_connection_info ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
uint8_t  state,
char *  comid,
int  verbose 
)

Send control message connection info (add on to AUTOSAR standard)

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
statestate of connection
comidCommunication id where connection state changed
verboseif set to true verbose information is printed out.

Definition at line 1262 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_CONNECTION_INFO, DLT_SERVICE_RESPONSE_OK, dlt_set_id(), and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_close_socket(), and dlt_daemon_process_client_connect().

int dlt_daemon_control_message_marker ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)

Send control message marker (add on to AUTOSAR standard)

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.

Definition at line 1374 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_MARKER, DLT_SERVICE_RESPONSE_OK, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_process_user_message_marker().

void dlt_daemon_control_message_time ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)
int dlt_daemon_control_message_timezone ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)

Send control message timezone (add on to AUTOSAR standard)

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.

Definition at line 1315 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_TIMEZONE, DLT_SERVICE_RESPONSE_OK, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_process_client_connect(), and dlt_daemon_process_sixty_s_timer().

int dlt_daemon_control_message_unregister_context ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
char *  apid,
char *  ctid,
char *  comid,
int  verbose 
)

Send control message unregister context (add on to AUTOSAR standard)

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
apidapplication id to be unregisteres
ctidcontext id to be unregistered
comidCommunication id where apid is unregistered
verboseif set to true verbose information is printed out.

Definition at line 1208 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_message_free(), dlt_message_init(), DLT_RETURN_ERROR, DLT_SERVICE_ID_UNREGISTER_CONTEXT, DLT_SERVICE_RESPONSE_OK, dlt_set_id(), and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_process_user_message_unregister_context().

void dlt_daemon_control_passive_node_connect ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received passive node connect control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 2249 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_control_service_response(), dlt_gateway_process_on_demand_request(), dlt_log(), DLT_SERVICE_ID_PASSIVE_NODE_CONNECT, DLT_SERVICE_ID_PASSIVE_NODE_CONNECTION_STATUS, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, DltDaemonLocal::flags, DltDaemonFlags::gatewayMode, NULL, DltDaemonLocal::pGateway, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_passive_node_connect_status ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int  verbose 
)

Process and generate response to received passive node connection status control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
verboseif set to true verbose information is printed out.

Definition at line 2315 of file dlt_daemon_client.c.

References DltGateway::connections, sDltMessage::databuffer, sDltMessage::databuffersize, sDltMessage::datasize, dlt_daemon_client_send_control_message(), dlt_daemon_control_service_response(), DLT_ENTRY_MAX, DLT_ID_SIZE, dlt_log(), dlt_message_free(), dlt_message_init(), DLT_SERVICE_ID_PASSIVE_NODE_CONNECTION_STATUS, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, DltGatewayConnection::ecuid, DltDaemonLocal::flags, DltDaemonFlags::gatewayMode, NULL, DltGateway::num_connections, DltDaemonLocal::pGateway, PRINT_FUNCTION_VERBOSE, and DltGatewayConnection::status.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_service_response ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
uint32_t  service_id,
int8_t  status,
int  verbose 
)
void dlt_daemon_control_set_all_log_level ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received set all log level control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 1763 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_control_service_response(), dlt_daemon_user_send_all_update(), DLT_LOG_VERBOSE, DLT_SERVICE_ID_SET_ALL_LOG_LEVEL, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_set_default_log_level ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received set default log level control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 1727 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DltDaemon::default_log_level, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_control_service_response(), dlt_daemon_user_send_default_update(), DLT_LOG_VERBOSE, DLT_SERVICE_ID_SET_DEFAULT_LOG_LEVEL, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_set_default_trace_status ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received set default trace status control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 1798 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DltDaemon::default_trace_status, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_control_service_response(), dlt_daemon_user_send_default_update(), DLT_SERVICE_ID_SET_DEFAULT_TRACE_STATUS, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, DLT_TRACE_STATUS_OFF, DLT_TRACE_STATUS_ON, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_set_log_level ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received set log level control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 1614 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_context_find(), dlt_daemon_control_service_response(), dlt_daemon_find_multiple_context_and_send(), dlt_daemon_send_log_level(), DLT_ID_SIZE, dlt_log(), DLT_SERVICE_ID_SET_LOG_LEVEL, DLT_SERVICE_RESPONSE_ERROR, dlt_set_id(), DltDaemonContext::log_level, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_set_timing_packets ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to set timing packets control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 1835 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_control_service_response(), DLT_SERVICE_ID_SET_TIMING_PACKETS, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, NULL, PRINT_FUNCTION_VERBOSE, and DltDaemon::timingpackets.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_set_trace_status ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
DltMessage msg,
int  verbose 
)

Process and generate response to received set trace status control message

Parameters
sockconnection handle used for sending response
daemonpointer to dlt daemon structure
daemon_localpointer to dlt daemon local structure
msgpointer to received control message
verboseif set to true verbose information is printed out.

Definition at line 1674 of file dlt_daemon_client.c.

References sDltMessage::databuffer, sDltMessage::datasize, DLT_CHECK_RCV_DATA_SIZE, dlt_daemon_context_find(), dlt_daemon_control_service_response(), dlt_daemon_user_send_log_level(), DLT_FD_MINIMUM, DLT_ID_SIZE, DLT_SERVICE_ID_SET_TRACE_STATUS, DLT_SERVICE_RESPONSE_ERROR, DLT_SERVICE_RESPONSE_OK, dlt_set_id(), NULL, PRINT_FUNCTION_VERBOSE, DltDaemonContext::trace_status, and DltDaemonContext::user_handle.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_find_multiple_context_and_send ( int  sock,
DltDaemon daemon,
DltDaemonLocal daemon_local,
int8_t  app_flag,
char *  str,
int8_t  len,
int8_t  loglevel,
int  verbose 
)
int dlt_daemon_process_systemd_timer ( DltDaemon daemon,
DltDaemonLocal daemon_local,
DltReceiver receiver,
int  verbose 
)

Definition at line 2107 of file dlt_daemon_client.c.

References dlt_log().

Referenced by dlt_connection_get_callback(), and dlt_daemon_process_sixty_s_timer().

Variable Documentation

char str[DLT_DAEMON_TEXTBUFSIZE]
static

Global text output buffer, mainly used for creation of error/warning strings

Definition at line 83 of file dlt_daemon_client.c.

Referenced by dlt_daemon_control_get_log_info(), dlt_daemon_process_one_s_timer(), and dlt_daemon_process_sixty_s_timer().