Skip to content

iox::roudi::RouDi🔗

Public Classes🔗

Name
struct RoudiStartupParameters

Public Types🔗

Name
enum RuntimeMessagesThreadStart { IMMEDIATE, DEFER_START }
Indicate whether the thread processing messages from the runtimes will start directly or deferred this is important for derived classes which may need to initialize their members before the thread starts.

Public Functions🔗

Name
RouDi & operator=(const RouDi & other)
RouDi(const RouDi & other)
RouDi(RouDiMemoryInterface & roudiMemoryInteface, PortManager & portManager, RoudiStartupParameters roudiStartupParameters)
virtual ~RouDi()

Protected Functions🔗

Name
void startProcessRuntimeMessagesThread()
Starts the thread processing messages from the runtimes Once this is done, applications can register and Roudi is fully operational.
void shutdown()
Stops threads and kills all process known to RouDi Called in d'tor.
virtual void processMessage(const runtime::IpcMessage & message, const iox::runtime::IpcMessageType & cmd, const RuntimeName_t & runtimeName)
virtual void cyclicUpdateHook()
void IpcMessageErrorHandler()
version::VersionInfo parseRegisterMessage(const runtime::IpcMessage & message, uint32_t & pid, uid_t & userId, int64_t & transmissionTimestamp)
void registerProcess(const RuntimeName_t & name, const uint32_t pid, const posix::PosixUser user, const int64_t transmissionTimestamp, const uint64_t sessionId, const version::VersionInfo & versionInfo)
Handles the registration request from process.
uint64_t getUniqueSessionIdForProcess()
Creates a unique ID which can be used to check outdated IPC channel transmissions.

Protected Attributes🔗

Name
RouDiMemoryInterface * m_roudiMemoryInterface
cxx::GenericRAII m_roudiMemoryManagerCleaner
PortManager * m_portManager
concurrent::smart_lock< ProcessManager > m_prcMgr
ProcessIntrospectionType m_processIntrospection
MemPoolIntrospectionType m_mempoolIntrospection

Public Types Documentation🔗

enum RuntimeMessagesThreadStart🔗

Enumerator Value Description
IMMEDIATE
DEFER_START

Indicate whether the thread processing messages from the runtimes will start directly or deferred this is important for derived classes which may need to initialize their members before the thread starts.

Public Functions Documentation🔗

function operator=🔗

RouDi & operator=(
    const RouDi & other
)

function RouDi🔗

RouDi(
    const RouDi & other
)

function RouDi🔗

RouDi(
    RouDiMemoryInterface & roudiMemoryInteface,
    PortManager & portManager,
    RoudiStartupParameters roudiStartupParameters
)

function ~RouDi🔗

virtual ~RouDi()

Protected Functions Documentation🔗

function startProcessRuntimeMessagesThread🔗

void startProcessRuntimeMessagesThread()

Starts the thread processing messages from the runtimes Once this is done, applications can register and Roudi is fully operational.

function shutdown🔗

void shutdown()

Stops threads and kills all process known to RouDi Called in d'tor.

Note: Intentionally not virtual to be able to call it in derived class

function processMessage🔗

virtual void processMessage(
    const runtime::IpcMessage & message,
    const iox::runtime::IpcMessageType & cmd,
    const RuntimeName_t & runtimeName
)

function cyclicUpdateHook🔗

virtual void cyclicUpdateHook()

function IpcMessageErrorHandler🔗

void IpcMessageErrorHandler()

function parseRegisterMessage🔗

version::VersionInfo parseRegisterMessage(
    const runtime::IpcMessage & message,
    uint32_t & pid,
    uid_t & userId,
    int64_t & transmissionTimestamp
)

function registerProcess🔗

void registerProcess(
    const RuntimeName_t & name,
    const uint32_t pid,
    const posix::PosixUser user,
    const int64_t transmissionTimestamp,
    const uint64_t sessionId,
    const version::VersionInfo & versionInfo
)

Handles the registration request from process.

Parameters:

  • name of the process which wants to register at roudi; this is equal to the IPC channel name
  • pid is the host system process id
  • user is the posix user id to which the process belongs
  • transmissionTimestamp is an ID for the application to check for the expected response
  • sessionId is an ID generated by RouDi to prevent sending outdated IPC channel transmission
  • versionInfo Version of iceoryx used

function getUniqueSessionIdForProcess🔗

static uint64_t getUniqueSessionIdForProcess()

Creates a unique ID which can be used to check outdated IPC channel transmissions.

Return: a unique, monotonic and consecutive increasing number

Protected Attributes Documentation🔗

variable m_roudiMemoryInterface🔗

RouDiMemoryInterface * m_roudiMemoryInterface {nullptr};

variable m_roudiMemoryManagerCleaner🔗

cxx::GenericRAII m_roudiMemoryManagerCleaner {[]() {},
                                                 [this]() {
                                                     if (this->m_roudiMemoryInterface->destroyMemory().has_error())
                                                     {
                                                         LogWarn() << "unable to cleanup roudi memory interface";
                                                     };
                                                 }};

Note: destroy the memory right at the end of the dTor, since the memory is not needed anymore and we know that the lifetime of the MemoryBlocks must be at least as long as RouDi; this saves us from issues if the RouDiMemoryManager outlives some MemoryBlocks

variable m_portManager🔗

PortManager * m_portManager {nullptr};

variable m_prcMgr🔗

concurrent::smart_lock< ProcessManager > m_prcMgr;

variable m_processIntrospection🔗

ProcessIntrospectionType m_processIntrospection;

variable m_mempoolIntrospection🔗

MemPoolIntrospectionType m_mempoolIntrospection;

Updated on 26 April 2021 at 15:31:02 CEST