skyeye-sdk-js 1.0.7 → 1.0.8

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.
Files changed (29) hide show
  1. package/dist/src/SkyEyeClient.d.ts +1 -1
  2. package/dist/src/SkyEyeClient.js +1 -3
  3. package/dist/test.js +1 -1
  4. package/package.json +1 -1
  5. package/dist/requests/BaseRequest.d.ts +0 -13
  6. package/dist/requests/BaseRequest.js +0 -18
  7. package/dist/response/BaseResponse.d.ts +0 -5
  8. package/dist/response/BaseResponse.js +0 -7
  9. package/dist/response/GetAllDeviceInfoResponse.d.ts +0 -5
  10. package/dist/response/GetAllDeviceInfoResponse.js +0 -11
  11. package/dist/response/GetCpuListResponse.d.ts +0 -8
  12. package/dist/response/GetCpuListResponse.js +0 -18
  13. package/dist/response/GetCpuRegisterInfoResponse.d.ts +0 -6
  14. package/dist/response/GetCpuRegisterInfoResponse.js +0 -11
  15. package/dist/response/GetCurrentPCResponse.d.ts +0 -4
  16. package/dist/response/GetCurrentPCResponse.js +0 -7
  17. package/dist/response/GetDeviceListResponse.d.ts +0 -6
  18. package/dist/response/GetDeviceListResponse.js +0 -11
  19. package/dist/response/GetDeviceTreeResponse.d.ts +0 -5
  20. package/dist/response/GetDeviceTreeResponse.js +0 -11
  21. package/dist/response/GetDisassembleInfoResponse.d.ts +0 -5
  22. package/dist/response/GetDisassembleInfoResponse.js +0 -7
  23. package/dist/response/GetFaultInjectListResponse.d.ts +0 -8
  24. package/dist/response/GetFaultInjectListResponse.js +0 -18
  25. package/dist/response/GetRamAddrInfoResponse.d.ts +0 -5
  26. package/dist/response/GetRamAddrInfoResponse.js +0 -7
  27. package/dist/response/GetRunningStateResponse.d.ts +0 -14
  28. package/dist/response/GetRunningStateResponse.js +0 -25
  29. package/src/response/BaseResponse.js +0 -27
@@ -67,5 +67,5 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
67
67
  close(): boolean;
68
68
  getHost(): string;
69
69
  getPort(): string;
70
- initSkyEye(pathSkyEye: string, fileName: string, skyeyeDir: string, port: string): void;
70
+ initSkyEyeAndRun(pathSkyEye: string, fileName: string, skyeyeDir: string, port: string): void;
71
71
  }
@@ -829,17 +829,15 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
829
829
  getPort() {
830
830
  return this.port;
831
831
  }
