From a16b570f1e8607f1c984cef4c281df9d5b7b129e Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 26 Nov 2019 16:19:43 +0100 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 Bug-AGL: SPEC-2976 Change-Id: I1d6410ebfc8ea82d33addf1bb828d9cd810b006a Signed-off-by: Arthur Guyader Signed-off-by: Romain Forlot --- low-can-binding/utils/signals.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'low-can-binding/utils') 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