summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-16 00:21:26 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-19 11:36:42 +0200
commit4175b4d28fe79e5a01d04625b5a50da6214b86b1 (patch)
treeaf2d964bbd67aef7d9f45b5739111bab88044824 /CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp
parent6f872acf6a3a6c3a7a1a1885e5e66bb7231660b2 (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp')
-rw-r--r--CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp3
1 files changed, 3 insertions, 0 deletions
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 <string>
#include <vector>
+#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);