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

Method init_routing_endpoint

implementation/routing/src/routing_manager_stub.cpp:682–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682void routing_manager_stub::init_routing_endpoint() {
683 auto ep_mgr = host_->get_endpoint_manager();
684 bool is_successful{true};
685
686 auto create_root = [&](auto& _root, transport_protocol_e _protocol) {
687 if (_root)
688 return; // already initialised, skip
689 if (!ep_mgr->create_routing_root(_root, _protocol, is_socket_activated_, shared_from_this())) {
690 is_successful = false;
691 }
692 };
693
694 if (routing_mode_ != routing_mode_e::TCP_ONLY) {
695 create_root(uds_root_, transport_protocol_e::UDS);
696 }
697 if (routing_mode_ != routing_mode_e::UDS_ONLY) {
698 create_root(tcp_root_, transport_protocol_e::TCP);
699 }
700
701 if (!is_successful) {
702 VSOMEIP_WARNING_P << "Routing root creating (partially) failed. Please check your configuration.";
703 }
704}
705void routing_manager_stub::on_offer_service(client_t _client, service_t _service, instance_t _instance, major_version_t _major,
706 minor_version_t _minor) {
707

Callers

nothing calls this directly

Calls 2

get_endpoint_managerMethod · 0.80
create_routing_rootMethod · 0.80

Tested by

no test coverage detected