Mtp3LinkStats

Obtains and potentially resets data link statistical information about the specified link number.

Prototype

MTP3_STATUS Mtp3LinkStats ( U8 board, S16 linkNo, MTP3LinkStats *pStats, BOOL bReset)

Argument

Description

board

TX board number on which the desired MTP 3 task resides. Valid range is 1 through maxboard (currently 8).

linkNo

Link number for which statistics are obtained. Must have been previously defined with Mtp3SetLinkCfg.

pStats

Pointer to a buffer provided by the application where the requested statistical information is returned. Refer to the MTP3LinkStats structure.

bReset

Optionally resets statistics.


Return values

Return value

Description

MTP3_SUCCESS

 

MTP3_BOARD

Invalid board number.

MTP3_HANDLE

Mtp3MgmtInit not called for the specified board.


Details

If the bReset value is a non-zero integer, the statistics are reset after returning the current values. A value of zero disables the reset function.

Link statistics include counts for the various message types and their acknowledgments both transmitted and received.

MTP3LinkStats structure

typedef struct _Mtp3LinkStats   /* MTP Level 3 link statistics   */
{
  U32  changeOverTx;      /* Changeover order transmitted        */
  U32  changeOverRx;      /* Changeover order received           */
  U32  changeOverAckTx;   /* Changeover ack transmitted          */
  U32  changeOverAckRx;   /* Changeover ack transmitted          */
  U32  changeBackTx;      /* Changeback declaration              */
                          /*   transmitted                       */
  U32  changeBackRx;      /* Changeback declaration received     */
  U32  changeBackAckTx;   /* Changeback ack transmitted          */
  U32  changeBackAckRx;   /* Changeback ack received             */
  U32  emChangeOverTx;    /* Emergency changeover transmitted    */
  U32  emChangeOverRx;    /* Emergency changeover received       */
  U32  emChangeOverAckTx; /* Emergency changeover ack            */
                          /*   transmitted                       */
  U32  emChangeOverAckRx; /* Emergency changeover ack received   */
  U32  lnkInhTx;          /* Link inhibit transmitted            */
  U32  lnkInhRx;          /* Lnk inhibit received                */
  U32  lnkUninhTx;        /* Lnk uninhibit transmitted           */
  U32  lnkUninhRx;        /* Link uninhibit received             */
  U32  lnkInhAckTx;       /* Link inhibited ack transmitted      */
  U32  lnkInhAckRx;       /* Link inhibited ack received         */
  U32  lnkUninhAckTx;     /* Link uninhibited ack transmitted    */
  U32  lnkUninhAckRx;     /* Link uninhibited ack received       */
  U32  lnkInhDenTx;       /* Link inhibit denied transmitted     */
  U32  lnkInhDenRx;       /* Link inhibit denied received        */
  U32  lnkForceUninhTx;   /* Force link uninhibit transmitted    */
  U32  lnkForceUninhRx;   /* Force link uninhibit received       */
  U32  lnkLocInhTstTx;    /* Local link inhibit test             */
                          /*   transmitted                       */
  U32  lnkLocInhTstRx;    /* Local link inhibit test received    */
  U32  lnkRmtInhTstTx;    /* Remote link inhibit test            */
                          /*   transmitted                       */
  U32  lnkRmtInhTstRx;    /* Remote link inhibit test received   */
  U32  lnkConOrdTx;       /* Link connection order transmitted   */
  U32  lnkConOrdRx;       /* Link connection order received      */
  U32  lnkConAckTx;       /* Link connection ack transmitted     */
  U32  lnkConAckRx;       /* Link connection ack received        */
  U32  txCntrlRx;         /* Transfer controlled received        */
  U32  txCntrlTx;         /* Transfer controlled transmitted     */
  U32  lnkTstRx;          /* Link test received                  */
  U32  lnkTstTx;          /* Link test transmitted               */
  U32  lnkTstAckRx;       /* Link test ack received              */
  U32  lnkTstAckTx;       /* Link test ack transmitted           */
  U32  txDrop;            /* Transmit messages dropped           */
  U32  txCongDrop;        /* MSUs dropped due to link congestion */
  U32  sifOctTx;          /* Number of SIF octets transmitted    */
  U32  sifOctRx;          /* Number of SIF octets received       */
  U32  sioOctTx;          /* Number of SIO octets transmitted    */
  U32  sioOctRx;          /* Number of SIO octets received       */
  U32  msuTx;             /* Number of MSU transmitted           */
  U32  msuRx;             /* Number of MSU received              */
  U32  cong0;             /* Link congestion at threshold 0      */
  U32  cong1;             /* Link congestion at threshold 1      */
  U32  cong2;             /* Link congestion at threshold 2      */
  U32  cong3;             /* Link congestion at threshold 3      */
  U16  tqCnt;             /* Message count in transmit queue     */
  U16  rtqCnt;            /* Message count in retransmit queue   */
  U16  hiTqCnt;           /* High water message count in transmit*/
                          /*   queue                             */
  U16  hiRtqCnt;          /* High water message count in the     */
                          /*   retransmit queue                  */
  U32  durLnkUnav;        /* Duration of link unavailability     */
  U32  durLnkCong;        /* Duration of link congestion         */
} MTP3LinkStats;

See also

Mtp3MgmtInit, Mtp3SetLinkSetCfg