diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-08 02:41:56 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:09:03 +0100 |
commit | 2049aca0927b55f2a256fd60ff686616b73eecb7 (patch) | |
tree | eb4e195c796aa5cc69bdedd772a659b4f83fe9d9 /src/utils/signals.hpp | |
parent | 64d3ead0ce87091a3489dd9796a9f77f241c468b (diff) |
Beginning of work of get central configuration object
that will be used by the binding to access generated
elements. It will hold generated structure/objects and
make a resume to the binding configuration.
Idea is to have an object that can be inherited
in the generated code to extend its functionnalities
or change some of its behoviors.
Change-Id: If2ce5cbe2eb98a74a8e3f13000ee02855674216f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/utils/signals.hpp')
-rw-r--r-- | src/utils/signals.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/signals.hpp b/src/utils/signals.hpp index 8e15bd21..e575bd15 100644 --- a/src/utils/signals.hpp +++ b/src/utils/signals.hpp @@ -25,6 +25,17 @@ #include "can/can-signals.hpp" #include "obd2/obd2-signals.hpp" +extern std::mutex subscribed_signals_mutex; +std::mutex& get_subscribed_signals_mutex(); + +/** + * @brief return the subscribed_signals map. + * + * return std::map<std::string, struct afb_event> - map of subscribed signals. + */ +extern std::map<std::string, struct afb_event> subscribed_signals; +std::map<std::string, struct afb_event>& get_subscribed_signals(); + template <typename T> void lookup_signals_by_name(const std::string& key, std::vector<T>& signals, std::vector<T*>& found_signals) { |