iceoryx_doc  1.0.1
chunk_receiver_data.hpp
1 // Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
2 // Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 // SPDX-License-Identifier: Apache-2.0
17 #ifndef IOX_POSH_POPO_BUILDING_BLOCKS_CHUNK_RECEIVER_DATA_HPP
18 #define IOX_POSH_POPO_BUILDING_BLOCKS_CHUNK_RECEIVER_DATA_HPP
19 
20 #include "iceoryx_posh/iceoryx_posh_types.hpp"
21 #include "iceoryx_posh/internal/mepoo/shared_chunk.hpp"
22 #include "iceoryx_posh/internal/popo/building_blocks/chunk_queue_data.hpp"
23 #include "iceoryx_posh/internal/popo/used_chunk_list.hpp"
24 #include "iceoryx_posh/mepoo/memory_info.hpp"
25 #include "iceoryx_utils/cxx/variant_queue.hpp"
26 
27 namespace iox
28 {
29 namespace popo
30 {
31 template <uint32_t MaxChunksHeldSimultaneously, typename ChunkQueueDataType>
32 struct ChunkReceiverData : public ChunkQueueDataType
33 {
34  explicit ChunkReceiverData(const cxx::VariantQueueTypes queueType,
35  const QueueFullPolicy queueFullPolicy,
36  const mepoo::MemoryInfo& memoryInfo = mepoo::MemoryInfo()) noexcept;
37 
38  using ChunkQueueData_t = ChunkQueueDataType;
39 
40  mepoo::MemoryInfo m_memoryInfo;
41 
45  static constexpr uint32_t MAX_CHUNKS_IN_USE = MaxChunksHeldSimultaneously + 1U;
47 };
48 
49 } // namespace popo
50 } // namespace iox
51 
52 #include "iceoryx_posh/internal/popo/building_blocks/chunk_receiver_data.inl"
53 
54 #endif // IOX_POSH_POPO_BUILDING_BLOCKS_CHUNK_RECEIVER_DATA_HPP
Definition: service_description.hpp:29
Stores properties of the memory to be used when we distinguish between different types of memory on e...
Definition: memory_info.hpp:28
Definition: chunk_receiver_data.hpp:33
static constexpr uint32_t MAX_CHUNKS_IN_USE
Definition: chunk_receiver_data.hpp:45