///
/// @brief Class constructor
///
-/// Constructor about can_message_t class.
+/// can_message_t class constructor.
///
can_message_t::can_message_t()
: maxdlen_{0},
/// @brief Set format_ member value.
///
-/// Preferred way to initialize these members by using
+/// Preferred way to initialize these members is to use
/// convert_from_canfd_frame method.
///
/// @param[in] new_format - class member
/// @return A can_message_t object fully initialized with canfd_frame values.
can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame, size_t nbytes, uint64_t timestamp)
{
- uint8_t maxdlen, length, flags = (uint8_t)NULL;
+ uint8_t maxdlen = 0, length = 0, flags = 0;
uint32_t id;
can_message_format_t format;
bool rtr_flag;
/// @return A can_message_t object fully initialized with can_frame values.
can_message_t can_message_t::convert_from_frame(const struct can_frame& frame, size_t nbytes, uint64_t timestamp)
{
- uint8_t maxdlen, length, flags = (uint8_t)NULL;
+ uint8_t maxdlen = 0, length = 0, flags = 0;
uint32_t id;
can_message_format_t format;
bool rtr_flag;
return can_message_t(maxdlen, id, length, format, rtr_flag, flags, data, timestamp);
}
-/// @brief Take all initialized class's members and build an
+/// @brief Take all initialized class members and build a
/// canfd_frame struct that can be use to send a CAN message over
/// the bus.
///
return frame;
}
-/// @brief Take all initialized class's members and build an
+/// @brief Take all initialized class members and build a
/// can_frame struct that can be use to send a CAN message over
/// the bus.
///