Remove socket read management by systemd event
[apps/agl-service-can-low-level.git] / src / can-decoder.hpp
index b6234b5..7f02d61 100644 (file)
 
 #pragma once
 
+#include "can-utils.hpp"
 
 class decoder_t
 {
        private:
-               openxc_DynamicField decoded_value;
 
        public:
                /* Public: Parse the signal's bitfield from the given data and return the raw
@@ -34,7 +34,7 @@ class decoder_t
                * Returns the raw value of the signal parsed as a bitfield from the given byte
                * array.
                */
-               float parseSignalBitfield(const CanSignal& signal, const CanMessage& message);
+               float parseSignalBitfield(const CanSignal& signal, const can_message_t& message);
 
                /* Public: Find and return the corresponding string state for a CAN signal's
                * raw integer value.
@@ -129,9 +129,8 @@ class decoder_t
                * The decoder returns an openxc_DynamicField, which may contain a number,
                * string or boolean. If 'send' is false, the return value is undefined.
                */
-               openxc_DynamicField decodeSignal(const CanSignal& signal,
-                               const CanMessage& message, const CanSignal& signals,
-                               bool* send);
+               openxc_DynamicField decodeSignal(const CanSignal& signal, const can_message_t& message,
+                               const std::vector<CanSignal>& signals, bool* send);
 
                /* Public: Decode a transformed, human readable value from an raw CAN signal
                * already parsed from a CAN message.
@@ -142,5 +141,5 @@ class decoder_t
                * else.
                */
                openxc_DynamicField decodeSignal(const CanSignal& signal, float value,
-               const CanSignal& signals, bool* send);
-}
\ No newline at end of file
+                       const std::vector<CanSignal>& signals, bool* send);
+};
\ No newline at end of file