#pragma once
+#include <stdint.h>
+#include <linux/can.h>
#include <string>
#include <thread>
-#include <linux/can.h>
#include "../utils/socket.hpp"
/// @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
void stop_reading();
- std::pair<struct canfd_frame&, size_t> 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);
};