18. nqLAN
The nqLAN object is a built-in object for obtaining LAN (Ethernet) connection information.
Functional overview:
- Provides the function to acquire the LAN connection information.
- Provides the function to acquire the unique information of the LAN adapter.
nqLAN Global Object
Methods()/Properties | Summary | Version | Note |
---|---|---|---|
nqLAN.getIDs() | Gets LAN connection information. | 00.00.03+ | |
nqLAN.isConnected() | Gets the LAN communication status. | 00.00.03+ |
Details
nqLAN.getIDs()
Gets LAN connection information.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | {LanID} | - | {LanID} : LAN connection information |
{LanID}
Name | Type/Object | Summary | Note |
---|---|---|---|
.ip | string | Current IP address If the link is down, it will be 0.0.0.0. | |
.mask | string | Current netmask If the link is down, it will be 0.0.0.0. | |
.gw | string | Current gateway If the link is down, it will be 0.0.0.0. | |
.macAddr | string | MAC address of LAN adapter If the link is down, it will be 00:00:00:00:00:00. |
nqLAN.isConnected()
Gets the LAN communication status.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | boolean | - | LAN communication status true: Available for communication false: Not available for communication |
Object Usage Examples
Sample 1
This is a sample that acquires and displays LAN connection information.
var info = nqLAN.getIDs();
print('IP : ' + info.ip);
print('mask : ' + info.mask);
print('gw : ' + info.gw);
print('MAC : ' + info.macAddr);
Updated: 2023-04-20