X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fcan%2Fcan-decoder.cpp;h=a2bf411baaa70827d8974d242694f85852744692;hb=d2180abe18533be7cbe68971a6767e5c2a0ecf6d;hp=0c81d7a6d3a1702f038a44c306ed85e2a6a3af0c;hpb=7aed41f1bdfc76eae902d289fce699b8fde40871;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/can/can-decoder.cpp b/low-can-binding/can/can-decoder.cpp index 0c81d7a6..a2bf411b 100644 --- a/low-can-binding/can/can-decoder.cpp +++ b/low-can-binding/can/can-decoder.cpp @@ -22,23 +22,23 @@ #include "can-message-definition.hpp" #include "../binding/low-can-hat.hpp" -/// @brief Parse the signal's bitfield from the given data and return the raw +/// @brief Parses the signal's bitfield from the given data and returns the raw /// value. /// -/// @param[in] signal - The signal to parse from the data. +/// @param[in] signal - The signal to be parsed from the data. /// @param[in] message - can_message_t to parse /// /// @return Returns the raw value of the signal parsed as a bitfield from the given byte /// array. /// -float decoder_t::parse_signal_bitfield(can_signal_t& signal, const can_message_t& message) +float decoder_t::parse_signal_bitfield(can_signal_t& signal, const message_t& message) { return bitfield_parse_float(message.get_data(), CAN_MESSAGE_SIZE, signal.get_bit_position(), signal.get_bit_size(), signal.get_factor(), signal.get_offset()); } -/// @brief Wrap a raw CAN signal value in a DynamicField without modification. +/// @brief Wraps a raw CAN signal value in a DynamicField without modification. /// /// This is an implementation of the Signal type signature, and can be /// used directly in the can_signal_t.decoder field. @@ -144,7 +144,7 @@ openxc_DynamicField decoder_t::decode_state(can_signal_t& signal, float value, b /// The decoder returns an openxc_DynamicField, which may contain a number, /// string or boolean. /// -openxc_DynamicField decoder_t::translate_signal(can_signal_t& signal, const can_message_t& message, bool* send) +openxc_DynamicField decoder_t::translate_signal(can_signal_t& signal, const message_t& message, bool* send) { float value = decoder_t::parse_signal_bitfield(signal, message); AFB_DEBUG("Decoded message from parse_signal_bitfield: %f", value);