| 79 | } |
| 80 | |
| 81 | void routing_manager_stub::start() { |
| 82 | |
| 83 | auto start_root = [](auto& root) { |
| 84 | if (root) { |
| 85 | root->set_id(VSOMEIP_ROUTING_CLIENT); |
| 86 | root->start(); |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | // Re-initialize only the roots required for the current mode (e.g. after stop/restart). |
| 91 | if ((routing_mode_ != routing_mode_e::TCP_ONLY && !uds_root_) || (routing_mode_ != routing_mode_e::UDS_ONLY && !tcp_root_)) { |
| 92 | init_routing_endpoint(); |
| 93 | } |
| 94 | |
| 95 | start_root(uds_root_); |
| 96 | start_root(tcp_root_); |
| 97 | } |
| 98 | |
| 99 | void routing_manager_stub::stop() { |
| 100 | auto stop_local_server = [](auto& local_server) { |