enniot-device-sdk
Advanced tools
Comparing version 0.0.12 to 0.0.13
28
index.js
@@ -39,3 +39,3 @@ const _ = require('lodash'); | ||
const memory_used = memory.used || Number(res[0].used_memory.replace(/mb/i, '')) * 1000000; | ||
console.log(res) | ||
return { | ||
@@ -47,3 +47,2 @@ gateway_eui: res[0].gateway_eui, | ||
operate_system: os.platform || res[0].operate_system, | ||
has_sim_card: !!res[0].SIM_status, | ||
flash_total, | ||
@@ -56,2 +55,6 @@ flash_used, | ||
cpu_load: load.currentload, | ||
cpu_usage: Number(res[0].CPU_usage), | ||
cpu_load_1: res[0].CPU_load_1, | ||
cpu_load_5: res[0].CPU_load_5, | ||
cpu_load_15: res[0].CPU_load_15, | ||
temperature: Number(res[0].temperature), | ||
@@ -83,7 +86,18 @@ humidity: Number(res[0].humidity), | ||
} | ||
// 获取内网网卡设置列表 | ||
async getNetworkLans() { | ||
const res = await this.tcp.invoke({ | ||
method: "GET", | ||
type: "NetworkLAN", | ||
}); | ||
return res; | ||
} | ||
// 获取内网网卡设置 | ||
async getNetworkLan() { | ||
async getNetworkLan(lan) { | ||
const res = await this.tcp.invoke({ | ||
method: "GET", | ||
type: "NetworkLAN", | ||
content: [{ | ||
network_interface: lan | ||
}], | ||
}); | ||
@@ -101,2 +115,10 @@ return res; | ||
} | ||
// 获取外网网卡设置 | ||
async getNetworkWan() { | ||
const res = await this.tcp.invoke({ | ||
method: "GET", | ||
type: "NetworkWAN", | ||
}); | ||
return res; | ||
} | ||
// 外网网卡设置 | ||
@@ -103,0 +125,0 @@ async setNetworkWan(params) { |
{ | ||
"name": "enniot-device-sdk", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10588
365