
Description | Cautions | Example | Errors | See Also
Name: |
int scx_setbrdparm (devh, param, valuep) | |
Inputs: |
int devh |
|
unsigned char param |
| |
void *valuep |
| |
Returns: |
0 on success | |
Includes: |
scxlib.h | |
Category: |
Configuration | |
Mode: |
synchronous | |
The scx_setbrdparm( ) function changes board level parameters.
Parameter |
Description |
devh: |
Specifies the SCX160 SCxbus Adapter device handle. |
param: |
Specifies the name of the parameter, see Table 13. SCX160 User Selectable Parameters, below for parameter defines and their description. |
valuep: |
Points to the location of the parameter value. |
The SCXBP_FIFO_ERR_THRESH parameter specifies the FIFO buffer error threshold. Most FIFO errors occur due to clock reference drift, maintenance activities on the network and any other activity that impacts the clock reference signal. Therefore, error rates will vary depending on the environment in which the SCX160 SCxbus Adapter system operates. Each user must determine an acceptable error threshold for their system. A typical rate of 255 slips in a 24 hour period (error threshold setting of 11 slips/hour) would not be uncommon.
The SCXBP_DRIVER_ERR_THRESH parameter specifies the SCX160 bus driver error threshold. Driver errors reflect impairments due to transmission line inefficiency, bus contention, excessive cable length, improper SCSI-3 termination and similar phenomena. Typically, copper-based transmission lines can be expected to offer a Bit Error Rate (BER) of better than 1 x 10-6 (1 error per 1 million bits). Each user must determine an acceptable BER threshold for their system while keeping in mind that each data stream runs at 4.096 M bits/sec. A threshold of 14,000 errors/hour (less than 1 error per million bits) may be appropriate for a network with moderate to heavy traffic between nodes.
Table 13. SCX160 User Selectable Parameters
Define |
B |
Default |
R/W |
Description |
SCXBP_SCX_CLOCK_MODE |
1 |
Default SCxbus clocking configured at download time. |
R/W |
Specifies clocking for the SCxbus interface of the SCX160 SCxbus Adapter. The SCxbus interface can be set to any of the following:
|
SCXBP_CLOCK_REF |
1 |
Default SCX160 Clock Reference Signal configured at download time. |
R/W |
Specifies source of the SCX160 SCxbus Adapter clock reference signal. The clock source can be any one of the following:
|
SCXBP_FIFO_ERR_THRESH |
4 |
0xFFFFFFFF |
R/W |
Specifies FIFO buffer error threshold that must be exceeded before an alarm is generated:
|
SCXBP_DRIVER_ERR_THRESH |
4 |
0xFFFFFFFF |
R/W |
Specifies SCX160 driver error threshold that must be exceeded before an alarm is generated.
|
SCXBP_SC_CLOCK_MODE |
1 |
Default SCbus clocking configured at download time. |
R/W |
Specifies clocking for SCbus interface of the SCX160 SCxbus Adapter. The SCbus interface can be set to any of the following:
|
Legend: |
B (2nd) column lists the length in Byte(s); | |||
This function will fail if an invalid device handle is specified.
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <srllib.h>
#include <scxlib.h>
int devh; /* SCX160 device handle */
unsigned char parm_val = SCXCM_MASTER; /* Parameter Value */
/* Open SCX160 board */
if ((devh = scx_open("scxB1", 0)) == -1) {
printf("Cannot open board scxB1. errno = %d \n", errno);
exit(1);
}
/* Set SCxbus clock mode to Master */
if (scx_setbrdparm(devh, SCXBP_SCX_CLOCK_MODE, &parm_val) == -1) {
printf("ERROR: scx_setbrdparm( ) failed, %s \n", ATDV_ERRMSGP(devh));
exit(1);
}
/* 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