Class PortPoolMemoryBlock
Defined in File port_pool_memory_block.hpp
Inheritance Relationships
Base Type
public iox::roudi::MemoryBlock(Class MemoryBlock)
Class Documentation
-
class PortPoolMemoryBlock : public iox::roudi::MemoryBlock
Public Functions
-
PortPoolMemoryBlock() noexcept = default
-
~PortPoolMemoryBlock() noexcept
-
PortPoolMemoryBlock(const PortPoolMemoryBlock&) = delete
-
PortPoolMemoryBlock(PortPoolMemoryBlock&&) = delete
-
PortPoolMemoryBlock &operator=(const PortPoolMemoryBlock&) = delete
-
PortPoolMemoryBlock &operator=(PortPoolMemoryBlock&&) = delete
-
virtual uint64_t size() const noexcept override
This function provides the size of the required memory for the underlying data. It is needed for the MemoryProvider to calculate the total size of memory.
Note
The size of for all the ports
- Returns:
the required memory as multiple of the alignment
-
virtual uint64_t alignment() const noexcept override
This function provides the alignment of the memory for the underlying data. This information is needed for the MemoryProvider.
Note
The memory alignment for the ports
- Returns:
the alignment of the underlying data.
-
cxx::optional<PortPoolData*> portPool() const noexcept
This function enables the access to the PortPool.
- Returns:
an optional pointer to the underlying type, cxx::nullopt_t if value is not initialized
Protected Functions
-
virtual void onMemoryAvailable(cxx::not_null<void*> memory) noexcept override
This function is called once the memory is available and is therefore the earliest possibility to use the memory.
Note
This will create the ports at the location
memorypoints to- Parameters:
memory – [in] pointer to a valid memory block, the same one that the memory() member function would return
-
virtual void destroy() noexcept override
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor.
Note
This function can be called multiple times. Make sure that the implementation can handle this.
Note
This will clean up the ports
-
PortPoolMemoryBlock() noexcept = default