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

Method add_remote_subscription

implementation/routing/src/eventgroupinfo.cpp:335–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335remote_subscription_id_t eventgroupinfo::add_remote_subscription(const std::shared_ptr<remote_subscription>& _subscription) {
336
337 if (_subscription == nullptr) {
338 VSOMEIP_ERROR_P << "Received ptr is null";
339 return id_;
340 }
341 std::scoped_lock its_lock(subscriptions_mutex_);
342
343 update_id();
344
345 _subscription->set_id(id_);
346 subscriptions_[id_] = _subscription;
347
348 boost::asio::ip::address its_address;
349 if (_subscription->get_ip_address(its_address)) {
350 remote_subscribers_count_[its_address]++;
351 }
352 return id_;
353}
354
355std::shared_ptr<remote_subscription> eventgroupinfo::get_remote_subscription(const remote_subscription_id_t _id) {
356 std::scoped_lock its_lock(subscriptions_mutex_);

Callers 1

on_remote_subscribeMethod · 0.80

Calls 2

get_ip_addressMethod · 0.80
set_idMethod · 0.45

Tested by

no test coverage detected