
Description | Cautions | Example | Errors
Name: |
char ** ATDX_CHNAMES(bddev) | |
Inputs: |
int bddev |
|
Returns: |
pointer to array of channel names if successful | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_CHNAMES( ) function returns all channel names for a board in a pointer to an array of channel names associated with the board device handle bddev.
A possible use for this attribute would be to display the names of the channel devices associated with a particular board device.
The function parameter is defined as follows:
Parameter |
Description |
bddev |
specifies the valid board device handle obtained when the board was opened using dx_open( ). |
None.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
int bddev, cnt;
char **chnames;
long subdevs;
.
.
/* Open the board device */
if ((bddev = dx_open("dxxxB1",NULL)) == -1) {
/* Process error */
}
.
.
/* Display channels on board */
chnames = ATDX_CHNAMES(bddev);
subdevs = ATDV_SUBDEVS(bddev); /* number of sub-devices on board */
printf("Channels on this board are:\n");
for(cnt=0; cnt<subdevs; cnt++) {
printf("%s\n",*(chnames + cnt));
}
/* Call dx_open( ) to open each of the
* channels and store the device descriptors
*/
.
.
}
This function will fail and return the address of a pointer to "Unknown device" if an invalid board device handle is specified in bddev.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation