From 109ba77a295811c5037c2c4dfc618c3f7e047228 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 16 Feb 2017 16:08:49 +0000 Subject: Adding canbus read method Change-Id: I438d885516e9cbe499d333ff3065c5e9d6d4d99a Signed-off-by: Romain Forlot --- src/can-utils.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/can-utils.h') diff --git a/src/can-utils.h b/src/can-utils.h index 04303e32..3a6070ad 100644 --- a/src/can-utils.h +++ b/src/can-utils.h @@ -94,9 +94,10 @@ class CanBus_c { int can_socket_; bool is_fdmode_on_; - struct sockaddr_can txAddress; + struct sockaddr_can txAddress_; std::thread th_reading_; + bool is_running_; std::thread th_decoding_; std::thread th_pushing_; @@ -108,10 +109,12 @@ class CanBus_c { int close(); void start_threads(); + bool is_running(); + int send_can_message(CanMessage_c can_msg); CanMessage_c* next_can_message(); - void insert_new_can_message(CanMessage_c *can_msg); + void insert_new_can_message(CanMessage_c &can_msg); openxc_VehicleMessage* next_vehicle_message(); void insert_new_vehicle_message(openxc_VehicleMessage *v_msg); -- cgit 1.2.3-korg