17#ifndef IOX_POSH_RUNTIME_POSH_RUNTIME_HPP
18#define IOX_POSH_RUNTIME_POSH_RUNTIME_HPP
20#include "iceoryx_hoofs/cxx/optional.hpp"
21#include "iceoryx_posh/capro/service_description.hpp"
22#include "iceoryx_posh/iceoryx_posh_types.hpp"
23#include "iceoryx_posh/internal/popo/building_blocks/condition_variable_data.hpp"
24#include "iceoryx_posh/internal/popo/ports/client_port_user.hpp"
25#include "iceoryx_posh/internal/popo/ports/interface_port.hpp"
26#include "iceoryx_posh/internal/popo/ports/publisher_port_user.hpp"
27#include "iceoryx_posh/internal/popo/ports/server_port_user.hpp"
28#include "iceoryx_posh/internal/popo/ports/subscriber_port_user.hpp"
29#include "iceoryx_posh/internal/runtime/ipc_runtime_interface.hpp"
30#include "iceoryx_posh/internal/runtime/node_property.hpp"
31#include "iceoryx_posh/popo/client_options.hpp"
32#include "iceoryx_posh/popo/server_options.hpp"
33#include "iceoryx_posh/popo/subscriber_options.hpp"
34#include "iceoryx_posh/runtime/port_config_info.hpp"
42class RuntimeTestInterface;
88 const popo::PublisherOptions& publisherOptions = {},
97 virtual SubscriberPortUserType::MemberType_t*
129 const NodeName_t& nodeName = {})
noexcept = 0;
138 virtual NodeData*
createNode(const NodeProperty& nodeProperty) noexcept = 0;
148 friend class roudi::RuntimeTestInterface;
149 using factory_t =
PoshRuntime& (*)(cxx::optional<const RuntimeName_t*>);
152 PoshRuntime(cxx::optional<const RuntimeName_t*> name) noexcept;
154 static
PoshRuntime& defaultRuntimeFactory(cxx::optional<const RuntimeName_t*> name) noexcept;
177 const RuntimeName_t m_appName;
178 std::atomic<
bool> m_shutdownRequested{
false};
class for the identification of a communication event including information on the service,...
Definition service_description.hpp:81
The runtime that is needed for each application to communicate with the RouDi daemon.
Definition posh_runtime.hpp:52
RuntimeName_t getInstanceName() const noexcept
get the name that was used to register with RouDi
virtual popo::InterfacePortData * getMiddlewareInterface(const capro::Interfaces interface, const NodeName_t &nodeName={}) noexcept=0
request the RouDi daemon to create an interface port
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
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 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 respo...
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
static PoshRuntime & getInstance() noexcept
returns active runtime
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 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
static void setRuntimeFactory(const factory_t &factory) noexcept
sets runtime factory, terminates if given factory is empty
virtual popo::ConditionVariableData * getMiddlewareConditionVariable() noexcept=0
request the RouDi daemon to create a condition variable
void shutdown() noexcept
initiates the shutdown of the runtime to unblock all potentially blocking publisher with the Consumer...
static PoshRuntime & initRuntime(const RuntimeName_t &name) noexcept
creates the runtime with given name
static factory_t & getRuntimeFactory() noexcept
gets current runtime factory. If the runtime factory is not yet initialized it is set to defaultRunti...
virtual NodeData * createNode(const NodeProperty &nodeProperty) noexcept=0
request the RouDi daemon to create a node
This struct is used to configure the client.
Definition client_options.hpp:33
the struct describes a callback with a user defined type which can be attached to a WaitSet or a List...
Definition notification_callback.hpp:58
This struct is used to configure the server.
Definition server_options.hpp:33
This struct is used to configure the subscriber.
Definition subscriber_options.hpp:33
Stores information necessary to create the right type of port on RouDi side. Different types of ports...
Definition port_config_info.hpp:33