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

Method on_subscribe_nack

implementation/routing/src/routing_manager_impl.cpp:2203–2231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2201}
2202
2203void routing_manager_impl::on_subscribe_nack(client_t _client, service_t _service, instance_t _instance, eventgroup_t _eventgroup,
2204 bool _remove, remote_subscription_id_t _id) {
2205 auto its_eventgroup = find_eventgroup(_service, _instance, _eventgroup);
2206 if (its_eventgroup) {
2207 auto its_subscription = its_eventgroup->get_remote_subscription(_id);
2208 if (its_subscription) {
2209 its_subscription->set_client_state(_client, remote_subscription_state_e::SUBSCRIPTION_NACKED);
2210
2211 auto its_parent = its_subscription->get_parent();
2212 if (its_parent) {
2213 its_parent->set_client_state(_client, remote_subscription_state_e::SUBSCRIPTION_NACKED);
2214 if (!its_subscription->is_pending()) {
2215 its_eventgroup->remove_remote_subscription(_id);
2216 }
2217 }
2218
2219 if (discovery_) {
2220 discovery_->update_remote_subscription(its_subscription);
2221 VSOMEIP_INFO << "REMOTE SUBSCRIBE(" << hex4(_client) << "): [" << hex4(_service) << "." << hex4(_instance) << "."
2222 << hex4(_eventgroup) << "] from " << its_subscription->get_subscriber()->get_address() << ":"
2223 << its_subscription->get_subscriber()->get_port()
2224 << (its_subscription->get_subscriber()->is_reliable() ? " reliable" : " unreliable")
2225 << " was not accepted. id=" << hex4(_id);
2226 }
2227 if (_remove)
2228 its_eventgroup->remove_remote_subscription(_id);
2229 }
2230 }
2231}
2232
2233return_code_e routing_manager_impl::check_error(const byte_t* _data, length_t /*_size*/, instance_t _instance) const {
2234

Callers 2

on_messageMethod · 0.45

Calls 11

hex4Function · 0.85
set_client_stateMethod · 0.80
get_parentMethod · 0.80
is_pendingMethod · 0.45
get_addressMethod · 0.45
get_subscriberMethod · 0.45
get_portMethod · 0.45
is_reliableMethod · 0.45

Tested by

no test coverage detected