X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=low-can-binding%2Fcan%2Fmessage%2Fcan-message.hpp;h=d3d8453c268355ae71ead371573d7628cdd44baa;hb=0ff6413b6dc42849f87ce8caa17a91f44ede2f93;hp=9e75887fa4d075f58b7dd09337891a55705f1c9f;hpb=f5997f7364a0ecead4b20af974b23eee4350b01b;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 9e75887f..d3d8453c 100644 --- a/low-can-binding/can/message/can-message.hpp +++ b/low-can-binding/can/message/can-message.hpp @@ -35,25 +35,29 @@ 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: can_message_t(); - can_message_t(uint32_t maxdlen, uint32_t id, uint32_t length, message_format_t format, bool rtr_flag_, uint32_t flags, std::vector& data, uint64_t timestamp); + can_message_t( uint32_t maxdlen, + uint32_t id, + uint32_t length, + bool rtr_flag_, + uint32_t flags, + std::vector& data, + uint64_t timestamp); uint32_t get_id() const; + void set_id(const canid_t id); + bool is_correct_to_send(); 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(); - bool is_set(); - struct bcm_msg get_bcm_msg(); + struct bcm_msg& get_bcm_msg(); void set_bcm_msg(struct bcm_msg bcm_msg); + struct can_frame convert_to_can_frame(); + bool is_set(); std::string get_debug_message(); - uint32_t get_flags(); };