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

How to place it

pipeline = dai.Pipeline()
xlinkIn = pipeline.create(dai.node.XLinkIn)
dai::Pipeline pipeline;
auto xlinkIn = pipeline.create<dai::node::XLinkIn>();

Inputs and Outputs

            │              │
(From host) │              │    out
----------->│   XLinkIn    ├────────►
            │              │
            │              │

Message types

  • out - Any


pipeline = dai.Pipeline()
xIn = pipeline.create(dai.node.XLinkIn)

# Create ColorCamera beforehand

with dai.Device(pipeline) as device:
  qCamControl = device.getInputQueue("camControl")

  # Send a message to the ColorCamera to capture a still image
  ctrl = dai.CameraControl()
dai::Pipeline pipeline;
auto xIn = pipeline.create<dai::node::XLinkIn>();

// Create ColorCamera beforehand

// Connect to the device
dai::Device device(pipeline);

auto qCamControl = device.getInputQueue("camControl");

// Send a message to the ColorCamera to capture a still image
dai::CameraControl ctrl;


class depthai.node.XLinkIn
class Id

Node identificator. Unique for every node on a single Pipeline

getAssetManager(*args, **kwargs)

Overloaded function.

  1. getAssetManager(self: depthai.Node) -> depthai.AssetManager

  2. getAssetManager(self: depthai.Node) -> depthai.AssetManager

getInputRefs(*args, **kwargs)

Overloaded function.

  1. getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]

  2. getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]

getInputs(self: depthai.Node) → List[depthai.Node.Input]
getMaxDataSize(self: depthai.node.XLinkIn)int
getName(self: depthai.Node)str
getNumFrames(self: depthai.node.XLinkIn)int
getOutputRefs(*args, **kwargs)

Overloaded function.

  1. getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]

  2. getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]

getOutputs(self: depthai.Node) → List[depthai.Node.Output]
getParentPipeline(*args, **kwargs)

Overloaded function.

  1. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

  2. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

getStreamName(self: depthai.node.XLinkIn)str
setMaxDataSize(self: depthai.node.XLinkIn, maxDataSize: int)None
setNumFrames(self: depthai.node.XLinkIn, numFrames: int)None
setStreamName(self: depthai.node.XLinkIn, streamName: str)None
class dai::node::XLinkIn : public dai::NodeCRTP<Node, XLinkIn, XLinkInProperties>

XLinkIn node. Receives messages over XLink.

Public Functions

XLinkIn(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId)
XLinkIn(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId, std::unique_ptr<Properties> props)
void setStreamName(const std::string &name)

Specifies XLink stream name to use.

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

  • name: Stream name

void setMaxDataSize(std::uint32_t maxDataSize)

Set maximum message size it can receive

  • maxDataSize: Maximum size in bytes

void setNumFrames(std::uint32_t numFrames)

Set number of frames in pool for sending messages forward

  • numFrames: Maximum number of frames in pool

std::string getStreamName() const

Get stream name.

std::uint32_t getMaxDataSize() const

Get maximum messages size in bytes.

std::uint32_t getNumFrames() const

Get number of frames in pool.

Public Members

Output out = {*this, "out", Output::Type::MSender, {{DatatypeEnum::Buffer, true}}}

Outputs message of same type as send from host.

Public Static Attributes

static constexpr const char *NAME = "XLinkIn"

Got questions?

Head over to Discussion Forum for technical support or any other questions you might have.