13#ifndef IOX2_UNIQUE_NODE_ID_HPP
14#define IOX2_UNIQUE_NODE_ID_HPP
19#include "iox2/iceoryx2.h"
31 iox2_node_state_e, iox2_unique_node_id_ptr,
const char*, iox2_node_name_ptr, iox2_config_ptr, iox2_callback_context)
32 -> iox2_callback_progression_e;
65 iox2_unique_node_id_ptr,
69 iox2_callback_context) -> iox2_callback_progression_e;
82 iox2_unique_node_id_h m_handle =
nullptr;
88 auto result = iox2_unique_node_id_pid(&m_handle, iox2::bb::into<iox2_service_type_e>(T), &
pid);
89 if (result == IOX2_OK) {
92 return bb::err(bb::into<UniqueIdGeneratorDetailsError>(result));
95template <ServiceType T>
98 uint32_t nanoseconds = 0;
100 iox2_unique_node_id_creation_time(&m_handle, iox2::bb::into<iox2_service_type_e>(T), &seconds, &nanoseconds);
101 if (result == IOX2_OK) {
102 return timespec {
static_cast<decltype(timespec::tv_sec)
>(seconds),
103 static_cast<decltype(timespec::tv_nsec)
>(nanoseconds) };
105 return bb::err(bb::into<UniqueIdGeneratorDetailsError>(result));
Contains the communication settings of the connected [Client].
Contains all details of a [Node] that is dead.
Contains the communication settings of the connected [Listener].
Contains the communication settings of the connected [Notifier].
Contains the communication settings of the connected [Publisher].
Contains the communication settings of the connected [Reader].
Contains the communication settings of the connected [Server].
Contains the communication settings of the connected [Subscriber].
The system-wide unique id of a [Node].
auto operator=(UniqueNodeId &&rhs) noexcept -> UniqueNodeId &
auto operator=(const UniqueNodeId &rhs) -> UniqueNodeId &
UniqueNodeId(const UniqueNodeId &rhs)
auto creation_time() const -> bb::Expected< timespec, UniqueIdGeneratorDetailsError >
Returns the time the [Node] was created.
auto value_high() const -> uint64_t
Returns the high bits of the underlying value of the [NodeId].
UniqueNodeId(UniqueNodeId &&rhs) noexcept
auto value_low() const -> uint64_t
Returns the low bits of the underlying value of the [NodeId].
auto pid() const -> bb::Expected< int32_t, UniqueIdGeneratorDetailsError >
Returns the [ProcessId] of the process that owns the [Node].
friend auto internal::list_callback(iox2_node_state_e, iox2_unique_node_id_ptr, const char *, iox2_node_name_ptr, iox2_config_ptr, iox2_callback_context) -> iox2_callback_progression_e
Contains the communication settings of the connected [Writer].
constexpr auto err(const E &error) -> Unexpected< E >
auto list_callback(iox2_node_state_e node_state, iox2_unique_node_id_ptr node_id_ptr, const char *executable, iox2_node_name_ptr node_name, iox2_config_ptr config, iox2_callback_context context) -> iox2_callback_progression_e
auto operator==(const EventId &lhs, const EventId &rhs) -> bool
auto operator!=(const EventId &lhs, const EventId &rhs) -> bool
auto operator<<(std::ostream &stream, const EventId &value) -> std::ostream &
UniqueIdGeneratorDetailsError