Function
Creates device file, then the device can
be used.
To access a device, you need to perform this function in advance.
This function supports multi-process.
Format
Ret = AioInit ( DeviceName , Id )
Parameters
DeviceName
[ C, C++ : char * ] [ Python : ctypes.c_char_p ]
Specifies the device name set by using Configuration Tool (config).
Id
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies address of the variable that receives the ID.
The sequent functions can use the value stored in this variable to access
the device.
Return values
Ret [ C, C++ : long ] [ Python : ctypes.c_long ]
Return values |
Content |
0 |
Normality completion |
2 |
Failed
in the registration of the interruption routine |
3 |
Failed
in the allocation of the memory |
8 |
Initialization failed because caio.sys is not found |
9 |
Initialization failed because the file version of caio.dll cannot be acquired |
10 |
Initialization failed because the file version of caio.sys cannot be acquired |
11 |
Initialization failed because the file version of caio.dll is not same as caio.sys |
10000 |
The
device name which wasn't registered by Configuration Tool was specified |
10003 |
Failed
in the creation of the file |
10100 |
A
device name isn't stored in DeviceName |
10101 |
Pointer
to Id is NULL |
20000 |
It
failed in memory allocation for the object preparation |
20035 |
It's need to upgrade the firmware |
20036 |
It's need to upgrade the host driver |
20100 |
The number of processes
met an upper limit |
Remarks
When the function is first performed in process,
all internal parameters are set to default values.
If the device is configured with registers, the registers are set to default
values.
If the function AioExit isn't performed, even if AioInit is performed,
the internal parameters don't return to the default values.
To return the internal parameters to their default values, please use AioResetDevice.
This function can be performed even if the device is in operation, but the operation of device doesn't stop.
Example
Performs initialization by device name "AIO000".
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also
Multi-process Device Device Name ID Resource