From 9f0d5da859bfe7778394f35baf48fbe77f1ed7d9 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 25 Jun 2019 17:12:37 +0200 Subject: Use subscription's sockets as shared_ptr This change is made to leverage C++ to read and write the different socket classes depending on CAN protocol used. Bug-AGL: SPEC-2386 Change-Id: I5e25e271fc82e9627f836aeb43b2af5ef25db83a Signed-off-by: Stephane Desneux Signed-off-by: Romain Forlot --- low-can-binding/binding/low-can-subscription.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'low-can-binding/binding/low-can-subscription.hpp') diff --git a/low-can-binding/binding/low-can-subscription.hpp b/low-can-binding/binding/low-can-subscription.hpp index 8af0aa19..ded600c5 100644 --- a/low-can-binding/binding/low-can-subscription.hpp +++ b/low-can-binding/binding/low-can-subscription.hpp @@ -54,7 +54,7 @@ private: std::shared_ptr can_signal_; ///< can_signal_ - the CAN signal subscribed std::vector > diagnostic_message_; ///< diagnostic_message_ - diagnostic messages meant to receive OBD2 /// responses. Normal diagnostic request and response are not tested for now. - utils::socketcan_bcm_t socket_; ///< socket_ - socket_ that receives CAN messages. + std::shared_ptr socket_; ///< socket_ - socket_ that receives CAN messages. int set_event(); @@ -83,7 +83,7 @@ public: float get_frequency() const; float get_min() const; float get_max() const; - utils::socketcan_bcm_t& get_socket(); + std::shared_ptr get_socket(); void set_frequency(float freq); void set_min(float min); -- cgit 1.2.3-korg