> This page is for version 4.3.
> For other versions, use one of these documentation indexes:
> - 4.6 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/4-6-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::FastDdsNativeBufferAdapter

> Fast-DDS native-buffer adapter: thin wrapper that creates ipc::Context&lt;FastDdsTransport&gt;.

Fast-DDS native-buffer adapter: thin wrapper that creates ipc::Context\<FastDdsTransport>.

```cpp showLineNumbers={false}
#include <holoscan/fastdds_native_buffer_adapter.hpp>
```

**Inherits from:** `holoscan::HoloIpcCudaNativeBufferAdapterBase< ipc::transport::fastdds::FastDdsTransport >` (public)

---

## Constructors

### FastDdsNativeBufferAdapter \[#fastddsnativebufferadapter]

```cpp showLineNumbers={false}
holoscan::FastDdsNativeBufferAdapter::FastDdsNativeBufferAdapter()
```

---

## Methods

### initialize \[#initialize]

```cpp showLineNumbers={false}
nvidia::gxf::Expected<void> holoscan::FastDdsNativeBufferAdapter::initialize(
    eprosima::fastdds::dds::DomainParticipant *participant,
    nvidia::gxf::NativeBufferPolicy policy
)
```

Initialize with the DomainParticipant from [FastDdsPubSubContext](fastddspubsubcontext).

The `participant` is retained indirectly through the holoipc Fast-DDS transport and must outlive this adapter (including its shutdown). When `policy` is `NativeBufferPolicy::kDisabled`, `participant` is ignored and may be null.

This method is idempotent: repeated calls after a successful initialization are no-ops that log a warning and return success, keeping the original policy and context.

### shutdown \[#shutdown]

```cpp showLineNumbers={false}
void holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::shutdown()
```

### is\_initialized \[#isinitialized]

```cpp showLineNumbers={false}
bool holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::is_initialized() const override
```

### policy \[#policy]

```cpp showLineNumbers={false}
nvidia::gxf::NativeBufferPolicy holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::policy() const
```

### set\_acquire\_timeout \[#setacquiretimeout]

```cpp showLineNumbers={false}
void holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::set_acquire_timeout(
    std::chrono::milliseconds timeout
)
```

### set\_export\_ttl \[#setexportttl]

```cpp showLineNumbers={false}
void holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::set_export_ttl(
    std::chrono::milliseconds ttl
)
```

### set\_use\_eager\_acquire \[#setuseeageracquire]

```cpp showLineNumbers={false}
void holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::set_use_eager_acquire(
    bool enabled
)
```

### default\_protocol\_name \[#defaultprotocolname]

```cpp showLineNumbers={false}
const std::string & holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::default_protocol_name() const override
```

### supports\_protocol \[#supportsprotocol]

```cpp showLineNumbers={false}
bool holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::supports_protocol(
    const std::string &protocol_name
) const override
```

### can\_export\_tensor \[#canexporttensor]

```cpp showLineNumbers={false}
bool holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::can_export_tensor(
    const nvidia::gxf::Tensor &tensor
) const override
```

### descriptor\_format\_version \[#descriptorformatversion]

```cpp showLineNumbers={false}
uint8_t holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::descriptor_format_version() const override
```

### export\_tensor \[#exporttensor]

```cpp showLineNumbers={false}
nvidia::gxf::Expected<std::vector<uint8_t>> holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::export_tensor(
    void *device_ptr,
    const std::shared_ptr<void> &device_ptr_owner,
    const NativeTensorMetadata &tensor_info,
    const std::string &protocol_name,
    uint32_t sequence_num
) override
```

[NativeBufferProtocolAdapter](nativebufferprotocoladapter) interface: converts [NativeTensorMetadata](../structs/nativetensormetadata) to CudaTensorDescriptor and delegates to the CudaTensorDescriptor overload.

### import\_tensor\_generic \[#importtensorgeneric]

```cpp showLineNumbers={false}
nvidia::gxf::Expected<ImportedNativeTensor> holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::import_tensor_generic(
    const std::vector<uint8_t> &descriptor_bytes,
    const std::string &protocol_name,
    std::chrono::milliseconds timeout = std::chrono::milliseconds{0}
) override
```

[NativeBufferProtocolAdapter](nativebufferprotocoladapter) interface: delegates to import\_tensor() and converts the NativeBufferHolder into a generic [ImportedNativeTensor](../structs/importednativetensor).

### import\_tensor \[#importtensor]

```cpp showLineNumbers={false}
nvidia::gxf::Expected<NativeBufferHolder> holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::import_tensor(
    const std::vector<uint8_t> &descriptor_bytes,
    std::chrono::milliseconds timeout = std::chrono::milliseconds{0}
)
```

Decode a DNBX payload and acquire the CUDA IPC mapping via holoipc.

In strict mode (default): sends ACQUIRED, waits for ACK, then opens handle. In eager mode: opens handle locally first, then sends ACQUIRED (no ACK wait). Returns an RAII NativeBufferHolder whose destruction sends RELEASED.

### pending\_export\_count \[#pendingexportcount]

```cpp showLineNumbers={false}
size_t holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::pending_export_count() const override
```

### set\_on\_pending\_export\_count\_changed \[#setonpendingexportcountchanged]

```cpp showLineNumbers={false}
void holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::set_on_pending_export_count_changed(
    PendingExportCountChangedCallback callback
) override
```

### evict\_stale\_exports \[#evictstaleexports]

```cpp showLineNumbers={false}
size_t holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::evict_stale_exports(
    std::chrono::milliseconds max_age
)
```

### initialize\_common \[#initializecommon]

```cpp showLineNumbers={false}
nvidia::gxf::Expected<void> holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::initialize_common(
    std::shared_ptr<IpcContextType> ipc_context,
    nvidia::gxf::NativeBufferPolicy policy
)
```

Called by derived-class initialize() after creating the ipc::Context.

---

## Static methods

### decode\_exported\_tensor \[#decodeexportedtensor]

```cpp showLineNumbers={false}
static nvidia::gxf::Expected<ExportedTensorDescriptor> holoscan::HoloIpcCudaNativeBufferAdapterBase<ipc::transport::fastdds::FastDdsTransport>::decode_exported_tensor(
    const std::vector<uint8_t> &descriptor_bytes
)
```

Parse DNBX wire format back into ExportedTensorDescriptor.

Wire layout: magic | version | handle\_type | ipc\_version | hipc\_blob | key | reply\_topic

---

## Types

### Typedefs

| Name                                | Definition                                                  |
| ----------------------------------- | ----------------------------------------------------------- |
| `IpcContextType`                    | `ipc::Context< ipc::transport::fastdds::FastDdsTransport >` |
| `PointerDescriptorType`             | `typename IpcContextType::PointerDescriptorType`            |
| `HandleType`                        | `typename IpcContextType::HandleType`                       |
| `PendingExportCountChangedCallback` | `std::function< void(size_t)>`                              |

---

## Member variables

| Name            | Type          | Description |
| --------------- | ------------- | ----------- |
| `adapter_name_` | `std::string` |             |