#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
* 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.
* 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.
* 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