(Page 5 of 15 in this chapter) Version


briGetBoardInfo

Description

Obtains information about a BX 2000 board.

Prototype

DWORD briGetBoardInfo ( CTAHD ctahd,
unsigned board,
unsigned size,
BRI_BOARD_INFO *boardinfo )

ctahd CTA context handle returned by ctaCreateContext.

board BX 2000 board number.

size Size of boardinfo structure.

boardinfo Pointer to the BRI_BOARD_INFO structure, as shown:

typedef struct
{

DWORD size; /* Size of this structure */

DWORD boardtype; /* Physical board type BRI_BOARDTYPE_xxx */

DWORD serial; /* Serial number */

DWORD ioaddr; /* Base IO address */

DWORD intnum; /* Interrupt number */

} BRI_BOARD_INFO;

Return Values

Events

None.

Details

This function retrieves hardware configuration data for the specified BX 2000 board.

The board argument identifies a particular BX 2000 board. The board argument identifies a particular BX 2000 board.

The board ID can be seen in the configuration tool. For more information, refer to the BX 2000 Installation and Developer's Manual.

The valid BRI_BOARD_INFO boardtype values are listed in the bridef.h file and include:

The ctahd argument is used to access the CTA context on which the BRI service was opened. The size argument indicates how much memory to write at boardinfo address. The BRI service stores the actual number of bytes written in the BRI_BOARD_INFO size field.

Example


void myShowBoardType( CTAHD ctahd, unsigned board )
{
    BRI_BOARD_INFO boardinfo;
    char          type[20];
    int           ret;

    ret = briGetBoardInfo( ctahd, board, sizeof boardinfo, &boardinfo );

    if( ret == SUCCESS )
    {
        if (boardinfo.boardtype != BRI_BOARDTYPE_4PORT)
printf( "board:%2d : Invalid board type\n", board) ;
else { strcpy(type, << BX 2000 board >>) ; printf( "board:%2d at addr:%4x is an %-. \n", board, boardinfo.ioaddr, type); }
}
else if( ret == CTAERR_INVALID_BOARD ) printf( "There is no board # %d.\n", board ); else /* unexpected error */ printf( "Error %x getting board # %d information.\n", ret, board ); }


(Page 5 of 15 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.