| 118 | } |
| 119 | |
| 120 | void run() { |
| 121 | while (running_) { |
| 122 | { |
| 123 | std::unique_lock its_lock(mutex_); |
| 124 | condition_.wait(its_lock, [this] { return blocked_; }); |
| 125 | |
| 126 | if (is_available_) { |
| 127 | app_->send(request_); |
| 128 | std::cout << "Client/Session [" << std::hex << std::setfill('0') << std::setw(4) << request_->get_client() << "/" |
| 129 | << std::setw(4) << request_->get_session() << "] sent a request to Service [" << std::setw(4) |
| 130 | << request_->get_service() << "." << std::setw(4) << request_->get_instance() << "]" << std::endl; |
| 131 | blocked_ = false; |
| 132 | } |
| 133 | } |
| 134 | std::this_thread::sleep_for(std::chrono::milliseconds(cycle_)); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | private: |
| 139 | std::shared_ptr<vsomeip::application> app_; |
nothing calls this directly
no test coverage detected