Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Change way to convert simplemessage into a json
[apps/agl-service-can-low-level.git]
/
src
/
can-signals.cpp
diff --git
a/src/can-signals.cpp
b/src/can-signals.cpp
index
1ccc7c3
..
ee682f9
100644
(file)
--- a/
src/can-signals.cpp
+++ b/
src/can-signals.cpp
@@
-17,6
+17,14
@@
#include "can-signals.hpp"
#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];
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;
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
}
\ No newline at end of file