---
name: "egd_get_numch"
section: "3"
platform: "linux"
package: "libeegdev-dev"
version: "0.2-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/egd_get_numch"
---

# egd\_get\_numch(3)

Get the number of channels sampled by type

## NAME

egd\_get\_numch - Get the number of channels sampled by type

## SYNOPSIS

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

**int egd\_get\_numch(const struct eegdev\*** *dev***, int** *stype***);**\

## DESCRIPTION

**egd\_get\_numch**() returns the number of channels of type *stype* sampled by the recording device referenced by *dev*. *stype* must be one of the values returned by [**egd\_sensor\_type**(3)](/egd_sensor_type/3.md).

## RETURN VALUE

In case of success, the function returns a non negative value corresponding to the number of channels of type *stype* (possibly 0 if the device does not sample this type of data). Otherwise, -1 is returned and *errno* is set accordingly.

## ERRORS

**egd\_get\_numch**() will fail if:

- **EINVAL**

  *dev* is NULL or *stype* is not valid value.

## SEE ALSO

[**egd\_get\_cap**(3)](/egd_get_cap/3.md), [**egd\_sensor\_type**(3)](/egd_sensor_type/3.md)
