| 1823 | } |
| 1824 | |
| 1825 | void routing_manager_client::cache_event_payload(const std::shared_ptr<message>& _message) { |
| 1826 | const service_t its_service(_message->get_service()); |
| 1827 | const instance_t its_instance(_message->get_instance()); |
| 1828 | const method_t its_method(_message->get_method()); |
| 1829 | |
| 1830 | std::scoped_lock its_lock(consumer_mutex_); |
| 1831 | auto its_event = find_consumed_event(its_service, its_instance, its_method, its_lock); |
| 1832 | if (!its_event) { |
| 1833 | // we received an event which was not yet requested. |
| 1834 | // create a placeholder until someone requests this event with |
| 1835 | // full information like eventgroup, field or not etc. |
| 1836 | std::set<eventgroup_t> its_eventgroups; |
| 1837 | register_consumer_event(host_->get_client(), its_service, its_instance, its_method, its_eventgroups, event_type_e::ET_UNKNOWN, |
| 1838 | reliability_type_e::RT_UNKNOWN, std::chrono::milliseconds::zero(), false, true, nullptr, true, its_lock); |
| 1839 | its_event = find_consumed_event(its_service, its_instance, its_method, its_lock); |
| 1840 | } |
| 1841 | if (its_event) { |
| 1842 | if (its_event->is_field() || its_event->get_type() == event_type_e::ET_UNKNOWN) { |
| 1843 | its_event->prepare_update_payload(_message->get_payload(), true); |
| 1844 | its_event->update_payload(); |
| 1845 | } |
| 1846 | } |
| 1847 | } |
| 1848 | |
| 1849 | void routing_manager_client::on_stop_offer_service(service_t _service, instance_t _instance, major_version_t _major, minor_version_t _minor, |
| 1850 | [[maybe_unused]] std::scoped_lock<std::mutex> const& _consumer_lock) { |
nothing calls this directly
no test coverage detected