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
36 auto payload_offset() const -> uint64_t;
37
38 private:
39 template <ServiceType, typename, typename>
40 friend class Sample;
41 template <ServiceType, typename, typename>
42 friend class SampleMut;
43
44 explicit HeaderPublishSubscribe(iox2_publish_subscribe_header_h handle);
45 void drop();
46
47 iox2_publish_subscribe_header_h m_handle = nullptr;
48};
49} // namespace iox2
50
51#endif
Sample header used by [MessagingPattern::PublishSubscribe].
HeaderPublishSubscribe(const HeaderPublishSubscribe &)=delete
auto operator=(const HeaderPublishSubscribe &) -> HeaderPublishSubscribe &=delete
auto payload_offset() const -> uint64_t
Returns the payload offset.
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].