iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
header_request_response.hpp
Go to the documentation of this file.
1// Copyright (c) 2025 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_REQUEST_RESPONSE_HPP
14#define IOX2_HEADER_REQUEST_RESPONSE_HPP
15
17
18namespace iox2 {
21 public:
22 RequestHeader(const RequestHeader&) = delete;
24 auto operator=(const RequestHeader&) -> RequestHeader& = delete;
25 auto operator=(RequestHeader&& rhs) noexcept -> RequestHeader&;
27
30
32 auto number_of_elements() const -> uint64_t;
33
35 auto payload_offset() const -> uint64_t;
36
37 private:
38 template <ServiceType, typename, typename, typename, typename>
39 friend class ActiveRequest;
40 template <ServiceType, typename, typename, typename, typename>
41 friend class PendingResponse;
42 template <ServiceType, typename, typename, typename, typename>
43 friend class RequestMut;
44
45 explicit RequestHeader(iox2_request_header_h handle);
46 void drop();
47
48 iox2_request_header_h m_handle = nullptr;
49};
50
53 public:
56 auto operator=(const ResponseHeader&) -> ResponseHeader& = delete;
57 auto operator=(ResponseHeader&& rhs) noexcept -> ResponseHeader&;
59
62
64 auto number_of_elements() const -> uint64_t;
65
67 auto payload_offset() const -> uint64_t;
68
69 private:
70 template <ServiceType, typename, typename>
71 friend class Response;
72 template <ServiceType, typename, typename>
73 friend class ResponseMut;
74
75 explicit ResponseHeader(iox2_response_header_h handle);
76 void drop();
77
78 iox2_response_header_h m_handle = nullptr;
79};
80} // namespace iox2
81#endif
Request header used by [MessagingPattern::RequestResponse].
RequestHeader(const RequestHeader &)=delete
auto client_port_id() -> UniqueClientId
Returns the [UniqueClientId] of the source [Client].
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 [Request].
RequestHeader(RequestHeader &&rhs) noexcept
auto operator=(RequestHeader &&rhs) noexcept -> RequestHeader &
auto operator=(const RequestHeader &) -> RequestHeader &=delete
Response header used by [MessagingPattern::RequestResponse].
ResponseHeader(ResponseHeader &&rhs) noexcept
auto server_port_id() -> UniqueServerId
Returns the [UniqueServerId] of the source [Server].
auto operator=(const ResponseHeader &) -> ResponseHeader &=delete
auto operator=(ResponseHeader &&rhs) noexcept -> ResponseHeader &
auto number_of_elements() const -> uint64_t
Returns the number of [Payload] elements in the received [Response].
ResponseHeader(const ResponseHeader &)=delete
The system-wide unique id of a [Client].
The system-wide unique id of a [Server].