Table of Contents Index NMS Glossary Previous Page Next Page (Page 10 of 17 in this chapter) Version


ppxDisconnect

Description

Disconnects an existing simplex, duplex, or quad connection.

Prototype

DWORD ppxDisconnect ( CTAHD ctahd,
PPX_MVIP_ADDR *talker,
PPX_MVIP_ADDR *listener,
PPX_CX_MODE mode )

ctahd Context handle returned by ctaCreateContext.

talker Pointer to a PPX_MVIP_ADDR structure. The structure is defined as follows:


typedef struct
{
 DWORD switch_number;
DWORD bus;
DWORD stream; DWORD timeslot; } PPX_MVIP_ADDR
See the Details section for a description of these fields.

listener Pointer to a PPX_MVIP_ADDR structure.

mode Connection mode: PPX_SIMPLEX,
PPX_DUPLEX, or PPX_QUAD.

Return Values

Events

Details

This function disconnects a talker from a listener that was previously connected through ppxConnect. Any intervening timeslots are freed.

The context must own the connection in order to disconnect.

If talker = NULL, the listener is disconnected (output disabled).

ppxDisconnect may also be used to disconnect any nailed up connections specified in the Point-to-Point Switching configuration file, as long as the connections were not specified with the NAILED keyword. Verify that no application is using the connection before disconnecting.

The PPX_MVIP_ADDR structure contains the following fields:
Field

Description

switch_number

Switch number of the board as defined in ppx.cfg.

bus

Acceptable values are:
MVIP95_MVIP_BUS
MVIP95_LOCAL_BUS

stream

The stream number of the listener/talker.

timeslot

The timeslot of the listener/talker.

See Also

ppxConnect, ppxRestoreConnections

Example

DWORD MyConnectDisconnect( CTAHD ctahd, PPX_CX_MODE mode, BOOL MakeConn )
{
    PPX_MVIP_ADDR listener, talker;
    DWORD ret ;
    
    talkers.switch_number = 0;
    talker.bus = MVIP95_LOCAL_BUS;
    talker.stream = 0;
    talker.timeslot = 4;
 
    listener.switch_number = 1 ;
    listener.bus = MVIP95_LOCAL_BUS;
    listener.stream = 5;
    listener.timeslot = 4;
    
     /*
      * The passed-in "mode" has one of the following
      * values:
      *    PPX_SIMPLEX, PPX_DUPLEX, PPX_QUAD
      */
    if ( MakeConn == TRUE )
   
       ret = ppxConnect( ctahd, &talker, &listener, mode );
    
    else
    
       ret = ppxDisconnect( ctahd, &listener, &talker, mode );
    
   return ( ret ) ;
}


Table of Contents Index NMS Glossary Previous Page Next Page (Page 10 of 17 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, NMS Communications Corporation. All rights reserved.