Initializes the provided data link configuration structure with default values and the specified link number and link type.
MTP2_STATUS Mtp2InitLinkCfg (U8 board, MTP2LinkCfg *pLinkCfg, S16 linkNo, U8 linkType)
Argument |
Description |
board |
TX board number on which the desired MTP 2 task resides. |
pLinkCfg |
Pointer to the MTP2LinkCfg structure to be initialized: typedef struct _MTP2LinkCfg /* MTP level 2 data link SAP configuration */ See the Details section for field descriptions. |
linkNo |
Link number to assign to this data link. Valid range is 0 through the maximum number of links minus 1, depending on hardware configuration and whether high speed links are defined. |
linkType |
Type of link. Valid values are: MTP2LNK_ANSI MTP2LNK_ANSI88 MTP2LNK_CCITT |
Return value |
Description |
MTP2_SUCCESS |
|
MTP2_LNKTYPE |
Invalid link type. |
This function enables an application to initialize an MTP2LinkCfg structure before calling Mtp2SetLinkCfg to set the data link configuration parameters. Mtp2InitLinkCfg sets the link number and link type as specified and initializes all other fields in the Mtp2SetLinkCfg structure to their defaults.
A pointer to an MTP2LinkCfg structure is passed to Mtp2InitLinkCfg where default values are set. After initialization, an application can override zero to all of these values and then pass the pointer to Mtp2SetLinkCfg, which sets the configuration. The default values provided by Mtp2InitLinkCfg are adequate for most applications.
The following table lists the MTP2LinkCfg fields that can be modified. Unless otherwise specified, the timer names correspond to the CCITT specification.
Note: All timer values are specified in tenths of a second.
Field |
Description | |||||||||||||||
swtch |
Protocol type. Default is the linkType parameter. Valid values: MTP2LNK_ANSI MTP2LNK_ANSI88 MTP2LNK_CCITT | |||||||||||||||
maxOutsFrm |
Maximum outstanding frames to layer MTP 1. NMS recommends leaving the default at 2. | |||||||||||||||
errType |
Normal or cyclical (for PCR) error checking. Valid values: ERR_NRM (default) ERR_CYC | |||||||||||||||
t1 |
Timer aligned and ready. Valid range is 1 through 65535. Default is 130 (ANSI) and 400 (ITU). | |||||||||||||||
t2 |
Timer not aligned. Valid range is 1 through 65535. Default is 115 (ANSI) and 100 (ITU). | |||||||||||||||
t3 |
Timer aligned. Valid range is 1 through 65535. Default is 115 (ANSI) and 15 (ITU). | |||||||||||||||
t5 |
Timer sending SIBs (busy indications). Valid range is 1 through 65535. Default is 1. | |||||||||||||||
t6 |
Timer remote congestion. Valid range is 1 through 65535. Default is 60. | |||||||||||||||
t7 |
Timer excessive delay of acknowledgement. Valid range is 1 through 65535. Default is 20. | |||||||||||||||
t10 |
Amount of time MTP 2 can be isolated from a remote MTP 3 before SIPO (sending processor outage). Valid range is 1 through 65535. Default is 30. | |||||||||||||||
t11 |
Time to wait for a flow control acknowledgement from MTP 3 before sending another flow control indication. Valid range is 1 through 65535. Default is 20. | |||||||||||||||
t12 |
Time to wait for a status confirmation from MTP 3 before sending another status indication. Valid range is 1 through 65535. Default is 20. | |||||||||||||||
t13 |
Time to wait for a disconnect confirmation from MTP 3 before sending another disconnect indication. Valid range is 1 through 65535. Default is 20. | |||||||||||||||
provNormal |
Normal proving period. Valid range is 1 through 65535. Default is 23 (ANSI) and 82 (ITU). | |||||||||||||||
provEmrgcy |
Emergency proving period. Valid range is 1 through 65535. Default is 6 (ANSI) and 5 (ITU). | |||||||||||||||
lssuLen |
One or two byte LSSU length. Valid values: 1 2 (default) | |||||||||||||||
hsBits |
High speed link bits valid values:
The following table describes these high speed link bits:
A combination of high and normal speed links is not supported. | |||||||||||||||
maxFrmLen |
Maximum frame length for MSU. Valid range is 64 through 1024. NMS recommends leaving the default at 272. | |||||||||||||||
congDisc |
Congestion discard. Valid values: TRUE FALSE (default) | |||||||||||||||
sdT |
SUERM error rate threshold. Valid range is 1 through 255. Default is 64. | |||||||||||||||
sdD |
SUERM decrement rate. Valid range is 1 through 65535. Default is 256. | |||||||||||||||
sdTie |
AERM emergency error rate threshold. Valid range is 1 (default) through 255. | |||||||||||||||
sdTin |
AERM normal error rate threshold. Valid range is 1 through 255. Default is 4. | |||||||||||||||
sdN1 |
Maximum number of MSUs for retransmission (when using PCR). Valid range is 1 through 255. Default is 30. | |||||||||||||||
sdN2 |
Maximum number of MSUs octets for retransmission (when using PCR). Valid range is 1 through 65535. Default is 220. | |||||||||||||||
sdCp |
Maximum number of proving failures. Valid range is 1 through 255. Default is 5. | |||||||||||||||
baud |
Baud rate. Valid values: BD_4800 BD_9600 BD_19200 BD_28800 BD_38400 BD_48000 BD_56000 (default) BD_64000 | |||||||||||||||
physIntType |
Physical interface type (DCE/DTE) with or without modem signal detection. Modem signal usage is the only way to assure detection of connection loss and re-establishment. Valid values: INT_DTE (default) INT_DCE INT_DTE_MODEM INT_DCE_MODEM
Note: Modem signal detection requires an additional pod jumper on the DCE side connecting DSR and CD. | |||||||||||||||
dataEncoding |
Data encoding (NRZ/NRZI). Valid values: DAT_NRZ (default) DAT_NRZ1 | |||||||||||||||
flgShare |
Share flags between frames. Valid values: FLAG_SHARE (default) NO_FLAG_SHARE | |||||||||||||||
FlgIdle |
Use idles (TRUE) or flags (FALSE). Default is FALSE. | |||||||||||||||
numFlg |
Number of additional flag characters between frames. Valid range is 0 (default) through 15. | |||||||||||||||
isoThresh |
Number of messages queued to MTP 3 while isolated that causes MTP 2 to begin SIPOs (processor outages). Valid range is 1 through 65535. Default is 1000. | |||||||||||||||
txqThresh1 |
Transmission queue length at which the outbound flow control level is raised to one. Valid range is 1 through 65535. Default is 50. | |||||||||||||||
txqThresh1Abate |
Transmission queue length at which the outbound flow control level is lowered to zero. Valid range is 1 through 65535. Default is 20. | |||||||||||||||
txqThresh2 |
Transmission queue length at which the outbound flow control level is raised to two. The subsequent indication causes MTP 3 to cease all transmission to MTP 2 until the flow control level returns to one or zero. Valid range is 1 through 65535. Default is 200. | |||||||||||||||
txqThresh2Abate |
Transmission queue length at which the outbound flow control level is lowered to one. Valid range is 1 through 65535. Default is 100. | |||||||||||||||
sapThresh |
Number of messages queued to MTP 3 while inbound flow control is in effect that causes MTP 2 to send SIBs (busy indications). Valid range is 1 through 65535. Default is 500. | |||||||||||||||
sapThreshAbate |
Number of messages queued to MTP 3 while inbound flow control is in effect that causes MTP 2 to stop sending SIBs (busy indications). Valid range is 1 through 65535. Default is 100. | |||||||||||||||
idleFreq |
Frequency at which FISUs are sent by the software (in ms). 0 (default) indicates that hardware constantly retransmits duplicate FISUs. Non-zero frequencies can be used by switches that process all FISUs (including duplicate FISUs) in the software. Valid range is 1 through 65535. | |||||||||||||||
rtFreq |
Frequency at which other retransmitted SUs (LSSUs) are sent by the software (in ms). 0 (default) indicates that hardware constantly retransmits duplicate LSSUs. Non zero frequencies can be used by switches that process all LSSUs (including duplicate LSSUs) in the software. Valid range is 1 through 65535. |