ms_chgxtder( )
Cautions | Errors | Example | See Also
Name: int ms_chgxtder (devh, xid, cdt) Inputs:
Returns: Includes: Category: Mode: Platform: Description
The ms_chgxtder( ) function changes the attribute of the connection extender. After an extended connection has been established, only the channel attributes of the connection extender may be changed.
The signal that the connection extender should listen to is always present on the TDM bus, irrespective of the connection extender setting of the chan_sel field in the MS_CDT data structure.
- Note: There can be only one connection extender per extended connection.
devh the MSI board device handle xid the extended connection identifier cdt pointer to the conference descriptor table. See the MS_CDT data structure page for details. Cautions
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 timeslot\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