---
name: "xdf_get_channel"
section: "3"
platform: "linux"
package: "libxdffileio-dev"
version: "0.3-4+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/xdf_get_channel"
---

# xdf\_get\_channel(3)

Get the channel descriptor handle of a particular index

## NAME

xdf\_get\_channel - Get the channel descriptor handle of a particular index

## SYNOPSIS

**#include \<xdfio.h\>**

**struct xdfch\* xdf\_get\_channel(const struct xdf\*** *xdf***,**\
                               **unsigned int** *index***);**\

## DESCRIPTION

**xdf\_get\_channel**() gets the channel descriptor of the channel stored at index *index* in the XDF file referenced by the handle *xdf*.

## RETURN VALUE

**xdf\_get\_channel**() returns the handle to requested channel descriptor in case of success, NULL otherwise.

## ERRORS

- **EINVAL**

  *xdf* is NULL or *index* is bigger than the number of channel.

## SEE ALSO

[**xdf\_add\_channel**(3)](/xdf_add_channel/3.md)
