bool is_correct_to_send();
-static can_message_t convert_to_canfd_frame(const struct canfd_frame& frame, size_t nbytes);
+static can_message_t convert_from_canfd_frame(const struct canfd_frame& frame, size_t nbytes);
canfd_frame convert_to_canfd_frame();
};
can_bus_dev_t& bus_; /*!< bus_ - A pointer to the bus this message is on. */
uint32_t id_; /*!< id_ - The ID of the message.*/
can_message_format_t format_; /*!< format_ - the format of the message's ID.*/
- FrequencyClock clock_; /*!< clock_ - an optional frequency clock to control the output of this
+ frequency_clock_t clock_; /*!< clock_ - an optional frequency clock to control the output of this
* message, if sent raw, or simply to mark the max frequency for custom
* handlers to retrieve.*/
bool force_send_changed_; /*!< force_send_changed_ - If true, regardless of the frequency, it will send CAN
* needs to compare an incoming CAN message with the previous frame.*/
public:
- can_message_definition_t();
+ can_message_definition_t(can_bus_dev_t& cbd);
uint32_t get_id() const;
};
-/**
- * @class can_message_set_t
- *
- * @brief A parent wrapper for a particular set of CAN messages and associated
- * CAN buses(e.g. a vehicle or program).
- */
-class can_message_set_t
-{
- private:
- uint8_t index_; /*!<index_ - A numerical ID for the message set, ideally the index in an array
- * for fast lookup*/
- const std::string name_; /*!< name_ - The name of the message set.*/
- uint8_t can_bus_count_; /*!< can_bus_count_ - The number of CAN buses defined for this message set.*/
- unsigned short can_message_count_; /*!< can_message_count_ - The number of CAN messages (across all buses) defined for
- * this message set.*/
- unsigned short can_signal_count_; /*!< can_signal_count_ - The number of CAN signals (across all messages) defined for
- * this message set.*/
- unsigned short can_command_count_; /*!< can_command_count_ - The number of CanCommmands defined for this message set.*/
- unsigned short obd2_signal_count_; /*!< obd2_signal_count_ - The number of obd2 signals defined for this message set.*/
-};
-
/** Public: Retrive a list of all possible CAN configurations.
*
* Returns a pointer to an array of all configurations.