Skip to content

iox::roudi::PortPool🔗

Public Functions🔗

Name
PortPool(PortPoolData & portPoolData)
virtual ~PortPool() =default
cxx::vector< PublisherPortRouDiType::MemberType_t *, MAX_PUBLISHERS > getPublisherPortDataList()
cxx::vector< SubscriberPortType::MemberType_t *, MAX_SUBSCRIBERS > getSubscriberPortDataList()
cxx::vector< popo::ClientPortData *, MAX_CLIENTS > getClientPortDataList()
cxx::vector< popo::ServerPortData *, MAX_SERVERS > getServerPortDataList()
cxx::vector< popo::InterfacePortData *, MAX_INTERFACE_NUMBER > getInterfacePortDataList()
cxx::vector< runtime::NodeData *, MAX_NODE_NUMBER > getNodeDataList()
cxx::vector< popo::ConditionVariableData *, MAX_NUMBER_OF_CONDITION_VARIABLES > getConditionVariableDataList()
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())
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())
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)
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)
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())
Adds a ClientPortData to the internal pool and returns a pointer for further usage.
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())
Adds a ServerPortData to the internal pool and returns a pointer for further usage.
cxx::expected< popo::InterfacePortData *, PortPoolError > addInterfacePort(const RuntimeName_t & runtimeName, const capro::Interfaces interface)
cxx::expected< runtime::NodeData *, PortPoolError > addNodeData(const RuntimeName_t & runtimeName, const NodeName_t & nodeName, const uint64_t nodeDeviceIdentifier)
cxx::expected< popo::ConditionVariableData *, PortPoolError > addConditionVariableData(const RuntimeName_t & runtimeName)
void removePublisherPort(const PublisherPortRouDiType::MemberType_t *const portData)
Removes a PublisherPortData from the internal pool.
void removeSubscriberPort(const SubscriberPortType::MemberType_t *const portData)
Removes a SubscriberPortData from the internal pool.
void removeClientPort(const popo::ClientPortData *const portData)
Removes a ClientPortData from the internal pool.
void removeServerPort(const popo::ServerPortData *const portData)
Removes a ServerPortData from the internal pool.
void removeInterfacePort(const popo::InterfacePortData *const portData)
Removes a InterfacePortData from the internal pool.
void removeNodeData(const runtime::NodeData *const nodeData)
Removes a NodeData from the internal pool.
void removeConditionVariableData(const popo::ConditionVariableData *const conditionVariableData)
Removes a ConditionVariableData from the internal pool.

Public Functions Documentation🔗

function PortPool🔗

PortPool(
    PortPoolData & portPoolData
)

function ~PortPool🔗

virtual ~PortPool() =default

function getPublisherPortDataList🔗

cxx::vector< PublisherPortRouDiType::MemberType_t *, MAX_PUBLISHERS > getPublisherPortDataList()

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

function getSubscriberPortDataList🔗

cxx::vector< SubscriberPortType::MemberType_t *, MAX_SUBSCRIBERS > getSubscriberPortDataList()

function getClientPortDataList🔗

cxx::vector< popo::ClientPortData *, MAX_CLIENTS > getClientPortDataList()

function getServerPortDataList🔗

cxx::vector< popo::ServerPortData *, MAX_SERVERS > getServerPortDataList()

function getInterfacePortDataList🔗

cxx::vector< popo::InterfacePortData *, MAX_INTERFACE_NUMBER > getInterfacePortDataList()

function getNodeDataList🔗

cxx::vector< runtime::NodeData *, MAX_NODE_NUMBER > getNodeDataList()

function getConditionVariableDataList🔗

cxx::vector< popo::ConditionVariableData *, MAX_NUMBER_OF_CONDITION_VARIABLES > getConditionVariableDataList()

function addPublisherPort🔗

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()
)

function addSubscriberPort🔗

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()
)

function constructSubscriber🔗

template <typename T ,
std::enable_if_t< std::is_same< T, iox::build::ManyToManyPolicy >::value > *  =nullptr>
inline iox::popo::SubscriberPortData * constructSubscriber(
    const capro::ServiceDescription & serviceDescription,
    const RuntimeName_t & runtimeName,
    const popo::SubscriberOptions & subscriberOptions,
    const mepoo::MemoryInfo & memoryInfo
)

function constructSubscriber🔗

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
)

function addClientPort🔗

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()
)

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

Parameters:

  • serviceDescription for the new client port
  • memoryManager to acquire chunks for the requests
  • runtimeName of the runtime the new client port belongs to
  • clientOptions for the new client port
  • memoryInfo for the new client port

Return: on success a pointer to a ClientPortData; on error a PortPoolError

function addServerPort🔗

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()
)

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

Parameters:

  • serviceDescription for the new server port
  • memoryManager to acquire chunks for the responses
  • runtimeName of the runtime the new server port belongs to
  • serverOptions for the new server port
  • memoryInfo for the new server port

Return: on success a pointer to a ServerPortData; on error a PortPoolError

function addInterfacePort🔗

cxx::expected< popo::InterfacePortData *, PortPoolError > addInterfacePort(
    const RuntimeName_t & runtimeName,
    const capro::Interfaces interface
)

function addNodeData🔗

cxx::expected< runtime::NodeData *, PortPoolError > addNodeData(
    const RuntimeName_t & runtimeName,
    const NodeName_t & nodeName,
    const uint64_t nodeDeviceIdentifier
)

function addConditionVariableData🔗

cxx::expected< popo::ConditionVariableData *, PortPoolError > addConditionVariableData(
    const RuntimeName_t & runtimeName
)

function removePublisherPort🔗

void removePublisherPort(
    const PublisherPortRouDiType::MemberType_t *const portData
)

Removes a PublisherPortData from the internal pool.

Parameters:

Note: after this call the provided PublisherPortData is no longer available for usage

function removeSubscriberPort🔗

void removeSubscriberPort(
    const SubscriberPortType::MemberType_t *const portData
)

Removes a SubscriberPortData from the internal pool.

Parameters:

  • portData is a pointer to the SubscriberPortData to be removed

Note: after this call the provided SubscriberPortData is no longer available for usage

function removeClientPort🔗

void removeClientPort(
    const popo::ClientPortData *const portData
)

Removes a ClientPortData from the internal pool.

Parameters:

  • portData is a pointer to the ClientPortData to be removed

Note: after this call the provided ClientPortData is no longer available for usage

function removeServerPort🔗

void removeServerPort(
    const popo::ServerPortData *const portData
)

Removes a ServerPortData from the internal pool.

Parameters:

  • portData is a pointer to the ServerPortData to be removed

Note: after this call the provided ServerPortData is no longer available for usage

function removeInterfacePort🔗

void removeInterfacePort(
    const popo::InterfacePortData *const portData
)

Removes a InterfacePortData from the internal pool.

Parameters:

  • portData is a pointer to the InterfacePortData to be removed

Note: after this call the provided InterfacePortData is no longer available for usage

function removeNodeData🔗

void removeNodeData(
    const runtime::NodeData *const nodeData
)

Removes a NodeData from the internal pool.

Parameters:

  • nodeData is a pointer to the NodeData to be removed

Note: after this call the provided NodeData is no longer available for usage

function removeConditionVariableData🔗

void removeConditionVariableData(
    const popo::ConditionVariableData *const conditionVariableData
)

Removes a ConditionVariableData from the internal pool.

Parameters:

  • conditionVariableData is a pointer to the ConditionVariableData to be removed

Note: after this call the provided ConditionVariableData is no longer available for usage


Updated on 17 March 2022 at 12:15:57 CET