/// @param[in] signalCount - The length of the signals array.
/// @param[in] value - The CAN signal parsed from the message as a raw floating point
/// value.
/// @param[in] signalCount - The length of the signals array.
/// @param[in] value - The CAN signal parsed from the message as a raw floating point
/// value.
-/// @param[out] send - An output parameter. If the decoding failed or the CAN signal should
-/// not send for some other reason, this should be flipped to false.
+/// @param[out] send - An output parameter. If decoding fails or CAN signal is
+/// not sending, this should be flipped to false.
-typedef openxc_DynamicField (*SignalDecoder)(can_signal_t& signal,
- const std::vector<can_signal_t>& signals, float value, bool* send);
+typedef openxc_DynamicField (*signal_decoder)(can_signal_t& signal, float value, bool* send);
/// @param[in] value - The dynamic field to encode.
/// @param[out] send - An output parameter. If the encoding failed or the CAN signal should
/// not be encoded for some other reason, this will be flipped to false.
///
/// @param[in] value - The dynamic field to encode.
/// @param[out] send - An output parameter. If the encoding failed or the CAN signal should
/// not be encoded for some other reason, this will be flipped to false.
///
std::string generic_name_; /*!< generic_name_ - The name of the signal to be output.*/
static std::string prefix_; /*!< prefix_ - generic_name_ will be prefixed with it. It has to reflect the used protocol.
* which make easier to sort message when the come in.*/
uint8_t bit_position_; /*!< bitPosition_ - The starting bit of the signal in its CAN message (assuming
* non-inverted bit numbering, i.e. the most significant bit of
* each byte is 0) */
std::string generic_name_; /*!< generic_name_ - The name of the signal to be output.*/
static std::string prefix_; /*!< prefix_ - generic_name_ will be prefixed with it. It has to reflect the used protocol.
* which make easier to sort message when the come in.*/
uint8_t bit_position_; /*!< bitPosition_ - The starting bit of the signal in its CAN message (assuming
* non-inverted bit numbering, i.e. the most significant bit of
* each byte is 0) */
float factor_; /*!< factor_ - The final value will be multiplied by this factor. Use 1 if you
* don't need a factor. */
float offset_; /*!< offset_ - The final value will be added to this offset. Use 0 if you
float factor_; /*!< factor_ - The final value will be multiplied by this factor. Use 1 if you
* don't need a factor. */
float offset_; /*!< offset_ - The final value will be added to this offset. Use 0 if you
* between numerical and string values for valid states. */
bool writable_; /*!< writable - True if the signal is allowed to be written from the USB host
* back to CAN. Defaults to false.*/
* between numerical and string values for valid states. */
bool writable_; /*!< writable - True if the signal is allowed to be written from the USB host
* back to CAN. Defaults to false.*/
* CAN into a byte array. If NULL, the default numerical encoder
* is used. */
bool received_; /*!< received_ - True if this signal has ever been received.*/
* CAN into a byte array. If NULL, the default numerical encoder
* is used. */
bool received_; /*!< received_ - True if this signal has ever been received.*/
uint8_t get_bit_position() const;
uint8_t get_bit_size() const;
float get_factor() const;
uint8_t get_bit_position() const;
uint8_t get_bit_size() const;
float get_factor() const;
bool get_force_send_changed() const;
const std::map<uint8_t, std::string>& get_states() const;
const std::string get_states(uint8_t value);
bool get_force_send_changed() const;
const std::map<uint8_t, std::string>& get_states() const;
const std::string get_states(uint8_t value);
void set_prefix(std::string val);
void set_received(bool r);
void set_last_value(float val);
void set_prefix(std::string val);
void set_received(bool r);
void set_last_value(float val);