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

Method subscribe

implementation/runtime/src/application_impl.cpp:625–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625void application_impl::subscribe(service_t _service, instance_t _instance, eventgroup_t _eventgroup, major_version_t _major,
626 event_t _event) {
627 if (routing_) {
628 bool send_back_cached(false);
629 bool send_back_cached_group(false);
630 check_send_back_cached_event(_service, _instance, _event, _eventgroup, &send_back_cached, &send_back_cached_group);
631
632 if (send_back_cached) {
633 send_back_cached_event(_service, _instance, _event);
634 } else if (send_back_cached_group) {
635 send_back_cached_eventgroup(_service, _instance, _eventgroup);
636 }
637
638 if (check_subscription_state(_service, _instance, _eventgroup, _event)) {
639 // Get configured, application-specific filter
640 auto its_filter{configuration_->get_debounce(get_name(), _service, _instance, _event)};
641 routing_->subscribe(client_, _service, _instance, _eventgroup, _major, _event, its_filter);
642 }
643 }
644}
645
646void application_impl::unsubscribe(service_t _service, instance_t _instance, eventgroup_t _eventgroup) {
647 remove_subscription(_service, _instance, _eventgroup, ANY_EVENT);

Callers 2

initMethod · 0.45

Calls 1

get_debounceMethod · 0.80

Tested by

no test coverage detected