X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fcan%2Fcan-decoder.hpp;h=02a2c7e122532dfe5197ebdf0c804b043f8f049d;hb=77a19477d3cb63b5af519853489cc90ead0a111b;hp=7eaa4a721a44d8f46d6eccf59c3c28c15e93a9aa;hpb=32e25cbca210a359b09768537b6f443fe90a3070;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/can/can-decoder.hpp b/low-can-binding/can/can-decoder.hpp index 7eaa4a72..02a2c7e1 100644 --- a/low-can-binding/can/can-decoder.hpp +++ b/low-can-binding/can/can-decoder.hpp @@ -17,33 +17,25 @@ #pragma once -#include "can-signals.hpp" -#include "can-message.hpp" +#include "signals.hpp" +#include "message/can-message.hpp" #include "openxc.pb.h" class decoder_t { public: - static float parseSignalBitfield(can_signal_t& signal, const can_message_t& message); + static int handle_sign(const signal_t& signal, std::vector& data_signal, uint8_t new_end_bit, const std::vector& can_data); + static float parse_signal_bitfield(signal_t& signal, std::shared_ptr message); - static openxc_DynamicField stateDecoder(can_signal_t& signal, const std::vector >& signals, - float value, bool* send); - static openxc_DynamicField booleanDecoder(can_signal_t& signal, const std::vector >& signals, - float value, bool* send); - static openxc_DynamicField ignoreDecoder(can_signal_t& signal, const std::vector >& signals, - float value, bool* send); - static openxc_DynamicField noopDecoder(can_signal_t& signal, const std::vector >& signals, - float value, bool* send); + static openxc_DynamicField decode_state(signal_t& signal, std::shared_ptr message, bool* send); + static openxc_DynamicField decode_boolean(signal_t& signal, std::shared_ptr message, bool* send); + static openxc_DynamicField decode_ignore(signal_t& signal, std::shared_ptr message, bool* send); + static openxc_DynamicField decode_noop(signal_t& signal, std::shared_ptr message, bool* send); + static openxc_DynamicField decode_bytes(signal_t& signal, std::shared_ptr message, bool* send); - static openxc_DynamicField translateSignal(can_signal_t& signal, const can_message_t& message, - const std::vector >& signals, bool* send); + static openxc_DynamicField translate_signal(signal_t& signal, std::shared_ptr message, bool* send); - static openxc_DynamicField decodeSignal(can_signal_t& signal, const can_message_t& message, - const std::vector >& signals, bool* send); - - static openxc_DynamicField decodeSignal(can_signal_t& signal, float value, - const std::vector >& signals, bool* send); + static openxc_DynamicField decode_signal(signal_t& signal, std::shared_ptr message, bool* send); static float decode_obd2_response(const DiagnosticResponse* response, float parsed_payload); - }; \ No newline at end of file