
Description | Cautions | Example | Errors | See Also
Name: |
long ATDT_TSMODE(devh) | |
Inputs: |
int devh |
|
Returns: |
time slot signaling mode | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
Mode: |
synchronous | |
The ATDT_TSMODE( ) function returns the current signaling mode of the time slot specified in devh.
Parameter |
Description |
devh: |
Specifies the valid Digital Network Interface logical time slot device handle returned by a call to dt_open( ) |
The following defines are provided in dtilib.h.
To determine the signaling mode of a specified time slot, compare the returned value with the defines listed above.
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dtilib.h>
#include <errno.h>
main()
{
int devh; /* Time slot device handle */
long mode; /* Time slot signaling mode */
/*
* Open board 1 time slot 1 device
*/
if ( ( devh = dt_open( "dtiB1T1", 0 ) ) == -1 ) {
printf( "Cannot open time slot dtiB1T1. errno = %d", errno );
exit( 1 );
}
/*
* Get current time slot signaling mode
*/
if ( ( mode = ATDT_TSMODE( devh ) ) == AT_FAILURE ) {
printf( "Error message = %s.",ATDV_ERRMSGP( devh ) );
exit( 1 );
}
/*
* Display it
*/
switch ( mode ) {
case DTM_SIGINS:
printf( "Time slot 1 on board 1 has signaling insertion\n" );
break;
case DTM_TRANSP:
printf( "Time slot 1 on board 1 has signaling transparent\n" );
break;
}
.
.
.
}
If the function returns AT_FAILURE, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive error message. See Appendix A - Standard Runtime Library for more information on SRL functions. The error codes returned by ATDV_LASTERR( ) are:
Error defines can be found in the file dtilib.h.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation