iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
header_publish_subscribe.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_HEADER_PUBLISH_SUBSCRIBE_HPP
14#define IOX2_HEADER_PUBLISH_SUBSCRIBE_HPP
15
17#include "unique_port_id.hpp"
18
19namespace iox2 {
22 public:
28
31
33 auto number_of_elements() const -> uint64_t;
34
35 private:
36 template <ServiceType, typename, typename>
37 friend class Sample;
38 template <ServiceType, typename, typename>
39 friend class SampleMut;
40
41 explicit HeaderPublishSubscribe(iox2_publish_subscribe_header_h handle);
42 void drop();
43
44 iox2_publish_subscribe_header_h m_handle = nullptr;
45};
46} // namespace iox2
47
48#endif
Sample header used by [MessagingPattern::PublishSubscribe].
HeaderPublishSubscribe(const HeaderPublishSubscribe &)=delete
auto operator=(const HeaderPublishSubscribe &) -> HeaderPublishSubscribe &=delete
auto number_of_elements() const -> uint64_t
Returns the number of [Payload] elements in the received [Sample].
HeaderPublishSubscribe(HeaderPublishSubscribe &&rhs) noexcept
auto operator=(HeaderPublishSubscribe &&rhs) noexcept -> HeaderPublishSubscribe &
auto publisher_id() const -> UniquePublisherId
Returns the [UniquePublisherId] of the source [Publisher].
The system-wide unique id of a [Publisher].