Mtp2LinkStatus

Obtains status information about the specified link number.

Prototype

MTP2_STATUS Mtp2LinkStatus (U8 board, S16 linkNo, MTP2LinkStatus *pStatus)

Argument

Description

board

TX board number on which the desired MTP 2 task resides.

linkNo

Link number for which to obtain status information. Must have been previously defined through Mtp2SetLinkCfg.

pStatus

Pointer to a buffer provided by the application where the requested status information is returned:

typedef struct _Mtp2LinkStatus /* MTP Level 2 - signaling link status */
{
  DateTime  DT;                /* Date / time stamp                   */
  U8        hlSt;              /* sap state                           */
  U8        psOutsFrm;         /* outstanding frames to MAC           */
  S16       cntMaDrop;         /* frames dropped by MAC               */
  U8        llSt;              /* link level matrix state             */
  U8        lclBsy;            /* local busy                          */
  Bool      remBsy;            /* remote busy                         */
  U8        fsn;               /* forward sequence number             */
  U8        bsn;               /* backward sequence number            */
  U8        flcSt;             /* flow control state                  */

} MTP2LinkStatus;

See the Details section for field descriptions.


Return values

Return value

Description

MTP2_SUCCESS

 

MTP2_BOARD

Invalid board number.

MTP2_HANDLE

Mtp2MgmtInit not called for specified board.


Details

This function obtains status information about the specified link number, including the link state, flow control state, and busy states.

The following table describes the MTP2LinkStatus fields:

Field

Description

hlSt

SAP state. Valid values:

ST_UNBOUND

ST_CONFIGURED

ST_BND_DISABLED

ST_BND_ENABLED

psOutsFrm

Outstanding frames to MAC. Valid range is 0 through 0xFF.

cntMaDrop

Frames dropped by MAC. Valid range is 0 through 0xFF.

llSt

Link level matrix state. Valid values:

ST_UNUSED

ST_OUT_OF_SERVICE

ST_INITIAL_ALIGNMENT

ST_ALIGNED_READY

ST_ALIGNED_NOT_READY

ST_PROC_OUT

ST_IN_SERVICE

ST_IDLE

ST_NOT_ALIGNED

ST_IS_ALIGNED

ST_PROVING

ST_LOCAL_PROC_OUT

ST_REMOTE_PROC_OUT

ST_BOTH_PROC_OUT

ST_MONITORING

ST_CONGESTION

ST_POWER_OFF

lclBsy

Whether the local MTP 2 is sending SIBs. Valid values:

TRUE

FALSE

remBsy

Whether the remote MTP 2 is sending SIBs. Valid values:

TRUE

FALSE

fsn

Last forward sequence number sent. Valid range is 0 through 127.

bsn

Backward sequence number to send next. Valid range is 0 through 127.

flcSt

Outbound flow control level. Valid range is 0 through 2. 2 = congested.


See also

Mtp2MgmtInit, Mtp2SetLinkCfg