AioGetDeviceType


Function

Find out the type of a device. This function supports multi-process.

Format

Ret = AioGetDeviceType ( Device , DeviceType )

Parameters

Device [ C, C++ : char * ] [ Python : ctypes.c_char_p ]
Specifies the device name.(For example: "AD12-16U(PCI)EV")

DeviceType [ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of a variable that receives the type of device.

1

PCI

3

USB

20

NET

Return values

Ret [ C, C++ : long ] [ Python : ctypes.c_long ]

Return values

Content

0

Normality completion

10013

Could not get device type

10014

Pointer to Device is NULL
Specify the address of variable to parameter.

10015

Pointer to DeviceType is NULL
Specify the address of variable to parameter.

Example

Retrieves the type of device AIO-163202F-PE.

C, C++

long Ret;
short DeviceType;
Ret = AioGetDeviceType ( "AIO-163202F-PE" , &DeviceType );
 

Python

Ret = ctypes.c_long()
DeviceType = ctypes.c_short()
Ret.value = caio.AioGetDeviceType ( "AIO-163202F-PE" , ctypes.byref(DeviceType) )