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

Method restart_sender

implementation/routing/src/routing_manager_client.cpp:2292–2318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2290}
2291
2292void routing_manager_client::restart_sender([[maybe_unused]] std::unique_lock<std::mutex> const& _sender_mutex) {
2293 if (sender_) {
2294 sender_->stop(true);
2295 sender_ = nullptr;
2296 }
2297 if (sender_debounce_active_) {
2298 start_sender_after_debounce_ = true;
2299 VSOMEIP_INFO_P << "The restart of the sender is debounced";
2300 return;
2301 }
2302 start_sender_after_debounce_ = false;
2303 if (!state_machine_->start_registration()) {
2304 VSOMEIP_WARNING_P << "(" << hex4(get_client()) << ") Non-Deregistered State Set (" << state_machine_->state() << "). Returning";
2305 return;
2306 }
2307 sender_ = ep_mgr_->create_routing_client();
2308 if (sender_) {
2309 // save to read even without acquiring the provider_mutex_, as a new
2310 // token is only generated during a reconnect or stop, start sequence,
2311 // which are serialized with the start of the sender.
2312 sender_->start(lc_count_.load());
2313 sender_debounce_active_ = true;
2314 sender_debounce_->start();
2315 } else {
2316 VSOMEIP_ERROR_P << "Failed due to a missing sender";
2317 }
2318}
2319
2320void routing_manager_client::debounce_restart_sender_done() {
2321 std::unique_lock its_sender_lock(sender_mutex_);

Callers

nothing calls this directly

Calls 7

hex4Function · 0.85
start_registrationMethod · 0.80
stateMethod · 0.80
create_routing_clientMethod · 0.80
stopMethod · 0.45
startMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected