X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Fcan%2Fcan-bus-dev.hpp;h=04914cec26eaf1f0773df4b1920af9c7bbab55b2;hb=84264431ca5a9958b3bb00b3de481336cf0cccb1;hp=96aa373eb0ebabee026dfd040e938b6cf47230e9;hpb=abf974815dc03c17a8ad7c6c749d53698cdd8dc1;p=apps%2Flow-level-can-service.git diff --git a/CAN-binder/low-can-binding/can/can-bus-dev.hpp b/CAN-binder/low-can-binding/can/can-bus-dev.hpp index 96aa373..04914ce 100644 --- a/CAN-binder/low-can-binding/can/can-bus-dev.hpp +++ b/CAN-binder/low-can-binding/can/can-bus-dev.hpp @@ -23,10 +23,11 @@ #include #include -#include "../utils/socket.hpp" +#include "../utils/socketcan.hpp" class can_bus_t; class can_message_t; +class can_signal_t; /// @brief Object representing a can device. Handle opening, closing and reading on the /// socket. This is the low level object to be initialized and use by can_bus_t. @@ -38,8 +39,6 @@ private: int32_t address_; ///< an identifier used through binding that refer to that device - bool is_fdmode_on_; ///< boolean telling if whether or not the can socket use fdmode. - std::thread th_reading_; ///< Thread handling read the socket can device filling can_message_q_ queue of can_bus_t bool is_running_ = false; ///< boolean telling whether or not reading is running or not void can_reader(can_bus_t& can_bus); @@ -50,7 +49,7 @@ public: std::string get_device_name() const; uint32_t get_address() const; - int open(bool bcm=false); + int open(); void configure(); int close(); @@ -59,6 +58,7 @@ public: void stop_reading(); can_message_t read(); + int create_rx_filter(const can_signal_t& s); int send(can_message_t& can_msg); bool shims_send(const uint32_t arbitration_id, const uint8_t* data, const uint8_t size);