skyeye-sdk-js 1.4.12 → 1.4.14
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/.vscode/launch.json +22 -0
- package/dist/src/RequestFactory.d.ts +4 -0
- package/dist/src/RequestFactory.js +36 -0
- package/dist/src/SkyEyeClient.d.ts +5 -0
- package/dist/src/SkyEyeClient.js +56 -0
- package/dist/src/proto/protoc.bat +3 -3
- package/dist/src/proto/skyeye_rpc.proto +1 -0
- package/dist/src/proto/skyeye_rpc_grpc_pb.js +99 -88
- package/dist/src/proto/skyeye_rpc_pb.js +328 -328
- package/dist/test.js +37 -19
- package/package.json +1 -1
- package/src/RequestFactory.ts +40 -0
- package/src/SkyEyeClient.ts +47 -0
- package/src/proto/protoc.bat +3 -3
- package/src/proto/skyeye_rpc.proto +1 -0
- package/src/proto/skyeye_rpc_grpc_pb.js +99 -88
- package/src/proto/skyeye_rpc_pb.js +328 -328
- package/test.ts +43 -20
package/test.ts
CHANGED
|
@@ -12,7 +12,7 @@ enum RegisterType {
|
|
|
12
12
|
CPU,
|
|
13
13
|
Device
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
let call
|
|
16
16
|
async function test() {
|
|
17
17
|
// console.log("Connected to SkyEye server");
|
|
18
18
|
// await client.getDeviceList();
|
|
@@ -50,34 +50,57 @@ async function test() {
|
|
|
50
50
|
// console.log("response:", response.boardMap)
|
|
51
51
|
// console.log("response:", response.boardMap.keys[0])
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
|
|
55
55
|
// const pathSkyEye = "D:/data/case/FMQL45T900_SylixOS";
|
|
56
56
|
// const fileName = "FMQL45T900_SylixOS.skyeye";
|
|
57
57
|
// const skyeyeDir = "D:/install/SkyEye/opt/skyeye/bin/skyeye.exe"
|
|
58
58
|
// const port = "50066"
|
|
59
59
|
|
|
60
|
-
const pathSkyEye = "
|
|
61
|
-
const fileName = "
|
|
60
|
+
const pathSkyEye = "C:/Users/lingt/Downloads/SkyTest_Double";
|
|
61
|
+
const fileName = "C:/Users/lingt/Downloads/SkyTest_Double/SkyTest_Double.skyeye";
|
|
62
62
|
const skyeyeDir = "G:/SkyEye/opt/skyeye/bin/skyeye.exe"
|
|
63
|
-
const port = "
|
|
63
|
+
const port = "50051"
|
|
64
|
+
// const client = await SkyEyeClientFactory.instance.createConnectedClient('127.0.0.1', port);
|
|
64
65
|
const client = SkyEyeClientFactory.instance.createClient('127.0.0.1', port);
|
|
65
66
|
const t = await client.initSkyEyeAndRun2(pathSkyEye, fileName, port, skyeyeDir)
|
|
66
|
-
await client.runCommand()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
// await client.runCommand();
|
|
68
|
+
const response = await client.getDeviceTree()
|
|
69
|
+
console.log(response)
|
|
70
|
+
// await client.registerTimeMonitor({
|
|
71
|
+
// "id": "1",
|
|
72
|
+
// "time": 50,
|
|
73
|
+
// "cpu_name": "c67x_core_0",
|
|
74
|
+
// "direction":"recv",
|
|
75
|
+
// "cycle":-1,
|
|
76
|
+
// "items": [
|
|
77
|
+
|
|
78
|
+
// {
|
|
79
|
+
// "id": "cc5f450b-6fbb-7bb3-4544-e761a907b46d",
|
|
80
|
+
// "cpu_name": "c67x_core_0",
|
|
81
|
+
// "var_name": "int1",
|
|
82
|
+
// "var_type": "int",
|
|
83
|
+
// "var_bytes": 4,
|
|
84
|
+
// "type": "global",
|
|
85
|
+
// "value": "111"
|
|
86
|
+
// }
|
|
87
|
+
// ],
|
|
88
|
+
// })
|
|
89
|
+
|
|
90
|
+
// await client.startTimeMonitor("1")
|
|
91
|
+
// // await client.getTimeMonitorConfig()
|
|
92
|
+
// console.log('bbbbbbbbbbbb')
|
|
93
|
+
|
|
94
|
+
// call = client.timeDataReceive("1")
|
|
95
|
+
// call.on('data',(response)=> {
|
|
96
|
+
// const ackObj = response.getResponse();
|
|
97
|
+
// console.log(ackObj)
|
|
98
|
+
// })
|
|
99
|
+
// console.log('gggggggggggggg')
|
|
100
|
+
|
|
101
|
+
// console.log(call)
|
|
102
|
+
// await client.stopTimeMonitor()
|
|
103
|
+
|
|
81
104
|
|
|
82
105
|
// response = client.setBitValue('c67x_core_0', '0x1000','1', 8)
|
|
83
106
|
// console.log("response:", response)
|