AioGetAoTransferSize


Function

Retrieves the transfer size for user buffer mode.

Format

Ret = AioGetAoTransferSize ( Id, AutoMode, TransferSize )

Parameters

Id [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specify the ID obtained by the AioInit function.

AutoMode [ VB.NET : Short ][ C, C++ : short *  ][ C# : out short ][ Python : ctypes.POINTER(ctypes.c_short) ]
Stores the method of setting the transfer size.

Macro

Value

 

AO_TRANSFERSIZE_MANUAL

0

Set the transfer size manually

AO_TRANSFERSIZE_AUTO

1

Set the transfer size automatically

TransferSize [ VB.NET : Integer ][ C, C++ : long *  ][ C# : out int ][ Python : cytpes.POINTER(ctypes.c_long) ]
Stores the transfer size.
Transfer size is set in number of packets.

Return value

Ret [ VB.NET : Integer ] [ C, C++ : long ] [ C# : int ] [ Python : ctypes.c_long ]

Return values

Content

0

Normality completion

7

Execute AioResetDevice function because the device has recovered from standby mode

10001

Invalid Id was specified
Use the Id retrieved from AioInit to specify the Id in this function.

10002

AIO driver can't be called
At first, perform AioInit function.

13990

AutoMode is NULL. Please specify the address of the variable in the parameter

13991

TransferSize is NULL. Please specify the address of the variable in the parameter

20001

This function can't be used by this device

20003

Can not use because another process is using the device
When another process is using the device, all functions except for those that support multi-process can not be performed.

23990

An internal driver error has occurred.

Initial value

The initial value for all devices is as follows
AutoMode = 1
TransferSize = Since the transfer size is set automatically, it varies depending on the device.

AIO-163202G-PE
AIO-163202UG-PE
AIO-123202G-PE
AIO-123202UG-PE

1

Remarks

Retrieves the transfer size for one transfer in user buffer mode.

Please refer to the AioSetAoTransferSize function for the specification of automatic setting.

Example

Retrieves the transfer size and the method of setting transfer size.

VB.NET

Dim Ret As Integer
Dim AutoMode As Short
Dim TransferSize As Integer
Ret = AioGetAoTransferSize ( Id , AutoMode , TransferSize )
 

C, C++

long Ret;

short AutoMode;
long TransferSize;
Ret = AioGetAoTransferSize ( Id , &AutoMode , &TransferSize );
 

C#

int Ret;

short AutoMode;
int TransferSize;
Ret = aio.AioGetAoTransferSize ( Id , out AutoMode , out TransferSize );
 

Python

Ret = ctypes.c_long()
AutoMode = ctypes.c_long()
TransferSize = ctypes.c_long()
Ret.value = caio.AioGetAoTransferSize ( Id , ctypes.byref(AutoMode) , ctypes.byref(TransferSize) )