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

Method run

examples/request-sample.cpp:120–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
138private:
139 std::shared_ptr<vsomeip::application> app_;

Callers

nothing calls this directly

Calls 6

waitMethod · 0.45
sendMethod · 0.45
get_clientMethod · 0.45
get_sessionMethod · 0.45
get_serviceMethod · 0.45
get_instanceMethod · 0.45

Tested by

no test coverage detected