iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::Node< T > Class Template Reference

#include <node.hpp>

Public Member Functions

 Node (Node &&) noexcept
auto operator= (Node &&) noexcept -> Node &
 Node (const Node &)=delete
auto operator= (const Node &) -> Node &=delete
 ~Node ()
auto config () const -> ConfigView
 Returns the [Config] that the [Node] will use to create any iceoryx2 entity.
auto name () const -> NodeNameView
 Returns the name of the node inside a [NodeNameView].
auto id () const -> UniqueNodeId
 Returns the unique id of the [Node].
auto service_builder (const ServiceName &name) const -> ServiceBuilder< T >
auto waitset_builder () const -> WaitSetBuilder< T >
 Returns the [WaitSetBuilder] to create a new [WaitSet].
auto wait (iox2::bb::Duration cycle_time) const -> bb::Expected< void, NodeWaitFailure >
 Waits for a given cycle_time.
auto signal_handling_mode () const -> SignalHandlingMode
 Returns the [SignalHandlingMode] with which the [Node] was created.
auto try_cleanup_dead_nodes () -> CleanupState
auto blocking_cleanup_dead_nodes (iox2::bb::Duration timeout) -> CleanupState
auto force_remove_service (const iox2::ServiceName &name, iox2::MessagingPattern messaging_pattern) const -> iox2::bb::Expected< bool, ServiceRemoveError >

Static Public Member Functions

static auto list (ConfigView config, const iox2::bb::StaticFunction< CallbackProgression(NodeState< T >)> &callback) -> bb::Expected< void, NodeListFailure >

Friends

class NodeBuilder

Detailed Description

template<ServiceType T>
class iox2::Node< T >

The central entry point of iceoryx2. Represents a node of the iceoryx2 system. One process can have arbitrary many nodes but usually it should be only one node per process. Can be created via the [NodeBuilder].

Definition at line 42 of file node.hpp.

Constructor & Destructor Documentation

◆ Node() [1/2]

template<ServiceType T>
iox2::Node< T >::Node ( Node< T > && )
noexcept

◆ Node() [2/2]

template<ServiceType T>
iox2::Node< T >::Node ( const Node< T > & )
delete

References Node().

◆ ~Node()

template<ServiceType T>
iox2::Node< T >::~Node ( )

References Node().

Member Function Documentation

◆ blocking_cleanup_dead_nodes()

template<ServiceType T>
auto iox2::Node< T >::blocking_cleanup_dead_nodes ( iox2::bb::Duration timeout) ->CleanupState

Removes the stale system resources of all dead [Node]s. The dead [Node]s are also removed from all registered [Service](crate::service::Service)s.

If a [Node] cannot be cleaned up since the process has insufficient permissions then the [Node] is skipped. If it is currently being cleaned up by another process then the cleaner will wait until the timeout as either passed or the cleaned was finished.

The timeout is applied to every individual dead [Node] the function needs to wait on.

References blocking_cleanup_dead_nodes().

Referenced by blocking_cleanup_dead_nodes().

◆ config()

template<ServiceType T>
auto iox2::Node< T >::config ( ) const->ConfigView

Returns the [Config] that the [Node] will use to create any iceoryx2 entity.

References config().

Referenced by config(), and list().

◆ force_remove_service()

template<ServiceType T>
auto iox2::Node< T >::force_remove_service ( const iox2::ServiceName & name,
iox2::MessagingPattern messaging_pattern ) const->iox2::bb::Expected< bool, ServiceRemoveError >

Removes a [Service] by force. This shall be used if the resources could not be removed in a previous run and now it is no longer possible to open the service.

Safety

  • No other process shall use the service.

References force_remove_service(), name(), and Node().

Referenced by force_remove_service().

◆ id()

template<ServiceType T>
auto iox2::Node< T >::id ( ) const->UniqueNodeId

Returns the unique id of the [Node].

◆ list()

template<ServiceType T>
auto iox2::Node< T >::list ( ConfigView config,
const iox2::bb::StaticFunction< CallbackProgression(NodeState< T >)> & callback )->bb::Expected< void, NodeListFailure >
static

Lists all [Node]s under a provided config. The provided callback is called for every [Node] and gets the [NodeState] as input argument. The callback can return [CallbackProgression::Stop] if the iteration shall stop or [CallbackProgression::Continue];

References config(), and list().

Referenced by list().

◆ name()

template<ServiceType T>
auto iox2::Node< T >::name ( ) const->NodeNameView

Returns the name of the node inside a [NodeNameView].

References name().

Referenced by force_remove_service(), name(), and service_builder().

◆ operator=() [1/2]

template<ServiceType T>
auto iox2::Node< T >::operator= ( const Node< T > & ) ->Node &=delete
delete

References Node().

◆ operator=() [2/2]

template<ServiceType T>
auto iox2::Node< T >::operator= ( Node< T > && ) ->Node &
noexcept

References Node().

◆ service_builder()

template<ServiceType T>
auto iox2::Node< T >::service_builder ( const ServiceName & name) const->ServiceBuilder< T >

Returns the [ServiceBuilder] to create a new service. The [ServiceName] of the [Service] is provided as argument.

References name(), and service_builder().

Referenced by service_builder().

◆ signal_handling_mode()

template<ServiceType T>
auto iox2::Node< T >::signal_handling_mode ( ) const->SignalHandlingMode

Returns the [SignalHandlingMode] with which the [Node] was created.

References signal_handling_mode().

Referenced by signal_handling_mode().

◆ try_cleanup_dead_nodes()

template<ServiceType T>
auto iox2::Node< T >::try_cleanup_dead_nodes ( ) ->CleanupState

Removes the stale system resources of all dead [Node]s. The dead [Node]s are also removed from all registered [Service](crate::service::Service)s.

If a [Node] cannot be cleaned up since the process has insufficient permissions or it is currently being cleaned up by another process then the [Node] is skipped.

References try_cleanup_dead_nodes().

Referenced by try_cleanup_dead_nodes().

◆ wait()

template<ServiceType T>
auto iox2::Node< T >::wait ( iox2::bb::Duration cycle_time) const->bb::Expected< void, NodeWaitFailure >

Waits for a given cycle_time.

References wait().

Referenced by wait().

◆ waitset_builder()

template<ServiceType T>
auto iox2::Node< T >::waitset_builder ( ) const->WaitSetBuilder< T >

Returns the [WaitSetBuilder] to create a new [WaitSet].

References waitset_builder().

Referenced by waitset_builder().

◆ NodeBuilder

template<ServiceType T>
friend class NodeBuilder
friend

Definition at line 111 of file node.hpp.

References NodeBuilder.

Referenced by NodeBuilder.


The documentation for this class was generated from the following file: