ISUPGetApiStats

Retrieves congestion level activity statistics from the ISUP service.

Prototype

DWORD ISUPGetApiStats ( CTAHD ctahd, ISUPAPISTATS *pStats, U8 reset)

Argument

Description

ctahd

Natural Access handle returned by ctaCreateContext.

pStats

Pointer to the address of the buffer where statistics are returned to the caller:

typedef struct
{
   U32 qCount;       /* Number of API messages currently
                      * queued to ISUP layer                     */
   U32 qPeak;        /* Max number of API messages ever
                      * queued to ISUP layer                     */
   U32 txPending;    /* Current number of outstanding transmit
                      * rqsts to ISUP layer                      */
   U32 txPendPeak;   /* Max number of transmit rqsts ever
                      * outstanding to ISUP layer                */
   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 ISUP
                      * layer                                    */
   U8  apiQCongLvl;  /* Current outbound queue congestion
                      * level [0..3]                             */
   U8  isupCongLvl;  /* Current ISUP layer congestion
                      * level [0..3]                             */
   U8  isupCongSrc;  /* Reason for ISUP layer congestion         */
   U8  spare1;       /* Spare for alignment                      */
} ISUPAPISTATS;

reset

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


Return values

Return value

Description

ISUP_SUCCESS

 

CTAERR_INVALID_CTAHD

Natural Access handle is invalid.


<NMSBREAK>

Example

ISUPAPISTATS  pStats;
DWORD         status;
CTAHD         FstCtaHd = Valid CTA Handle;
 

status = ISUPGetApiStats(FstCtaHd, &pStats, 0);
if (status != ISUP_SUCCESS)
    printf("isuporig: ISUPGetApiStats() failed status = %d\n", status);
    else
    {
        printf("qCount = %x\n", pStats.qCount);
        printf("qPeak = %x\n", pStats.qPeak);
        printf("txPending = %x\n", pStats.txPending);
        printf("txPendPeak = %x\n", pStats.txPendPeak);
        printf("txSuccess = %x\n", pStats.txSuccess);
        printf("txFailed = %x\n", pStats.txFailed);
        printf("txLastErr = %x\n", pStats.txLastErr);
        printf("rxSuccess = %x\n", pStats.rxSuccess);
        printf("apiQCongLvl = %x\n", pStats.apiQCongLvl);
        printf("isupCongLvl = %x\n", pStats.isupCongLvl);
        printf("isupCongSrc = %x\n", pStats.isupCongSrc);
     }