NMS_V5AddChannel

Adds an HDLC channel (usually associated with an ISDN data channel) to a provisioned active variant of a specified interface.

Prototype

NMS_V5_RESULT_T NMS_V5AddChannel ( NMS_V5_INTERFACE_ID_T interfaceId, NMS_V5_CHANNEL_LOCATION_T channel_loc)

Argument

Description

interfaceId

Interface ID of a provisioned interface.

channel_loc

HDLC channel location specified by the following structure:

typedef union _NMS_V5_CHANNEL_LOCATION_T
{
   struct {
   DWORD boardNb;
   DWORD trunkNb;
   DWORD timeslotNb;
}  CG;
} NMS_V5_CHANNEL_LOCATION_T

See the Details section for field descriptions.


Return values

Return value

Description

NMSV5_SUCCESS

 

NMSV5_INTERNAL_FAILURE

Internal failure. Refer to the trace log for more information.

NMSV5_INVALID_CHANNEL

Specified HDLC channel is already provisioned on the specified interface.

NMSV5_INVALID_E1

An E1 link is not provisioned for this channel.

NMSV5_INVALID_INTERFACE_ID

Specified interface is not provisioned.

NMSV5_INVALID_PARMS

Invalid context handle was passed to NMS_V5Initialize.

NMSV5_NOT_INITIALIZED

NMS V5 library was not initialized with NMS_V5Initialize.

NMSV5_OUTOFRESOURCE

Physical limit of HDLC channels on board is reached. No more HDLC channels can be added.


Details

NMS_V5AddChannel adds an HDLC link (usually associated with ISDN data over V5.2 interface) to an active variant of a provisioned interface without requiring the application to re-provision the interface. NMS_V5AddChannel creates, initializes, and resets the specified HDLC channel. When the NMS V5 library adds the channel, the library starts the channel if the interface is started, or leaves the channel configured but disabled if the interface is not started.

The NMS V5 library uses the call back function and the buffer the application defined when calling NMS_V5ProvisionInterface to pass HDLC data and events to the application. NMS_V5AddChannel performs any necessary internal switching between the DSP(s) processing the HDLC data and the channel's physical HDLC location on the E1 trunk. The E1 link with which the new HDLC channel is associated must be provisioned before the application can invoke NMS_V5AddChannel for that channel.

Caution:

Resetting the switch block on a board where HDLC channels have been provisioned automatically destroys the internal switching connections set up by the NMS V5 library between E1 interfaces and DSP cores.


The NMS_V5_CHANNEL_LOCATION_T structure includes the following fields:

Field

Description

boardNb

Logical board number where an HDLC instance is located (as defined by NMS OAM).

trunkNb

Logical trunk number associated with the HDLC channel (as defined by NMS OAM).

TimeslotNb

Physical timeslot associated with the HDLC channel.


The NMS V5 library uses the channel_callback function (defined by the application when invoking NMS_V5ProvisionInterface) to pass HDLC frames and errors to the application.

See also

NMS_V5DeleteChannel, NMS_V5AddE1, NMS_V5DeleteE1

Example

void  AddChannel( void )
{
    NMS_V5_RESULT_T           NmsResult;
    DWORD                     InterfaceId;
    NMS_V5_CHANNEL_LOCATION_T NMSNewChannelLoc;

    printf("NMS_V5AddChannel:\n");

    /* Get parameters */
    promptdw_nodft("Enter interfaceId", &InterfaceId);
    GetChannelLocationNMS( &NMSNewChannelLoc );

    NmsResult = NMS_V5AddChannel( InterfaceId, NMSNewChannelLoc );

    printf ("NMS_V5AddChannel: Result=%s\n",PRINT_RESULT(NmsResult));
}