#include <cogent.h>
int DR_ApListBuffers(int card_id, int max_bufs, int* num_bufs, unsigned short* size, char** error );
The integer value 0 if the function was successful, otherwise one of the following error codes:
DR_API_IPC_ERRORS DR_API_STATUS_ERRORS DR_ERR_CARD_INVALID DR_ERR_BLK_INVALID DR_ERR_BLK_NOT_FOUND DR_ERR_NO_USER_OBJECT
This function provides a list of the blocks currently defined to the driver. This information may then be used to get further block attribute information and read or write the blocks.
int i, num_blks, result;
unsigned short buf_size[4];
char *error_str;
num_blks = 0;
if (!(result = DR_ApListBuffers (0, 4, &num_blks, buf_size,
&error_str)))
{
printf (" Device 0 has %d buffers with sizes ", num_blks);
for (i=0; i<num_blks; i++)
printf ("%d%s", buf_size[i],
((i+1==num_blks)?".":", "));
printf ("\n");
}
else
printf (" Error@ListBuffers (%d,%s)\n",
result, error_str);
}
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.