xPCI-3016 API
xPCI-3016 general functions

Functions

_INT_ i_PCI3016_GetNumberOfBoards (PBYTE pb_NbrOfBoards)
 
_INT_ i_PCI3016_GetBoardInformation (BYTE b_BoardIndex, DWORD dw_IdentifierStringSize, PCHAR pc_Identifier, PDWORD pdw_UINumber, PDWORD pdw_DeviceNumber, PDWORD pdw_BusNumber, PDWORD pdw_BaseAddress0, PDWORD pdw_BaseAddress1, PDWORD pdw_BaseAddress2, PDWORD pdw_BaseAddress3, PBYTE pb_Interrupt)
 
_INT_ i_PCI3016_OpenBoardViaIndex (BYTE b_BoardIndex, PHANDLE ph_DeviceHandle)
 
_INT_ i_PCI3016_OpenBoardViaIdentifier (PCHAR pc_Identifier, PHANDLE ph_DeviceHandle)
 
_INT_ i_PCI3016_CloseBoard (HANDLE h_DeviceHandle)
 
_INT_ i_PCI3016_GetDLLVersion (PDWORD pdw_Version)
 
_INT_ i_PCI3016_GetDeviceDriverVersion (HANDLE h_DeviceHandle, PDWORD pdw_Version)
 
_INT_ i_PCI3016_GetSerialNumber (HANDLE deviceHandle, PDWORD pdw_DeviceNumber)
 

Detailed Description

Function Documentation

_INT_ i_PCI3016_GetNumberOfBoards ( PBYTE  pb_NbrOfBoards)

Enables to get the number of xPCI-3016 boards present in the system.
The function fill the value pointed by pb_NbrOfBoards with the number of boards present.

Parameters
[out]pb_NbrOfBoardsValue that will be filled with the number of boards
Return values
0: No error
-1: Error while getting the number of boards
_INT_ i_PCI3016_GetBoardInformation ( BYTE  b_BoardIndex,
DWORD  dw_IdentifierStringSize,
PCHAR  pc_Identifier,
PDWORD  pdw_UINumber,
PDWORD  pdw_DeviceNumber,
PDWORD  pdw_BusNumber,
PDWORD  pdw_BaseAddress0,
PDWORD  pdw_BaseAddress1,
PDWORD  pdw_BaseAddress2,
PDWORD  pdw_BaseAddress3,
PBYTE  pb_Interrupt 
)

Get device information of the board.

Parameters
[in]b_BoardIndex: Index of the board
[in]dw_IdentifierStringSize: size of the identifier parameter
[out]pc_IdentifierIdentifier of the board
[out]pdw_UINumber: This number is typically a user-perceived slot number, such as a number printed next to the slot on the board, or some other number that makes locating the physical device easier for the user. If the device is on a bus that has no UI number convention, or if the bus driver for the device cannot determine the UI number, this value is 0xFFFFFFFF.
[out]pdw_DeviceNumber: Device number.
[out]pdw_BusNumber: Bus number.
[out]pdw_BaseAddress0: Base address 0 of the board
[out]pdw_BaseAddress1: Base address 1 of the board
[out]pdw_BaseAddress2: Base address 2 of the board
[out]pdw_BaseAddress3: Base address 3 of the board
[out]pb_Interrupt: Interrupt line of the board
Return values
0: No error
-1: Unable to open the board via index
-2: Error when calling driver's IOCTL
_INT_ i_PCI3016_OpenBoardViaIndex ( BYTE  b_BoardIndex,
PHANDLE  ph_DeviceHandle 
)

Open the board with the index : b_BoardIndex. A handle is returned to the
user which allows to use the driver functions.

Parameters
[in]b_BoardIndex: Index of the board to open
[out]ph_DeviceHandle: Handle of the selected xPCI-3016 board for using the functions
Return values
0: No error
-1: Unable to get the number of available boards
-2: Wrong device index parameter. The parameter is too high
-3: Error while getting the device's class
-4: Error while getting informations about the device
-5: Memory allocation error
-6: Get device interface detail error
-7: Error while creating communication handle
-8: Error in the initialization callback function
_INT_ i_PCI3016_OpenBoardViaIdentifier ( PCHAR  pc_Identifier,
PHANDLE  ph_DeviceHandle 
)

Open the board with the indentifier : pc_Identifier. A handle is returned to the
user which allows to use the following functions.

Parameters
[in]pc_Identifier: Identifier of the board to open
[out]ph_DeviceHandle: Handle of the board xPCI-3016 for using the functions
Return values
0: No Error
-1: Unable to get the number of available boards
-2: Unable to get the board identifier
-3: Unable to open the board
-4: Identifier not found
_INT_ i_PCI3016_CloseBoard ( HANDLE  h_DeviceHandle)

Release the handle of the board. Block the access to the board.

Parameters
[in]h_DeviceHandle: Handle of the board
Return values
0: No Error
-1: The device handle parameter is wrong
_INT_ i_PCI3016_GetDLLVersion ( PDWORD  pdw_Version)

Return the version of the DLL.

Parameters
[out]pdw_Version: Version. sample : 0x01010910 -> version 1.01 september 2010
Return values
0: No Error
_INT_ i_PCI3016_GetDeviceDriverVersion ( HANDLE  h_DeviceHandle,
PDWORD  pdw_Version 
)

Return the version of the device driver.

Parameters
[in]h_DeviceHandle: Handle of the board
[out]pdw_Version: Version. sample : 0x01011211 -> version 1.01 - 12/2011
Return values
0: No Error
-1: Error while calling IOCTL function
_INT_ i_PCI3016_GetSerialNumber ( HANDLE  deviceHandle,
PDWORD  pdw_DeviceNumber 
)

Return the serial number of the board.

Parameters
[in]h_DeviceHandle: Handle of the board
[out]pdw_DeviceNumber: Serial number of the board in decimal
Return values
0: No Error
-1: timeout
-100: Error while calling IOCTL function