
Description | Cautions | Example | Errors
Name: |
int d42_flags(devh, bufferp) | |
Inputs: |
int devh |
|
char *bufferp |
| |
Returns: |
ED42_NOERROR |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
Supports: |
D/42-SX | |
The d42_flags( ) function retrieves current D/42D-SX LCD Features Display data and places it in the application buffer. The application buffer must be 49 bytes, and will contain a bit mask representing the status of each flag in the Features Display. Refer to the D/42 Series User's Guide for more information.
Parameter |
Description |
devh: |
specifies the valid channel device descriptor obtained by a call to dx_open( ) |
bufferp: |
pointer to the application buffer. The buffer will contain the Features Display data. |
The Features Display data stored in the application buffer is 16 bytes long. Each byte represents a specific flag on the SUPERSET 4 Feature Display. Refer to Table 1 for a description of each Feature Display LCD flag. The value of each byte can be 0x00 (off), 0x01 (on), or 0x02 (flashing). Figure 1 shows the contents of the application buffer when the Features Display illuminates "3:AUTO ANS".
Table 1. MITEL SUPERSET 4 Features Display Descriptions
Byte |
Flag |
Byte |
Flag |
Byte |
Flag |
0 |
Undefined |
6 |
5: |
12 |
1: |
1 |
MIC ON |
7 |
Undefined |
13 |
2: |
2 |
ACC CODE |
8 |
Undefined |
14 |
3: |
3 |
MSG |
9 |
FWD |
15 |
Undefined |
4 |
_ |
10 |
NO DIST'B |
||
5 |
4: |
11 |
AUTO ANS |
Figure 1. Contents of the Features Display Application Buffer

The application buffer must be 49 bytes. The Features Display is stored as a binary data (16 bytes). The 49 byte buffer size is for future expansion. An application that passes anything smaller will not be backward compatible in future releases.
void main(void)
{
int devh;
int rc = 0;
char bufferp[49];
/* Open Channel Device */
if ( (devh = dx_open("dxxxB1C1",NULL))==-1)
{
printf("Error dx_open( )\n");
exit(-1);
} /* End dx_open */
/* Wait for incoming call */
if ( (rc = dx_wtring(devh, 2, DX_ONHOOK, -1))==-1)
{
printf("Error dx_wtring( )\n");
dx_close(devh);
exit(-1);
}
/* Get the LCD Flags Information */
if ( (rc = d42_flags(devh, bufferp)) == -1)
{
printf("Error d42_flags( )\n");
dx_close(devh);
exit(-1);
} /* End d42_flags*/
/* Test 1 Flag */
if (buffer[1] == 1)
{
printf("Microphone is ON");
}
else if (buffer[1] == 0)
{
printf("Microphone is OFF");
}
else /* must be flashing */
{
printf("Microphone is FLASHING");
} /* End Test 1 Flag */
dx_close(devh);
} /* End main */
If this function returns -1 to indicate a failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following (most common) errors. For a complete list of error codes and definitions, refer to Appendix C.
ED42_FWREQFAILURE |
Firmware error |
ED42_UNKNOWNBOARD |
Unknown D/42 board type |
ED42_BADDEVICE |
Invalid or wrong device handle |
ED42_INVALARG |
Invalid argument passed to function |
DXLIB_INVNRB |
Internal voice library error |
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation