summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can/can-bus-dev.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-20 00:07:37 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-20 00:07:37 +0200
commitf546e121079088920e2a3f64bc054afa05ff945f (patch)
tree4b966d3b97b3666cdb5b263c1b3be3f2b563db42 /CAN-binder/low-can-binding/can/can-bus-dev.hpp
parentff30daa04391f981e871f1dea27b6fbb2b91791c (diff)
Specializing socket class to CAN socket operations.
Move all legacy opening RAW CAN socket operation to socket class. Each operations on a CAN socket has to be simple and made by the socket class. Simple BCM socket open operation is implemented. Future will be to open specialized BCM CAN sockets on demand. Change-Id: If285b97afb9871245ab1f13cd9f0401fbd9adf95 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can/can-bus-dev.hpp')
-rw-r--r--CAN-binder/low-can-binding/can/can-bus-dev.hpp5
1 files changed, 2 insertions, 3 deletions
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 a612e7d8..3e6b2d1c 100644
--- a/CAN-binder/low-can-binding/can/can-bus-dev.hpp
+++ b/CAN-binder/low-can-binding/can/can-bus-dev.hpp
@@ -34,12 +34,11 @@ class can_bus_dev_t
{
private:
std::string device_name_; ///< a string identifier identitfying the linux CAN device.
- utils::socket_t can_socket_;
+ utils::socketcan_t can_socket_;
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.
- 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
@@ -51,7 +50,7 @@ public:
std::string get_device_name() const;
uint32_t get_address() const;
- int open();
+ int open_raw();
int close();
void start_reading(can_bus_t& can_bus);