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

Method on_state

implementation/runtime/src/application_impl.cpp:1369–1387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1367}
1368
1369void application_impl::on_state(state_type_e _state) {
1370
1371 bool has_state_handler(false);
1372 state_handler_t handler = nullptr;
1373 {
1374 std::scoped_lock its_lock{state_handler_mutex_};
1375 if (handler_) {
1376 has_state_handler = true;
1377 handler = handler_;
1378 }
1379 }
1380 if (has_state_handler) {
1381 std::scoped_lock its_lock{handlers_mutex_};
1382 auto its_sync_handler = std::make_shared<sync_handler>([handler, _state]() { handler(_state); });
1383 its_sync_handler->handler_type_ = handler_type_e::STATE;
1384 handlers_.push_back(its_sync_handler);
1385 dispatcher_condition_.notify_all();
1386 }
1387}
1388
1389availability_state_e application_impl::get_availability_state(const availability_state_t& _availability_state, service_t _service,
1390 instance_t _instance, major_version_t _major, minor_version_t _minor) const {

Callers 3

stopMethod · 0.45
reconnectMethod · 0.45
register_applicationMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected