# XLinkOut

XLinkOut node is used to send data from the device to the host via XLink.

## How to place it

#### Python

```python
pipeline = dai.Pipeline()
xlinkOut = pipeline.create(dai.node.XLinkOut)
```

#### C++

```cpp
dai::Pipeline pipeline;
auto xlinkOut = pipeline.create<dai::node::XLinkOut>();
```

## Inputs and Outputs

## Usage

#### Python

```python
pipeline = dai.Pipeline()
xOut = pipeline.create(dai.node.XLinkOut)
xOut.setStreamName("camOut")

# Here we will send camera preview (ImgFrame) to the host via XLink.
# Host can then display the frame to the user
cam.preview.link(xOut.input)
```

#### C++

```cpp
dai::Pipeline pipeline;
auto xOut = pipeline.create<dai::node::XLinkOut>();
xOut->setStreamName("camOut");

// Here we will send camera preview (ImgFrame) to the host via XLink.
// Host can then display the frame to the user
cam->preview.link(xOut->input);
```

## Examples of functionality

 * [RGB Preview](https://docs.luxonis.com/software/depthai/examples/rgb_preview.md)
 * [Mono & MobilenetSSD](https://docs.luxonis.com/software/depthai/examples/mono_depth_mobilenetssd.md)
 * [Mono & MobilenetSSD & Depth](https://docs.luxonis.com/software/depthai/examples/mono_depth_mobilenetssd.md)

## Reference

### depthai.node.XLinkOut(depthai.Node)

Kind: Class

XLinkOut node. Sends messages over XLink.

#### getFpsLimit(self) -> float: float

Kind: Method

Get rate limit in messages per second

#### getMetadataOnly(self) -> bool: bool

Kind: Method

Get whether to transfer only messages attributes and not buffer data

#### getStreamName(self) -> str: str

Kind: Method

Get stream name

#### setFpsLimit(self, fpsLimit: typing.SupportsFloat)

Kind: Method

Specifies a message sending limit. It's approximated from specified rate.

Parameter ``fps``:
Approximate rate limit in messages per second

#### setMetadataOnly(self, arg0: bool)

Kind: Method

Specify whether to transfer only messages attributes and not buffer data

#### setStreamName(self, streamName: str)

Kind: Method

Specifies XLink stream name to use.

The name should not start with double underscores '__', as those are reserved
for internal use.

Parameter ``name``:
Stream name

#### input

Kind: Property

Input for any type of messages to be transferred over XLink stream

Default queue is blocking with size 8

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
