UcxNode#

Fully qualified name: isaacsim::ucx::nodes::UcxNode

class UcxNode : public isaacsim::core::includes::BaseResetNode#

Base class for UCX omnigraph nodes.

This class provides the foundation for UCX nodes in Isaac Sim. It handles listener management and provides common functionality for UCX-based communication nodes.

Subclassed by UCXPublishClockNodeBase< DatabaseT >, UCXPublishImageNodeBase< DatabaseT >, UCXPublishImuNodeBase< DatabaseT >, UCXPublishJointStateNodeBase< DatabaseT >, UCXPublishOdometryNodeBase< DatabaseT >, isaacsim::ucx::nodes::UCXSubscribeJointCommandNodeBase< DatabaseT >

Public Functions

UcxNode() = default#

Constructor for the UCX node.

Initializes the node with default settings.

inline virtual ~UcxNode()#

Destructor.

Ensures proper cleanup by calling reset().

inline virtual void reset() override#

Resets the node state.

Cleans up the listener reference. Derived classes should call this method after cleaning up their own resources.

Note

This is a virtual method that can be overridden by derived classes.

Protected Functions

inline bool initializeListener(uint16_t port)#

Gets or creates a listener for the specified port.

Returns an existing listener if one is already registered for the port, otherwise creates a new listener on the specified port.

The port is validated before attempting to create a listener. Invalid ports (0-1023) are rejected.

Parameters:

port[in] Port number for the listener (must be >= 1024)

Returns:

bool True if listener was successfully obtained or created, false otherwise.

inline bool isInitialized() const#

Checks if the node has a valid listener.

Verifies if the listener has been properly created and initialized.

Returns:

bool True if the listener exists, false otherwise.

template<typename DatabaseT>
inline bool ensureListenerReady(
DatabaseT &db,
uint16_t port,
)#

Ensures the listener is initialized and started.

Initializes the listener if not already done or if the port has changed, and starts the progress thread. Validates the port number before initialization.

Template Parameters:

DatabaseT – The database type for logging

Parameters:
  • db[in] Database accessor for logging

  • port[in] Port number for the listener (must be >= 1024)

Returns:

bool True if listener is ready, false on error

inline bool waitForConnection()#

Waits for a client connection.

Checks if a connection exists, and if not, performs a non-blocking wait. Returns true if connected and ready to communicate, false if not yet connected.

Returns:

bool True if connected, false if no connection available

template<typename DatabaseT>
inline bool publishMessage(
DatabaseT &db,
const std::vector<uint8_t> &messageData,
uint64_t tag,
uint32_t timeoutMs,
)#

Publishes a message over UCX with validation and timeout.

Validates that message data is not empty, then sends using UCX tagged send. Wrapper for UCXListener::tagSend() that adds logging for OmniGraph nodes.

Template Parameters:

DatabaseT – The database type for logging

Parameters:
  • db[in] Database accessor for logging

  • messageData[in] Serialized message data to send

  • tag[in] UCX tag for message identification

  • timeoutMs[in] Timeout in milliseconds for send request (0 = infinite)

Returns:

bool True if send completed successfully, false on error or timeout

Protected Attributes

std::shared_ptr<isaacsim::ucx::core::UCXListener> m_listener = nullptr#

UCX listener instance.

Protected Static Functions

static inline bool isValidPort(uint16_t port)#

Validates port number is in acceptable range for OmniGraph nodes.

Ports 0-1023 are system reserved and should not be used by OmniGraph nodes. Port 0 (auto-assign) is also not allowed to ensure deterministic behavior.

Parameters:

port[in] Port number to validate

Returns:

bool True if port is valid (>= 1024), false otherwise

static inline bool isValidTag(uint64_t tag)#

Validates UCX tag value.

UCX uses the full 64-bit tag space. This function can be extended to restrict tag ranges if needed for application-specific protocols.

Parameters:

tag[in] Tag value to validate

Returns:

bool True if tag is valid, false otherwise