
Description | Cautions | Example | Errors | See Also
Name: |
int scx_tstdat(devh, tmo) | |
Inputs: |
int devh |
|
short tmo |
| |
Returns: |
0 on success | |
Includes: |
scxlib.h | |
Category: |
Diagnostic | |
Mode: |
synchronous | |
The scx_tstdat( ) function runs a data test to verify the integrity of the host computer-to-SCX160 SCxbus Adapter Shared RAM interface for the requested SCX160 SCxbus Adapter board. Usually performed during Dialogic Service startup, the data test sends a series of bytes to the SCX160 SCxbus Adapter. The same data is returned to the host computer and checked to verify the integrity of the interface. A return code of 0 indicates successful completion of the test.
Parameter |
Description |
devh: |
Specifies the SCX160 SCxbus Adapter device handle. |
tmo: |
Specifies the maximum amount of time in seconds that the function will block while waiting for a response from the SCX160 SCxbus Adapter. If a response is not received within tmo seconds, an error is returned. A suggested setting is 5 seconds. |
This function fails if any of the following occur:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <srllib.h>
#include <scxlib.h>
int devh; /* SCX160 Device Handle */
int rcode; /* Function Return Code */
/* Open SCX160 Board */
if ((devh = scx_open("scxB1", 0)) == -1) {
printf("Cannot open board scxB1. errno=%d \n", errno);
exit(1);
}
/* Perform Data Test with SCX160 Board */
rcode = scx_tstdat(devh, 5);
if (rcode == -1) {
printf("ERROR: SCX/160 Data Test Failed on Board scxB1: %s\n",
ATDV_ERRMSGP(devh));
} else {
printf("SCX/160 Data Test was Successful on Board scxB1\n");
}
/* Close the SCX160 Board */
scx_close(devh);
If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code, or you can use the ATDV_ERRMSGP( ) function to obtain a descriptive error message. The error codes returned by ATDV_LASTERR( ) function are listed in Chapter 7. Errors.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation