X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Futils%2Fsignals.hpp;h=fe8695394ce4a1230bebae949bd7e832ce3ab164;hb=3b55101caf70e27cb312f3f7235ed4b30ff6d849;hp=cee5505d6ecf183c5de47b640c07b64e429854bb;hpb=349c9647be645fbd2e26c67713de648688b4d216;p=apps%2Fagl-service-can-low-level.git diff --git a/src/utils/signals.hpp b/src/utils/signals.hpp index cee5505d..fe869539 100644 --- a/src/utils/signals.hpp +++ b/src/utils/signals.hpp @@ -22,11 +22,11 @@ #include #include "openxc.pb.h" -#include "configuration.hpp" -#include "can/can-signals.hpp" -#include "obd2/obd2-signals.hpp" +#include "../configuration.hpp" +#include "../can/can-signals.hpp" +#include "../obd2/obd2-signals.hpp" -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" extern std::mutex subscribed_signals_mutex; std::mutex& get_subscribed_signals_mutex(); @@ -34,7 +34,7 @@ std::mutex& get_subscribed_signals_mutex(); /** * @brief return the subscribed_signals map. * - * return std::map - map of subscribed signals. + * return Map of subscribed signals. */ extern std::map subscribed_signals; std::map& get_subscribed_signals(); @@ -44,7 +44,7 @@ void lookup_signals_by_name(const std::string& key, std::vector& signals, std { for(T& s : signals) { - if(::fnmatch(key.c_str(), s.generic_name, FNM_CASEFOLD) == 0) + if(::fnmatch(key.c_str(), s.get_generic_name().c_str(), FNM_CASEFOLD) == 0) found_signals.push_back(&s); } } @@ -52,10 +52,10 @@ void lookup_signals_by_name(const std::string& key, std::vector& signals, std template void lookup_signals_by_name(const std::string& key, std::vector& signals, std::vector& found_signals_name) { - for(const T& s : signals) + for(T& s : signals) { - if(::fnmatch(key.c_str(), s.generic_name, FNM_CASEFOLD) == 0) - found_signals_name.push_back(s.generic_name); + if(::fnmatch(key.c_str(), s.get_generic_name().c_str(), FNM_CASEFOLD) == 0) + found_signals_name.push_back(s.get_generic_name()); } } @@ -74,11 +74,11 @@ void lookup_signals_by_id(const double key, std::vector& signals, std::vector template void lookup_signals_by_id(const double key, std::vector& signals, std::vector& found_signals_name) { - for(const T& s : signals) + for(T& s : signals) { if(config->get_signal_id(s) == key) { - found_signals_name.push_back(s.generic_name); + found_signals_name.push_back(s.get_generic_name()); } } }