---
title: getChannelIndex
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioreporter_ivars/getchannelindex
---

# getChannelIndex

## Declaration

```occ
virtual IOReturn getChannelIndex(uint64_t channel_id, int *channel_index);
```

## Parameters

- `channel_id`: ID of the channel
- `channel_index`: pointer to the returned element_index

## Return Value

Return Value Appropriate IOReturn code

## Discussion

Discussion Returns the index of a channel from internal data structures For efficiently and thread-safely reading channels Locking: Caller must ensure that the reporter (data) lock is held.
