ms_estxtdcon( )
Cautions | Errors | Example | See Also
Name: int ms_estxtdcon (devh, cdt, xid) Inputs:
Returns: Includes: Category: Mode: Platform: Description
The ms_estxtdcon( ) function establishes an extended connection. An extended connection is a connection in which there is a third party. Calling this function uses three resources.
devh the MSI board device handle cdt pointer to the conference descriptor table xid pointer to the memory location containing the extended connection number For the purpose of this function, a connection is a full-duplex, TDM bus routing between two parties. A connection may be set up using the convenience function nr_scroute( ). It is the responsibility of the application to set up the connection prior to extending it. No verification of the presence of a connection between parties is made prior to extending the connection.
One party of the connection to be extended must be a station on the board for which the ms_estxtdcon( ) function is issued. The other party is another station or a TDM bus time slot. Extended connections have a connection extender and a connection identifier. The differences are as follows:
- A connection extender is always the third party in a connection and can be either a station or a TDM bus time slot.
- A connection identifier must be a station. The attributes of the connection identifier can only be set at the time the extended connection is established.
Cautions
- Stations to be added to an extended connection must be off-hook when ms_estxtdcon( ) is called.
- This function fails when:
Errors
If this function returns -1 to indicate failure, obtain the reason for the error by calling the SRL standard attribute function ATDV_LASTERR( ) or ATDV_ERRMSGP( ) to retrieve either the error code or a pointer to the error description, respectively.
Refer to the error type tables found in Chapter 5, "Error Codes". Error defines can be found in dtilib.h or msilib.h.
Example
#include <windows.h> /* For Windows applications only */ #include <errno.h> #include "srllib.h" #include "dtilib.h" #include "msilib.h" int dev1; /* Device handle for board */ int chdev2; /* Station dev descriptor */ int tsdev1,tsdev2; /* DTI time slot device handles */ MS_CDT cdt[3]; /* Connection descriptors */ int xid; /* Connection ID */ long lts; /* listen time slot */ SC_TSINFO tsinfo; /* Time slot information structure */ int rc; /* Return Code */ int station, ts1, ts2; /* Start System */ /* Assume that there is a DTI in the system. * Assume two DTI transmit time slots. ts1 and * ts2, are identified by device handles tsdev1 * and tsdev2, respectively. */ /* * Continue processing */ /* * Establish connection between a station and time slot ts1 */ if ((rc=nr_scroute(tsdev1,SC_DTI,chdev2,SC_MSI,SC_FULLDUP))== -1) { printf("Error making connection between DTI time slot\n"); printf("and MSI station. rc = 0x%x\n",rc); exit(1); } /* * Now extend the connection established earlier */ cdt[0].chan_num = station ; /* Use MSI station as connection identifier*/ cdt[0].chan_sel = MSPN_STATION; cdt[0].chan_attr = MSPA_PUPIL; cdt[1].chan_num = ts2; /* DTI time slot ts2 for connection extender */ cdt[1].chan_sel = MSPN_TS; cdt[1].chan_attr = MSPA_RO; /* Establish extended connection. Since the extender is in receive only mode, * the connection will be extended without interrupting the conversation between the * external party and the station */ if (ms_estxtdcon(dev1,cdt,&xid) == -1) { printf("Error Message = %s",ATDV_ERRMSGP(dev1)); exit(1); } /* Make tsdev2 listen to time slot returned by the ms_estxtdcon function */ tsinfo.sc_numts = 1; tsinfo.sc_tsarray = &cdt[1].chan_lts; if (dt_listen(tsdev2,&tsinfo) == -1) { printf("Error Message = %s",ATDV_ERRMSGP(tsdev2)); exit(1); } /* Prepare cdt to change the attribute of the connection extender */ cdt[0].chan_num = ts2 ; /* Required station number */ cdt[0].chan_sel = MSPN_TS; cdt[0].chan_attr = MSPA_COACH; /* Change extender to coach */ if (ms_chgxtder(dev1,xid,cdt)== -1) { printf("Error Message = %s",ATDV_ERRMSGP(dev1)); exit(1); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation