summaryrefslogtreecommitdiffstats
path: root/src/can-decoder.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-21 17:16:59 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-22 12:15:12 +0100
commitcddc9c28e3e1a242e55f68c9971d0710ada30e9f (patch)
tree007eff68d56578400ed2ce39b9eec7cbfe7d6850 /src/can-decoder.cpp
parentc535c3bb2d73327772c1bb72c9fcca3f8a7f8204 (diff)
Fix: decoder_t class decodeSignal method signature
Change-Id: Id7ef4fe3b8d3f5b14fd447cf05865ba494862792 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can-decoder.cpp')
-rw-r--r--src/can-decoder.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/can-decoder.cpp b/src/can-decoder.cpp
index 0c8c8039..b163011f 100644
--- a/src/can-decoder.cpp
+++ b/src/can-decoder.cpp
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-decoder_t::decoder_t()
- : decoded_value{false, openxc_DynamicField_Type_STRING, false, "", false, 0, false, false}
-{
-}
+#pragma once
+
+#include "can-decoder.hpp"
float decoder_t::parseSignalBitfield(const CanSignal& signal, const CanMessage& message)
{
@@ -75,17 +74,18 @@ openxc_DynamicField decoder_t::stateDecoder(const CanSignal& signal,
}
openxc_DynamicField decoder_t::decodeSignal(const CanSignal& signal,
- float value, const CanSignal& signals, bool* send)
+ float value, const std::vector<CanSignal>& signals, bool* send)
{
SignalDecoder decoder = signal->decoder == NULL ?
- noopDecoder : signal->decoder;
+ noopDecoder : signal->decoder;
openxc_DynamicField decoded_value = decoder(signal, signals,
value, send);
return decoded_value;
}
openxc_DynamicField decoder_t::decodeSignal(const CanSignal& signal,
- const CanMessage& message, const CanSignal& signals, bool* send) {
+ const can_message_t& message, const std::vector<CanSignal>& signals, bool* send)
+{
float value = parseSignalBitfield(signal, message);
return decodeSignal(signal, value, signals, send);
} \ No newline at end of file