-
Improvement
-
Resolution: Fixed
-
Major
-
None
Currently, the 'Low Level CAN Service' is checking for duplicate signals using only the 'name' of the signal. So, when an already subscribed signal is requested for a new subscription, filter is ignore and the new subscription will receive the same data as the previously subscribed subscription.
Technical details :
To handle correctly multiple subscription with different filters for the same signal, a method called 'isSignalSubscriptionCorresponding' should be added in 'low_can_socket_t' class. This method will take an 'std::shared_ptr<can_signal_t>' and and 'event_filter_t' as parameter and return a boolean at 'true' if parameters are corresponding to the current 'subscription' object.
This method should be used in 'subscribe_unsubscribe_can_signals' function of 'low-can-cb.cpp' file. By doing that, a new subscription object (and therefore, a new SocketCAN socket) will be created if the filters is not the same as the previously subscribed subscription.