-/**
-* @brief Set data_ member value.
-*
-* Preferred way to initialize these members by using
-* convert_from_canfd_frame method.
-*
-* @param uint8_t data_ array with a max size of 8 elements.
-*/
-void can_message_t::set_data(const __u8* new_data)
-{
- int i;
-
- data_.clear();
- /* maxdlen_ is now set at CAN_MAX_DLEN or CANFD_MAX_DLEN, respectively 8 and 64 bytes*/
- for(i=0;i<maxdlen_;i++)
- {
- data_.push_back(new_data[i]);
- }
-}
-
-/**
-* @brief Take a canfd_frame struct to initialize class members
-*
-* This is the preferred way to initialize class members.
-*
-* @param canfd_frame struct read from can bus device.
-*/
-void can_message_t::convert_from_canfd_frame(const std::pair<struct canfd_frame&, size_t>args)
-{
- // May be it's overkill to assign member of the pair... May be it will change...
- struct canfd_frame frame = args.first;
- size_t nbytes = args.second;
- set_max_data_length(nbytes);
- set_length(frame.len);
- set_id_and_format(frame.can_id);
-
- /* Overwrite lenght_ if RTR flags is detected.