summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.h
diff options
context:
space:
mode:
authorFrederic Berat <fberat@de.adit-jv.com>2015-12-01 11:13:12 +0100
committerGernot Wirschal <gernot.wirschal@bmw.de>2016-04-28 13:17:43 +0200
commita9a43701138c99b3211ded8d388666161f7cde67 (patch)
tree4d63ee965a87395b470c624033a08e2856526522 /src/daemon/dlt-daemon.h
parent3563d0c799fb24153dfa8ed3f425deb24d56274a (diff)
downloadDLT-daemon-a9a43701138c99b3211ded8d388666161f7cde67.tar.gz
dlt-daemon: receiver rework
The receiver structures have been removed from the dlt-daemon structure, they are now part of the connection. The overall usage of the receiver structrure has also been reviewed in the daemon. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Change-Id: I7cf80d79ed73bd6d4f370bb3f278d26ccc9d8d7a
Diffstat (limited to 'src/daemon/dlt-daemon.h')
-rw-r--r--src/daemon/dlt-daemon.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/daemon/dlt-daemon.h b/src/daemon/dlt-daemon.h
index 7f26d82..ad169fc 100644
--- a/src/daemon/dlt-daemon.h
+++ b/src/daemon/dlt-daemon.h
@@ -134,18 +134,10 @@ typedef struct
typedef struct
{
DltDaemonFlags flags; /**< flags of the daemon */
- int fp; /**< handle for own fifo */
- int sock; /**< handle for tcp connection to client */
- int fdserial; /**< handle for serial connection */
- int ctrlsock; /**< handle for control socket connection */
DltFile file; /**< struct for file access */
DltEventHandler pEvent; /**< struct for message producer event handling */
DltGateway pGateway; /**< struct for passive node connection handling */
DltMessage msg; /**< one dlt message */
- DltReceiver receiver; /**< receiver for fifo connection */
- DltReceiver receiverSock; /**< receiver for socket connection */
- DltReceiver receiverSerial; /**< receiver for serial connection */
- DltReceiver receiverCtrlSock; /**< receiver for control socket */
int client_connections; /**< counter for nr. of client connections */
size_t baudrate; /**< Baudrate of serial connection */
#ifdef DLT_SHM_ENABLE
@@ -156,12 +148,6 @@ typedef struct
unsigned long RingbufferMinSize;
unsigned long RingbufferMaxSize;
unsigned long RingbufferStepSize;
- DltReceiver timer_one_s;
- DltReceiver timer_sixty_s;
-#if defined(DLT_SYSTEMD_WATCHDOG_ENABLE)
- DltReceiver timer_wd; /**< file descriptor for watchdog timer */
-#endif
- DltReceiver timer_gateway; /**< timer for gateway reconnection handling */
} DltDaemonLocal;
typedef struct
@@ -204,19 +190,20 @@ int dlt_daemon_process_systemd_timer(DltDaemon *daemon, DltDaemonLocal *daemon_l
int dlt_daemon_process_control_connect(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *recv, int verbose);
int dlt_daemon_process_control_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *recv, int verbose);
-int dlt_daemon_process_user_message_overflow(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
+typedef int (*dlt_daemon_process_user_message_func)(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
+
+int dlt_daemon_process_user_message_overflow(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
int dlt_daemon_send_message_overflow(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_register_application(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_unregister_application(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_register_context(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_unregister_context(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_log(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
+int dlt_daemon_process_user_message_register_application(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
+int dlt_daemon_process_user_message_unregister_application(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
+int dlt_daemon_process_user_message_register_context(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
+int dlt_daemon_process_user_message_unregister_context(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
+int dlt_daemon_process_user_message_log(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
#ifdef DLT_SHM_ENABLE
-int dlt_daemon_process_user_message_log_shm(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
+int dlt_daemon_process_user_message_log_shm(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
#endif
-int dlt_daemon_process_user_message_set_app_ll_ts(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_log_mode(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
-int dlt_daemon_process_user_message_marker(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
+int dlt_daemon_process_user_message_set_app_ll_ts(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
+int dlt_daemon_process_user_message_marker(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose);
int dlt_daemon_send_ringbuffer_to_client(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
void dlt_daemon_timingpacket_thread(void *ptr);
@@ -225,7 +212,7 @@ void dlt_daemon_ecu_version_thread(void *ptr);
void dlt_daemon_systemd_watchdog_thread(void *ptr);
#endif
-int create_timer_fd(DltDaemonLocal *daemon_local, int period_sec, int starts_in, int* fd, DltTimers timer);
+int create_timer_fd(DltDaemonLocal *daemon_local, int period_sec, int starts_in, DltTimers timer);
int dlt_daemon_close_socket(int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);