
Description | Cautions | Example | Errors | See Also
Name: |
dt_unlisten(devh) | |
Inputs: |
int devh |
|
Returns: |
0 on success | |
Includes: |
srllib.h | |
Category: |
SCbus Routing | |
Mode: |
||
The dt_unlisten( ) function disconnects the receive channel from the SCbus. This function disconnects the digital receive (listen) channel (T-1/E-1 time slot) such as on a D/240SC-T1 or D/300SC-E1 board from the SCbus time slot.
Calling the dt_listen( ) function to connect to a different SCbus time slot will automatically break an existing connection. Therefore, when changing connections, you need not call the dt_unlisten( ) function.
Parameter |
Description |
devh: |
Specifies a valid Digital Network Interface time slot device handle returned by a call to dt_open( ) |
This function will fail if an invalid time slot device handle is specified.
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dtilib.h>
#include <errno.h>
main( )
{
int devh; /* Digital channel (time slot) device handle */
/* 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);
}
/* Disconnect receive of board 1, time slot 1 from all SCbus time
slots */
if (dt_unlisten(devh) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(devh));
exit(1);
}
}
If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive error message. The error codes returned by ATDV_LASTERR( ) are:
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation