diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-26 16:19:20 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-28 16:11:47 +0100 |
commit | 4963f654612f4a1411b9980601a725026c57da29 (patch) | |
tree | 1ebe21d40a7e10b13911895fbcc3699557c770ba /low-can-binding/can/message/message.cpp | |
parent | b37ea4acd86941e587b6eefe1dca262e3bf21f12 (diff) |
Move attributes flags and maxdlen
This commit moves attributes flags and maxdlen from
class can_message_t to class message_t.
Bug-AGL : SPEC-2779
Bug-AGL: SPEC-2976
Change-Id: I56f9cd54d8b9822636311c603501326b36692cf4
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/message/message.cpp')
-rw-r--r-- | low-can-binding/can/message/message.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/low-can-binding/can/message/message.cpp b/low-can-binding/can/message/message.cpp index b0a33f78..497304de 100644 --- a/low-can-binding/can/message/message.cpp +++ b/low-can-binding/can/message/message.cpp @@ -30,7 +30,8 @@ message_t::message_t() length_{0}, format_{message_format_t::INVALID}, timestamp_{0}, - sub_id_{-1} + sub_id_{-1}, + flags_{0} {} /** @@ -46,13 +47,15 @@ message_t::message_t(uint32_t maxdlen, uint32_t length, message_format_t format, std::vector<uint8_t>& data, - uint64_t timestamp) + uint64_t timestamp, + uint32_t flags) : maxdlen_{maxdlen}, length_{length}, format_{format}, data_{data}, timestamp_{timestamp}, - sub_id_{-1} + sub_id_{-1}, + flags_{flags} {} /** @@ -169,3 +172,25 @@ message_format_t message_t::get_msg_format() { return format_; } + + +uint32_t message_t::get_flags() +{ + return flags_; +} + +void message_t::set_flags(uint32_t flags) +{ + flags_ = flags_ | flags; +} + +uint32_t message_t::get_maxdlen() +{ + return maxdlen_; +} + + +void message_t::set_maxdlen(uint32_t maxdlen) +{ + maxdlen_ = maxdlen; +}
\ No newline at end of file |