From 84264431ca5a9958b3bb00b3de481336cf0cccb1 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 24 Apr 2017 19:15:07 +0200 Subject: Create a received job for BCM Socket to handle filtering. Filter is created using can_signals description and send with appropriate BCM header structure. This is the simplest way to do, no temporal filtering for now is available. Change-Id: Iee49f011ba9316880735d2765c1c23a8b2d3c4d2 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/can/can-bus.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CAN-binder/low-can-binding/can/can-bus.cpp') diff --git a/CAN-binder/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp index 6e6fba2..6665744 100644 --- a/CAN-binder/low-can-binding/can/can-bus.cpp +++ b/CAN-binder/low-can-binding/can/can-bus.cpp @@ -335,6 +335,15 @@ void can_bus_t::push_new_vehicle_message(const openxc_VehicleMessage& v_msg) vehicle_message_q_.push(v_msg); } +/// @brief Create a RX_SETUP receive job for the BCM socket of a CAN signal. +/// +/// @return 0 if ok. + int can_bus_t::create_rx_filter(const can_signal_t& s) + { + const std::string& bus = s.get_message().get_bus_name(); + return can_bus_t::can_devices_[bus]->create_rx_filter(s); + } + /// @brief Return a map with the can_bus_dev_t initialized /// /// @return map can_bus_dev_m_ map -- cgit 1.2.3-korg