This function retrieves the communication status of the Ethernet device. This is a multi-process compatible function.
Ret = DioGetNetCommunicationInfo ( Id , InfoType , InfoData )
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify the device ID retrieved from DioInit.
InfoType
[ VB.NET:Short ] [ C, C++:short] [ C#:short ] [ Python: ctypes.c_short
]
Specify the type of the information to be retrieved. The information type
is one of the following definition values.
Definition |
Value [Dec] |
Description |
IDIO_NET_TYPE_REGISTER_PROCESS |
0 |
Process registration status |
InfoData
[ VB.NET:Integer ] [ C, C++:long *] [ C#:out int ] [ Python: ctypes.POINTER(ctypes.c_long)
]
Specify the address of the variable that stores the retrieved information.
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Value |
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_INFO_INVALID_INFOTYPE |
10052 |
Specified device information type beyond the limit. |
DIO_ERR_SYS_NOT_SUPPORTED |
20001 |
This board couldn't use this function. |
The others (See also: Details of Error Code)
This function retrieves the communication
status of the Ethernet device.
The information that can be retrieved based on the specified information
type is listed below.
Process registration status
You can check whether the process that executed the function is registered on the device as an event notification destination.
Definition |
Value [Dec] |
Description |
DIO_IVALUE_PROCESS_UNREGISTERED |
0 |
Unregistered |
DIO_IVALUE_PROCESS_REGISTERED |
1 |
Registered |
If the process is unregistered, the event
will no longer be notified.
If you want to perform event notification again, please run the event notification
settings again.
Retrieve the process registration status.
VB.NET |
Dim Ret As Integer Dim info_data As Integer Ret = DioGetNetCommunicationInfo
( Id , IDIO_NET_TYPE_REGISTER_PROCESS , info_data ) |
C, C++ |
long Ret; long info_data; Ret = DioGetNetCommunicationInfo
( Id , IDIO_NET_TYPE_REGISTER_PROCESS , &info_data ); |
C# |
int Ret; int info_data; Ret = Dio.GetNetCommunicationInfo
( Id , IDIO_NET_TYPE_REGISTER_PROCESS , out info_data ); |
Python |
Ret = ctypes.c_long() info_data = ctypes.c_long() Ret.value = cdio.DioGetNetCommunicationInfo
( Id , cdio.IDIO_NET_TYPE_REGISTER_PROCESS , ctypes.byref(info_data)
) |
DioNotifyInterrupt DioNotifyTrg