summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/message/message.hpp
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-08-27 14:40:08 +0200
committerArthur Guyader <arthur.guyader@iot.bzh>2019-08-30 11:46:04 +0200
commitfa8c188743f5f2b4beaffc5673edc5e1f4c24996 (patch)
treeabcd189376821c7c65f3ff2bae0c224308ae12b5 /low-can-binding/can/message/message.hpp
parentf516a1228e83c7921a326f52e0055f69fd429fe8 (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 Change-Id: I56f9cd54d8b9822636311c603501326b36692cf4 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Diffstat (limited to 'low-can-binding/can/message/message.hpp')
-rw-r--r--low-can-binding/can/message/message.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/low-can-binding/can/message/message.hpp b/low-can-binding/can/message/message.hpp
index f0e1bf0b..2182fe5b 100644
--- a/low-can-binding/can/message/message.hpp
+++ b/low-can-binding/can/message/message.hpp
@@ -55,12 +55,11 @@ protected:
std::vector<uint8_t> data_; ///< data_ - The message's data field with a size of 8 which is the standard about CAN bus messages.*/
uint64_t timestamp_; ///< timestamp_ - timestamp of the received message*/
int sub_id_; ///< sub_id_ - Subscription index. */
-
-
+ uint32_t flags_; ///< flags_ - flags of a CAN FD frame. Needed if we catch FD frames.*/
public:
message_t();
- message_t(uint32_t maxdlen, uint32_t length, message_format_t format, std::vector<uint8_t>& data, uint64_t timestamp);
+ message_t(uint32_t maxdlen, uint32_t length, message_format_t format, std::vector<uint8_t>& data, uint64_t timestamp, uint32_t flags);
virtual ~message_t() = default;
int get_sub_id() const;
@@ -77,5 +76,10 @@ public:
virtual bool is_set() = 0;
virtual std::string get_debug_message() = 0;
virtual uint32_t get_id() const = 0;
+ uint32_t get_flags();
+ void set_flags(uint32_t flags);
+ uint32_t get_maxdlen();
+ void set_maxdlen(uint32_t maxdlen);
+
};