iceoryx_posh
2.0.5
Loading...
Searching...
No Matches
iceoryx_posh
mepoo
segment_config.hpp
1
// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
//
15
// SPDX-License-Identifier: Apache-2.0
16
#ifndef IOX_POSH_MEPOO_SEGMENT_CONFIG_HPP
17
#define IOX_POSH_MEPOO_SEGMENT_CONFIG_HPP
18
19
#include "iceoryx_posh/mepoo/memory_info.hpp"
20
#include "iceoryx_posh/mepoo/mepoo_config.hpp"
21
22
#include "iceoryx_hoofs/cxx/vector.hpp"
23
#include "iceoryx_hoofs/posix_wrapper/posix_access_rights.hpp"
24
#include "iceoryx_posh/iceoryx_posh_types.hpp"
25
26
namespace
iox
27
{
28
namespace
mepoo
29
{
30
struct
SegmentConfig
31
{
32
struct
SegmentEntry
33
{
34
SegmentEntry
(
const
posix::PosixGroup::string_t& readerGroup,
35
const
posix::PosixGroup::string_t& writerGroup,
36
const
MePooConfig
& memPoolConfig,
37
iox::mepoo::MemoryInfo
memoryInfo =
iox::mepoo::MemoryInfo
()) noexcept
38
: m_readerGroup(readerGroup)
39
, m_writerGroup(writerGroup)
40
, m_mempoolConfig(memPoolConfig)
41
, m_memoryInfo(memoryInfo)
42
43
{
44
}
45
46
posix::PosixGroup::string_t m_readerGroup;
47
posix::PosixGroup::string_t m_writerGroup;
48
MePooConfig
m_mempoolConfig;
49
iox::mepoo::MemoryInfo
m_memoryInfo;
50
};
51
52
cxx::vector<SegmentEntry, MAX_SHM_SEGMENTS> m_sharedMemorySegments;
53
55
SegmentConfig
&
setDefaults
() noexcept;
56
57
SegmentConfig
& optimize() noexcept;
58
};
59
}
// namespace mepoo
60
}
// namespace iox
61
62
#endif
// IOX_POSH_MEPOO_SEGMENT_CONFIG_HPP
iox::mepoo::MePooConfig
Definition
mepoo_config.hpp:33
iox::mepoo::MemoryInfo
Stores properties of the memory to be used when we distinguish between different types of memory on e...
Definition
memory_info.hpp:29
iox::mepoo::SegmentConfig::SegmentEntry
Definition
segment_config.hpp:33
iox::mepoo::SegmentConfig
Definition
segment_config.hpp:31
iox::mepoo::SegmentConfig::setDefaults
SegmentConfig & setDefaults() noexcept
Set Function for default values to be added in SegmentConfig.
Generated by
1.9.8