From da4ac57d87108d8b2690979c273c000a798a59f5 Mon Sep 17 00:00:00 2001 From: Christoph Lipka Date: Wed, 18 Nov 2015 19:19:22 +0900 Subject: Unix socket control interface Control applications running in the same Linux OS should be able to communicate with the DLT Daemon via a socket connection. To be able to do that, the DLT Client library need to be extended. DLT Clients connected via this UNIX socket are not handled as normal DLT Clients and no log messages will be forwarded to them. This avoids problems in situations when a control application is connected to the DLT Daemon before any other 'real' DLT Client (e.g. DLT Viewer) is connected. In this situations, all already stored log messages are flushed to the control application and therefore lost, because the control application most likely ignore all incoming messages besides the one in which it is interested in. Signed-off-by: Christoph Lipka --- include/dlt/dlt_client.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dlt/dlt_client.h b/include/dlt/dlt_client.h index f1d1f4c..1dcc3a6 100644 --- a/include/dlt/dlt_client.h +++ b/include/dlt/dlt_client.h @@ -78,14 +78,23 @@ #include "dlt_types.h" #include "dlt_common.h" +typedef enum +{ + DLT_CLIENT_MODE_UNDEFINED = -1, + DLT_CLIENT_MODE_TCP, + DLT_CLIENT_MODE_SERIAL, + DLT_CLIENT_MODE_UNIX +} DltClientMode; + typedef struct { DltReceiver receiver; /**< receiver pointer to dlt receiver structure */ int sock; /**< sock Connection handle/socket */ char *servIP; /**< servIP IP adress/Hostname of TCP/IP interface */ char *serialDevice; /**< serialDevice Devicename of serial device */ + char *socketPath; /**< socketPath Unix socket path */ speed_t baudrate; /**< baudrate Baudrate of serial interface, as speed_t */ - int serial_mode; /**< serial_mode Serial mode enabled =1, disabled =0 */ + DltClientMode mode; /**< mode DltClientMode */ } DltClient; #ifdef __cplusplus -- cgit v1.2.1