aboutsummaryrefslogtreecommitdiffstats
path: root/src/can-signals.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-06 16:57:14 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-06 16:57:14 +0100
commit239729c759948d4574de625a84cff6f9c1338adf (patch)
tree4f5635d50c5704a0753586d4fea4b3822eee0e51 /src/can-signals.hpp
parent217690559c27646c7e412aaeacfa2064a9e7e6e4 (diff)
Change way to find signals to make it a little bit more generic.
Now we have basically 3 functions : - one for subscription which return signal name into a vector - one to find from CanSignal vector - a last to find from Obd2Pid vector Name of some function has been changed. May be reworked later. Change-Id: Ie72969fd20503fc1f9291958dc2ac5d827a6be59 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can-signals.hpp')
-rw-r--r--src/can-signals.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/can-signals.hpp b/src/can-signals.hpp
index 2443e63..547769f 100644
--- a/src/can-signals.hpp
+++ b/src/can-signals.hpp
@@ -23,6 +23,7 @@
#include <vector>
#include <string>
+#include "obd2-signals.hpp"
#include "timer.hpp"
#include "openxc.pb.h"
#include "can-bus.hpp"
@@ -134,9 +135,9 @@ typedef struct CanSignal CanSignal;
/* Public: Return signals from an signals array filtered on name.
*/
-const std::vector<CanSignal>& getSignals();
+std::vector<CanSignal>& get_can_signals();
-/* Public: Return the length of the array returned by getSignals(). */
+/* Public: Return the length of the array returned by get_can_signals(). */
size_t getSignalCount();
/**
@@ -148,7 +149,7 @@ size_t getSignalCount();
*
* @return std::vector<std::string> return found CanSignal generic name vector.
*/
-std::vector<CanSignal> find_can_signals(const openxc_DynamicField &key);
+void find_can_signals(const openxc_DynamicField &key, std::vector<CanSignal*>& found_signals);
/**
* @brief Retrieve can arbitration id of a given CanSignal
@@ -157,4 +158,4 @@ std::vector<CanSignal> find_can_signals(const openxc_DynamicField &key);
*
* @return uint32_t - unsigned integer representing the arbitration id.
*/
-inline uint32_t get_CanSignal_id(const CanSignal& sig); \ No newline at end of file
+uint32_t get_signal_id(const CanSignal& sig); \ No newline at end of file