# XLinkOut

XLinkOut 节点用于通过 XLink 将数据从设备发送到主机。

## 如何放置

#### Python

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

#### C++

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

## 输入和输出

## 使用方式

#### Python

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

# 我们将通过 XLink 将相机预览（ImgFrame）发送到主机。
# 主机随后可以将帧显示给用户
cam.preview.link(xOut.input)
```

#### C++

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

// 我们将通过 XLink 将相机预览（ImgFrame）发送到主机。
// 主机随后可以将帧显示给用户
cam->preview.link(xOut->input);
```

## 功能示例

 * [RGB 预览](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)

## 参考

### 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

### 需要帮助？

请前往 [OAKChina 官网](https://www.oakchina.cn/) 获取技术支持或解答您的任何疑问。
