Obtains per-channel statistics synchronously.
#include txcpi.h
CPI_ERR_TYPE cpi_stats ( TX_HANDLE handle, U32 options, TX_STATS_COMMON *stats)
Argument |
Description |
handle |
TX_HANDLE associated with the channel. |
options |
Statistics collection operation. Refer to the Details section for valid values. |
stats |
Pointer to a location where statistics information is written. |
Return value |
Description |
CPI_SUCCESS |
Statistics request successfully completed. |
CPI_ERROR |
Call cpi_get_last_error to obtain the error code. |
cpi_stats enables an application to collect the per-channel statistics maintained by the CPI library. All statistics definitions can be found in the txstats.h include file.
The CPI layer maintains a set of common statistics and optionally a set of layer-specific statistics. The common statistics are defined by the TX_STATS_COMMON structure. Use the TX_STATS_NAME operation to get ASCII names of the common statistics.
Use the options parameter to describe the type of statistics to return. The following table lists the valid values for the options parameter:
#include txstats.h
Use this value... |
To return... |
TX_STATS_GET |
Current statistics. |
TX_STATS_ZERO |
Current statistics, then zero the statistics. |
TX_STATS_NAME |
Names of common statistics. |
TX_STATS_NAME_LAYER |
Names of layer-specific statistics. |
TX_STATS_DESC |
A description of common statistics. |
TX_STATS_DESC_LAYER |
A description of layer-specific statistics. |