X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fcan%2Fcan-bus-dev.hpp;h=3a1f5371acb2ce3048da27b1f527feac952da25b;hb=8871f8ae696035877afcbb3b089fc06219c2ba3a;hp=83a1b30e999985a2168623212a6404f8eb71b47e;hpb=9519e9d5b875b45fbf6f32267b728b1d11377276;p=apps%2Fagl-service-can-low-level.git diff --git a/src/can/can-bus-dev.hpp b/src/can/can-bus-dev.hpp index 83a1b30e..3a1f5371 100644 --- a/src/can/can-bus-dev.hpp +++ b/src/can/can-bus-dev.hpp @@ -18,9 +18,10 @@ #pragma once +#include +#include #include #include -#include #include "../utils/socket.hpp" @@ -29,14 +30,14 @@ class can_message_t; /// @brief Object representing a can device. Handle opening, closing and reading on the /// socket. This is the low level object to be use by can_bus_t. -class can_bus_dev_t +class can_bus_dev_t { private: std::string device_name_; utils::socket_t can_socket_; int32_t id_; /// < 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. struct sockaddr_can txAddress_; /// < internal member using to bind to the socket @@ -54,7 +55,8 @@ public: void stop_reading(); - std::pair read(); - - int send_can_message(can_message_t& can_msg); + can_message_t read(); + + int send(can_message_t& can_msg); + bool shims_send(const uint32_t arbitration_id, const uint8_t* data, const uint8_t size); };