iceoryx_doc  1.0.1
ipc_interface_creator.hpp
1 // Copyright (c) 2019 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 
18 #ifndef IOX_POSH_RUNTIME_IPC_INTERFACE_CREATOR_HPP
19 #define IOX_POSH_RUNTIME_IPC_INTERFACE_CREATOR_HPP
20 
21 #include "iceoryx_posh/internal/runtime/ipc_interface_base.hpp"
22 #include "iceoryx_utils/posix_wrapper/file_lock.hpp"
23 
24 namespace iox
25 {
26 namespace runtime
27 {
31 {
32  public:
39  IpcInterfaceCreator(const RuntimeName_t& name,
40  const uint64_t maxMessages = ROUDI_MAX_MESSAGES,
41  const uint64_t messageSize = ROUDI_MESSAGE_SIZE) noexcept;
42 
47  IpcInterfaceCreator& operator=(const IpcInterfaceCreator&) = delete;
48 
51  IpcInterfaceCreator& operator=(IpcInterfaceCreator&&) = delete;
52 
53  private:
54  friend class IpcRuntimeInterface;
55  void cleanupResource();
56  posix::FileLock m_fileLock;
57 };
58 
59 } // namespace runtime
60 } // namespace iox
61 
62 #endif // IOX_POSH_RUNTIME_IPC_INTERFACE_CREATOR_HPP
Base-Class should never be used by the end-user. Handles the common properties and methods for the ch...
Definition: ipc_interface_base.hpp:127
Class for creating and handling a IPC channel.
Definition: ipc_interface_creator.hpp:31
IpcInterfaceCreator(const RuntimeName_t &name, const uint64_t maxMessages=ROUDI_MAX_MESSAGES, const uint64_t messageSize=ROUDI_MESSAGE_SIZE) noexcept
Constructs a IpcInterfaceCreator and opens a new IPC channel. If it fails isInitialized will return f...
IpcInterfaceCreator(IpcInterfaceCreator &&)=delete
Not needed therefore deleted.
IpcInterfaceCreator(const IpcInterfaceCreator &)=delete
The copy constructor and assignment operator is deleted since this class manages a resource (IPC chan...
Definition: ipc_runtime_interface.hpp:29
Definition: service_description.hpp:29