iceoryx_posh 2.0.3
Public Member Functions | List of all members
iox::roudi::PortPool Class Reference

Public Member Functions

 PortPool (PortPoolData &portPoolData) noexcept
 
cxx::vector< PublisherPortRouDiType::MemberType_t *, MAX_PUBLISHERS > getPublisherPortDataList () noexcept
 
cxx::vector< SubscriberPortType::MemberType_t *, MAX_SUBSCRIBERS > getSubscriberPortDataList () noexcept
 
cxx::vector< popo::ClientPortData *, MAX_CLIENTS > getClientPortDataList () noexcept
 
cxx::vector< popo::ServerPortData *, MAX_SERVERS > getServerPortDataList () noexcept
 
cxx::vector< popo::InterfacePortData *, MAX_INTERFACE_NUMBER > getInterfacePortDataList () noexcept
 
cxx::vector< runtime::NodeData *, MAX_NODE_NUMBER > getNodeDataList () noexcept
 
cxx::vector< popo::ConditionVariableData *, MAX_NUMBER_OF_CONDITION_VARIABLES > getConditionVariableDataList () noexcept
 
cxx::expected< PublisherPortRouDiType::MemberType_t *, PortPoolError > addPublisherPort (const capro::ServiceDescription &serviceDescription, mepoo::MemoryManager *const memoryManager, const RuntimeName_t &runtimeName, const popo::PublisherOptions &publisherOptions, const mepoo::MemoryInfo &memoryInfo=mepoo::MemoryInfo()) noexcept
 
cxx::expected< SubscriberPortType::MemberType_t *, PortPoolError > addSubscriberPort (const capro::ServiceDescription &serviceDescription, const RuntimeName_t &runtimeName, const popo::SubscriberOptions &subscriberOptions, const mepoo::MemoryInfo &memoryInfo=mepoo::MemoryInfo()) noexcept
 
template<typename T , std::enable_if_t< std::is_same< T, iox::build::ManyToManyPolicy >::value > * = nullptr>
iox::popo::SubscriberPortData * constructSubscriber (const capro::ServiceDescription &serviceDescription, const RuntimeName_t &runtimeName, const popo::SubscriberOptions &subscriberOptions, const mepoo::MemoryInfo &memoryInfo) noexcept
 
template<typename T , std::enable_if_t< std::is_same< T, iox::build::OneToManyPolicy >::value > * = nullptr>
iox::popo::SubscriberPortData * constructSubscriber (const capro::ServiceDescription &serviceDescription, const RuntimeName_t &runtimeName, const popo::SubscriberOptions &subscriberOptions, const mepoo::MemoryInfo &memoryInfo) noexcept
 
cxx::expected< popo::ClientPortData *, PortPoolError > addClientPort (const capro::ServiceDescription &serviceDescription, mepoo::MemoryManager *const memoryManager, const RuntimeName_t &runtimeName, const popo::ClientOptions &clientOptions, const mepoo::MemoryInfo &memoryInfo=mepoo::MemoryInfo()) noexcept
 Adds a ClientPortData to the internal pool and returns a pointer for further usage. More...
 
cxx::expected< popo::ServerPortData *, PortPoolError > addServerPort (const capro::ServiceDescription &serviceDescription, mepoo::MemoryManager *const memoryManager, const RuntimeName_t &runtimeName, const popo::ServerOptions &serverOptions, const mepoo::MemoryInfo &memoryInfo=mepoo::MemoryInfo()) noexcept
 Adds a ServerPortData to the internal pool and returns a pointer for further usage. More...
 
cxx::expected< popo::InterfacePortData *, PortPoolError > addInterfacePort (const RuntimeName_t &runtimeName, const capro::Interfaces interface) noexcept
 
cxx::expected< runtime::NodeData *, PortPoolError > addNodeData (const RuntimeName_t &runtimeName, const NodeName_t &nodeName, const uint64_t nodeDeviceIdentifier) noexcept
 
cxx::expected< popo::ConditionVariableData *, PortPoolError > addConditionVariableData (const RuntimeName_t &runtimeName) noexcept
 
void removePublisherPort (const PublisherPortRouDiType::MemberType_t *const portData) noexcept
 Removes a PublisherPortData from the internal pool. More...
 
void removeSubscriberPort (const SubscriberPortType::MemberType_t *const portData) noexcept
 Removes a SubscriberPortData from the internal pool. More...
 
void removeClientPort (const popo::ClientPortData *const portData) noexcept
 Removes a ClientPortData from the internal pool. More...
 
void removeServerPort (const popo::ServerPortData *const portData) noexcept
 Removes a ServerPortData from the internal pool. More...
 
void removeInterfacePort (const popo::InterfacePortData *const portData) noexcept
 Removes a InterfacePortData from the internal pool. More...
 
