Class ProcessManager
Defined in File process_manager.hpp
Inheritance Relationships
Base Type
public iox::roudi::ProcessManagerInterface(Class ProcessManagerInterface)
Class Documentation
-
class ProcessManager : public iox::roudi::ProcessManagerInterface
Public Types
-
enum class TerminationFeedback
Values:
-
enumerator SEND_ACK_TO_PROCESS
-
enumerator DO_NOT_SEND_ACK_TO_PROCESS
-
enumerator SEND_ACK_TO_PROCESS
-
using ProcessList_t = cxx::list<Process, MAX_PROCESS_NUMBER>
-
using PortConfigInfo = iox::runtime::PortConfigInfo
Public Functions
-
ProcessManager(RouDiMemoryInterface &roudiMemoryInterface, PortManager &portManager, const version::CompatibilityCheckLevel compatibilityCheckLevel) noexcept
-
virtual ~ProcessManager() noexcept override = default
-
ProcessManager(const ProcessManager &other) = delete
-
ProcessManager &operator=(const ProcessManager &other) = delete
-
bool registerProcess(const RuntimeName_t &name, const uint32_t pid, const posix::PosixUser user, const bool isMonitored, const int64_t transmissionTimestamp, const uint64_t sessionId, const version::VersionInfo &versionInfo) noexcept
Registers a process at the ProcessManager.
- Parameters:
name – [in] of the process which wants to register
pid – [in] is the host system process id
user – [in] is the posix user id to which the process belongs
isMonitored – [in] indicates if the process should be monitored for being alive
transmissionTimestamp – [in] is an ID for the application to check for the expected response
sessionId – [in] is an ID generated by RouDi to prevent sending outdated IPC channel transmission
versionInfo – [in] Version of iceoryx used
- Returns:
false if process was already registered, true otherwise
-
bool unregisterProcess(const RuntimeName_t &name) noexcept
Unregisters a process at the ProcessManager.
- Parameters:
name – [in] of the process which wants to unregister
- Returns:
true if known process was unregistered, false if process is unknown
-
void killAllProcesses() noexcept
Kills all registered processes. If RouDi doesn’t have sufficient rights to kill the process, the process is considered killed.
-
void printWarningForRegisteredProcessesAndClearProcessList() noexcept
Informs the user about the processes which are registered and then clears the process list.
-
bool isAnyRegisteredProcessStillRunning() noexcept
Is one or more of the registered processes running?
- Returns:
true if one or more of the registered processes is running, false otherwise
-
void handleProcessShutdownPreparationRequest(const RuntimeName_t &name) noexcept
A process is about to shut down and needs to be unblock by a potentially block publisher.
- Parameters:
name – [in] of the process runtime which is about to shut down
-
void requestShutdownOfAllProcesses() noexcept
Tries to gracefully terminate all registered processes.
-
void updateLivelinessOfProcess(const RuntimeName_t &name) noexcept
-
void addInterfaceForProcess(const RuntimeName_t &name, capro::Interfaces interface, const NodeName_t &node) noexcept
-
void addNodeForProcess(const RuntimeName_t &process, const NodeName_t &node) noexcept
-
void addSubscriberForProcess(const RuntimeName_t &name, const capro::ServiceDescription &service, const popo::SubscriberOptions &subscriberOptions, const PortConfigInfo &portConfigInfo = PortConfigInfo()) noexcept
-
void addPublisherForProcess(const RuntimeName_t &name, const capro::ServiceDescription &service, const popo::PublisherOptions &publisherOptions, const PortConfigInfo &portConfigInfo = PortConfigInfo()) noexcept
-
void addClientForProcess(const RuntimeName_t &name, const capro::ServiceDescription &service, const popo::ClientOptions &clientOptions, const PortConfigInfo &portConfigInfo) noexcept
Adds a client port to the internal process object and sends it to the OS process.
- Parameters:
name – [in] is the name of the runtime requesting the port
service – [in] is the service description for the new client port
clientOptions – [in] like the queue capacity and queue full policy by a client
portConfigInfo – [in] 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
-
void addServerForProcess(const RuntimeName_t &name, const capro::ServiceDescription &service, const popo::ServerOptions &serverOptions, const PortConfigInfo &portConfigInfo) noexcept
Adds a server port to the internal process object and sends it to the OS process.
- Parameters:
name – [in] is the name of the runtime requesting the port
service – [in] is the service description for the new server port
serverOptions – [in] like the queue capacity and queue full policy by a server
portConfigInfo – [in] 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
-
void addConditionVariableForProcess(const RuntimeName_t &runtimeName) noexcept
-
void initIntrospection(ProcessIntrospectionType *processIntrospection) noexcept
-
void run() noexcept
-
popo::PublisherPortData *addIntrospectionPublisherPort(const capro::ServiceDescription &service) noexcept
-
void sendMessageNotSupportedToRuntime(const RuntimeName_t &name) noexcept
Notify the application that it sent an unsupported message.
-
enum class TerminationFeedback