aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can/can-bus.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-01 09:07:00 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:38:16 +0200
commitbc28c33a3805331b36751af2b895ac61be418eaa (patch)
tree980886f8853a9ade5b36cc44bae778e782584b7e /CAN-binder/low-can-binding/can/can-bus.hpp
parent78dd7bb6236bef3a9476accc28585d16283a11e9 (diff)
Implement method to filter messages before pushing
Change-Id: I94223ebead4a011a1fb56ed0c3676c433e01319b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can/can-bus.hpp')
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/CAN-binder/low-can-binding/can/can-bus.hpp b/CAN-binder/low-can-binding/can/can-bus.hpp
index 1d064b2b..99d5a30f 100644
--- a/CAN-binder/low-can-binding/can/can-bus.hpp
+++ b/CAN-binder/low-can-binding/can/can-bus.hpp
@@ -29,6 +29,7 @@
#include "can-message.hpp"
#include "../utils/config-parser.hpp"
#include "../binding/low-can-hat.hpp"
+#include "../binding/low-can-cb.hpp"
// TODO actual max is 32 but dropped to 24 for memory considerations
#define MAX_ACCEPTANCE_FILTERS 24
@@ -51,8 +52,9 @@ class can_bus_t
private:
utils::config_parser_t conf_file_; ///< configuration file handle used to initialize can_bus_dev_t objects.
- int process_can_signals(const can_message_t& can_message);
- int process_diagnostic_signals(diagnostic_manager_t& manager, const can_message_t& can_message);
+ bool apply_filter(const openxc_VehicleMessage& vehicle_message, std::shared_ptr<low_can_subscription_t> can_subscription);
+ void process_can_signals(const can_message_t& can_message);
+ void process_diagnostic_signals(diagnostic_manager_t& manager, const can_message_t& can_message);
void can_decode_message();
std::thread th_decoding_; ///< thread that'll handle decoding a can frame