X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fcan%2Fcan-bus-dev.hpp;h=a612e7d82c0e14f211e1992203d6c554a794db3d;hb=7b336475a398d37c4d5c4a534c87919263ae4b01;hp=c0ef8daae95bad58ccb0298c56370b27555f0923;hpb=b4f03616bbf4b69c1f644b4c58462ef9a8e7f8a9;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 c0ef8daa..a612e7d8 100644 --- a/src/can/can-bus-dev.hpp +++ b/src/can/can-bus-dev.hpp @@ -29,26 +29,27 @@ class can_bus_t; 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. +/// socket. This is the low level object to be initialized and use by can_bus_t. class can_bus_dev_t { private: - std::string device_name_; + std::string device_name_; ///< a string identifier identitfying the linux CAN device. utils::socket_t can_socket_; - int32_t address_; /// < an identifier used through binding that refer to that device + 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. + 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 - 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 + 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); public: can_bus_dev_t(const std::string& dev_name, int32_t address); std::string get_device_name() const; + uint32_t get_address() const; int open(); int close();