X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fbinding%2Flow-can-socket.cpp;h=8a8efbf78de76478c64c3e49db8ac7f9c60624c8;hb=2debfc561d3ad517ad0c82ebd18cba8ec78ab6ce;hp=c479a0ad81578f3570ad94cd14a30f6517666955;hpb=4becc6d7986cf656f10f02ecdd5202b5b0fdddf1;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/binding/low-can-socket.cpp b/low-can-binding/binding/low-can-socket.cpp index c479a0ad..8a8efbf7 100644 --- a/low-can-binding/binding/low-can-socket.cpp +++ b/low-can-binding/binding/low-can-socket.cpp @@ -62,6 +62,11 @@ const std::shared_ptr low_can_socket_t::get_can_signal() const return can_signal_; } +bool low_can_socket_t::is_signal_subscription_corresponding(const std::shared_ptr can_signal, const struct event_filter_t& event_filter) const +{ + return can_signal_ == can_signal && event_filter_ == event_filter; +} + const std::vector > low_can_socket_t::get_diagnostic_message() const { return diagnostic_message_; @@ -235,7 +240,7 @@ int low_can_socket_t::create_rx_filter(std::shared_ptr sig) CAN_MAX_DLEN); struct timeval freq, timeout = {0, 0}; - frequency_clock_t f = std::isnan(event_filter_.frequency) ? can_signal_->get_frequency() : frequency_clock_t(event_filter_.frequency); + frequency_clock_t f = event_filter_.frequency == 0 ? can_signal_->get_frequency() : frequency_clock_t(event_filter_.frequency); freq = f.get_timeval_from_period(); utils::simple_bcm_msg bcm_msg = make_bcm_head(RX_SETUP, can_signal_->get_message()->get_id(), SETTIMER|RX_NO_AUTOTIMER, timeout, freq);