skyeye-sdk-js 1.4.11 → 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;
@@ -17,6 +17,7 @@ import { GetDisassembleInfoResponse } from './response/GetDisassembleInfoRespons
17
17
  import { GetCpuRegisterInfoResponse } from './response/GetCpuRegisterInfoResponse';
18
18
  import { BaseResponse } from './response/BaseResponse';
19
19
  import { GetAddressWidthResponse } from './response/GetAddressWidthResponse';
20
+ import { GetFaultInjectListResponse2 } from './response/GetFaultInjectListResponse2';
20
21
  export declare class SkyEyeClient extends JSONTransmissionClient {
21
22
  private host;
22
23
  private port;
@@ -78,6 +79,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
78
79
  deleteFaultInjectDefault(faultInjectItem: FaultInjectItem): Promise<any>;
79
80
  deleteFaultInject(boardName: string, deviceName: string, addr: string, bit: string, mode: FaultInjectType): Promise<any>;
80
81
  getFaultInjectList(): Promise<GetFaultInjectListResponse>;
82
+ getFaultInjectList2(): Promise<GetFaultInjectListResponse2>;
81
83
  getDisassembleInfo(cpuName: string, startAddr: string, nums: string): Promise<GetDisassembleInfoResponse>;
82
84
  getDisassembleInfoDefault(startAddr: string, nums: string): Promise<GetDisassembleInfoResponse>;
83
85
  SingleStep(cpuName: string): Promise<any>;
@@ -58,6 +58,7 @@ const SkyEyeSDKException_1 = require("./exception/SkyEyeSDKException");
58
58
  const cp = __importStar(require("child_process"));
59
59
  const BaseResponse_1 = require("./response/BaseResponse");
60
60
  const GetAddressWidthResponse_1 = require("./response/GetAddressWidthResponse");
61
+ const GetFaultInjectListResponse2_1 = require("./response/GetFaultInjectListResponse2");
61
62
  let client = null;
62
63
  // ----------------------------当前运行程序的设备树----------------------------------------//
63
64
  const boardMap = new Map();
@@ -962,7 +963,7 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
962
963
  setRegisterFaultInject(boardName, deviceName, addr, bit, mode) {
963
964
  return __awaiter(this, void 0, void 0, function* () {
964
965
  try {
965
- 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));
966
967
  }
967
968
  catch (error) {
968
969
  throw error;
@@ -1027,6 +1028,22 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
1027
1028
  return response;
1028
1029
  });
1029
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
+ }
1030
1047
  getDisassembleInfo(cpuName, startAddr, nums) {
1031
1048
  return __awaiter(this, void 0, void 0, function* () {
1032
1049
  const response = new GetDisassembleInfoResponse_1.GetDisassembleInfoResponse();
@@ -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.11",
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;
@@ -27,6 +27,7 @@ import * as cp from 'child_process';
27
27
  import { Board } from './models/Board';
28
28
  import { BaseResponse } from './response/BaseResponse';
29
29
  import { GetAddressWidthResponse } from './response/GetAddressWidthResponse';
30
+ import { GetFaultInjectListResponse2 } from './response/GetFaultInjectListResponse2';
30
31
  let client: JSONTransmissionClient | any = null;
31
32
 
32
33
 
@@ -872,7 +873,7 @@ export class SkyEyeClient extends JSONTransmissionClient {
872
873
 
873
874
  public async setRegisterFaultInject(boardName: string, deviceName: string, addr: string, bit: string, mode: FaultInjectType) {
874
875
  try {
875
- 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))
876
877
  } catch (error) {
877
878
  throw error;
878
879
  }
@@ -935,6 +936,21 @@ export class SkyEyeClient extends JSONTransmissionClient {
935
936
  return response;
936
937
  }
937
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
+
938
954
 
939
955
  public async getDisassembleInfo(cpuName: string, startAddr: string, nums: string) {
940
956
  const response = new GetDisassembleInfoResponse();
@@ -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
+ }