From d4899192ccda96a8ee328bad3e16efdc98c2a856 Mon Sep 17 00:00:00 2001 From: Arthur Guyader Date: Wed, 28 Aug 2019 10:36:40 +0200 Subject: Change vector to list to allow to remove signal. This commit allows to remove signals. We need that because subscription to an iso tp message needs to be individual. Bug-AGL : SPEC-2779 Change-Id: I1d6410ebfc8ea82d33addf1bb828d9cd810b006a Signed-off-by: Arthur Guyader --- low-can-binding/utils/signals.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'low-can-binding/utils/signals.hpp') diff --git a/low-can-binding/utils/signals.hpp b/low-can-binding/utils/signals.hpp index 84e81d03..b28942e7 100644 --- a/low-can-binding/utils/signals.hpp +++ b/low-can-binding/utils/signals.hpp @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -32,8 +33,8 @@ namespace utils { struct signals_found { - std::vector > signals; - std::vector > diagnostic_messages; + std::list > signals; + std::list > diagnostic_messages; }; /// @brief Signal manager singleton hold subscription object with attached afb_event_t and its mutex @@ -59,7 +60,7 @@ namespace utils void find_signals(const openxc_DynamicField &key, std::vector >& found_signals); template - void lookup_signals_by_name(const std::string& key, std::vector > signals, std::vector >& found_signals) + void lookup_signals_by_name(const std::string& key, std::vector > signals, std::list >& found_signals) { for(std::shared_ptr s : signals) { @@ -71,7 +72,7 @@ namespace utils } template - void lookup_signals_by_id(const double key, std::vector > signals, std::vector >& found_signals) + void lookup_signals_by_id(const double key, std::vector > signals, std::list >& found_signals) { for(std::shared_ptr s : signals) { -- cgit 1.2.3-korg