DioDmSetStopEvent


Function

Sets notification of the transfer completion message.

Format

Ret = DioDmSetStopEvent ( Id , Dir , CallBack ,Param )

Parameters

Id [C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.

Dir [C:unsigned long] [Python: ctypes.c_ulong]
Specify the transfer direction.

Definition

Value

[Hex]

Description

DIODM_DIR_IN

0x01

Input

DIODM_DIR_OUT

0x02

Output

CallBack [C:PDIO_STOP_CALLBACK] [Python: PDIO_STOP_CALLBACK]
Specify the address of callback function.

Param [C:void *] [Python: ctypes.c_void_p]
Specify the optional parameter that is carried from callback function.

Return Value

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

Definition

Value

[Dec]

Description

DIO_ERR_SUCCESS

0

Normal complete

DIO_ERR_DLL_INVALID_ID

10001

Invalid ID is specified.

DIO_ERR_DLL_CALL_DRIVER

10002

Driver cannot be called (failed in ioctl).

DIO_ERR_DLL_BUFF_ADDRESS

10100

Invalid data buffer address.

DIO_ERR_DLL_CALLBACK

10400

Invalid address of callback function.

DIO_ERR_SYS_DIRECTION

50000

I/O direction is outside of the setting range.

The other errors: (See also: Error code details)

Initial Value

None

Remarks

Completion can be notified by the window message upon completion of sampling/generation if this function is used.

Example

C

Ret = DioDmSetStopEvent( Id , DIODM_DIR_IN , CallBack , Param );
 

Python

Ret = cdio.DioDmSetStopEvent( Id , cdio.DIODM_DIR_IN , CallBack , Param )
 

See Also

PDIO_DM_STOP_CALLBACK