diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-31 12:46:02 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-01 18:22:49 +0200 |
commit | 1f4eb8c5562bf5c0bc6ebd1b35977cd71d9b3a83 (patch) | |
tree | 0373a64035f894a7b18139306cbf879989d28268 /CAN-binder/low-can-binding/can/can-message.hpp | |
parent | c28f479a597de89f38b2bbd155afc26c7f2de822 (diff) |
Reworked subscription to integrate filtering.
- Creation of an object which old the subscription context
(filter, signal) : low_can_subscription_t
- Move socket from can_signal_t to this new object.
- Adding a member to can_message_t to transport subscription_id to be able to
retrieve it with all the context through running.
Change-Id: I87be8cd6c3c93a81040357920d8c081a316800c3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can/can-message.hpp')
-rw-r--r-- | CAN-binder/low-can-binding/can/can-message.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/can/can-message.hpp b/CAN-binder/low-can-binding/can/can-message.hpp index 1ce1c7a5..ced2602a 100644 --- a/CAN-binder/low-can-binding/can/can-message.hpp +++ b/CAN-binder/low-can-binding/can/can-message.hpp @@ -52,12 +52,14 @@ private: uint8_t flags_; /*!< flags_ - flags of a CAN FD frame. Needed if we catch FD frames.*/ 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. */ public: can_message_t(); can_message_t(uint8_t maxdlen, uint32_t id, uint8_t length, can_message_format_t format, bool rtr_flag_, uint8_t flags, std::vector<uint8_t>& data, uint64_t timestamp); uint32_t get_id() const; + int get_sub_id() const; bool get_rtr_flag_() const; can_message_format_t get_format() const; uint8_t get_flags() const; @@ -66,6 +68,7 @@ public: uint8_t get_length() const; uint64_t get_timestamp() const; + void set_sub_id(int sub_id); void set_timestamp(uint64_t timestamp); void set_format(const can_message_format_t new_format); |