From 4175b4d28fe79e5a01d04625b5a50da6214b86b1 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 16 May 2017 00:21:26 +0200 Subject: Reworking diagnostic manager to use BCM sockets. Use 2 sockets: - TX sockets on active_diagnostic_request class as we need X sockets using the same CAN ID "7DF" with different timing settings - RX socket on diagnostic_manager object as we need to read the same CAN ID and process them the same way, there isn't so much need to split them. Change-Id: I7338fd751a033a1d0e8912ee554e2c72c43961c3 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp') diff --git a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp index 247eeb17..e8c5dbf7 100644 --- a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp +++ b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp @@ -20,6 +20,7 @@ #include #include +#include "../utils/socketcan-bcm.hpp" #include "uds/uds.h" #include "uds/uds_types.h" #include "../utils/timer.hpp" @@ -85,6 +86,7 @@ private: ///< recurring request. If the request is not reecurring, this attribute is not used. frequency_clock_t timeout_clock_; ///< timeout_clock_ - A frequency_clock_t object to monitor how long it's been since ///< this request was sent. + utils::socketcan_bcm_t socket_; ///< tx_socket_ - A BCM socket setup to send cyclic message to CAN ID 7DF. public: bool operator==(const active_diagnostic_request_t& b); active_diagnostic_request_t& operator=(const active_diagnostic_request_t& adr); @@ -108,6 +110,7 @@ public: bool get_in_flight() const; frequency_clock_t& get_frequency_clock(); frequency_clock_t& get_timeout_clock(); + utils::socketcan_bcm_t& get_socket(); void set_handle(DiagnosticShims& shims, DiagnosticRequest* request); void set_in_flight(bool val); -- cgit 1.2.3-korg