M3uaGetApiStats

Obtains statistics from the host driver about congestion level and data transfer activity.

Prototype

DWORD M3uaGetApiStats ( CTAHD ctahd, M3UAAPISTATS *pStats, U8 bReset)

Argument

Description

ctahd

Natural Access handle.

pStats

Pointer to the following M3UAApiSt structure:

typedef struct
{
  U32 qCount;      /* number of API messages currently queued    */
                   /* to M3UA task                               */
  U32 qPeak;       /* max number of API messages ever queued to  */
                   /* M3UA task                                  */
  U32 txPending;   /* current number of outstanding transmit     */
                   /* rqsts to M3UA task                         */
  U32 txPendPeak;  /* max number of transmit rqsts ever          */
                   /* outstanding to M3UA task                   */
  U32 txSuccess;   /* number of successful transmit requests     */
                   /* completed                                  */
  U32 txFailed;    /* number of failed transmit requests         */
  U32 txLastErr;   /* error code from last failed transmit       */
                   /* request                                    */
  U32 rxSuccess;   /* number of events received from M3UA task   */
  U32 rxFailed;    /* number of receive failure events from      */
                   /* M3UA task                                  */
  U8  apiQCongLvl; /* current outbound queue congestion level    */
                   /* [0..3]                                     */
  U8  spare1;      /* spare for alignment                        */
  U16 spare2;      /* spare for alignment                        */
} M3UAAPISTATS;

bReset

If non-zero, statistics are reset after returning them to the application.


Return values

Return value

Description

M3UA_SUCCESS

 

CTAERR_INVALID_CTAHD

Invalid handle.