832
- initSkyEye(pathSkyEye, fileName, skyeyeDir, port) {
832
+ initSkyEyeAndRun(pathSkyEye, fileName, skyeyeDir, port) {
833
833
  console.log('runExample');
834
834
  cp.exec(skyeyeDir + " -q " + port + "\n", (err, stdout, stderr) => {
835
835
  console.log('stdout: ' + stdout);
836
836
  console.log('stderr: ' + stderr);
837
837
  });
838
838
  setTimeout(() => {
839
- //客户端
840
839
  client = new skyeye_rpc_grpc_pb_1.JSONTransmissionClient('127.0.0.1:50051', grpc.credentials.createInsecure());
841
840
  console.log('client:' + client);
842
- //chdir
843
841
  const Jr = new skyeye_rpc_pb_1.JSONRequest();
844
842
  Jr.setRequest("{\"request\": {\"name\": \"chdir\", \"args\": {\"path\":\"" + pathSkyEye + "\"}}}");
845
843
  client.callSkyEye(Jr, (error, response) => {
package/dist/test.js CHANGED
@@ -30,7 +30,7 @@ function test() {
30
30
  const fileName = "c6713_demo.skyeye";
31
31
  const skyeyeDir = "D:/install/skyeye/opt/skyeye/bin/skyeye.exe";
32
32
  const port = "50051";
33
- yield client.initSkyEye(pathSkyEye, fileName, skyeyeDir, port);
33
+ yield client.initSkyEyeAndRun(pathSkyEye, fileName, skyeyeDir, port);
34
34
  // GrpcUtil.initAndRunExample();
35
35
  });
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyeye-sdk-js",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "gRPC to SkyEye",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,13 +0,0 @@
1
- export declare class BaseRequest {
2
- request: {
3
- name: string;
4
- args: {
5
- [key: string]: string;
6
- };
7
- };
8
- constructor(name: string);
9
- toJSONString(): string;
10
- setArgs(args: {
11
- [key: string]: string;
12
- }): void;
13
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseRequest = void 0;
4
- class BaseRequest {
5
- constructor(name) {
6
- this.request = {
7
- name: name,
8
- args: null
9
- };
10
- }
11
- toJSONString() {
12
- return JSON.stringify({ request: this.request });
13
- }
14
- setArgs(args) {
15
- this.request.args = args;
16
- }
17
- }
18
- exports.BaseRequest = BaseRequest;
@@ -1,5 +0,0 @@
1
- import { JSONResponse } from "../proto/skyeye_rpc_pb";
2
- export declare class BaseResponse extends JSONResponse {
3
- isSuccess: boolean;
4
- callFuncName: string;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseResponse = void 0;
4
- const skyeye_rpc_pb_1 = require("../proto/skyeye_rpc_pb");
5
- class BaseResponse extends skyeye_rpc_pb_1.JSONResponse {
6
- }
7
- exports.BaseResponse = BaseResponse;
@@ -1,5 +0,0 @@
1
- import { Board } from "../models/Board";
2
- import { BaseResponse } from "./BaseResponse";
3
- export declare class GetAllDeviceInfoResponse extends BaseResponse {
4
- boardMap: Map<String, Board>;
5
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetAllDeviceInfoResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetAllDeviceInfoResponse extends BaseResponse_1.BaseResponse {
6
- constructor() {
7
- super(...arguments);
8
- this.boardMap = new Map();
9
- }
10
- }
11
- exports.GetAllDeviceInfoResponse = GetAllDeviceInfoResponse;
@@ -1,8 +0,0 @@
1
- import { Cpu } from "../models/Cpu";
2
- import { BaseResponse } from "./BaseResponse";
3
- export declare class GetCpuListResponse extends BaseResponse {
4
- private cpuList;
5
- constructor();
6
- getCpuList(): Cpu[];
7
- setCpuList(cpuList: Cpu[]): void;
8
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetCpuListResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetCpuListResponse extends BaseResponse_1.BaseResponse {
6
- constructor() {
7
- super();
8
- this.cpuList = [];
9
- this.callFuncName = "cpu_list";
10
- }
11
- getCpuList() {
12
- return this.cpuList;
13
- }
14
- setCpuList(cpuList) {
15
- this.cpuList = cpuList;
16
- }
17
- }
18
- exports.GetCpuListResponse = GetCpuListResponse;
@@ -1,6 +0,0 @@
1
- import { Register } from "../models/Register";
2
- import { BaseResponse } from "./BaseResponse";
3
- export declare class GetCpuRegisterInfoResponse extends BaseResponse {
4
- registers: Register[];
5
- constructor();
6
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetCpuRegisterInfoResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetCpuRegisterInfoResponse extends BaseResponse_1.BaseResponse {
6
- constructor() {
7
- super();
8
- this.registers = [];
9
- }
10
- }
11
- exports.GetCpuRegisterInfoResponse = GetCpuRegisterInfoResponse;
@@ -1,4 +0,0 @@
1
- import { BaseResponse } from "./BaseResponse";
2
- export declare class GetCurrentPCResponse extends BaseResponse {
3
- private pc;
4
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetCurrentPCResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetCurrentPCResponse extends BaseResponse_1.BaseResponse {
6
- }
7
- exports.GetCurrentPCResponse = GetCurrentPCResponse;
@@ -1,6 +0,0 @@
1
- import { Device } from '../models/Device';
2
- import { BaseResponse } from './BaseResponse';
3
- export declare class GetDeviceListResponse extends BaseResponse {
4
- deviceList: Device[];
5
- constructor();
6
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetDeviceListResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetDeviceListResponse extends BaseResponse_1.BaseResponse {
6
- constructor() {
7
- super();
8
- this.deviceList = [];
9
- }
10
- }
11
- exports.GetDeviceListResponse = GetDeviceListResponse;
@@ -1,5 +0,0 @@
1
- import { BaseResponse } from "./BaseResponse";
2
- import { Board } from "../models/Board";
3
- export declare class GetDeviceTreeResponse extends BaseResponse {
4
- boardMap: Map<string, Board>;
5
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetDeviceTreeResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetDeviceTreeResponse extends BaseResponse_1.BaseResponse {
6
- constructor() {
7
- super(...arguments);
8
- this.boardMap = new Map();
9
- }
10
- }
11
- exports.GetDeviceTreeResponse = GetDeviceTreeResponse;
@@ -1,5 +0,0 @@
1
- import { InstructionItem } from "../models/InstructionItem";
2
- import { BaseResponse } from "./BaseResponse";
3
- export declare class GetDisassembleInfoResponse extends BaseResponse {
4
- instructions: Array<InstructionItem>;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetDisassembleInfoResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetDisassembleInfoResponse extends BaseResponse_1.BaseResponse {
6
- }
7
- exports.GetDisassembleInfoResponse = GetDisassembleInfoResponse;
@@ -1,8 +0,0 @@
1
- import { FaultInjectItem } from "../models/FaultInjectItem";
2
- import { BaseResponse } from "./BaseResponse";
3
- export declare class GetFaultInjectListResponse extends BaseResponse {
4
- private _faultInjectItems;
5
- constructor();
6
- get faultInjectItems(): FaultInjectItem[];
7
- set faultInjectItems(value: FaultInjectItem[]);
8
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetFaultInjectListResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetFaultInjectListResponse extends BaseResponse_1.BaseResponse {
6
- constructor() {
7
- super();
8
- this.callFuncName = "SE_get_fault_inject_list";
9
- this._faultInjectItems = [];
10
- }
11
- get faultInjectItems() {
12
- return this._faultInjectItems;
13
- }
14
- set faultInjectItems(value) {
15
- this._faultInjectItems = value;
16
- }
17
- }
18
- exports.GetFaultInjectListResponse = GetFaultInjectListResponse;
@@ -1,5 +0,0 @@
1
- import { BaseResponse } from "./BaseResponse";
2
- export declare class GetRamAddrInfoResponse extends BaseResponse {
3
- bits: number;
4
- value: number;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetRamAddrInfoResponse = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- class GetRamAddrInfoResponse extends BaseResponse_1.BaseResponse {
6
- }
7
- exports.GetRamAddrInfoResponse = GetRamAddrInfoResponse;
@@ -1,14 +0,0 @@
1
- import { BaseResponse } from "./BaseResponse";
2
- export declare enum StateState {
3
- QUITED = "QUITED",
4
- UNLOADED = "UNLOADED",
5
- RUNNING = "RUNNING",
6
- STOPPED = "STOPPED"
7
- }
8
- export declare class GetRunningStateResponse extends BaseResponse {
9
- state: StateState;
10
- callFuncName: string;
11
- constructor();
12
- getState(): StateState;
13
- setState(state: StateState): void;
14
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetRunningStateResponse = exports.StateState = void 0;
4
- const BaseResponse_1 = require("./BaseResponse");
5
- var StateState;
6
- (function (StateState) {
7
- StateState["QUITED"] = "QUITED";
8
- StateState["UNLOADED"] = "UNLOADED";
9
- StateState["RUNNING"] = "RUNNING";
10
- StateState["STOPPED"] = "STOPPED";
11
- })(StateState || (exports.StateState = StateState = {}));
12
- class GetRunningStateResponse extends BaseResponse_1.BaseResponse {
13
- constructor() {
14
- super();
15
- this.state = StateState.QUITED;
16
- this.callFuncName = "SE_get_running_status";
17
- }
18
- getState() {
19
- return this.state;
20
- }
21
- setState(state) {
22
- this.state = state;
23
- }
24
- }
25
- exports.GetRunningStateResponse = GetRunningStateResponse;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.BaseResponse = void 0;
19
- var skyeye_rpc_pb_1 = require("../proto/skyeye_rpc_pb");
20
- var BaseResponse = /** @class */ (function (_super) {
21
- __extends(BaseResponse, _super);
22
- function BaseResponse() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- return BaseResponse;
26
- }(skyeye_rpc_pb_1.JSONResponse));
27
- exports.BaseResponse = BaseResponse;