iceoryx2
C++ Language 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 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 41 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

◆ ~Node()

template<ServiceType T>
iox2::Node< T >::~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.

◆ config()

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

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

◆ 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.

◆ id()

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

Returns the unique id of the [Node].

◆ list()

template<ServiceType T>
static 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];

◆ name()

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

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ 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.

◆ signal_handling_mode()

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

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

◆ 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.

◆ 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.

Friends And Related Symbol Documentation

◆ NodeBuilder

template<ServiceType T>
friend class NodeBuilder
friend

Definition at line 107 of file node.hpp.


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