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

Method set_client_state

implementation/routing/src/remote_subscription.cpp:145–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void remote_subscription::set_client_state(const client_t _client, remote_subscription_state_e _state) {
146 std::scoped_lock its_lock(mutex_);
147 auto found_item = clients_.find(_client);
148 if (found_item != clients_.end()) {
149 found_item->second.first = _state;
150 if (found_item->second.second == std::chrono::steady_clock::time_point()
151 && (_state == remote_subscription_state_e::SUBSCRIPTION_ACKED || _state == remote_subscription_state_e::SUBSCRIPTION_NACKED)) {
152 found_item->second.second = std::chrono::steady_clock::now() + std::chrono::seconds(ttl_);
153 }
154 }
155}
156
157void remote_subscription::set_all_client_states(remote_subscription_state_e _state) {
158 std::scoped_lock its_lock(mutex_);

Callers 3

on_subscribe_ackMethod · 0.80
on_subscribe_nackMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected