swiGetBoardInfo

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

Prototype

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

Argument

Description

swihd

Switch handle.

args

Pointer to a SWI_BOARDINFO_ARGS structure for the information about the board controlled by the MVIP driver:

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;

Refer to the Details section for a description of these fields.

size

Size, in bytes, of the args buffer.


Return values

Return value

Description

SUCCESS

 

CTAERR_DRIVER_ERROR

Underlying driver retrieved an unrecognized error. Call swiGetLastError to retrieve the MVIP device error code.

CTAERR_FUNCTION_NOT_AVAIL

Underlying driver does not support the configuration of board-specific characteristics of a local device.

CTAERR_INVALID_HANDLE

swihd is not a valid switch handle.

CTAERR_SVR_COMM

Communication error in the server environment.


Details

swiGetBoardInfo is specific to MVIP-95. swiGetBoardInfo 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.

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 Configuring boards and drivers for more information.

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

See also

swiConfigLocalStream, swiConfigLocalTimeslot, swiGetDriverInfo, swiGetLocalStreamInfo, swiGetLocalTimeslotInfo

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);
}