- return can_message_t(maxdlen, id, length, format, rtr_flag, flags, data);
-}
-
-///
-/// @brief Take all initialized class's members and build an
-/// canfd_frame struct that can be use to send a CAN message over
-/// the bus.
-///
-/// @return canfd_frame struct built from class members.
-///
-canfd_frame can_message_t::convert_to_canfd_frame()
-{
- canfd_frame frame;
-
- if(is_correct_to_send())
- {
- frame.can_id = get_id();
- frame.len = get_length();
- ::memcpy(frame.data, get_data(), length_);
- }
- else
- ERROR(binder_interface, "can_message_t not correctly initialized to be sent");
-
- return frame;
+ return can_message_t(maxdlen, id, length, format, rtr_flag, flags, data, timestamp);