void removeNodeData (const runtime::NodeData *const nodeData) noexcept
 Removes a NodeData from the internal pool. More...
 
void removeConditionVariableData (const popo::ConditionVariableData *const conditionVariableData) noexcept
 Removes a ConditionVariableData from the internal pool. More...
 

Member Function Documentation

◆ addClientPort()

cxx::expected< popo::ClientPortData *, PortPoolError > iox::roudi::PortPool::addClientPort ( const capro::ServiceDescription serviceDescription,
mepoo::MemoryManager *const  memoryManager,
const RuntimeName_t &  runtimeName,
const popo::ClientOptions clientOptions,
const mepoo::MemoryInfo memoryInfo = mepoo::MemoryInfo() 
)
noexcept

Adds a ClientPortData to the internal pool and returns a pointer for further usage.

Parameters
[in]serviceDescriptionfor the new client port
[in]memoryManagerto acquire chunks for the requests
[in]runtimeNameof the runtime the new client port belongs to
[in]clientOptionsfor the new client port
[in]memoryInfofor the new client port
Returns
on success a pointer to a ClientPortData; on error a PortPoolError

◆ addServerPort()

cxx::expected< popo::ServerPortData *, PortPoolError > iox::roudi::PortPool::addServerPort ( const capro::ServiceDescription serviceDescription,
mepoo::MemoryManager *const  memoryManager,
const RuntimeName_t &  runtimeName,
const popo::ServerOptions serverOptions,
const mepoo::MemoryInfo memoryInfo = mepoo::MemoryInfo() 
)
noexcept

Adds a ServerPortData to the internal pool and returns a pointer for further usage.

Parameters
[in]serviceDescriptionfor the new server port
[in]memoryManagerto acquire chunks for the responses
[in]runtimeNameof the runtime the new server port belongs to
[in]serverOptionsfor the new server port
[in]memoryInfofor the new server port
Returns
on success a pointer to a ServerPortData; on error a PortPoolError

◆ getPublisherPortDataList()

cxx::vector< PublisherPortRouDiType::MemberType_t *, MAX_PUBLISHERS > iox::roudi::PortPool::getPublisherPortDataList ( )
noexcept
Todo:
don't create the vector with each call but only when the data really change there could be a member "cxx::vector<popo::PublisherPortData* m_publisherPorts;" and publisherPorts() would just update this member if the publisher ports actually changed

◆ removeClientPort()

void iox::roudi::PortPool::removeClientPort ( const popo::ClientPortData *const  portData)
noexcept

Removes a ClientPortData from the internal pool.

Parameters
[in]portDatais a pointer to the ClientPortData to be removed
Note
after this call the provided ClientPortData is no longer available for usage

◆ removeConditionVariableData()

void iox::roudi::PortPool::removeConditionVariableData ( const popo::ConditionVariableData *const  conditionVariableData)
noexcept

Removes a ConditionVariableData from the internal pool.

Parameters
[in]conditionVariableDatais a pointer to the ConditionVariableData to be removed
Note
after this call the provided ConditionVariableData is no longer available for usage

◆ removeInterfacePort()

void iox::roudi::PortPool::removeInterfacePort ( const popo::InterfacePortData *const  portData)
noexcept

Removes a InterfacePortData from the internal pool.

Parameters
[in]portDatais a pointer to the InterfacePortData to be removed
Note
after this call the provided InterfacePortData is no longer available for usage

◆ removeNodeData()

void iox::roudi::PortPool::removeNodeData ( const runtime::NodeData *const  nodeData)
noexcept

Removes a NodeData from the internal pool.

Parameters
[in]nodeDatais a pointer to the NodeData to be removed
Note
after this call the provided NodeData is no longer available for usage

◆ removePublisherPort()

void iox::roudi::PortPool::removePublisherPort ( const PublisherPortRouDiType::MemberType_t *const  portData)
noexcept

Removes a PublisherPortData from the internal pool.

Parameters
[in]portDatais a pointer to the PublisherPortData to be removed
Note
after this call the provided PublisherPortData is no longer available for usage

◆ removeServerPort()

void iox::roudi::PortPool::removeServerPort ( const popo::ServerPortData *const  portData)
noexcept

Removes a ServerPortData from the internal pool.

Parameters
[in]portDatais a pointer to the ServerPortData to be removed
Note
after this call the provided ServerPortData is no longer available for usage

◆ removeSubscriberPort()

void iox::roudi::PortPool::removeSubscriberPort ( const SubscriberPortType::MemberType_t *const  portData)
noexcept

Removes a SubscriberPortData from the internal pool.

Parameters
[in]portDatais a pointer to the SubscriberPortData to be removed
Note
after this call the provided SubscriberPortData is no longer available for usage

The documentation for this class was generated from the following files: