skyeye-sdk-js 1.1.8 → 1.1.9
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/src/SkyEyeClient.js +6 -6
- package/dist/test.js +1 -2
- package/package.json +1 -1
- package/src/SkyEyeClient.ts +3 -6
- package/test.ts +1 -1
package/dist/src/SkyEyeClient.js
CHANGED
|
@@ -877,10 +877,12 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
877
877
|
initSkyEyeAndRun(pathSkyEye, fileName, port, skyeyeDir) {
|
|
878
878
|
console.log('runExample');
|
|
879
879
|
cp.exec(skyeyeDir + " -q " + port + "\n", (err, stdout, stderr) => {
|
|
880
|
-
console.log('stdout: ' + stdout);
|
|
881
|
-
console.log('stderr: ' + stderr);
|
|
880
|
+
// console.log('stdout: ' + stdout);
|
|
881
|
+
// console.log('stderr: ' + stderr);
|
|
882
|
+
});
|
|
883
|
+
setTimeout(() => {
|
|
882
884
|
client = new skyeye_rpc_grpc_pb_1.JSONTransmissionClient('127.0.0.1:' + port, grpc.credentials.createInsecure());
|
|
883
|
-
console.log('client:' + client);
|
|
885
|
+
// console.log('client:' + client);
|
|
884
886
|
const Jr = new skyeye_rpc_pb_1.JSONRequest();
|
|
885
887
|
Jr.setRequest("{\"request\": {\"name\": \"chdir\", \"args\": {\"path\":\"" + pathSkyEye + "\"}}}");
|
|
886
888
|
client.callSkyEye(Jr, (error, response) => {
|
|
@@ -892,9 +894,7 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
892
894
|
return "1";
|
|
893
895
|
});
|
|
894
896
|
});
|
|
895
|
-
});
|
|
896
|
-
// setTimeout(() => {
|
|
897
|
-
// }, 2000);
|
|
897
|
+
}, 2000);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
900
|
exports.SkyEyeClient = SkyEyeClient;
|
package/dist/test.js
CHANGED
|
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const GrpcUtil_1 = require("./src/GrpcUtil");
|
|
13
12
|
const { SkyEyeClientFactory } = require('./src/SkyEyeClientFactory');
|
|
14
13
|
const { SkyEyeClient } = require('./src/SkyEyeClient');
|
|
15
14
|
function test() {
|
|
@@ -32,7 +31,7 @@ function test() {
|
|
|
32
31
|
const skyeyeDir = "D:/install/skyeye/opt/skyeye/bin/skyeye.exe";
|
|
33
32
|
const port = "50051";
|
|
34
33
|
yield client.initSkyEyeAndRun(pathSkyEye, fileName, port, skyeyeDir);
|
|
35
|
-
|
|
34
|
+
// GrpcUtil.initAndRunExample();
|
|
36
35
|
// const bean:string = '{"id":"33d209da-2459-4e49-97c3-5b1509bc638c","steps":[{"condition":{"type":10,"value":"123"},"send":{"target":{"type":2,"addr":"1222"},"data":"0101011101"}},{"condition":{"type":0,"value":"0xff"},"send":{"target":{"type":2,"addr":"1222"},"data":"0101011101"}}],"expects":[{"condition":{"type":0,"value":"0xff"},"send":{"target":{"type":3,"addr":"2221"}}}]}';
|
|
37
36
|
});
|
|
38
37
|
}
|
package/package.json
CHANGED
package/src/SkyEyeClient.ts
CHANGED
|
@@ -814,7 +814,8 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
814
814
|
cp.exec(skyeyeDir + " -q " + port + "\n", (err: any, stdout: any, stderr: any) => {
|
|
815
815
|
// console.log('stdout: ' + stdout);
|
|
816
816
|
// console.log('stderr: ' + stderr);
|
|
817
|
-
|
|
817
|
+
});
|
|
818
|
+
setTimeout(() => {
|
|
818
819
|
client = new JSONTransmissionClient('127.0.0.1:' + port, grpc.credentials.createInsecure());
|
|
819
820
|
// console.log('client:' + client);
|
|
820
821
|
const Jr = new JSONRequest();
|
|
@@ -829,11 +830,7 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
829
830
|
return "1";
|
|
830
831
|
});
|
|
831
832
|
});
|
|
832
|
-
|
|
833
|
-
});
|
|
834
|
-
// setTimeout(() => {
|
|
835
|
-
|
|
836
|
-
// }, 2000);
|
|
833
|
+
}, 2000);
|
|
837
834
|
}
|
|
838
835
|
|
|
839
836
|
|
package/test.ts
CHANGED
|
@@ -30,7 +30,7 @@ async function test() {
|
|
|
30
30
|
const port = "50051"
|
|
31
31
|
await client.initSkyEyeAndRun(pathSkyEye,fileName,port,skyeyeDir);
|
|
32
32
|
|
|
33
|
-
GrpcUtil.initAndRunExample();
|
|
33
|
+
// GrpcUtil.initAndRunExample();
|
|
34
34
|
|
|
35
35
|
// const bean:string = '{"id":"33d209da-2459-4e49-97c3-5b1509bc638c","steps":[{"condition":{"type":10,"value":"123"},"send":{"target":{"type":2,"addr":"1222"},"data":"0101011101"}},{"condition":{"type":0,"value":"0xff"},"send":{"target":{"type":2,"addr":"1222"},"data":"0101011101"}}],"expects":[{"condition":{"type":0,"value":"0xff"},"send":{"target":{"type":3,"addr":"2221"}}}]}';
|
|
36
36
|
|