summaryrefslogtreecommitdiffstats
path: root/src/can-signals.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-22 11:44:27 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-22 12:15:13 +0100
commit747d58ad84d230f6cf11ac818bab65019df83611 (patch)
treea7a6f84cac521fd181b8aec490260fda676f08cc /src/can-signals.cpp
parentcfd941effb1b2183f6d3f693496aadd45762523f (diff)
No more warning about not defined functions
because of wrong header files inclusion. Some variables are now accessible using functions rather than using global variables that can not be accessed through separated files. Also fix timer returning function type. Change-Id: I36138ff671c2537f595235273abaa34783be18e1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can-signals.cpp')
-rw-r--r--src/can-signals.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/can-signals.cpp b/src/can-signals.cpp
index 1ccc7c30..ee682f9f 100644
--- a/src/can-signals.cpp
+++ b/src/can-signals.cpp
@@ -17,6 +17,14 @@
#include "can-signals.hpp"
+/**
+ * @brief Dumb SIGNALS array. It is composed by CanMessageSet
+ * SIGNALS[MESSAGE_SET_ID][CanSignal]
+ */
+std::vector<std::vector<CanSignal>> SIGNALS {
+ {}// message set: example
+};
+
const std::vector<CanSignal> getSignals()
{
return SIGNALS[MESSAGE_SET_ID];
@@ -57,4 +65,14 @@ std::vector<CanSignal> find_can_signals(const struct afb_binding_interface* inte
break;
}
return signals;
+}
+
+inline uint32_t get_CanSignal_id(const CanSignal& sig)
+{
+ return sig.message->id;
+}
+
+const std::map<std::string, struct afb_event> get_subscribed_signals()
+{
+ return subscribed_signals;
} \ No newline at end of file