MCPcopy Create free account
hub / github.com/COVESA/vsomeip / cache_event_payload

Method cache_event_payload

implementation/routing/src/routing_manager_client.cpp:1825–1847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1823}
1824
1825void 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
1849void 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) {

Callers

nothing calls this directly

Calls 9

get_methodMethod · 0.80
is_fieldMethod · 0.80
update_payloadMethod · 0.80
get_serviceMethod · 0.45
get_instanceMethod · 0.45
get_clientMethod · 0.45
get_typeMethod · 0.45
get_payloadMethod · 0.45

Tested by

no test coverage detected