
Description | Cautions | Example | Errors | See Also
Name: |
int d42_brdstatus(devh, buffstatus, bufferp) | |
Inputs: |
int devh |
|
char *buffstatus |
| |
char *bufferp |
| |
Returns: |
0 |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
The d42_brdstatus( ) function retrieves the current board status and places it in an application buffer. The board status is a bit mask representing the status of the board (see below) on a per board basis. Each D/82JCT-U contains two virtual boards of four channels each, for a total of eight channels. Each D/42JCT-U contains one virtual board of four channels. The application buffer (buffstatus) that will contain the board status information must be one byte.
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Channel |
x |
x |
x |
x |
4 |
3 |
2 |
1 |
Example* |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
1 |
* Data shows that all channels on the board have communication. | ||||||||
bit0 |
first channel on board |
1=OK, 0=no communication |
bit1 |
second channel on board |
1=OK, 0=no communication |
bit2 |
third channel on board |
1=OK, 0=no communication |
bit3 |
fourth channel on board |
1=OK, 0=no communication |
Parameter |
Description |
devh: |
specifies the valid board device descriptor obtained by a call to dx_open( ) |
buffstatus: |
pointer to the 1-byte application buffer where the board status is placed |
bufferp: |
pointer to an additional application buffer (reserved for future use) |
The character pointer bufferp is required. The associated buffer must be 49 bytes.
void main(void)
{
int devh;
int rc = 0;
char buffstatus;
char bufferp[49];
/* Open Channel Device */
if ( (devh = dx_open("dxxxB1C1",NULL))==-1)
{
printf("Error dx_open()\n");
exit(-1);
} /* End dx_open */
/* Get the board status Information */
if ( (rc = d42_brdstatus(devh, &buffstatus, bufferp)) == -1)
{
printf("Error d42_brdstatus()\n");
dx_close(devh);
exit(-1);
} /* End d42_brdstatus*/
printf("Board Status = %X\n",buffstatus);
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