17 #ifndef IOX_POSH_ROUDI_INTROSPECTION_PROCESS_INTROSPECTION_HPP
18 #define IOX_POSH_ROUDI_INTROSPECTION_PROCESS_INTROSPECTION_HPP
20 #include "iceoryx_posh/iceoryx_posh_types.hpp"
21 #include "iceoryx_posh/internal/popo/ports/publisher_port_user.hpp"
22 #include "iceoryx_posh/roudi/introspection_types.hpp"
23 #include "iceoryx_utils/cxx/list.hpp"
24 #include "iceoryx_utils/cxx/method_callback.hpp"
25 #include "iceoryx_utils/internal/concurrent/periodic_task.hpp"
38 template <
typename PublisherPort>
56 void addProcess(
const int pid,
const RuntimeName_t& name) noexcept;
65 void addNode(
const RuntimeName_t& runtimeName,
const NodeName_t& node) noexcept;
70 void removeNode(
const RuntimeName_t& runtimeName,
const NodeName_t& node) noexcept;
93 cxx::optional<PublisherPort> m_publisherPort;
97 using ProcessList_t = cxx::list<ProcessIntrospectionData, MAX_PROCESS_NUMBER>;
98 ProcessList_t m_processList;
99 bool m_processListNewData{
true};
103 units::Duration m_sendInterval{units::Duration::fromSeconds(1U)};
104 concurrent::PeriodicTask<cxx::MethodCallback<void>> m_publishingTask{
105 concurrent::PeriodicTaskManualStart,
"ProcessIntr", *
this, &ProcessIntrospection::send};
115 #include "iceoryx_posh/internal/roudi/introspection/process_introspection.inl"
This class handles the process intropection for RouDi. It is recommended to use the ProcessIntrospect...
Definition: process_introspection.hpp:40
void addNode(const RuntimeName_t &runtimeName, const NodeName_t &node) noexcept
This function is used to add a node to the process introspection.
Definition: process_introspection.inl:77
void removeNode(const RuntimeName_t &runtimeName, const NodeName_t &node) noexcept
This function is used to remove a node from the process introspection.
Definition: process_introspection.inl:111
void stop() noexcept
This function stops the thread previously started by run().
Definition: process_introspection.inl:195
void run() noexcept
This function starts a thread which periodically sends the introspection data to the client....
Definition: process_introspection.inl:156
void addProcess(const int pid, const RuntimeName_t &name) noexcept
This function is used to add a process to the process introspection.
Definition: process_introspection.inl:47
void setSendInterval(const units::Duration interval) noexcept
This function configures the interval for the transmission of the port introspection data.
Definition: process_introspection.inl:201
void registerPublisherPort(PublisherPort &&publisherPort) noexcept
This functions registers the POSH publisher port which is used to send the data to the instrospcetion...
Definition: process_introspection.inl:146
void removeProcess(const int pid) noexcept
This function is used to remove the process from the process introspection.
Definition: process_introspection.inl:61
Definition: service_description.hpp:29