skyeye-sdk-js 1.4.10 → 1.4.12

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.
@@ -281,7 +281,7 @@ class RequestFactory {
281
281
  const baseRequest = new BaseRequest_1.BaseRequest("SE_set_fault_inject");
282
282
  const args = {};
283
283
  args.machname = machName;
284
- args.devicename = deviceName;
284
+ args.devname = deviceName;
285
285
  args.addr = addr;
286
286
  args.bit = bit;
287
287
  args.mode = mode;
@@ -294,7 +294,7 @@ class RequestFactory {
294
294
  const baseRequest = new BaseRequest_1.BaseRequest("SE_delete_fault");
295
295
  const args = {};
296
296
  args.machname = machName;
297
- args.devicename = deviceName;
297
+ args.devname = deviceName;
298
298
  args.addr = addr;
299
299
  args.bit = bit;
300
300
  args.mode = mode;
@@ -7,6 +7,7 @@ import { GetRunningStateResponse } from './response/GetRunningStateResponse';
7
7
  import { Register } from './models/Register';
8
8
  import { GetDeviceTreeResponse } from './response/GetDeviceTreeResponse';
9
9
  import { GetAllDeviceInfoResponse } from './response/GetAllDeviceInfoResponse';
10
+ import { GetAllDeviceInfoResponse2 } from './response/GetAllDeviceInfoResponse2';
10
11
  import { GetRamAddrInfoResponse } from './response/GetRamAddrInfoResponse';
11
12
  import { Device } from './models/Device';
12
13
  import { FaultInjectType } from './models/FaultInjectType';
@@ -16,6 +17,7 @@ import { GetDisassembleInfoResponse } from './response/GetDisassembleInfoRespons
16
17
  import { GetCpuRegisterInfoResponse } from './response/GetCpuRegisterInfoResponse';
17
18
  import { BaseResponse } from './response/BaseResponse';
18
19
  import { GetAddressWidthResponse } from './response/GetAddressWidthResponse';
20
+ import { GetFaultInjectListResponse2 } from './response/GetFaultInjectListResponse2';
19
21
  export declare class SkyEyeClient extends JSONTransmissionClient {
20
22
  private host;
21
23
  private port;
@@ -68,6 +70,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
68
70
  getModuleStatus(): Promise<BaseResponse>;
69
71
  getCurrentRunningState(): Promise<GetRunningStateResponse>;
70
72
  getAllDeviceInfo(): Promise<GetAllDeviceInfoResponse>;
73
+ getAllDeviceInfo2(): Promise<GetAllDeviceInfoResponse2>;
71
74
  getRamAddrInfo(machName: string, addr: string): Promise<GetRamAddrInfoResponse>;
72
75
  setRamFaultInjectDefault(device: Device, addr: string, bit: string, mode: FaultInjectType): Promise<any>;
73
76
  setRamFaultInject(boardName: string, deviceName: string, addr: string, bit: string, mode: FaultInjectType): Promise<any>;
@@ -76,6 +79,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
76
79
  deleteFaultInjectDefault(faultInjectItem: FaultInjectItem): Promise<any>;
77
80
  deleteFaultInject(boardName: string, deviceName: string, addr: string, bit: string, mode: FaultInjectType): Promise<any>;
78
81
  getFaultInjectList(): Promise<GetFaultInjectListResponse>;
82
+ getFaultInjectList2(): Promise<GetFaultInjectListResponse2>;
79
83
  getDisassembleInfo(cpuName: string, startAddr: string, nums: string): Promise<GetDisassembleInfoResponse>;
80
84
  getDisassembleInfoDefault(startAddr: string, nums: string): Promise<GetDisassembleInfoResponse>;
81
85
  SingleStep(cpuName: string): Promise<any>;
@@ -45,6 +45,7 @@ const Register_1 = require("./models/Register");
45
45
  const GetDeviceTreeResponse_1 = require("./response/GetDeviceTreeResponse");
46
46
  const ParseBoardUtils_1 = require("./utils/ParseBoardUtils");
47
47
  const GetAllDeviceInfoResponse_1 = require("./response/GetAllDeviceInfoResponse");
48
+ const GetAllDeviceInfoResponse2_1 = require("./response/GetAllDeviceInfoResponse2");
48
49
  const GetRamAddrInfoResponse_1 = require("./response/GetRamAddrInfoResponse");
49
50
  const Device_1 = require("./models/Device");
50
51
  const FaultInjectType_1 = require("./models/FaultInjectType");
@@ -57,6 +58,7 @@ const SkyEyeSDKException_1 = require("./exception/SkyEyeSDKException");
57
58
  const cp = __importStar(require("child_process"));
58
59
  const BaseResponse_1 = require("./response/BaseResponse");
59
60
  const GetAddressWidthResponse_1 = require("./response/GetAddressWidthResponse");
61
+ const GetFaultInjectListResponse2_1 = require("./response/GetFaultInjectListResponse2");
60
62
  let client = null;
61
63
  // ----------------------------当前运行程序的设备树----------------------------------------//
62
64
  const boardMap = new Map();
@@ -887,6 +889,26 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
887
889
  return response;
888
890
  });
889
891
  }
