
Description | Cautions | Example | Errors | See Also
Name: |
||
Inputs: |
int devh |
|
char *bufferp |
| |
Returns: |
0 |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
The d42_display( ) function retrieves the current LCD/LED display (alphanumeric) data and places it in an application buffer. The application buffer must be 49 bytes, and will hold an entire data string up to 48 bytes (see below) plus a null. The length of the data string is 32 or 48 bytes for the supported 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. Examples showing the contents of the application buffer for each supported switch with a display less than or equal to 48 bytes are shown below:
Siemens Hicom - 48-digit display
data |
4E 6F 65 6C 20 4D 63 4C 6F 75 67 68 6C 69 6E 20 |
byte |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
20 20 20 20 20 20 20 20 43 6F 6E 73 75 6C 74 61 |
byte |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
data |
74 69 6F 6E 3F 20 20 20 20 20 20 20 20 20 20 20 |
byte |
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
MITEL SUPERSET 420 - 32-character display
data |
43 41 4C 4C 46 4F 52 44 57 41 52 49 4E 47 3F 20 |
byte |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
59 65 73 20 20 20 20 20 20 20 20 20 20 4E 6F 20 |
byte |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
data |
xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx |
byte |
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
Nortel Norstar - 32-character display
data |
54 72 61 6E 73 66 65 72 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 |
data |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
data |
xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx |
byte |
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
Nortel Meridian 1 - 48-character display
data |
61 32 01 00 04 05 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 |
data |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
data |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
byte |
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
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. |
The application buffer must be 49 bytes. The length of the LCD display data is
48 bytes for the supported PBX listed above. All other supported PBXs have longer-length LCD display data, so d42_displayex( ) must be used. The data is stored as a null-terminated ASCII string. An application that passes anything smaller will not be backward compatible.
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_display( ), or you can call the d42_display( ) function until valid display data is returned.
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 Display Information */
if ( (rc = d42_display(devh, bufferp)) == -1)
{
printf("Error d42_display()\n");
dx_close(devh);
exit(-1);
} /* End d42_display */
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 |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation