| 117 | } |
| 118 | |
| 119 | void routing_manager_client::start() { |
| 120 | state_machine_->target_running(); |
| 121 | ep_mgr_->start(); |
| 122 | { |
| 123 | std::scoped_lock its_receiver_lock(receiver_mutex_); |
| 124 | // NOTE: order matters, `create_local_server` must done first |
| 125 | // with TCP, following `create_local_client` will use whatever port is established there |
| 126 | if (routing_mode_ != routing_mode_e::UDS_ONLY && !tcp_receiver_) { |
| 127 | tcp_receiver_ = ep_mgr_->create_local_server(transport_protocol_e::TCP); |
| 128 | VSOMEIP_INFO << "Created local TCP server for routing manager client"; |
| 129 | } |
| 130 | } |
| 131 | std::unique_lock lock{sender_mutex_}; |
| 132 | restart_sender(lock); |
| 133 | { |
| 134 | std::scoped_lock its_lock{log_timer_mutex_}; |
| 135 | if (configuration_->get_version_log_interval(host_->get_name(), false) > 0) { |
| 136 | version_log_timer_.expires_after(std::chrono::seconds(0)); |
| 137 | version_log_timer_.async_wait([this](boost::system::error_code const& ec) { this->version_log_timer_cbk(ec); }); |
| 138 | } |
| 139 | if (configuration_->get_status_log_interval(host_->get_name(), false) > 0) { |
| 140 | status_log_timer_.expires_after(std::chrono::seconds(0)); |
| 141 | status_log_timer_.async_wait([this](boost::system::error_code const& ec) { this->status_log_timer_cbk(ec); }); |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | void routing_manager_client::status_log_timer_cbk(boost::system::error_code const& _error) { |
| 147 | if (!_error) { |
no test coverage detected