
Description | Cautions | Example | Errors | See Also
Name: |
||
Inputs: |
int devh |
|
Returns: |
char *bufferp |
|
Includes: |
0 -1 |
|
Category: |
D42LIB.H | |
Mode: |
synchronous | |
The d42_displayex( ) function retrieves the current LCD/LED display (alphanumeric) data and places it in an application buffer. Unlike d42_display( ), this function can retrieve display data larger than 49 bytes. The buffer must be at least 49 bytes, which would mean a data string of 48 bytes plus a null. The length of the data string is 50 for the Lucent Definity G3 and the 75/85 PBXs 60 for the Siemens ROLM; and 80 for the MITEL SX-200ML or SX-2000 PBXs. Byte 0 of the display data corresponds to the top, left-most display element. The display data is stored as a null-terminated ASCII string. Refer to the PBX Integration User's Guide for more information specific to your PBX. An example showing the contents of the application buffer for each of the two supported switches with a display larger than 48 bytes is shown below. d42_displayex( ) may also be used for display sizes smaller than 48 bytes.
Lucent Definity - 50-character display
data |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
data |
52 45 4C 45 41 53 45 20 41 4E 44 20 54 52 59 20 41 47 41 49 4E 20 20 20 20 |
byte |
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
Siemens ROLM - 60-character display
data |
43 4F 4E 46 45 52 45 4E 43 45 20 20 20 20 20 20 01 02 03 20 |
byte |
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 |
data |
20 20 20 20 20 20 20 20 20 20 59 4F 55 52 20 50 4F 53 49 54 |
byte |
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
data |
49 4F 4E 3A 20 20 01 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
MITEL SUPERSET 430 - 80-character display
data |
01 00 00 01 20 41 43 55 52 52 41 4E 20 49 53 20 43 41 4C 4C |
byte |
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 |
data |
49 4E 47 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
data |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
data |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
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 display data in ASCII format. |
buflen: |
length of buffer on entry. |
The pointer to the application buffer is assumed to be large enough to hold the entire string plus a null, and the total must be at least 49 bytes.
If you execute a function that updates the display (e.g., set the message waiting indicator, or show the calling number ID), ensure that you allow time for the switch to update the display before using d42_displayex( ), or you can call the d42_displayex( ) function until valid display data is returned.
void main(void)
{
int devh;
int buflen = 50;
int rc = 0;
char bufferp[50];
/* 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 Display Information */
if ( (rc = d42_displayex(devh, bufferp, buflen)) == -1)
{
printf("Error d42_displayex()\n");
dx_close(devh);
exit(-1);
} /* End d42_displayex */
printf("Display = %s\n",bufferp);
dx_close(devh);
} /* End main */
If this function returns -1 to indicate a failure, one of the following (most common) codes will be contained in dx_errno. For a complete list of error codes and definitions, refer to Appendix C.
ED42_BADDEVICE |
Invalid or wrong device handle |
ED42_UNSUPPORTED |
Function not supported on this board |
ED42_SYSTEM |
System level error |
ED42_INVALARG |
Invalid argument passed to function |
ED42_MEMORY |
Buffer not large enough |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation