AioQueryDeviceName


Function

Retrieves the list of available devices. This function supports multi-process.

Format

Ret = AioQueryDeviceName(Index, DeviceName,  Device)

Parameters

Index [ C, C++ : short ] [ Python : ctypes.c_short ]
This parameter should be zero for the first call and then be incremented by 1 for subsequent calls.

DeviceName [ C, C++ : char * ] [ Python : ctypes.c_char_p ]
Returns the device name. (For example: "AIO000")

Device [ C, C++ : char * ] [ Python : ctypes.c_char_p ]
Returns the board name. (For example: "AIO-163202F-PE")

Return values

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

Return values

Content

0

Normality completion

10006

Device not found
Make sure that the device is registered in Configuration Tool (config)

10007

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

10008

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

Remarks

This function can be used when you are creating a general-purpose application about the selected device to be used.
Index is incremented by 1 from 0 in order for subsequent calls until the function returns error.

Example

Retrieves the information of the device by Index=0.

C, C++

long Ret;
char DeviceName[256];
char Device[256];
Ret = AioQueryDeviceName ( 0 , DeviceName , Device );
 

Python

Ret = ctypes.c_long()
DeviceName = ctypes.create_string_buffer(256)
Device = ctypes.create_string_buffer(256)
Ret.value = caio.AioQueryDeviceName ( 0 , DeviceName , Device )