From a6fb72a70f90c35e0968f2460d324a8505410562 Mon Sep 17 00:00:00 2001 From: Arthur Guyader Date: Fri, 24 May 2019 12:16:28 +0200 Subject: Implement a new socket type CAN for j1939 protocol This commit implements a new socket class for the j1939 protocol and prepares the bases classes by modifying the write and read methods. Bug-AGL: SPEC-2386 Change-Id: I16ba493418a4bb37a0262b61a2a2629be6ab5051 Signed-off-by: Arthur Guyader Signed-off-by: Stephane Desneux Signed-off-by: Romain Forlot --- low-can-binding/utils/socketcan-bcm.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'low-can-binding/utils/socketcan-bcm.hpp') diff --git a/low-can-binding/utils/socketcan-bcm.hpp b/low-can-binding/utils/socketcan-bcm.hpp index 478a5292..00028905 100644 --- a/low-can-binding/utils/socketcan-bcm.hpp +++ b/low-can-binding/utils/socketcan-bcm.hpp @@ -40,13 +40,14 @@ namespace utils using socketcan_t::socketcan_t; virtual int open(std::string device_name); + virtual std::shared_ptr read_message(); + virtual void write_message(std::vector>& vobj); + virtual void write_message(std::shared_ptr obj); + void write_message(struct bcm_msg& obj); private: int connect(const struct sockaddr* addr, socklen_t len); }; - socketcan_bcm_t& operator>>(socketcan_bcm_t& s, can_message_t& cm); - socketcan_bcm_t& operator<<(socketcan_bcm_t& s, const std::vector& obj); - socketcan_bcm_t& operator<<(socketcan_bcm_t& s, const struct bcm_msg& obj); } -- cgit 1.2.3-korg