This class handles the port introspection for RouDi. It is recommended to use the PortIntrospectionType alias which sets the intended template parameter required for the actual introspection. The class manages a thread that periodically updates a field with port introspection data to which clients may subscribe.
More...
#include <port_introspection.hpp>
|
void | sendPortData () noexcept |
| sends the port data; this is used from the unittests
|
|
void | sendThroughputData () noexcept |
| sends the throughput data; this is used from the unittests
|
|
void | sendSubscriberPortsData () noexcept |
| sends the subscriberport changing data, this is used from the unittests
|
|
void | send () noexcept |
| calls the three specific send functions from above, this is used from the periodic task
|
|
|
cxx::optional< PublisherPort > | m_publisherPort |
|
cxx::optional< PublisherPort > | m_publisherPortThroughput |
|
cxx::optional< PublisherPort > | m_publisherPortSubscriberPortsData |
|
template<typename PublisherPort, typename SubscriberPort>
class iox::roudi::PortIntrospection< PublisherPort, SubscriberPort >
This class handles the port introspection for RouDi. It is recommended to use the PortIntrospectionType alias which sets the intended template parameter required for the actual introspection. The class manages a thread that periodically updates a field with port introspection data to which clients may subscribe.
◆ addPublisher()
template<typename PublisherPort , typename SubscriberPort >
add a publisher port to be tracked by introspection
- Parameters
-
- Returns
- returns false if the port could not be added and true otherwise
◆ addSubscriber()
template<typename PublisherPort , typename SubscriberPort >
add a subscriber port to be tracked by introspection
- Parameters
-
- Returns
- returns false if the port could not be added and true otherwise
◆ registerPublisherPort()
template<typename PublisherPort , typename SubscriberPort >
bool iox::roudi::PortIntrospection< PublisherPort, SubscriberPort >::registerPublisherPort |
( |
PublisherPort && |
publisherPortGeneric, |
|
|
PublisherPort && |
publisherPortThroughput, |
|
|
PublisherPort && |
publisherPortSubscriberPortsData |
|
) |
| |
|
inlinenoexcept |
register publisher port used to send introspection
- Parameters
-
[in] | publisherPort | publisher port to be registered |
- Returns
- true if registration was successful, false otherwise
◆ removePublisher()
template<typename PublisherPort , typename SubscriberPort >
remove a publisher port from introspection
- Parameters
-
[in] | port | publisher port to be removed |
- Returns
- returns false if the port could not be removed (since it did not exist) and true otherwise
◆ removeSubscriber()
template<typename PublisherPort , typename SubscriberPort >
remove a subscriber port from introspection
- Parameters
-
[in] | port | subscriber port to be removed |
- Returns
- returns false if the port could not be removed (since it did not exist) and true otherwise
◆ reportMessage() [1/2]
template<typename PublisherPort , typename SubscriberPort >
report a capro message to introspection (since this could change the state of active connections)
- Parameters
-
[in] | message | capro message to be processed |
◆ reportMessage() [2/2]
template<typename PublisherPort , typename SubscriberPort >
report a capro message to introspection (since this could change the state of active connections)
- Parameters
-
[in] | message | capro message to be processed |
[in] | id | unique port id |
- Note
- introduced for identifying the subscriber port whose connection state has to be updated, e.g. if a subscriber unsubscribes only its connection state should be updated - not the states of all subscribers which are subscribed to the same topic
◆ setSendInterval()
template<typename PublisherPort , typename SubscriberPort >
set the time interval used to send new introspection data
- Parameters
-
[in] | interval | duration between two send invocations |
The documentation for this class was generated from the following files:
- iceoryx_posh/internal/roudi/introspection/port_introspection.hpp
- iceoryx_posh/internal/roudi/introspection/port_introspection.inl