
Description | Cautions | Example | Errors | See Also
Name: |
int dt_getevtmsk(devh,event,bitmaskp) | |
Inputs: |
int devh |
|
int event |
| |
unsigned short *bitmaskp |
| |
Returns: |
0 on success | |
Includes: |
srllib.h | |
Category: |
Parameter Request | |
Mode: |
synchronous | |
The dt_getevtmsk( ) function retrieves the current event bitmask(s) for the specified event type and Digital Network Interface logical board or time slot device. The function can be used to find which bitmask was set by the dt_setevtmsk( ) function.
Parameter |
Description |
devh: |
Specifies the valid Digital Network Interface logical board or Digital Network Interface logical time slot device handle returned by a call to dt_open( ). |
event: |
Specifies which event's bitmask will be retrieved. The possible values for event are: |
| |
| |
| |
| |
See Table 5 for the mask values returned | |
bitmaskp: |
Points to the variable that will contain the value of the bitmask |
Table 5. dt_getevtmsk( ) Return Values
Event |
Return |
Description |
DTG_T1ERREVT |
DTEC_LOS |
loss of T-1 digital signal mask |
DTEC_DPM |
driver performance monitor mask | |
DTEC_RED |
receive red alarm mask | |
DTEC_BPVS |
bipolar violation count saturation mask | |
DTEC_ECS |
error count saturation mask | |
DTEC_RYEL |
receive yellow alarm mask | |
DTEC_RCLX |
receive carrier loss mask | |
DTEC_FERR |
frame bit error mask | |
DTEC_B8ZSD |
bipolar 8 zero substitution detect mask | |
DTEC_RBL |
receive blue alarm mask | |
DTEC_RLOS |
receive loss of sync mask | |
DTEC_OOF |
out of frame error mask | |
DTG_E1ERREVT |
DEEC_RLOS |
receive loss of sync mask |
DEEC_RUA1 |
receive unframed all ones alarm mask | |
DEEC_FSERR |
frame sync error mask | |
DEEC_RRA |
receive remote alarm mask | |
DEEC_BPVS |
bipolar violation count saturation mask | |
DEEC_CECS |
CRC error count saturation mask | |
DEEC_ECS |
error count saturation mask | |
DEEC_LOS |
loss of E-1 digital signal detected mask | |
DEEC_DPM |
driver performance monitor mask | |
DEEC_MFSERR |
multiframe sync error mask | |
DEEC_RSA1 |
receive signaling all ones alarm mask | |
DEEC_RDMA |
receive distant multiframe alarm mask | |
DTG_SIGEVT |
DTMM_AON |
signaling bit A ON event mask |
DTMM_AOFF |
signaling bit A OFF event mask | |
DTMM_BON |
signaling bit B ON event mask | |
DTMM_BOFF |
signaling bit B OFF event mask | |
DTMM_WINK |
receive wink signaling event mask | |
(E-1 only) |
DTMM_CON |
signaling bit C ON event mask |
" " |
DTMM_COFF |
signaling bit C OFF event mask |
" " |
DTMM_DON |
signaling bit D ON event mask |
" " |
DTMM_DOFF |
signaling bit D OFF event mask |
DTG_PDIGEVT |
DTIS_ENABLE |
pulse digit detection enabled |
DTIS_DISABLE |
Refer to Appendix A - Standard Runtime Library for more information on SRL data structures and functions.
This function will fail under the following conditions:
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dtilib.h>
#include <errno.h>
main()
{
int devh; /* Board device handle */
unsigned short bitmaskp; /* Bitmask variable */
/*
* Open board 1 device
*/
if ( ( devh = dt_open( "dtiB1", 0 ) ) == -1 ) {
printf( "Cannot open board dtiB1. errno = %d", errno );
exit( 1 );
}
/*
* Get current T1 error mask
*/
if ( dt_getevtmsk( devh, DTG_T1ERREVT, &bitmaskp ) == -1 ) {
printf( "Error message = %s.",ATDV_ERRMSGP( devh ) );
exit( 1 );
}
/*
* Check for loss of T-1 digital signal
*/
if ( bitmaskp & DTEC_LOS) {
printf( "Loss of T-1 digital signal will be reported \n");
}
.
.
}
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. 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