diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-01 17:42:52 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-01 17:42:52 +0100 |
commit | 937fe8e40aba5eb37c69fd5ff6bf4d800541a009 (patch) | |
tree | cd7b1d7919aacba6861ab63e98ed924531b00002 /src/can-message.hpp | |
parent | 4f06114c79f804ed404d40ffad771cbacab0fe8b (diff) |
New way to return canfd_frame with now number of read bytes.
This way, we can detect correctly the max data length and
set the data correctly.
Change-Id: I346df154df76dbd4a463d1fabfd9edd56faca506
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can-message.hpp')
-rw-r--r-- | src/can-message.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/can-message.hpp b/src/can-message.hpp index 82e2e019..efae17ff 100644 --- a/src/can-message.hpp +++ b/src/can-message.hpp @@ -117,7 +117,7 @@ class can_message_t { */ uint8_t get_length() const; - void set_max_data_length(const struct canfd_frame& frame); + void set_max_data_length(size_t nbytes); /** * @brief Control whether the object is correctly initialized @@ -176,7 +176,7 @@ class can_message_t { * * @param uint8_t data_ array with a max size of 8 elements. */ - void set_data(const __u8 new_data[], size_t dlen); + void set_data(const __u8* new_data); /** * @brief Set length_ member value. @@ -195,7 +195,7 @@ class can_message_t { * * @param canfd_frame struct read from can bus device. */ - void convert_from_canfd_frame(const struct canfd_frame& frame); + void convert_from_canfd_frame(const std::pair<struct canfd_frame&, size_t>args); /** * @brief Take all initialized class's members and build an |