From 4f1b1d088afe8eb9a5b75287429104e4175e97e7 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 16 May 2017 12:37:46 +0200 Subject: Adding also diagnostic request to systemd event loop As for CAN signal, monitoring diagnostic request messages is now handled by systemD io event loop. Socket reading is common for all OBD2 signals and handled by the diagnostic manager. systemd callback function lies in binding callback which in turns call read_socket method of diagnostic manager. Processing is little bit different from classic CAN messages so it is a separate callback function. Lot of cleaning to do now... Change-Id: I4d2ada0beb5d3348736dfdf3c56a7cb875a1c6c7 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/binding/low-can-hat.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CAN-binder/low-can-binding/binding/low-can-hat.hpp') diff --git a/CAN-binder/low-can-binding/binding/low-can-hat.hpp b/CAN-binder/low-can-binding/binding/low-can-hat.hpp index 7df4663c..57c0a536 100644 --- a/CAN-binder/low-can-binding/binding/low-can-hat.hpp +++ b/CAN-binder/low-can-binding/binding/low-can-hat.hpp @@ -20,6 +20,7 @@ #include #include +#include extern "C" { @@ -31,6 +32,8 @@ extern "C" struct afb_binding_interface; extern const struct afb_binding_interface *binder_interface; void on_no_clients(std::string message); +int read_can_signal(sd_event_source *s, int fd, uint32_t revents, void *userdata); +int read_diagnostic_message(sd_event_source *s, int fd, uint32_t revents, void *userdata); void subscribe(struct afb_req request); void unsubscribe(struct afb_req request); \ No newline at end of file -- cgit 1.2.3-korg