Function
This function retrieves the communication status of an Ethernet device. Supports multi-processing.
Format
Ret = CntGetNetCommunicationInfo ( Id , InfoType , InfoData )
Parameters
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify the device ID retrieved from CntInit.
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 defined values.
Definition |
Value [Dec] |
Description |
ICNT_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.
Return Value
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Value |
Description |
CNT_ERR_SUCCESS |
0 |
Normality completion |
CNT_ERR_SYS_RECOVERED_FROM_STANDBY |
7 |
Execute the function CntResetDevice to return from the standby mode. |
CNT_ERR_DLL_INVALID_ID |
10001 |
Invalid ID was specified. |
CNT_ERR_DLL_CALL_DRIVER |
10002 |
CNT driver can't be called (Failed in the device I/O control). |
CNT_ERR_INFO_INVALID_INFOTYPE |
10052 |
Information type is invalid. |
CNT_ERR_SYS_NOT_SUPPORTED |
20001 |
This function can't be used by this device. |
The others: (See also: Details of Error Code)
Remarks
This function retrieves the communication
status of an 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 |
CNT_IVALUE_PROCESS_UNREGISTERED |
0 |
Unregistered |
CNT_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.
Example
Retrieves the process registration status.
VB.NET |
Dim Ret As Integer |
C, C++ |
long Ret; |
C# |
int Ret; |
Python |
Ret = ctypes.c_long() |
See Also
CntNotifyCountUp CntNotifyCounterError CntNotifyCarryBorrow CntNotifySamplingStop CntNotifySamplingCount