X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Fcan%2Fcan-bus.hpp;h=99d5a30f80e3432f926d19a8e9f06c816e549939;hb=89b22975575deba2aee277ea03867238f963c3aa;hp=934b45d56655f55aa979110d9e38a8e0dc8c4947;hpb=1f4eb8c5562bf5c0bc6ebd1b35977cd71d9b3a83;p=apps%2Fagl-service-can-low-level.git diff --git a/CAN-binder/low-can-binding/can/can-bus.hpp b/CAN-binder/low-can-binding/can/can-bus.hpp index 934b45d5..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 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 @@ -88,5 +90,5 @@ public: std::condition_variable& get_new_can_message_cv(); std::pair next_vehicle_message(); - void push_new_vehicle_message(const std::pair& v_msg); + void push_new_vehicle_message(int subscription_id, const openxc_VehicleMessage& v_msg); };