17#ifndef IOX_POSH_ROUDI_MEMORY_ICEORYX_ROUDI_MEMORY_MANAGER_HPP
18#define IOX_POSH_ROUDI_MEMORY_ICEORYX_ROUDI_MEMORY_MANAGER_HPP
20#include "iceoryx_posh/roudi/memory/roudi_memory_interface.hpp"
22#include "iceoryx_hoofs/posix_wrapper/file_lock.hpp"
23#include "iceoryx_posh/internal/log/posh_logging.hpp"
24#include "iceoryx_posh/roudi/memory/default_roudi_memory.hpp"
25#include "iceoryx_posh/roudi/memory/roudi_memory_manager.hpp"
26#include "iceoryx_posh/roudi/port_pool.hpp"
55 cxx::optional<
PortPool*> portPool() noexcept override;
56 cxx::optional<mepoo::MemoryManager*> introspectionMemoryManager() const noexcept override;
57 cxx::optional<mepoo::SegmentManager<>*> segmentManager() const noexcept override;
62 posix::FileLock fileLock =
63 std::move(posix::FileLock::create(ROUDI_LOCK_NAME)
64 .or_else([](auto& error) {
65 if (error == posix::FileLockError::LOCKED_BY_OTHER_PROCESS)
67 LogFatal() <<
"Could not acquire lock, is RouDi still running?";
68 errorHandler(Error::kICEORYX_ROUDI_MEMORY_MANAGER__ROUDI_STILL_RUNNING,
70 iox::ErrorLevel::FATAL);
74 LogFatal() <<
"Error occurred while acquiring file lock named " << ROUDI_LOCK_NAME;
75 errorHandler(Error::kICEORYX_ROUDI_MEMORY_MANAGER__COULD_NOT_ACQUIRE_FILE_LOCK,
77 iox::ErrorLevel::FATAL);
82 PortPoolMemoryBlock m_portPoolBlock;
83 cxx::optional<PortPool> m_portPool;
Definition iceoryx_roudi_memory_manager.hpp:33
cxx::expected< RouDiMemoryManagerError > createAndAnnounceMemory() noexcept override
The RouDiMemoryManager calls the the MemoryProvider to create the memory and announce the availabilit...
virtual ~IceOryxRouDiMemoryManager() noexcept=default
The Destructor of the IceOryxRouDiMemoryManager also calls destroy on the registered MemoryProvider.
cxx::expected< RouDiMemoryManagerError > destroyMemory() noexcept override
The RouDiMemoryManager calls the the MemoryProvider to destroy the memory, which in turn prompts the ...
Definition port_pool.hpp:62
Creates the shared memory based on a provided configuration.
Definition posix_shm_memory_provider.hpp:36
Definition roudi_memory_interface.hpp:36
Definition roudi_memory_manager.hpp:53
RouDiMemoryManagerError
Definition roudi_memory_manager.hpp:39
Definition default_roudi_memory.hpp:28