(Page 9 of 69 in this chapter) Version
DWORD size; /* Size of this structure */
DWORD boardtype; /* Physical board type ADI_BOARDTYPE_xxx */
DWORD serial; /* Serial number */
DWORD ioaddr; /* Base IO address */
DWORD intnum; /* Interrupt number */
DWORD bufsize; /* Buffer size */
DWORD freemem; /* Available memory */
BYTE daughterboardid[4] ; /* Daughterboard IDs 0 = none */
DWORD totalmips; /* Total gross DSP MIPS */
DWORD trunktype; /* Type of digital or analog trunk */
DWORD numtrunks; /* Number of trunks */
}ADI_BOARD_INFO;
void myShowBoardType( CTAHD ctahd, unsigned board )
{
ADI_BOARD_INFO boardinfo;
char *type;
unsigned b_ports;
int ret;
ret = adiGetBoardInfo( ctahd, board, sizeof boardinfo, &boardinfo );
if( ret == SUCCESS )
{
switch( boardinfo.boardtype )
case ADI_BOARDTYPE_QX2000 : type="QX 2000"; b_ports=4; break;
case ADI_BOARDTYPE_AGQUADT1: type="AG Quad T1"; b_ports=96; break;
case ADI_BOARDTYPE_AGQUADE1: type="AG Quad E1"; b_ports=120; break;
case ADI_BOARDTYPE_AGDUALT1: type="AG Dual T1"; b_ports=48; break;
case ADI_BOARDTYPE_AGDUALE1: type="AG Dual E1"; b_ports=60; break;
case ADI_BOARDTYPE_AG2000: type="AG 2000"; b_ports= 8; break;
case ADI_BOARDTYPE_AG4000_4T:type="AG 4000 4T"; b_ports=96; break;
case ADI_BOARDTYPE_AG4000_4E:type="AG 4000 4E"; b_ports=120; break;
case ADI_BOARDTYPE_CG6000C_QUAD:type="CG6000C_QUAD";b_ports=120;break;
default:
case ADI_BOARDTYPE_UNKNOWN : type="Unknown"; b_ports=0; break;
}
printf( "board:%2d at addr:%4x is an %-7s with %3d ports.\n",
board, boardinfo.ioaddr, type, b_ports );
}
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 9 of 69 in this chapter) Version