summaryrefslogtreecommitdiffstats
path: root/meta-agl-core
AgeCommit message (Expand)AuthorFilesLines
2021-07-30agl-compositor_git: Bump SRCREVMarius Vlad2-1/+6
2021-07-13qt5: Fix timer leak in qtwayland to avoid animations being sluggishHiroyuki Ishii3-0/+49
2021-07-13agl-compositor: Move protocol files to the -dev packageMarius Vlad1-5/+9
2021-07-02Change master to Magic Marlinmarlin_12.90.0marlin/12.90.012.90.0Jan-Simon Moeller1-2/+2
2021-06-29Refactor kernel configuration fragment handlingScott Murray25-299/+121
2021-06-25packagegroup-agl-core-devel: remove duplicate profiling toolsScott Murray1-2/+0
2021-06-25Post release bump after LL m2Jan-Simon Moeller1-2/+2
2021-06-23Remove default inclusion of kernel-modulesScott Murray1-6/+2
2021-06-14Prepare Lucky Lamprey M2lamprey_11.92.0lamprey/11.92.011.92.0Jan-Simon Moeller1-3/+3
2021-06-08meta-agl-core: dynamically add qtbase bbappendScott Murray3-0/+14
2021-06-08Add agl-package-management featureScott Murray2-7/+6
2021-06-01meta-agl-core: Rework packagegroup-agl-core-bootScott Murray3-29/+9
2021-05-26Remove connman-plugin-session-policy-localNaoto Yamaguchi2-4/+1
2021-05-25Post release update to distro configJan-Simon Möller1-2/+2
2021-05-14Prepare Lucky Lamprey Milestone 1Jan-Simon Moeller1-3/+3
2021-05-13agl-shell-activator_git: Add recipelamprey_11.91.0lamprey/11.91.011.91.0Marius Vlad1-0/+22
2021-05-05meta-agl-core: remove IMAGE_FSTYPES overrideScott Murray3-21/+3
2021-04-30meta-agl-core/recipes-graphics/wayland: Do not export seat related functionsMarius Vlad1-1/+3
2021-04-26meta-pipewire: update to pipewire 0.3.25 and wireplumber masterGeorge Kiagiadakis2-0/+2
2021-04-26recipes-graphics/wayland/weston_8.0_aglcore: Remove unneeded patchMarius Vlad2-31/+0
2021-04-26recipes-graphics/wayland/agl-compositor: SRCREV bumpMarius Vlad1-1/+1
2021-03-15meta-agl-core: remove rng-tools bbappendScott Murray4-110/+0
2021-03-01meta-agl-core: update poky-agl distro configurationScott Murray1-27/+12
2021-03-01meta-agl-core: update packagegroup-agl-core-bootScott Murray1-5/+2
2021-03-01meta-agl-core: fix connman-ncurses compilationScott Murray2-1/+55
2021-03-01meta-agl-core: remove libsoup bbappendScott Murray2-2/+0
2021-03-01meta-agl-core: update packagegroup-agl-core-connectivityScott Murray1-1/+0
2021-03-01meta-agl-core: fix S definition in waltham-transmitter-pluginScott Murray1-1/+1
2021-02-05agl-compositor: Bump SRCREVMarius Vlad1-1/+1
2021-02-05meta-agl-core: Update weston-ini-conf landscape supportScott Murray3-2/+30
2021-02-05RBAModel: Added unknown_app content_idAnusha Gugale1-0/+20
2021-02-04meta-agl-core: fix entropy gathering on rng-tools 6.9Julien Massot4-0/+110
2021-02-04Post Milestone 3 change - open master for Lucky LampreyJan-Simon Möller1-4/+4
2021-01-29Prepare Kooky Koi Milestone 3koi_10.93.0koi/10.93.010.93.0Jan-Simon Möller1-3/+3
2021-01-26change SRCREV of librbaAnusha Gugale1-1/+1
2021-01-22agl-compositor_git: Enable loading waltham-transmitter-pluginMarius Vlad1-1/+3
2021-01-22waltham-transmitter-plugin: Add waltham-transmitter plug-in recipeMarius Vlad2-34/+17
2021-01-22wayland/weston-ini-conf: Add transmitter-output ini sectionMarius Vlad3-0/+7
2021-01-21Post Milestone 2 change to distro configJan-Simon Möller1-2/+2
2021-01-16Prepare KK Milestone 2koi_10.92.0koi/10.92.010.92.0Jan-Simon Moeller1-3/+3
2021-01-14meta-agl: move open-vm-tools and vboxguestdrivers to meta-agl-demoJan-Simon Möller1-2/+0
2021-01-13agl-compositor: include runtime dependencies in PACKAGECONFIG for policy-rbaJan-Simon Moeller1-1/+1
2021-01-13meta-agl-core: remove connman cluster demo supportScott Murray1-7/+2
2021-01-12agl-compositor: Bump SRCREV for agl-compositorMarius Vlad1-1/+1
2021-01-12agl-compositor: added option to build rba policyAnusha Gugale1-0/+2
2021-01-12meta-agl-core: add recipe for librba and rba-configAnusha Gugale3-0/+339
2021-01-12Improve workaround for do_image_wic race conditionPaul Barker2-3/+33
2021-01-12meta-agl-core: Revise weston-ini-conf mechanismScott Murray8-61/+109
2021-01-08meta-agl-bsp: enable HCI UART for i.MX8MQ EVKScott Murray1-5/+0
2021-01-06Post release update to distro configJan-Simon Moeller1-2/+2
"p">())) { if (apply_filter(vehicle_message, s[subscription_id])) { std::lock_guard<std::mutex> decoded_can_message_lock(decoded_can_message_mutex_); push_new_vehicle_message(subscription_id, vehicle_message); DEBUG("%s CAN signals processed.", s[subscription_id]->get_name().c_str()); } } } /// @brief thread to decoding raw CAN messages. /// /// Depending on the nature of message, if arbitration ID matches ID for a diagnostic response /// then decoding a diagnostic message else use classic CAN signals decoding functions. /// /// It will take from the can_message_q_ queue the next can message to process then it search /// about signal subscribed if there is a valid afb_event for it. We only decode signal for which a /// subscription has been made. Can message will be decoded using translateSignal that will pass it to the /// corresponding decoding function if there is one assigned for that signal. If not, it will be the default /// noopDecoder function that will operate on it. /// /// TODO: make diagnostic messages parsing optionnal. void can_bus_t::can_decode_message() { utils::signals_manager_t& sm = utils::signals_manager_t::instance(); while(is_decoding_) { std::unique_lock<std::mutex> can_message_lock(can_message_mutex_); new_can_message_cv_.wait(can_message_lock); while(!can_message_q_.empty()) { const can_message_t can_message = next_can_message(); can_message_lock.unlock(); { std::lock_guard<std::mutex> subscribed_signals_lock(sm.get_subscribed_signals_mutex()); std::map<int, std::shared_ptr<low_can_subscription_t> >& s = sm.get_subscribed_signals(); if(application_t::instance().get_diagnostic_manager().is_diagnostic_response(can_message)) {process_diagnostic_signals(application_t::instance().get_diagnostic_manager(), can_message, s);} else {process_can_signals(can_message, s);} } can_message_lock.lock(); } new_decoded_can_message_.notify_one(); can_message_lock.unlock(); } } /// @brief thread to push events to suscribers. It will read subscribed_signals map to look /// which are events that has to be pushed. void can_bus_t::can_event_push() { openxc_SimpleMessage s_message; json_object* jo; utils::signals_manager_t& sm = utils::signals_manager_t::instance(); while(is_pushing_) { std::unique_lock<std::mutex> decoded_can_message_lock(decoded_can_message_mutex_); new_decoded_can_message_.wait(decoded_can_message_lock); while(!vehicle_message_q_.empty()) { std::pair<int, openxc_VehicleMessage> v_message = next_vehicle_message(); decoded_can_message_lock.unlock(); { std::lock_guard<std::mutex> subscribed_signals_lock(sm.get_subscribed_signals_mutex()); std::map<int, std::shared_ptr<low_can_subscription_t> >& s = sm.get_subscribed_signals(); s_message = get_simple_message(v_message.second); if(s.find(v_message.first) != s.end() && afb_event_is_valid(s[v_message.first]->get_event())) { jo = json_object_new_object(); jsonify_simple(s_message, jo); if(afb_event_push(s[v_message.first]->get_event(), jo) == 0) { if(v_message.second.has_diagnostic_response) {on_no_clients(s[v_message.first], v_message.second.diagnostic_response.pid, s);} else {on_no_clients(s[v_message.first], s);} } } } decoded_can_message_lock.lock(); } decoded_can_message_lock.unlock(); } } /// @brief Will initialize threads that will decode /// and push subscribed events. void can_bus_t::start_threads() { is_decoding_ = true; th_decoding_ = std::thread(&can_bus_t::can_decode_message, this); th_decoding_.detach(); is_pushing_ = true; th_pushing_ = std::thread(&can_bus_t::can_event_push, this); th_pushing_.detach(); } /// @brief Will stop all threads holded by can_bus_t object /// which are decoding and pushing then will wait that's /// they'll finish their job. void can_bus_t::stop_threads() { is_decoding_ = false; is_pushing_ = false; } /// @brief return new_can_message_cv_ member /// /// @return return new_can_message_cv_ member std::condition_variable& can_bus_t::get_new_can_message_cv() { return new_can_message_cv_; } /// @brief return can_message_mutex_ member /// /// @return return can_message_mutex_ member std::mutex& can_bus_t::get_can_message_mutex() { return can_message_mutex_; } /// @brief Return first can_message_t on the queue /// /// @return a can_message_t const can_message_t can_bus_t::next_can_message() { can_message_t can_msg; if(!can_message_q_.empty()) { can_msg = can_message_q_.front(); can_message_q_.pop(); DEBUG("Here is the next can message : id %X, length %X, data %02X%02X%02X%02X%02X%02X%02X%02X", can_msg.get_id(), can_msg.get_length(), can_msg.get_data()[0], can_msg.get_data()[1], can_msg.get_data()[2], can_msg.get_data()[3], can_msg.get_data()[4], can_msg.get_data()[5], can_msg.get_data()[6], can_msg.get_data()[7]); return can_msg; } return can_msg; } /// @brief Push a can_message_t into the queue /// /// @param[in] can_msg - the const reference can_message_t object to push into the queue void can_bus_t::push_new_can_message(const can_message_t& can_msg) { can_message_q_.push(can_msg); } /// @brief Return first openxc_VehicleMessage on the queue /// /// @return a openxc_VehicleMessage containing a decoded can message std::pair<int, openxc_VehicleMessage> can_bus_t::next_vehicle_message() { std::pair<int, openxc_VehicleMessage> v_msg; if(! vehicle_message_q_.empty()) { v_msg = vehicle_message_q_.front(); vehicle_message_q_.pop(); DEBUG("next vehicle message poped"); return v_msg; } return v_msg; } /// @brief Push a openxc_VehicleMessage into the queue /// /// @param[in] v_msg - const reference openxc_VehicleMessage object to push into the queue void can_bus_t::push_new_vehicle_message(int subscription_id, const openxc_VehicleMessage& v_msg) { vehicle_message_q_.push(std::make_pair(subscription_id, v_msg)); } /// @brief Fills the CAN device map member with value from device /// mapping configuration file read at initialization. void can_bus_t::set_can_devices() { can_devices_ = conf_file_.get_devices_name(); if(can_devices_.empty()) { ERROR("No mapping found in config file: '%s'. Check it that it have a CANbus-mapping section.", conf_file_.filepath().c_str()); } } /// @brief Return the CAN device index from the map /// map are sorted so index depend upon alphabetical sorting. int can_bus_t::get_can_device_index(const std::string& bus_name) const { int i = 0; for(const auto& d: can_devices_) { if(d.first == bus_name) break; i++; } return i; } /// @brief Return CAN device name from a logical CAN device name gotten from /// the signals.json description file which comes from a CAN databases file in /// general. const std::string can_bus_t::get_can_device_name(const std::string& id_name) const { std::string ret; for(const auto& d: can_devices_) { if(d.first == id_name) { ret = d.second; break; } } return ret; }