iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
service.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_SERVICE_HPP
14#define IOX2_SERVICE_HPP
15
16#include "iox2/bb/expected.hpp"
17#include "iox2/bb/optional.hpp"
20#include "iox2/config.hpp"
24#include "iox2/service_name.hpp"
25#include "iox2/service_type.hpp"
26
27namespace iox2 {
32template <ServiceType S>
33class Service {
34 public:
36 static auto does_exist(const ServiceName& service_name, ConfigView config, MessagingPattern messaging_pattern)
38
40 static auto details(const ServiceName& service_name, ConfigView config, MessagingPattern messaging_pattern)
42
44 static auto list(ConfigView config,
47};
48} // namespace iox2
49
50#endif
Non-owning view of a [Config].
Definition config.hpp:417
The name of a [Service].
static auto does_exist(const ServiceName &service_name, ConfigView config, MessagingPattern messaging_pattern) -> bb::Expected< bool, ServiceDetailsError >
Checks if a service under a given [ConfigView] does exist.
static auto list(ConfigView config, const iox2::bb::StaticFunction< CallbackProgression(ServiceDetails< S >)> &callback) -> bb::Expected< void, ServiceListError >
Returns a list of all services created under a given [config::Config].
static auto details(const ServiceName &service_name, ConfigView config, MessagingPattern messaging_pattern) -> bb::Expected< bb::Optional< ServiceDetails< S > >, ServiceDetailsError >
Acquires the [ServiceDetails] of a [Service].
iox2::bb::variation::Expected< T, E > Expected
Definition expected.hpp:22