iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
port_factory_event.hpp
Go to the documentation of this file.
1// Copyright (c) 2024 Contributors to the Eclipse Foundation
2//
3// See the NOTICE file(s) distributed with this work for additional
4// information regarding copyright ownership.
5//
6// This program and the accompanying materials are made available under the
7// terms of the Apache Software License 2.0 which is available at
8// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
9// which is available at https://opensource.org/licenses/MIT.
10//
11// SPDX-License-Identifier: Apache-2.0 OR MIT
12
13#ifndef IOX2_PORTFACTORY_EVENT_HPP
14#define IOX2_PORTFACTORY_EVENT_HPP
15
17#include "iox2/bb/expected.hpp"
24#include "iox2/node_state.hpp"
27#include "iox2/service_hash.hpp"
28#include "iox2/service_name.hpp"
29#include "iox2/service_type.hpp"
31
32namespace iox2 {
34template <ServiceType S>
36 public:
38 auto operator=(PortFactoryEvent&&) noexcept -> PortFactoryEvent&;
40
42 auto operator=(const PortFactoryEvent&) -> PortFactoryEvent& = delete;
43
45 auto name() const -> ServiceNameView;
46
48 auto service_hash() const -> ServiceHash;
49
52
56
60
65 auto nodes(const iox2::bb::StaticFunction<CallbackProgression(NodeState<S>)>& callback) const
66 -> bb::Expected<void, NodeListFailure>;
67
70
73
79
87 auto blocking_cleanup_dead_nodes(iox2::bb::Duration timeout) const -> CleanupState;
88
89 private:
90 template <ServiceType>
91 friend class ServiceBuilderEvent;
92
93 explicit PortFactoryEvent(iox2_port_factory_event_h handle);
94 void drop() noexcept;
95
96 iox2_port_factory_event_h m_handle = nullptr;
97};
98} // namespace iox2
99
100#endif
Describes the state of a [Node].
Represents the port factory of a [Service] with [MessagingPattern::Event].
auto nodes(const iox2::bb::StaticFunction< CallbackProgression(NodeState< S >)> &callback) const -> bb::Expected< void, NodeListFailure >
auto name() const -> ServiceNameView
Returns the [ServiceName] of the service.
auto dynamic_config() const -> DynamicConfigEvent
auto try_cleanup_dead_nodes() const -> CleanupState
auto notifier_builder() const -> PortFactoryNotifier< S >
Returns a [PortFactoryNotifier] to create a new [Notifier] port.
auto service_hash() const -> ServiceHash
Returns the [ServiceHash] of the [Service].
auto listener_builder() const -> PortFactoryListener< S >
Returns a [PortFactoryListener] to create a new [Listener] port.
auto attributes() const -> AttributeSetView
Returns the attributes defined in the [Service].
PortFactoryEvent(PortFactoryEvent &&) noexcept
auto static_config() const -> StaticConfigEvent
auto blocking_cleanup_dead_nodes(iox2::bb::Duration timeout) const -> CleanupState
Builder to create new [MessagingPattern::Event] based [Service]s.
Represents the unique if of a [Service].
Non-owning view of a [ServiceName].
NodeListFailure
All failures that can occur in [Node::list()].