X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fcan%2Fmessage%2Fcan-message.hpp;h=76515d802b4dd169ed40bc18435bf7d8e47273c8;hb=refs%2Fchanges%2F47%2F22247%2F3;hp=7625cc1734e4b13f731f2df35bae370b54e67397;hpb=88077fb4b383cf7f35093b6cc0d2d9d86c6f1bf3;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/can/message/can-message.hpp b/low-can-binding/can/message/can-message.hpp index 7625cc17..76515d80 100644 --- a/low-can-binding/can/message/can-message.hpp +++ b/low-can-binding/can/message/can-message.hpp @@ -18,7 +18,14 @@ #pragma once #include "./message.hpp" - +struct bcm_msg +{ + struct bcm_msg_head msg_head; + union { + struct canfd_frame fd_frames[MAX_BCM_CAN_FRAMES]; + struct can_frame frames[MAX_BCM_CAN_FRAMES]; + }; +}; /// @class can_message_t /// @@ -28,7 +35,6 @@ class can_message_t : public message_t { private: uint32_t id_; ///< id_ - The ID of the message. */ bool rtr_flag_; ///< rtr_flag_ - Telling if the frame has RTR flag positionned. Then frame hasn't data field*/ - uint32_t flags_; ///< flags_ - flags of a CAN FD frame. Needed if we catch FD frames.*/ struct bcm_msg bcm_msg_; public: @@ -39,6 +45,7 @@ class can_message_t : public message_t { static std::shared_ptr convert_from_frame(const canfd_frame& frame, size_t nbytes, uint64_t timestamp); struct canfd_frame convert_to_canfd_frame(); + struct std::vector convert_to_canfd_frame_vector(); struct can_frame convert_to_can_frame(); bool is_correct_to_send(); @@ -47,5 +54,5 @@ class can_message_t : public message_t { void set_bcm_msg(struct bcm_msg bcm_msg); std::string get_debug_message(); - uint32_t get_flags(); + };