aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-16 12:37:46 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-19 11:36:42 +0200
commit4f1b1d088afe8eb9a5b75287429104e4175e97e7 (patch)
treef3d0ba62b108f1f9ad022800929022f575c70b45 /CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
parentc59a57338a488cc451482f1180fe672e7d5c9179 (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp')
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
index 65ff0cb5..66a4d73f 100644
--- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
@@ -57,6 +57,7 @@ private:
* response is received for a non-recurring request or it times out, it is removed*/
bool initialized_; /*!< * initialized - True if the DiagnosticsManager has been initialized with shims. It will interface with the uds-c lib*/
utils::socketcan_bcm_t socket_; ///< rx_socket_ - a BCM socket with 8 RX_SETUP jobs for the 8 CAN ID on which ECU could respond.
+ struct sd_event_source* event_source_;
void init_diagnostic_shims();
void reset();
@@ -66,6 +67,8 @@ public:
bool initialize();
+ void read_socket();
+ utils::socketcan_bcm_t& get_socket();
std::string get_can_bus();
active_diagnostic_request_t* get_last_recurring_requests() const;
DiagnosticShims& get_shims();