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

Method find_eventgroup

implementation/routing/src/routing_manager_impl.cpp:4417–4452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4415}
4416
4417std::shared_ptr<eventgroupinfo> routing_manager_impl::find_eventgroup(service_t _service, instance_t _instance,
4418 eventgroup_t _eventgroup) const {
4419 std::scoped_lock its_lock(eventgroups_mutex_);
4420
4421 std::shared_ptr<eventgroupinfo> its_info(nullptr);
4422
4423 const auto search = eventgroups_.find(service_instance_t{_service, _instance});
4424
4425 if (search != eventgroups_.end()) {
4426 const auto found_eventgroup = search->second.find(_eventgroup);
4427 if (found_eventgroup != search->second.end()) {
4428 its_info = found_eventgroup->second;
4429 std::shared_ptr<serviceinfo> its_service_info = find_service(_service, _instance);
4430 if (its_service_info) {
4431 std::string its_multicast_address;
4432 uint16_t its_multicast_port;
4433 if (configuration_->get_multicast(_service, _instance, _eventgroup, its_multicast_address, its_multicast_port)) {
4434 try {
4435 its_info->set_multicast(boost::asio::ip::make_address(its_multicast_address), its_multicast_port);
4436 } catch (...) {
4437 VSOMEIP_ERROR_P << "Eventgroup [" << hex4(_service) << "." << hex4(_instance) << "." << hex4(_eventgroup)
4438 << hex4(_service) << "." << hex4(_instance) << "." << hex4(_eventgroup)
4439 << "] is configured as multicast, but no valid multicast address is configured!";
4440 }
4441 }
4442
4443 // LB: THIS IS STRANGE. A "FIND" - METHOD SHOULD NOT ADD INFORMATION...
4444 its_info->set_major(its_service_info->get_major());
4445 its_info->set_ttl(its_service_info->get_ttl());
4446 its_info->set_threshold(configuration_->get_threshold(_service, _instance, _eventgroup));
4447 }
4448 }
4449 }
4450
4451 return its_info;
4452}
4453
4454void routing_manager_impl::stop_offer_service_base(client_t _client, service_t _service, instance_t _instance, major_version_t _major,
4455 minor_version_t _minor) {

Callers 4

is_subscribedMethod · 0.45

Calls 10

hex4Function · 0.85
endMethod · 0.80
set_multicastMethod · 0.80
set_thresholdMethod · 0.80
get_multicastMethod · 0.45
set_majorMethod · 0.45
get_majorMethod · 0.45
set_ttlMethod · 0.45
get_ttlMethod · 0.45
get_thresholdMethod · 0.45

Tested by

no test coverage detected