skyeye-sdk-js 1.0.4 → 1.0.6
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/SkyEyeClient.d.ts +2 -1
- package/dist/SkyEyeClient.js +2 -2
- package/dist/src/GrpcUtil.d.ts +1 -0
- package/dist/src/GrpcUtil.js +58 -0
- package/dist/src/SkyEyeClient.d.ts +1 -0
- package/dist/src/SkyEyeClient.js +35 -1
- package/dist/src/SkyEyeClientFactory.js +1 -1
- package/dist/test.d.ts +1 -0
- package/dist/test.js +33 -0
- package/package.json +31 -34
- package/src/GrpcUtil.ts +45 -1
- package/src/RequestFactory.ts +0 -4
- package/src/SkyEyeClient.ts +38 -6
- package/src/SkyEyeClientFactory.ts +4 -4
- package/src/exception/SkyEyeSDKException.js +23 -5
- package/src/models/Board.js +12 -9
- package/src/models/Cpu.js +42 -23
- package/src/models/Device.js +13 -12
- package/src/models/FaultInjectItem.js +4 -3
- package/src/models/FaultInjectType.js +1 -1
- package/src/models/InstructionItem.js +5 -2
- package/src/models/Register.js +19 -18
- package/src/response/BaseResponse.js +23 -3
- package/src/response/GetAllDeviceInfoResponse.js +24 -6
- package/src/response/GetCpuListResponse.js +29 -11
- package/src/response/GetCpuRegisterInfoResponse.js +24 -6
- package/src/response/GetDeviceListResponse.js +24 -6
- package/src/response/GetDeviceTreeResponse.js +24 -6
- package/src/response/GetDisassembleInfoResponse.js +23 -3
- package/src/response/GetFaultInjectListResponse.js +35 -13
- package/src/response/GetRamAddrInfoResponse.js +23 -3
- package/src/response/GetRunningStateResponse.js +29 -11
- package/src/{test.js → test1.js} +45 -42
- package/src/utils/ParseBoardUtils.js +33 -30
- package/test.ts +31 -0
- package/src/GrpcUtil.js +0 -55
- package/src/JsonRequest.js +0 -29
- package/src/JsonResponse.js +0 -36
- package/src/RequestFactory.js +0 -257
- package/src/SkyEyeClient.js +0 -831
- package/src/SkyEyeClientFactory.js +0 -53
- package/src/requests/BaseRequest.js +0 -18
- /package/dist/{proto → src/proto}/skyeye_rpc.proto +0 -0
- /package/dist/{proto → src/proto}/skyeye_rpc_grpc_pb.d.ts +0 -0
- /package/dist/{proto → src/proto}/skyeye_rpc_grpc_pb.js +0 -0
- /package/dist/{proto → src/proto}/skyeye_rpc_pb.d.ts +0 -0
- /package/dist/{proto → src/proto}/skyeye_rpc_pb.js +0 -0
package/src/models/Device.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Device = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return this.name;
|
|
7
|
-
}
|
|
8
|
-
getParent() {
|
|
9
|
-
return this.parent;
|
|
10
|
-
}
|
|
11
|
-
constructor(info) {
|
|
4
|
+
var Device = /** @class */ (function () {
|
|
5
|
+
function Device(info) {
|
|
12
6
|
if (info) {
|
|
13
7
|
this.name = info.name;
|
|
14
8
|
this.parent = info.parent;
|
|
@@ -19,8 +13,15 @@ class Device {
|
|
|
19
13
|
this.state = info.state;
|
|
20
14
|
}
|
|
21
15
|
}
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
}
|
|
25
|
-
|
|
16
|
+
Device.prototype.getName = function () {
|
|
17
|
+
return this.name;
|
|
18
|
+
};
|
|
19
|
+
Device.prototype.getParent = function () {
|
|
20
|
+
return this.parent;
|
|
21
|
+
};
|
|
22
|
+
Device.prototype.toString = function () {
|
|
23
|
+
return "Device{name='".concat(this.name, "', parent=").concat(this.parent != null ? this.parent.getName() : null, ", registerMap=").concat(this.registerMap, ", baseAddr=").concat(this.baseAddr, ", length=").concat(this.length, ", className='").concat(this.className, "', state=").concat(this.state, "}");
|
|
24
|
+
};
|
|
25
|
+
return Device;
|
|
26
|
+
}());
|
|
26
27
|
exports.Device = Device;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FaultInjectItem = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var FaultInjectItem = /** @class */ (function () {
|
|
5
|
+
function FaultInjectItem(info) {
|
|
6
6
|
if (info) {
|
|
7
7
|
this.boardName = info.boardName;
|
|
8
8
|
this.deviceName = info.deviceName;
|
|
@@ -12,5 +12,6 @@ class FaultInjectItem {
|
|
|
12
12
|
this.type = info.type;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
return FaultInjectItem;
|
|
16
|
+
}());
|
|
16
17
|
exports.FaultInjectItem = FaultInjectItem;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InstructionItem = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var InstructionItem = /** @class */ (function () {
|
|
5
|
+
function InstructionItem() {
|
|
6
|
+
}
|
|
7
|
+
return InstructionItem;
|
|
8
|
+
}());
|
|
6
9
|
exports.InstructionItem = InstructionItem;
|
package/src/models/Register.js
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Register = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return this.name;
|
|
7
|
-
}
|
|
8
|
-
setName(name) {
|
|
9
|
-
this.name = name;
|
|
10
|
-
}
|
|
11
|
-
getParent() {
|
|
12
|
-
return this.parent;
|
|
13
|
-
}
|
|
14
|
-
setParent(node) {
|
|
15
|
-
this.parent = node;
|
|
16
|
-
}
|
|
17
|
-
constructor(info) {
|
|
4
|
+
var Register = /** @class */ (function () {
|
|
5
|
+
function Register(info) {
|
|
18
6
|
if (info) {
|
|
19
7
|
this.name = info.name;
|
|
20
8
|
this.parent = info.parent;
|
|
@@ -25,8 +13,21 @@ class Register {
|
|
|
25
13
|
this.description = info.description;
|
|
26
14
|
}
|
|
27
15
|
}
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
|
|
16
|
+
Register.prototype.getName = function () {
|
|
17
|
+
return this.name;
|
|
18
|
+
};
|
|
19
|
+
Register.prototype.setName = function (name) {
|
|
20
|
+
this.name = name;
|
|
21
|
+
};
|
|
22
|
+
Register.prototype.getParent = function () {
|
|
23
|
+
return this.parent;
|
|
24
|
+
};
|
|
25
|
+
Register.prototype.setParent = function (node) {
|
|
26
|
+
this.parent = node;
|
|
27
|
+
};
|
|
28
|
+
Register.prototype.toString = function () {
|
|
29
|
+
return "Register{name='".concat(this.name, "', parent=").concat(this.parent != null ? this.parent.getName() : null, ", baseAddr=").concat(this.baseAddr, ", offset=").concat(this.offset, ", bits=").concat(this.bits, ", value=").concat(this.value, ", description='").concat(this.description, "'}");
|
|
30
|
+
};
|
|
31
|
+
return Register;
|
|
32
|
+
}());
|
|
32
33
|
exports.Register = Register;
|
|
@@ -1,7 +1,27 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.BaseResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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));
|
|
7
27
|
exports.BaseResponse = BaseResponse;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetAllDeviceInfoResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetAllDeviceInfoResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetAllDeviceInfoResponse, _super);
|
|
22
|
+
function GetAllDeviceInfoResponse() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.boardMap = new Map();
|
|
25
|
+
return _this;
|
|
9
26
|
}
|
|
10
|
-
|
|
27
|
+
return GetAllDeviceInfoResponse;
|
|
28
|
+
}(BaseResponse_1.BaseResponse));
|
|
11
29
|
exports.GetAllDeviceInfoResponse = GetAllDeviceInfoResponse;
|
|
@@ -1,18 +1,36 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetCpuListResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetCpuListResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetCpuListResponse, _super);
|
|
22
|
+
function GetCpuListResponse() {
|
|
23
|
+
var _this = _super.call(this) || this;
|
|
24
|
+
_this.cpuList = [];
|
|
25
|
+
_this.callFuncName = "cpu_list";
|
|
26
|
+
return _this;
|
|
10
27
|
}
|
|
11
|
-
getCpuList() {
|
|
28
|
+
GetCpuListResponse.prototype.getCpuList = function () {
|
|
12
29
|
return this.cpuList;
|
|
13
|
-
}
|
|
14
|
-
setCpuList(cpuList) {
|
|
30
|
+
};
|
|
31
|
+
GetCpuListResponse.prototype.setCpuList = function (cpuList) {
|
|
15
32
|
this.cpuList = cpuList;
|
|
16
|
-
}
|
|
17
|
-
|
|
33
|
+
};
|
|
34
|
+
return GetCpuListResponse;
|
|
35
|
+
}(BaseResponse_1.BaseResponse));
|
|
18
36
|
exports.GetCpuListResponse = GetCpuListResponse;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetCpuRegisterInfoResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetCpuRegisterInfoResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetCpuRegisterInfoResponse, _super);
|
|
22
|
+
function GetCpuRegisterInfoResponse() {
|
|
23
|
+
var _this = _super.call(this) || this;
|
|
24
|
+
_this.registers = [];
|
|
25
|
+
return _this;
|
|
9
26
|
}
|
|
10
|
-
|
|
27
|
+
return GetCpuRegisterInfoResponse;
|
|
28
|
+
}(BaseResponse_1.BaseResponse));
|
|
11
29
|
exports.GetCpuRegisterInfoResponse = GetCpuRegisterInfoResponse;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetDeviceListResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetDeviceListResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetDeviceListResponse, _super);
|
|
22
|
+
function GetDeviceListResponse() {
|
|
23
|
+
var _this = _super.call(this) || this;
|
|
24
|
+
_this.deviceList = [];
|
|
25
|
+
return _this;
|
|
9
26
|
}
|
|
10
|
-
|
|
27
|
+
return GetDeviceListResponse;
|
|
28
|
+
}(BaseResponse_1.BaseResponse));
|
|
11
29
|
exports.GetDeviceListResponse = GetDeviceListResponse;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetDeviceTreeResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetDeviceTreeResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetDeviceTreeResponse, _super);
|
|
22
|
+
function GetDeviceTreeResponse() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.boardMap = new Map();
|
|
25
|
+
return _this;
|
|
9
26
|
}
|
|
10
|
-
|
|
27
|
+
return GetDeviceTreeResponse;
|
|
28
|
+
}(BaseResponse_1.BaseResponse));
|
|
11
29
|
exports.GetDeviceTreeResponse = GetDeviceTreeResponse;
|
|
@@ -1,7 +1,27 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetDisassembleInfoResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetDisassembleInfoResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetDisassembleInfoResponse, _super);
|
|
22
|
+
function GetDisassembleInfoResponse() {
|
|
23
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
}
|
|
25
|
+
return GetDisassembleInfoResponse;
|
|
26
|
+
}(BaseResponse_1.BaseResponse));
|
|
7
27
|
exports.GetDisassembleInfoResponse = GetDisassembleInfoResponse;
|
|
@@ -1,18 +1,40 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetFaultInjectListResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetFaultInjectListResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetFaultInjectListResponse, _super);
|
|
22
|
+
function GetFaultInjectListResponse() {
|
|
23
|
+
var _this = _super.call(this) || this;
|
|
24
|
+
_this.callFuncName = "SE_get_fault_inject_list";
|
|
25
|
+
_this._faultInjectItems = [];
|
|
26
|
+
return _this;
|
|
10
27
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
28
|
+
Object.defineProperty(GetFaultInjectListResponse.prototype, "faultInjectItems", {
|
|
29
|
+
get: function () {
|
|
30
|
+
return this._faultInjectItems;
|
|
31
|
+
},
|
|
32
|
+
set: function (value) {
|
|
33
|
+
this._faultInjectItems = value;
|
|
34
|
+
},
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
return GetFaultInjectListResponse;
|
|
39
|
+
}(BaseResponse_1.BaseResponse));
|
|
18
40
|
exports.GetFaultInjectListResponse = GetFaultInjectListResponse;
|
|
@@ -1,7 +1,27 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetRamAddrInfoResponse = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
20
|
+
var GetRamAddrInfoResponse = /** @class */ (function (_super) {
|
|
21
|
+
__extends(GetRamAddrInfoResponse, _super);
|
|
22
|
+
function GetRamAddrInfoResponse() {
|
|
23
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
}
|
|
25
|
+
return GetRamAddrInfoResponse;
|
|
26
|
+
}(BaseResponse_1.BaseResponse));
|
|
7
27
|
exports.GetRamAddrInfoResponse = GetRamAddrInfoResponse;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.GetRunningStateResponse = exports.StateState = void 0;
|
|
4
|
-
|
|
19
|
+
var BaseResponse_1 = require("./BaseResponse");
|
|
5
20
|
var StateState;
|
|
6
21
|
(function (StateState) {
|
|
7
22
|
StateState["QUITED"] = "QUITED";
|
|
@@ -9,17 +24,20 @@ var StateState;
|
|
|
9
24
|
StateState["RUNNING"] = "RUNNING";
|
|
10
25
|
StateState["STOPPED"] = "STOPPED";
|
|
11
26
|
})(StateState || (exports.StateState = StateState = {}));
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
var GetRunningStateResponse = /** @class */ (function (_super) {
|
|
28
|
+
__extends(GetRunningStateResponse, _super);
|
|
29
|
+
function GetRunningStateResponse() {
|
|
30
|
+
var _this = _super.call(this) || this;
|
|
31
|
+
_this.state = StateState.QUITED;
|
|
32
|
+
_this.callFuncName = "SE_get_running_status";
|
|
33
|
+
return _this;
|
|
17
34
|
}
|
|
18
|
-
getState() {
|
|
35
|
+
GetRunningStateResponse.prototype.getState = function () {
|
|
19
36
|
return this.state;
|
|
20
|
-
}
|
|
21
|
-
setState(state) {
|
|
37
|
+
};
|
|
38
|
+
GetRunningStateResponse.prototype.setState = function (state) {
|
|
22
39
|
this.state = state;
|
|
23
|
-
}
|
|
24
|
-
|
|
40
|
+
};
|
|
41
|
+
return GetRunningStateResponse;
|
|
42
|
+
}(BaseResponse_1.BaseResponse));
|
|
25
43
|
exports.GetRunningStateResponse = GetRunningStateResponse;
|
package/src/{test.js → test1.js}
RENAMED
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
const { GrpcUtil } = require('./GrpcUtil');
|
|
2
|
-
|
|
3
|
-
const { SkyEyeClientFactory } = require('./SkyEyeClientFactory')
|
|
4
|
-
const { SkyEyeClient } = require('./SkyEyeClient')
|
|
5
|
-
|
|
6
|
-
// const util = new GrpcUtil('127.0.0.1','50051');
|
|
7
|
-
// const util = new GrpcUtil('192.168.1.150','31391');
|
|
8
|
-
// const response = util.getRunningStatus();
|
|
9
|
-
// util.runCommand();
|
|
10
|
-
// util.getRunningStatus();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// const client = new SkyEyeClient('127.0.0.1','50051');
|
|
15
|
-
// const response = client.getCurrentRunningState();
|
|
16
|
-
// console.log("res:",response)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const client = SkyEyeClientFactory.instance.createClient('127.0.0.1', '50051');
|
|
21
|
-
|
|
22
|
-
async function test() {
|
|
23
|
-
// let response = await client.getCurrentRunningState();
|
|
24
|
-
|
|
25
|
-
// response = await client.runCommand();
|
|
26
|
-
|
|
27
|
-
// await client.getCpuList();
|
|
28
|
-
|
|
29
|
-
// await client.getDeviceList();
|
|
30
|
-
|
|
31
|
-
// await client.getCurrentCpuMips();
|
|
32
|
-
|
|
33
|
-
await client.getCpuMips("c67x_core_0");
|
|
34
|
-
|
|
35
|
-
await client.getMemoryValue("c67x_core_0",12,0);
|
|
36
|
-
|
|
37
|
-
const response = await client.getDeviceList();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
const { GrpcUtil } = require('./GrpcUtil');
|
|
2
|
+
|
|
3
|
+
const { SkyEyeClientFactory } = require('./SkyEyeClientFactory')
|
|
4
|
+
const { SkyEyeClient } = require('./SkyEyeClient')
|
|
5
|
+
|
|
6
|
+
// const util = new GrpcUtil('127.0.0.1','50051');
|
|
7
|
+
// const util = new GrpcUtil('192.168.1.150','31391');
|
|
8
|
+
// const response = util.getRunningStatus();
|
|
9
|
+
// util.runCommand();
|
|
10
|
+
// util.getRunningStatus();
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const client = SkyEyeClientFactory.instance.createClient('127.0.0.1','50051');
|
|
14
|
+
// const client = new SkyEyeClient('127.0.0.1','50051');
|
|
15
|
+
// const response = client.getCurrentRunningState();
|
|
16
|
+
// console.log("res:",response)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
// const client = SkyEyeClientFactory.instance.createClient('127.0.0.1', '50051');
|
|
21
|
+
|
|
22
|
+
async function test() {
|
|
23
|
+
// let response = await client.getCurrentRunningState();
|
|
24
|
+
|
|
25
|
+
// response = await client.runCommand();
|
|
26
|
+
|
|
27
|
+
// await client.getCpuList();
|
|
28
|
+
|
|
29
|
+
// await client.getDeviceList();
|
|
30
|
+
|
|
31
|
+
// await client.getCurrentCpuMips();
|
|
32
|
+
|
|
33
|
+
// await client.getCpuMips("c67x_core_0");
|
|
34
|
+
|
|
35
|
+
// await client.getMemoryValue("c67x_core_0",12,0);
|
|
36
|
+
|
|
37
|
+
// const response = await client.getDeviceList();
|
|
38
|
+
|
|
39
|
+
// client.test();
|
|
40
|
+
// await client.initAndRunExample();
|
|
41
|
+
// console.log("最终response:",response)
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 调用异步函数
|
|
43
46
|
test();
|