Function
Retrieves the number of a device's input and output ports.
Format
Ret = DioGetMaxPorts ( Id , &InPortNum , &OutPortNum )
Parameters
Id
[ C, C++: short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.
InPortNum
[ C, C++: short *] [Python: ctypes.POINTER(ctypes.c_short)]
Specifies address of variable to store the number of input ports.
OutPortNum
[ C, C++: short *] [Python: ctypes.POINTER(ctypes.c_short)]
Specifies address of variable to store the number of output ports.
Return Value
Ret [ C, 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. |
The other errors: (See also: Error code details)
Initial Value
None
Remarks
Retrieves the number of a device's input ports and output ports.
Example
C, C++ |
Ret = DioGetMaxPorts(
Id , &InPortNum , &OutPortNum ); |
Python |
Ret = cdio.DioGetMaxPorts(
Id , ctypes.byref(InPortNum) , ctypes.byref(OutPortNum) ) |
See Also
None