The runtime that is needed for each application to communicate with the RouDi daemon.
More...
#include <iceoryx_posh/runtime/posh_runtime.hpp>
|
| PoshRuntime (const PoshRuntime &)=delete |
|
PoshRuntime & | operator= (const PoshRuntime &)=delete |
|
| PoshRuntime (PoshRuntime &&)=delete |
|
PoshRuntime & | operator= (PoshRuntime &&)=delete |
|
RuntimeName_t | getInstanceName () const noexcept |
| get the name that was used to register with RouDi
|
|
void | shutdown () noexcept |
| initiates the shutdown of the runtime to unblock all potentially blocking publisher with the ConsumerTooSlowPolicy::WAIT_FOR_CONSUMER option set
|
|
virtual PublisherPortUserType::MemberType_t * | getMiddlewarePublisher (const capro::ServiceDescription &service, const popo::PublisherOptions &publisherOptions={}, const PortConfigInfo &portConfigInfo={}) noexcept=0 |
| request the RouDi daemon to create a publisher port
|
|
virtual SubscriberPortUserType::MemberType_t * | getMiddlewareSubscriber (const capro::ServiceDescription &service, const popo::SubscriberOptions &subscriberOptions={}, const PortConfigInfo &portConfigInfo={}) noexcept=0 |
| request the RouDi daemon to create a subscriber port
|
|
virtual popo::ClientPortData * | getMiddlewareClient (const capro::ServiceDescription &service, const popo::ClientOptions &clientOptions={}, const PortConfigInfo &portConfigInfo=PortConfigInfo()) noexcept=0 |
| request the RouDi daemon to create a client port
|
|
virtual popo::ServerPortData * | getMiddlewareServer (const capro::ServiceDescription &service, const popo::ServerOptions &serverOptions={}, const PortConfigInfo &portConfigInfo=PortConfigInfo()) noexcept=0 |
| request the RouDi daemon to create a server port
|
|
virtual popo::InterfacePortData * | getMiddlewareInterface (const capro::Interfaces interface, const NodeName_t &nodeName={}) noexcept=0 |
| request the RouDi daemon to create an interface port
|
|
virtual popo::ConditionVariableData * | getMiddlewareConditionVariable () noexcept=0 |
| request the RouDi daemon to create a condition variable
|
|
virtual NodeData * | createNode (const NodeProperty &nodeProperty) noexcept=0 |
| request the RouDi daemon to create a node
|
|
virtual bool | sendRequestToRouDi (const IpcMessage &msg, IpcMessage &answer) noexcept=0 |
| send a request to the RouDi daemon and get the response currently each request is followed by a response
|
|
|
using | factory_t = PoshRuntime &(*)(cxx::optional< const RuntimeName_t * >) |
|
|
| PoshRuntime (cxx::optional< const RuntimeName_t * > name) noexcept |
|
const RuntimeName_t & | verifyInstanceName (cxx::optional< const RuntimeName_t * > name) noexcept |
| checks the given application name for certain constraints like length or if is empty
|
|
|
static PoshRuntime & | defaultRuntimeFactory (cxx::optional< const RuntimeName_t * > name) noexcept |
|
static factory_t & | getRuntimeFactory () noexcept |
| gets current runtime factory. If the runtime factory is not yet initialized it is set to defaultRuntimeFactory.
|
|
static void | setRuntimeFactory (const factory_t &factory) noexcept |
| sets runtime factory, terminates if given factory is empty
|
|
static PoshRuntime & | getInstance (cxx::optional< const RuntimeName_t * > name) noexcept |
| creates the runtime or returns the already existing one -> Singleton
|
|
|
const RuntimeName_t | m_appName |
|
std::atomic< bool > | m_shutdownRequested {false} |
|
|
class | roudi::RuntimeTestInterface |
|
The runtime that is needed for each application to communicate with the RouDi daemon.
◆ createNode()
virtual NodeData * iox::runtime::PoshRuntime::createNode |
( |
const NodeProperty & |
nodeProperty | ) |
|
|
pure virtualnoexcept |
request the RouDi daemon to create a node
- Parameters
-
[in] | nodeProperty | class which contains all properties which the node should have |
- Returns
- pointer to the data of the node
◆ getInstance() [1/2]
static PoshRuntime & iox::runtime::PoshRuntime::getInstance |
( |
| ) |
|
|
staticnoexcept |
returns active runtime
- Returns
- active runtime
◆ getInstance() [2/2]
static PoshRuntime & iox::runtime::PoshRuntime::getInstance |
( |
cxx::optional< const RuntimeName_t * > |
name | ) |
|
|
staticprotectednoexcept |
creates the runtime or returns the already existing one -> Singleton
- Parameters
-
[in] | name | optional containing the name used for registering with the RouDi daemon |
- Returns
- active runtime
◆ getInstanceName()
RuntimeName_t iox::runtime::PoshRuntime::getInstanceName |
( |
| ) |
const |
|
noexcept |
get the name that was used to register with RouDi
- Returns
- name of the registered application
◆ getMiddlewareClient()
request the RouDi daemon to create a client port
- Parameters
-
[in] | serviceDescription | service description for the new client port |
[in] | clientOptions | like the queue capacity and queue full policy by a client |
[in] | portConfigInfo | configuration information for the port (what type of port is requested, device where its payload memory is located on etc.) |
- Returns
- pointer to a created client port data
◆ getMiddlewareConditionVariable()
request the RouDi daemon to create a condition variable
- Returns
- pointer to a created condition variable data
◆ getMiddlewareInterface()
virtual popo::InterfacePortData * iox::runtime::PoshRuntime::getMiddlewareInterface |
( |
const capro::Interfaces |
interface, |
|
|
const NodeName_t & |
nodeName = {} |
|
) |
| |
|
pure virtualnoexcept |
request the RouDi daemon to create an interface port
- Parameters
-
[in] | interface | interface to create |
[in] | nodeName | name of the node where the interface should belong to |
- Returns
- pointer to a created interface port data
◆ getMiddlewarePublisher()
request the RouDi daemon to create a publisher port
- Parameters
-
[in] | serviceDescription | service description for the new publisher port |
[in] | publisherOptions | like the history capacity of a publisher |
[in] | portConfigInfo | configuration information for the port (i.e. what type of port is requested, device where its payload memory is located on etc.) |
- Returns
- pointer to a created publisher port user
◆ getMiddlewareServer()
request the RouDi daemon to create a server port
- Parameters
-
[in] | serviceDescription | service description for the new server port |
[in] | serverOptions | like the queue capacity and queue full policy by a server |
[in] | portConfigInfo | configuration information for the port (what type of port is requested, device where its payload memory is located on etc.) |
- Returns
- pointer to a created server port data
◆ getMiddlewareSubscriber()
request the RouDi daemon to create a subscriber port
- Parameters
-
[in] | serviceDescription | service description for the new subscriber port |
[in] | subscriberOptions | like the queue capacity and history requested by a subscriber |
[in] | portConfigInfo | configuration information for the port (what type of port is requested, device where its payload memory is located on etc.) |
- Returns
- pointer to a created subscriber port data
◆ getRuntimeFactory()
static factory_t & iox::runtime::PoshRuntime::getRuntimeFactory |
( |
| ) |
|
|
staticprotectednoexcept |
gets current runtime factory. If the runtime factory is not yet initialized it is set to defaultRuntimeFactory.
- Returns
- current runtime factory
◆ initRuntime()
static PoshRuntime & iox::runtime::PoshRuntime::initRuntime |
( |
const RuntimeName_t & |
name | ) |
|
|
staticnoexcept |
creates the runtime with given name
- Parameters
-
[in] | name | used for registering the process with the RouDi daemon |
- Returns
- active runtime
◆ sendRequestToRouDi()
virtual bool iox::runtime::PoshRuntime::sendRequestToRouDi |
( |
const IpcMessage & |
msg, |
|
|
IpcMessage & |
answer |
|
) |
| |
|
pure virtualnoexcept |
send a request to the RouDi daemon and get the response currently each request is followed by a response
- Parameters
-
[in] | msg | request message to send |
[out] | response | from the RouDi daemon |
- Returns
- true if sucessful request/response, false on error
◆ setRuntimeFactory()
static void iox::runtime::PoshRuntime::setRuntimeFactory |
( |
const factory_t & |
factory | ) |
|
|
staticprotectednoexcept |
sets runtime factory, terminates if given factory is empty
- Parameters
-
[in] | factory | std::function to which the runtime factory should be set |
The documentation for this class was generated from the following file: