From cba9b59fab054d3a33a4d58ed227fc3d4b6f6d9d Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 20 Feb 2017 20:19:59 +0000 Subject: Clean up include statement... Change-Id: Ie909836171ea5eb030246255bb08f1c5b8a65641 Signed-off-by: Romain Forlot --- src/can-utils.hpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src/can-utils.hpp') diff --git a/src/can-utils.hpp b/src/can-utils.hpp index 20267ae2..ee87790e 100644 --- a/src/can-utils.hpp +++ b/src/can-utils.hpp @@ -23,11 +23,23 @@ #include #include #include +#include +#include +#include +#include #include +#include +#include #include "timer.hpp" #include "openxc.pb.h" +extern "C" +{ + #include + #include +} + // TODO actual max is 32 but dropped to 24 for memory considerations #define MAX_ACCEPTANCE_FILTERS 24 // TODO this takes up a ton of memory @@ -37,6 +49,13 @@ #define CAN_ACTIVE_TIMEOUT_S 30 +/** + * @brief Function representing thread activated by can bus objects + */ +void can_reader(can_bus_dev_t& can_bus); +void can_decode_message(can_bus_t& can_bus); +void can_event_push(can_bus_t& can_bus); + /** * @brief The type signature for a CAN signal decoder. * @@ -146,11 +165,13 @@ class can_bus_dev_t { public: can_bus_dev_t(const std::string& dev_name); - int open(); + int open(const struct afb_binding_interface* interface); int close(); bool is_running(); + void start_reading(); + canfd_frame read(const struct afb_binding_interface *interface); - can_message_t* next_can_message(); + can_message_t next_can_message(); void push_new_can_message(const can_message_t& can_msg); bool has_can_message() const; }; -- cgit 1.2.3-korg