892
+ getAllDeviceInfo2() {
893
+ return __awaiter(this, void 0, void 0, function* () {
894
+ const response = new GetAllDeviceInfoResponse2_1.GetAllDeviceInfoResponse2();
895
+ try {
896
+ const call = yield this.call(RequestFactory_1.RequestFactory.getInstance().getAllDeviceInfo());
897
+ if (call != null) {
898
+ response.isSuccess = true;
899
+ response.result = call;
900
+ }
901
+ else {
902
+ throw new SkyEyeSDKException_1.SkyEyeSDKException(String(call.error));
903
+ }
904
+ }
905
+ catch (error) {
906
+ console.error("Error during getAllDeviceInfo:", error);
907
+ throw error;
908
+ }
909
+ return response;
910
+ });
911
+ }
890
912
  getRamAddrInfo(machName, addr) {
891
913
  return __awaiter(this, void 0, void 0, function* () {
892
914
  const response = new GetRamAddrInfoResponse_1.GetRamAddrInfoResponse();
@@ -941,7 +963,7 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
941
963
  setRegisterFaultInject(boardName, deviceName, addr, bit, mode) {
942
964
  return __awaiter(this, void 0, void 0, function* () {
943
965
  try {
944
- return yield this.call(RequestFactory_1.RequestFactory.getInstance().setFaultInject(boardName, deviceName, "0x" + String(addr), String(bit), mode));
966
+ return yield this.call(RequestFactory_1.RequestFactory.getInstance().setFaultInject(boardName, deviceName, String(addr), String(bit), mode));
945
967
  }
946
968
  catch (error) {
947
969
  throw error;
@@ -1006,6 +1028,22 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
1006
1028
  return response;
1007
1029
  });
1008
1030
  }
1031
+ getFaultInjectList2() {
1032
+ return __awaiter(this, void 0, void 0, function* () {
1033
+ const response = new GetFaultInjectListResponse2_1.GetFaultInjectListResponse2();
1034
+ try {
1035
+ const call = yield this.call(RequestFactory_1.RequestFactory.getInstance().getFaultInjectList());
1036
+ if (call.result != null) {
1037
+ response.isSuccess = true;
1038
+ response.result = call.result;
1039
+ }
1040
+ }
1041
+ catch (error) {
1042
+ throw error;
1043
+ }
1044
+ return response;
1045
+ });
1046
+ }
1009
1047
  getDisassembleInfo(cpuName, startAddr, nums) {
1010
1048
  return __awaiter(this, void 0, void 0, function* () {
1011
1049
  const response = new GetDisassembleInfoResponse_1.GetDisassembleInfoResponse();
@@ -0,0 +1,4 @@
1
+ import { BaseResponse } from "./BaseResponse";
2
+ export declare class GetAllDeviceInfoResponse2 extends BaseResponse {
3
+ result: object;
4
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAllDeviceInfoResponse2 = void 0;
4
+ const BaseResponse_1 = require("./BaseResponse");
5
+ class GetAllDeviceInfoResponse2 extends BaseResponse_1.BaseResponse {
6
+ }
7
+ exports.GetAllDeviceInfoResponse2 = GetAllDeviceInfoResponse2;
@@ -0,0 +1,5 @@
1
+ import { BaseResponse } from "./BaseResponse";
2
+ export declare class GetFaultInjectListResponse2 extends BaseResponse {
3
+ result: any;
4
+ constructor();
5
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetFaultInjectListResponse2 = void 0;
4
+ const BaseResponse_1 = require("./BaseResponse");
5
+ class GetFaultInjectListResponse2 extends BaseResponse_1.BaseResponse {
6
+ constructor() {
7
+ super();
8
+ this.callFuncName = "SE_get_fault_inject_list";
9
+ }
10
+ }
11
+ exports.GetFaultInjectListResponse2 = GetFaultInjectListResponse2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyeye-sdk-js",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "gRPC to SkyEye",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -335,7 +335,7 @@ export class RequestFactory {
335
335
  const baseRequest = new BaseRequest("SE_set_fault_inject");
336
336
  const args: { [key: string]: string } = {};
337
337
  args.machname = machName;
338
- args.devicename = deviceName;
338
+ args.devname = deviceName;
339
339
  args.addr = addr;
340
340
  args.bit = bit;
341
341
  args.mode = mode;
@@ -351,7 +351,7 @@ export class RequestFactory {
351
351
  const baseRequest = new BaseRequest("SE_delete_fault");
352
352
  const args: { [key: string]: string } = {};
353
353
  args.machname = machName;
354
- args.devicename = deviceName;
354
+ args.devname = deviceName;
355
355
  args.addr = addr;
356
356
  args.bit = bit;
357
357
  args.mode = mode;
@@ -12,6 +12,7 @@ import { Register } from './models/Register';
12
12
  import { GetDeviceTreeResponse } from './response/GetDeviceTreeResponse';
13
13
  import { ParseBoardUtils } from './utils/ParseBoardUtils';
14
14
  import { GetAllDeviceInfoResponse } from './response/GetAllDeviceInfoResponse';
15
+ import { GetAllDeviceInfoResponse2 } from './response/GetAllDeviceInfoResponse2';
15
16
  import { GetRamAddrInfoResponse } from './response/GetRamAddrInfoResponse';
16
17
  import { Device } from './models/Device';
17
18
  import { FaultInjectType } from './models/FaultInjectType';
@@ -26,6 +27,7 @@ import * as cp from 'child_process';
26
27
  import { Board } from './models/Board';
27
28
  import { BaseResponse } from './response/BaseResponse';
28
29
  import { GetAddressWidthResponse } from './response/GetAddressWidthResponse';
30
+ import { GetFaultInjectListResponse2 } from './response/GetFaultInjectListResponse2';
29
31
  let client: JSONTransmissionClient | any = null;
30
32
 
31
33
 
@@ -803,6 +805,24 @@ export class SkyEyeClient extends JSONTransmissionClient {
803
805
  }
804
806
 
805
807
 
808
+ public async getAllDeviceInfo2() {
809
+ const response = new GetAllDeviceInfoResponse2();
810
+ try {
811
+ const call = await this.call(RequestFactory.getInstance().getAllDeviceInfo());
812
+ if (call != null) {
813
+ response.isSuccess = true;
814
+ response.result = call;
815
+ } else {
816
+ throw new SkyEyeSDKException(String(call.error));
817
+ }
818
+ } catch (error) {
819
+ console.error("Error during getAllDeviceInfo:", error);
820
+ throw error;
821
+ }
822
+ return response;
823
+ }
824
+
825
+
806
826
  public async getRamAddrInfo(machName: string, addr: string) {
807
827
  const response = new GetRamAddrInfoResponse();
808
828
  try {
@@ -853,7 +873,7 @@ export class SkyEyeClient extends JSONTransmissionClient {
853
873
 
854
874
  public async setRegisterFaultInject(boardName: string, deviceName: string, addr: string, bit: string, mode: FaultInjectType) {
855
875
  try {
856
- return await this.call(RequestFactory.getInstance().setFaultInject(boardName, deviceName, "0x" + String(addr), String(bit), mode))
876
+ return await this.call(RequestFactory.getInstance().setFaultInject(boardName, deviceName, String(addr), String(bit), mode))
857
877
  } catch (error) {
858
878
  throw error;
859
879
  }
@@ -916,6 +936,21 @@ export class SkyEyeClient extends JSONTransmissionClient {
916
936
  return response;
917
937
  }
918
938
 
939
+ public async getFaultInjectList2() {
940
+ const response = new GetFaultInjectListResponse2();
941
+ try {
942
+ const call = await this.call(RequestFactory.getInstance().getFaultInjectList());
943
+ if (call.result != null) {
944
+ response.isSuccess = true;
945
+ response.result = call.result;
946
+ }
947
+ } catch (error) {
948
+ throw error;
949
+ }
950
+ return response;
951
+ }
952
+
953
+
919
954
 
920
955
  public async getDisassembleInfo(cpuName: string, startAddr: string, nums: string) {
921
956
  const response = new GetDisassembleInfoResponse();
@@ -0,0 +1,6 @@
1
+ import { Board } from "../models/Board";
2
+ import { BaseResponse } from "./BaseResponse";
3
+
4
+ export class GetAllDeviceInfoResponse2 extends BaseResponse{
5
+ result: object;
6
+ }
@@ -0,0 +1,11 @@
1
+ import { FaultInjectItem } from "../models/FaultInjectItem";
2
+ import { BaseResponse } from "./BaseResponse";
3
+
4
+ export class GetFaultInjectListResponse2 extends BaseResponse {
5
+ result: any;
6
+
7
+ constructor() {
8
+ super();
9
+ this.callFuncName = "SE_get_fault_inject_list";
10
+ }
11
+ }