2.0.17 • Published 5 months ago

ciot v2.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

使用方法

	import CIoT from "./dist/CIoT.js"
	
	var iot = new CIoT();
	console.log(iot);
	
	// 初始化
	var ret = await iot.init("123456789", "POS");
	console.log(ret);

	// 设置事件回调函数
	iot.onEvent((eventName, data) => {
		showMsg(`${eventName} ==> ${data}`);
	});
	
	// 连接Plugin
	ret = await iot.connect({
		pluginName:"DongleSense",
		resource:"DONGLE_SENSE_RESOURCE_ID",
		pluginType:"DLL",
		miniVersion:"1.0.0.1",
		ctrlType: "2"
	});
	console.log(ret);
	
	// 连接Plugin后,可以重复调用Action
	for(i = 0;i < 1000; i++){
		ret = await iot.invoke("NetIP_IpInfo", {});
		console.log(ret);
		ret = await iot.invoke("NetIP_GetHardID", {});
		console.log(ret);
	}
	
	// 断开Plugin
	await iot.disconnect();
	
	// 反初始化(断开websocket)
	iot.unInit();
2.0.17

5 months ago

2.0.15

10 months ago

2.0.3

10 months ago

2.0.16

9 months ago

2.0.13

10 months ago

2.0.5

10 months ago

2.0.11

10 months ago

2.0.7

10 months ago

2.0.12

10 months ago

2.0.9

10 months ago

2.0.10

10 months ago

2.0.8

10 months ago

2.0.2

10 months ago

2.0.1

10 months ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago