Initializes the provided linkset configuration structure MTP3LinkSetCfg with default values, the specified linkset number, and the destination point code.
MTP3_STATUS Mtp3InitLinkSetCfg ( MTP3LinkSetCfg *pLinkSetCfg, S16 linkSetNo, U32 dpc)
Argument |
Description |
pLinkSetCfg |
Pointer to the MTP3LinkSetCfg structure to be initialized: typedef struct _MTP3LnkSetCfg Refer to the Details section for field descriptions. |
linkSetNo |
Number to assign to this linkset. Valid range is 1 through the maximum number of linksets defined in the call to Mtp3SetGenCfg. |
dpc |
Destination point code associated with this linkset. |
MTP3_SUCCESS
This function enables an application to initialize an MTP3LinkSetCfg structure before calling Mtp3SetLinkSetCfg to set the linkset configuration parameters. Mtp3InitLinkSetCfg sets the linkset number and destination point code as specified, and initializes all other fields in the MTP3LinkSetCfg structure to the defaults.
A pointer to an MTP3LinkSetCfg structure is passed to Mtp3InitLinkSetCfg where default values are set. After initialization, an application can override zero to all of these values and then pass the pointer to Mtp3SetLinkSetCfg, which sets the configuration. The default values provided by Mtp3InitLinkSetCfg are adequate for most applications.
The following table lists the MTP3LinkSetCfg fields that can be modified. A field name in bold indicates that subsequent calls to Mtp3SetLinkSetCfg with the same lnkSetId (lnkSetNo) can update the field. Fields that do not appear in the following table are either unused or for internal use, and must not be modified.
Field |
Description |
lnkSetId |
Linkset number. Must be specified with the lnkSetNo parameter. |
opc |
Originating point code. This field defaults to zero and indicates to the MTP task that it must use the general OPC instead. It can be overridden for multiple OPC emulation. |
adjDpc |
Adjacent destination point code of all links in this linkset. Must be specified with the dpc parameter. Valid range is 0 through 0xFFFFFF. |
minNmbActLnk |
Target number of links to keep active at any given time. Valid range is 0 through 16. Default is 16. |
nmbCmbLnkSet |
Number of combined linksets. Valid range is 0 through 256. Default is 0. |
cmbLnkSet |
Array of combined linkset structures. The entire structure contains zeros by default. Refer to the MTP3CmbLnkSet structure. |
typedef struct _Mtp3CmbLnkSet
/* MTP Level 3 combined linkset cfg */
{
U16 cmbLnkSetId; /* Combined linkset ID */
U8 lnkSetPrior; /* Linkset priority */
U8 spare1; /* Alignment */
} MTP3CmbLnkSet;
The following table lists the MTP3CmbLnkSet fields that can be modified. Both fields in this table can be updated on subsequent calls to Mtp3SetLinkSetCfg with the same lnkSetId (lnkSetNo).
Field |
Description |
cmbLnkSetId |
Combined linkset number (route number). Valid range is 1 through 256. |
lnkSetPrior |
Priority of this linkset relative to other link sets containing this route. Valid range is 0 through 3. Priorities must not be skipped. A single linkset must always be zero. For example, two linksets containing the same route can be assigned priorities 0 and 0 or 0 and 1 but not 0 and 2 or 1 and 2. Default value is 0, the highest priority. |