mini_program_gizwits_sdk 3.6.4 → 3.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/yarn-error.log +6901 -0
- package/dist/src/GizLog.d.ts +0 -18
- package/dist/src/crc/calculators/crc16modbus.d.ts +0 -2
- package/dist/src/crc/calculators/crc32.d.ts +0 -2
- package/dist/src/crc/crc16modbus.d.ts +0 -7
- package/dist/src/crc/crc32.d.ts +0 -7
- package/dist/src/crc/create_buffer.d.ts +0 -3
- package/dist/src/crc/define_crc.d.ts +0 -7
- package/dist/src/crc/index.d.ts +0 -19
- package/dist/src/crc/types.d.ts +0 -11
- package/dist/src/errorCode.d.ts +0 -3
- package/dist/src/globalData.d.ts +0 -2
- package/dist/src/handler/EventListener.d.ts +0 -9
- package/dist/src/handler/ble.d.ts +0 -105
- package/dist/src/handler/lan.d.ts +0 -78
- package/dist/src/handler/socket.d.ts +0 -151
- package/dist/src/openApiRequest.d.ts +0 -3
- package/dist/src/productConfigFileManage.d.ts +0 -11
- package/dist/src/protocol/Bind.d.ts +0 -7
- package/dist/src/protocol/DeviceInfo.d.ts +0 -11
- package/dist/src/protocol/DiscoverUDP.d.ts +0 -17
- package/dist/src/protocol/GetDeviceStatus.d.ts +0 -5
- package/dist/src/protocol/Login.d.ts +0 -12
- package/dist/src/protocol/Ntp.d.ts +0 -5
- package/dist/src/protocol/OTA/AwaitNoti.d.ts +0 -7
- package/dist/src/protocol/OTA/CheckCanOTA.d.ts +0 -10
- package/dist/src/protocol/OTA/OTAPackPackage.d.ts +0 -8
- package/dist/src/protocol/OTA/OtaComplete.d.ts +0 -8
- package/dist/src/protocol/OTA/PreOTA.d.ts +0 -11
- package/dist/src/protocol/OTA/ResetPosition.d.ts +0 -6
- package/dist/src/protocol/OffLineData.d.ts +0 -23
- package/dist/src/protocol/ProtocolBase.d.ts +0 -11
- package/dist/src/protocol/Reset.d.ts +0 -8
- package/dist/src/protocol/SetReset.d.ts +0 -7
- package/dist/src/protocol/WifiConfig.d.ts +0 -6
- package/dist/src/protocol/dataPoint.d.ts +0 -34
- package/dist/src/protocol/tool.d.ts +0 -14
- package/dist/src/randomCode.d.ts +0 -3
- package/dist/src/request.d.ts +0 -1
- package/dist/src/sdk.d.ts +0 -136
- package/dist/src/sentry.d.ts +0 -2
- package/dist/src/services/devices.d.ts +0 -47
- package/dist/src/services/login.d.ts +0 -4
- package/dist/src/services/monitor.d.ts +0 -12
- package/dist/src/services/ota.d.ts +0 -7
- package/dist/src/services/tool.d.ts +0 -4
- package/dist/src/services/uploadP0.d.ts +0 -14
- package/dist/src/sleep.d.ts +0 -2
- package/dist/src/types/index.d.ts +0 -361
- package/dist/src/utils.d.ts +0 -46
- package/dist/src/wechatApi.d.ts +0 -19
- package/dist/src/wifiConfig/ConfigBase.d.ts +0 -27
- package/dist/src/wifiConfig/ap.d.ts +0 -11
- package/dist/src/wifiConfig/ble.d.ts +0 -41
- package/dist/src/wifiConfig/nfc/disposeData.d.ts +0 -2
- package/dist/src/wifiConfig/nfc/formatData.d.ts +0 -3
- package/dist/src/wifiConfig/nfc/formatSSID.d.ts +0 -6
- package/dist/src/wifiConfig/nfc/index.d.ts +0 -22
- package/dist/src/wifiConfig/nfc/isIncludedCH.d.ts +0 -1
- package/dist/src/wifiConfig/nfc/nfcAConnect.d.ts +0 -6
- package/dist/src/wifiConfig/nfc/nfcATransceive.d.ts +0 -5
- package/dist/src/wifiConfig/nfc/ssIDToASC.d.ts +0 -1
- package/dist/src/wifiConfig/nfc/stringToGbk.d.ts +0 -1
- package/dist/src/wifiConfig/nfc/transceive.wx.d.ts +0 -2
- package/dist/src/wifiConfig/nfc/types.d.ts +0 -15
- package/index.ts +0 -8
- package/src/GizLog.ts +0 -51
- package/src/crc/calculators/crc16modbus.ts +0 -36
- package/src/crc/calculators/crc32.ts +0 -47
- package/src/crc/crc16modbus.ts +0 -3
- package/src/crc/crc32.ts +0 -4
- package/src/crc/create_buffer.ts +0 -7
- package/src/crc/define_crc.ts +0 -9
- package/src/crc/index.ts +0 -10
- package/src/crc/package.json +0 -3
- package/src/crc/types.ts +0 -10
- package/src/errorCode.ts +0 -83
- package/src/globalData.ts +0 -9
- package/src/handler/EventListener.ts +0 -44
- package/src/handler/ble.ts +0 -1369
- package/src/handler/lan.ts +0 -389
- package/src/handler/socket.ts +0 -686
- package/src/openApiRequest.ts +0 -50
- package/src/productConfigFileManage.ts +0 -72
- package/src/protocol/Bind.ts +0 -22
- package/src/protocol/DeviceInfo.ts +0 -37
- package/src/protocol/DiscoverUDP.ts +0 -80
- package/src/protocol/GetDeviceStatus.ts +0 -61
- package/src/protocol/Login.ts +0 -43
- package/src/protocol/Ntp.ts +0 -13
- package/src/protocol/OTA/AwaitNoti.ts +0 -14
- package/src/protocol/OTA/CheckCanOTA.ts +0 -23
- package/src/protocol/OTA/OTAPackPackage.ts +0 -37
- package/src/protocol/OTA/OtaComplete.ts +0 -17
- package/src/protocol/OTA/PreOTA.ts +0 -48
- package/src/protocol/OTA/ResetPosition.ts +0 -14
- package/src/protocol/OffLineData.ts +0 -81
- package/src/protocol/ProtocolBase.ts +0 -54
- package/src/protocol/Reset.ts +0 -16
- package/src/protocol/SetReset.ts +0 -13
- package/src/protocol/WifiConfig.ts +0 -42
- package/src/protocol/dataPoint.ts +0 -687
- package/src/protocol/tool.ts +0 -140
- package/src/randomCode.ts +0 -25
- package/src/request.ts +0 -22
- package/src/sdk.ts +0 -1536
- package/src/sentry.ts +0 -55
- package/src/services/devices.ts +0 -313
- package/src/services/login.ts +0 -11
- package/src/services/monitor.ts +0 -117
- package/src/services/ota.ts +0 -17
- package/src/services/tool.ts +0 -10
- package/src/services/uploadP0.ts +0 -57
- package/src/sleep.ts +0 -2
- package/src/types/index.ts +0 -456
- package/src/utils.ts +0 -449
- package/src/wechatApi.ts +0 -211
- package/src/wifiConfig/ConfigBase.ts +0 -235
- package/src/wifiConfig/ap.ts +0 -185
- package/src/wifiConfig/ble.ts +0 -460
- package/src/wifiConfig/nfc/disposeData.ts +0 -63
- package/src/wifiConfig/nfc/formatData.ts +0 -46
- package/src/wifiConfig/nfc/formatSSID.ts +0 -59
- package/src/wifiConfig/nfc/index.ts +0 -134
- package/src/wifiConfig/nfc/isIncludedCH.ts +0 -8
- package/src/wifiConfig/nfc/nfcAConnect.ts +0 -30
- package/src/wifiConfig/nfc/nfcATransceive.ts +0 -29
- package/src/wifiConfig/nfc/ssIDToASC.ts +0 -12
- package/src/wifiConfig/nfc/stringToGbk.ts +0 -51
- package/src/wifiConfig/nfc/transceive.wx.ts +0 -124
- package/src/wifiConfig/nfc/types.ts +0 -18
- package/src/wifiConfig/timeZoneName.json +0 -1
package/src/protocol/Reset.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import ProtocolBase from "./ProtocolBase";
|
|
2
|
-
import { arrayToString } from "./tool";
|
|
3
|
-
|
|
4
|
-
type IStatus = 0 | 1;
|
|
5
|
-
class Reset extends ProtocolBase {
|
|
6
|
-
status: IStatus = 0; // 0 没有进入重置 1 进入了重置状态
|
|
7
|
-
constructor(data: number[]) {
|
|
8
|
-
super(data);
|
|
9
|
-
this.status = this.content[0] as IStatus;
|
|
10
|
-
}
|
|
11
|
-
static pack = () => {
|
|
12
|
-
return [0,0,0,3,3,0,0,0x61];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default Reset;
|
package/src/protocol/SetReset.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import ProtocolBase from "./ProtocolBase";
|
|
2
|
-
import { arrayToString } from "./tool";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type IStatus = 0 | 1;
|
|
6
|
-
class SetReset extends ProtocolBase {
|
|
7
|
-
status: IStatus = 0; // 0 没有进入重置 1 进入了重置状态
|
|
8
|
-
static pack = (status: IStatus) => {
|
|
9
|
-
return [0,0,0,3,3,0,0,0x63, status];
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default SetReset;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import ProtocolBase from "./ProtocolBase";
|
|
2
|
-
import { formatCodesFromStr } from "./tool";
|
|
3
|
-
|
|
4
|
-
class WifiConfig extends ProtocolBase {
|
|
5
|
-
constructor(data: number[]) {
|
|
6
|
-
super(data);
|
|
7
|
-
}
|
|
8
|
-
static pack = (ssid: string, password: string) => {
|
|
9
|
-
const header = [0, 0, 0, 3];
|
|
10
|
-
const length: number[] = [];
|
|
11
|
-
const flag = [0];
|
|
12
|
-
const cmd = [0, 1];
|
|
13
|
-
|
|
14
|
-
const [ASSID, ssidLength] = formatCodesFromStr(ssid);
|
|
15
|
-
const [APassword, passwordLength] = formatCodesFromStr(password);
|
|
16
|
-
|
|
17
|
-
const content = flag.concat(
|
|
18
|
-
cmd,
|
|
19
|
-
ssidLength,
|
|
20
|
-
ASSID,
|
|
21
|
-
passwordLength,
|
|
22
|
-
APassword
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
let contentLength = content.length;
|
|
26
|
-
while (contentLength > 0) {
|
|
27
|
-
length.push(contentLength);
|
|
28
|
-
contentLength -= 255;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const config = header.concat(length).concat(content);
|
|
32
|
-
const buffer = new ArrayBuffer(config.length);
|
|
33
|
-
const uint8Array = new Uint8Array(buffer);
|
|
34
|
-
for (let i = 0; i < buffer.byteLength; i++) {
|
|
35
|
-
uint8Array[i] = config[i];
|
|
36
|
-
}
|
|
37
|
-
return uint8Array;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// console.log(Array.from(WifiConfig.pack("aiottest", "aiottest")).map(item => item.toString(16)))
|
|
42
|
-
export default WifiConfig;
|