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

# hololink::emulation::RoCEv2DataPlane

> The DataPlane implementation for RoCEv2 UDP transport.

The [DataPlane](dataplane) implementation for RoCEv2 UDP transport.

```cpp showLineNumbers={false}
#include <hololink/emulation/rocev2_data_plane.hpp>
```

**Inherits from:** `hololink::emulation::DataPlane` (public)

***

## Constructors

### RoCEv2DataPlane \[#rocev2dataplane]

```cpp showLineNumbers={false}
hololink::emulation::RoCEv2DataPlane::RoCEv2DataPlane(
    HSBEmulator &hsb_emulator,
    const IPAddress &source_ip,
    uint8_t data_plane_id,
    uint8_t sensor_id
)
```

python:

`def __init__(self: hemu.RoCEv2DataPlane, hsb_emulator: hemu.HSBEmulator, source_ip: hemu.IPAddress, data_plane_id: int, sensor_id: int)`

Construct a new `RoCEv2DataPlane` object

**Parameters**

The [HSBEmulator](hsbemulator) object to attach to.

The IP address of the [DataPlane](dataplane).

The identifying index of the [DataPlane](dataplane).

The identifying index of the sensor interface associated with the [DataPlane](dataplane).

### Destructor \[#destructor]

### \~RoCEv2DataPlane

```cpp showLineNumbers={false}
hololink::emulation::RoCEv2DataPlane::~RoCEv2DataPlane()
```

***

## Methods

### start \[#start]

```cpp showLineNumbers={false}
void hololink::emulation::RoCEv2DataPlane::start()
```

Start the [DataPlane](dataplane) by initiating the BootP broadcast.

### stop \[#stop]

```cpp showLineNumbers={false}
void hololink::emulation::RoCEv2DataPlane::stop()
```

Stop the [DataPlane](dataplane) by stopping the BootP broadcast.

### stop\_bootp \[#stopbootp]

```cpp showLineNumbers={false}
void hololink::emulation::RoCEv2DataPlane::stop_bootp()
```

This is a clear alias for stop().

### is\_running \[#isrunning]

```cpp showLineNumbers={false}
bool hololink::emulation::RoCEv2DataPlane::is_running()
```

Check if the [DataPlane](dataplane) is running.

(Bootp is broadcasting)

**Returns:** True if the [DataPlane](dataplane) is running, false otherwise.

### send \[#send]

#### Send a tensor over the \[DataPlane]\(dataplane)

```cpp showLineNumbers={false}
int64_t hololink::emulation::RoCEv2DataPlane::send(
    const DLTensor &tensor,
    FrameMetadata *frame_metadata = DEFAULT_FRAME_METADATA
)
```

Send a tensor over the [DataPlane](dataplane).

This method is synchronous. It will block and metadata will be protected by a mutex until the send is complete.

**Returns:** The number of bytes sent or \< 0 if error occurred.

**Parameters**

The tensor object reference to send. Supported device types are kDLCPU, kDLCUDA, kDLCUDAHost (host pinned), and kDLCUDAManaged (Unified Memory)

The frame metadata to send. Acts as a buffer flush. If nullptr, the data is by default buffered until the next send command that fills an MTU or a non-nullptr frame\_metadata is provided.

#### Send a buffer over the \[DataPlane]\(dataplane)

```cpp showLineNumbers={false}
int64_t hololink::emulation::RoCEv2DataPlane::send(
    const uint8_t *buffer,
    size_t buffer_size,
    FrameMetadata *frame_metadata = nullptr
)
```

Send a buffer over the [DataPlane](dataplane).

**Returns:** The number of bytes sent or \< 0 if error occurred.

**Parameters**

The buffer to send.

The size of the buffer.

The frame metadata to send. Acts as a buffer flush. If nullptr, the data is by default buffered until the next send command that fills an MTU or a non-nullptr frame\_metadata is provided.

### get\_sensor\_id \[#getsensorid]

```cpp showLineNumbers={false}
uint8_t hololink::emulation::RoCEv2DataPlane::get_sensor_id() const
```

Get the sensor ID associated with the [DataPlane](dataplane).

**Returns:** The sensor ID.

### packetizer\_enabled \[#packetizerenabled]

```cpp showLineNumbers={false}
bool hololink::emulation::RoCEv2DataPlane::packetizer_enabled() const
```

Check if the packetizer is enabled.

**Returns:** True if the packetizer is enabled, false otherwise.

### get\_start\_time \[#getstarttime]

```cpp showLineNumbers={false}
struct timespec hololink::emulation::RoCEv2DataPlane::get_start_time() const
```

### broadcast\_bootp \[#broadcastbootp]

```cpp showLineNumbers={false}
int hololink::emulation::RoCEv2DataPlane::broadcast_bootp()
```

### update\_metadata \[#updatemetadata]

```cpp showLineNumbers={false}
void hololink::emulation::RoCEv2DataPlane::update_metadata() override
```

Update the TransmissionMetadata for the `RoCEv2DataPlane`.

Only one thread may call [RoCEv2DataPlane::send](coedataplane#send) at a time. DataPlane::send() ensures thread safety.

***

## Member variables

| Name               | Type                                                                             | Description |
| ------------------ | -------------------------------------------------------------------------------- | ----------- |
| `page_`            | `uint32_t`                                                                       |             |
| `registers_`       | `AddressMemory &`                                                                |             |
| `ip_address_`      | `IPAddress`                                                                      |             |
| `configuration_`   | `HSBConfiguration`                                                               |             |
| `sensor_id_`       | `uint8_t`                                                                        |             |
| `data_plane_id_`   | `uint8_t`                                                                        |             |
| `transmitter_`     | `BaseTransmitter *`                                                              |             |
| `data_plane_ctxt_` | `std::unique_ptr< struct DataPlaneCtxt, std::function< void(DataPlaneCtxt *)> >` |             |