| 2977 | } |
| 2978 | |
| 2979 | void routing_manager_client::notify_one(service_t _service, instance_t _instance, event_t _event, std::shared_ptr<payload> _payload, |
| 2980 | client_t _client, bool _force) { |
| 2981 | std::scoped_lock its_lock{provider_mutex_}; |
| 2982 | std::shared_ptr<event> its_event = find_provided_event(_service, _instance, _event, its_lock); |
| 2983 | if (its_event) { |
| 2984 | // Event is valid for service/instance |
| 2985 | bool found_eventgroup(false); |
| 2986 | bool already_subscribed(false); |
| 2987 | // Iterate over all groups of the event to ensure at least |
| 2988 | // one valid eventgroup for service/instance exists. |
| 2989 | for (auto its_group : its_event->get_eventgroups()) { |
| 2990 | auto its_eventgroup = find_eventgroup(provided_eventgroups_, _service, _instance, its_group, its_lock); |
| 2991 | if (its_eventgroup) { |
| 2992 | // Eventgroup is valid for service/instance |
| 2993 | found_eventgroup = true; |
| 2994 | if (is_local_client(_client)) { |
| 2995 | already_subscribed = its_event->has_subscriber(its_group, _client); |
| 2996 | } else { |
| 2997 | // Remotes always needs to be marked as subscribed here |
| 2998 | already_subscribed = true; |
| 2999 | } |
| 3000 | break; |
| 3001 | } |
| 3002 | } |
| 3003 | if (found_eventgroup) { |
| 3004 | if (already_subscribed) { |
| 3005 | its_event->set_payload(_payload, _client, _force); |
| 3006 | } |
| 3007 | } |
| 3008 | } else { |
| 3009 | VSOMEIP_WARNING_P << "Attempt to update the undefined event/field [" << hex4(_service) << "." << hex4(_instance) << "." |
| 3010 | << hex4(_event) << "]"; |
| 3011 | } |
| 3012 | } |
| 3013 | |
| 3014 | void routing_manager_client::notify_one_current_value(client_t _client, service_t _service, instance_t _instance, eventgroup_t _eventgroup, |
| 3015 | event_t _event, std::scoped_lock<std::mutex> const& _lock) { |
no test coverage detected