summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-01 13:48:19 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:40:13 +0200
commitcc76d9863d8f528d6299b8ecdbfc2f7f437ac5de (patch)
tree8bc0cb6dd36bf021e5a5242d960cbc26018ba9e3 /CAN-binder/low-can-binding/binding
parente9b00c3af0c469726e32755715a69395ad1d3718 (diff)
Use UDS PID has key to record subscriptions
can_signal_t use socket number but has for OBD2 diagnostic request there is only 1 socket to listen all response then we use PID has key to find the subscription later on the processing. Change-Id: I5f0554e1a4ac43e1046d9b7b7f9bb00d3a753562 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/binding')
-rw-r--r--CAN-binder/low-can-binding/binding/low-can-cb.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.cpp b/CAN-binder/low-can-binding/binding/low-can-cb.cpp
index 6504acf7..245a9ce5 100644
--- a/CAN-binder/low-can-binding/binding/low-can-cb.cpp
+++ b/CAN-binder/low-can-binding/binding/low-can-cb.cpp
@@ -61,7 +61,9 @@ low_can_subscription_t::low_can_subscription_t(struct event_filter_t event_filte
low_can_subscription_t::low_can_subscription_t(struct event_filter_t event_filter, std::shared_ptr<diagnostic_message_t> diagnostic_message)
: diagnostic_message_{diagnostic_message}, event_filter_{event_filter}
-{}
+{
+ index_ = diagnostic_message->get_pid();
+}
low_can_subscription_t::low_can_subscription_t( low_can_subscription_t&& s)
: index_{s.index_},