17#ifndef IOX_POSH_RUNTIME_SERVICE_DISCOVERY_HPP
18#define IOX_POSH_RUNTIME_SERVICE_DISCOVERY_HPP
20#include "iceoryx_posh/iceoryx_posh_types.hpp"
21#include "iceoryx_posh/internal/roudi/service_registry.hpp"
22#include "iceoryx_posh/popo/subscriber.hpp"
23#include "iceoryx_posh/runtime/posh_runtime.hpp"
32enum class MessagingPattern
40enum class ServiceDiscoveryEvent : popo::EventEnumIdentifier
42 SERVICE_REGISTRY_CHANGED
62 void findService(
const cxx::optional<capro::IdString_t>& service,
63 const cxx::optional<capro::IdString_t>& instance,
64 const cxx::optional<capro::IdString_t>& event,
66 const popo::MessagingPattern pattern)
noexcept;
71 void enableEvent(
popo::TriggerHandle&& triggerHandle,
const ServiceDiscoveryEvent event)
noexcept;
72 void disableEvent(
const ServiceDiscoveryEvent event)
noexcept;
73 void invalidateTrigger(
const uint64_t uniqueTriggerId);
74 iox::popo::WaitSetIsConditionSatisfiedCallback
75 getCallbackForIsStateConditionSatisfied(
const popo::SubscriberState state);
79 std::unique_ptr<roudi::ServiceRegistry> m_serviceRegistry{
new iox::roudi::ServiceRegistry};
80 std::mutex m_serviceRegistryMutex;
83 {SERVICE_DISCOVERY_SERVICE_NAME, SERVICE_DISCOVERY_INSTANCE_NAME, SERVICE_DISCOVERY_EVENT_NAME},
84 {1U, 1U, iox::NodeName_t(
"Service Registry"),
true}};
class for the identification of a communication event including information on the service,...
Definition: service_description.hpp:81
Class which allows accessing private methods to friends of NotificationAttorney. Used for example by ...
Definition: notification_attorney.hpp:33
TriggerHandle is threadsafe without restrictions in a single process. Not qualified for inter process...
Definition: trigger_handle.hpp:38
Definition: service_discovery.hpp:45
void findService(const cxx::optional< capro::IdString_t > &service, const cxx::optional< capro::IdString_t > &instance, const cxx::optional< capro::IdString_t > &event, const cxx::function_ref< void(const capro::ServiceDescription &)> &callableForEach, const popo::MessagingPattern pattern) noexcept
Searches all services with the given messaging pattern that match the provided service description an...