Registers the callback function, it will be called when the event of specified number transfer completion occurred that is set with the DioDmSetCountEvent function.
Ret = DioDmSetCountCallBackProc ( Id , CallBackProc , Param )
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify the device ID retrieved from DioInit.
CallBackProc
[ VB.NET: IntPtr ] [ C, C++: long * ] [ C#: IntPtr ] [ Python: ctypes.POINTER(ctypes.c_long)
]
Specify the address of the callback function.
Param
[ VB.NET: IntPtr ] [ C, C++: void * ] [ C#: void * ] [ Python: ctypes.c_void_p
]
Specify the address of the parameter that is passed to the callback function.
Specify it to NULL when the parameter is unnecessary.
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Value [Dec] |
Description |
DIO_ERR_SUCCESS |
0 |
Normal completed. |
DIO_ERR_SYS_RECOVERED_FROM_STANDBY |
7 |
Execute DioResetDevice function because the device has recovered from standby mode. |
DIO_ERR_DLL_INVALID_ID |
10001 |
Invalid ID specified. |
DIO_ERR_DLL_CALL_DRIVER |
10002 |
Not call the driver (Failure on DEVICE I/O CONTROL). |
DIO_ERR_DLL_BUFF_ADDRESS |
10100 |
Invalid data buffer address. |
DIO_ERR_SYS_NOT_SUPPORTED |
20001 |
This board couldn't use this function. |
The others (See also: Details of Error Code)
None
Use this function to register the callback function, then the callback function will be called when the event of specified number transfer completion occurred. Though the operation of the callback function is similar to an event, it is different from an event that the window handle is not necessary for it, so the application without a window also can use it.
Registers the callback function for the DioDmSetCountEvent function.
VB.NET |
Please refer to [Note of Using Visual Basic
.NET]. |
C, C++ |
long Ret; |
C# |
Please refer to [Note of Using Visual C#]. |
Python |
Ret = ctypes.c_long() |
DioDmTransferStart DioDmSetCountEvent
Ret = CallBackProc ( Id , wParam , lParam , Param )
Id
[ VB.NET: Short ][ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Pass the ID retrieved from DioInit.
wParam
[ VB.NET: Integer ] [ C, C++: WPARAM ] [ C#: int ] [ Python: ctypes.wintypes.WPARAM
]
This parameter is passed from the driver. It is not used now.
lParam
[ VB.NET: Integer ] [ C, C++: LPARAM ] [ C#: int ] [ Python: ctypes.wintypes.LPARAM
]
LOWORD(lParam)=Transfer direction (DIODM_DIR_IN or DIODM_DIR_OUT)
* HIWORD indicates the high-order word. LOWORD indicates the low-order
word.
Param
[ VB.NET: IntPtr ][ C, C++: void * ] [ C#: void * ] [ Python: ctypes.c_void_p
]
The parameter specified by the DioDmSetCountCallBackProc function is passed.
It will be NULL when the Param parameter was specified to NULL.
When the device name is specified such as "DIO000", it is possible
to know which device the event corresponds to.
None