aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/binding/low-can-cb.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-01 13:46:10 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:40:13 +0200
commite9b00c3af0c469726e32755715a69395ad1d3718 (patch)
treea4ab62ebf0a69a9657292104cd7ee822af996d42 /CAN-binder/low-can-binding/binding/low-can-cb.hpp
parent4499dbbeadc3fb2a7234d2021097ddca2ba3351e (diff)
Simplify processing event
Set afb_event into subscription object then there is no more std::pair used t access it, better use a method from low_can_subscription_t class Change-Id: Ic0772d97c18ca8899821cf3ce175166bbe0be660 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/binding/low-can-cb.hpp')
-rw-r--r--CAN-binder/low-can-binding/binding/low-can-cb.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.hpp b/CAN-binder/low-can-binding/binding/low-can-cb.hpp
index 0f276fb7..ad3f74fe 100644
--- a/CAN-binder/low-can-binding/binding/low-can-cb.hpp
+++ b/CAN-binder/low-can-binding/binding/low-can-cb.hpp
@@ -37,6 +37,7 @@ class low_can_subscription_t
{
private:
int index_;
+ struct afb_event event_;
/// Signal part
std::shared_ptr<can_signal_t> can_signal_;
@@ -57,6 +58,7 @@ public:
explicit operator bool() const;
int get_index() const;
+ struct afb_event& get_event();
const std::shared_ptr<can_signal_t> get_can_signal() const;
const std::string get_name() const;
float get_frequency() const;
@@ -64,6 +66,7 @@ public:
float get_max() const;
utils::socketcan_bcm_t& get_socket();
+ void set_event(struct afb_event event);
void set_frequency(float freq);
void set_min(float min);
void set_max(float max);