(Page 14 of 28 in this chapter)


swiGetBoardInfo

Description

Retrieves information about the board controlled by the MVIP device driver.

Prototype

DWORD swiGetBoardInfo ( SWIHD swihd,
SWI_BOARDINFO_ARGS *args,
unsigned size)

swihd Handle returned by swiOpenSwitch.

args Pointer to a SWI_BOARDINFO_ARGS structure where the information about the board controlled by the MVIP driver will be retrieved. The SWI_BOARDINFO_ARGS structure is:

typedef struct
{
BYTE description [80];
BYTE revision [16];
BYTE date [12];
BYTE vendor [80];
BYTE serialnumber [80];
DWORD boardid;
DWORD base_port_address
} SWI_BOARDINFO_ARGS;

See the Details section for a description of these fields.

size Size, in bytes, of the args buffer.

Return Values

Events

Details

This function retrieves information about the board controlled by the MVIP device driver. The device driver is associated with the switch block handle opened by the user with swiOpenSwitch. All BYTE fields are NULL-terminated ASCII strings. With the exception of the date field, there are no restrictions on how ASCII information is represented.

This function is specific to MVIP-95. Calling this function on an MVIP-90 driver will return CTAERR_FUNCTION_NOT_AVAIL.

The SWI_BOARDINFO_ARGS structure contains the following fields:

Field

Description

description

Text that provides information about the board.

revision

Version number of the board in a vendor-specific format.

date

Release date of the board. The date format is yyyy/mm/dd.

vendor

Company or organization that created the board.

serialnumber

Vendor-specific ASCII representation of the board's serial number.

boardid

Vendor-specific value used to identify the board. With boardid, an application can determine the actual board type when a single driver supports more than one board type. The board identifier represented by boardid is not unique across all vendors.

base_port_address

Identifies the physical base input/output of the PC bus used by the board. Applications use this information to make the association between the physical hardware and the logical device used by the driver. Not used for PCI boards.

Refer to Section 6.3, Board and Driver Configuration for more information.

If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.

See Also

swiConfigLocalStream, swiConfigLocalTimeslot, swiGetDriverInfo, swiGetLastError, swiGetLocalStreamInfo, swiGetLocalTimeslotInfo, swiOpenSwitch

Example


void myPrintBoardInfo(SWIHD hd)
{
SWI_BOARDINFO_ARGS args;
unsigned size;

size = sizeof(SWI_BOARDINFO_ARGS);
swiGetBoardInfo(hd, &args, size);
printf("%s\n", args.description);
printf("Revision %s Date %s\n", args.revision, args.date);
printf("%s\n", args.vendor);
printf("Board type: %d, Serial No. %s\n", args.boardid, args.serialnumber);
}


(Page 14 of 28 in this chapter)


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