skyeye-sdk-js 1.4.6 → 1.4.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.
- package/dist/src/RequestFactory.d.ts +1 -1
- package/dist/src/RequestFactory.js +2 -1
- package/dist/src/SkyEyeClient.js +5 -4
- package/dist/src/proto/protoc.sh +32 -32
- package/dist/src/proto/skyeye_rpc_grpc_pb.js +88 -88
- package/dist/src/proto/skyeye_rpc_pb.js +328 -328
- package/package.json +1 -1
- package/src/RequestFactory.ts +3 -2
- package/src/SkyEyeClient.ts +5 -4
- package/src/exception/SkyEyeSDKException.js +31 -31
- package/src/models/Board.js +18 -18
- package/src/models/Cpu.js +66 -66
- package/src/models/CpuInterface.js +2 -2
- package/src/models/Device.js +27 -27
- package/src/models/DeviceInterface.js +2 -2
- package/src/models/DeviceState.js +8 -8
- package/src/models/FaultInjectItem.js +17 -17
- package/src/models/FaultInjectItemInterface.js +2 -2
- package/src/models/FaultInjectType.js +25 -25
- package/src/models/GlobalVarType.js +9 -9
- package/src/models/InstructionItem.js +9 -9
- package/src/models/Node.js +2 -2
- package/src/models/Register.js +33 -33
- package/src/models/RegisterInterface.js +2 -2
- package/src/proto/protoc.sh +32 -32
- package/src/proto/skyeye_rpc_grpc_pb.js +88 -88
- package/src/proto/skyeye_rpc_pb.js +328 -328
- package/src/proto bc_240328/protoc.sh +32 -32
- package/src/proto bc_240328/skyeye_rpc_grpc_pb.js +77 -77
- package/src/proto bc_240328/skyeye_rpc_pb.js +328 -328
- package/src/requests/BaseRequest.js +19 -19
- package/src/requests/GetRunningStatusRequest.js +10 -10
- package/src/response/BaseResponse.js +27 -27
- package/src/response/GetAllDeviceInfoResponse.js +29 -29
- package/src/response/GetCpuListResponse.js +36 -36
- package/src/response/GetCpuRegisterInfoResponse.js +29 -29
- package/src/response/GetCurrentPCResponse.js +7 -7
- package/src/response/GetDeviceListResponse.js +29 -29
- package/src/response/GetDeviceTreeResponse.js +29 -29
- package/src/response/GetDisassembleInfoResponse.js +27 -27
- package/src/response/GetFaultInjectListResponse.js +40 -40
- package/src/response/GetRamAddrInfoResponse.js +27 -27
- package/src/response/GetRunningStateResponse.js +43 -43
- package/src/utils/ParseBoardUtils.js +111 -111
- package/dist/GrpcUtil.d.ts +0 -9
- package/dist/GrpcUtil.js +0 -55
- package/dist/JsonRequest.d.ts +0 -10
- package/dist/JsonRequest.js +0 -29
- package/dist/JsonResponse.d.ts +0 -12
- package/dist/JsonResponse.js +0 -36
- package/dist/RequestFactory.d.ts +0 -35
- package/dist/RequestFactory.js +0 -257
- package/dist/exception/SkyEyeSDKException.d.ts +0 -3
- package/dist/exception/SkyEyeSDKException.js +0 -13
- package/dist/models/Board.d.ts +0 -9
- package/dist/models/Board.js +0 -15
- package/dist/models/Cpu.d.ts +0 -14
- package/dist/models/Cpu.js +0 -47
- package/dist/models/CpuInterface.d.ts +0 -13
- package/dist/models/CpuInterface.js +0 -2
- package/dist/models/Device.d.ts +0 -38
- package/dist/models/Device.js +0 -26
- package/dist/models/DeviceInterface.d.ts +0 -12
- package/dist/models/DeviceInterface.js +0 -2
- package/dist/models/DeviceState.d.ts +0 -4
- package/dist/models/DeviceState.js +0 -8
- package/dist/models/FaultInjectItem.d.ts +0 -11
- package/dist/models/FaultInjectItem.js +0 -16
- package/dist/models/FaultInjectItemInterface.d.ts +0 -9
- package/dist/models/FaultInjectItemInterface.js +0 -2
- package/dist/models/FaultInjectType.d.ts +0 -11
- package/dist/models/FaultInjectType.js +0 -25
- package/dist/models/GlobalVarType.d.ts +0 -5
- package/dist/models/GlobalVarType.js +0 -9
- package/dist/models/InstructionItem.d.ts +0 -5
- package/dist/models/InstructionItem.js +0 -6
- package/dist/models/Node.d.ts +0 -4
- package/dist/models/Node.js +0 -2
- package/dist/models/Register.d.ts +0 -38
- package/dist/models/Register.js +0 -32
- package/dist/models/RegisterInterface.d.ts +0 -10
- package/dist/models/RegisterInterface.js +0 -2
- package/dist/src/proto copy/skyeye_rpc.proto +0 -11
- package/dist/src/proto copy/skyeye_rpc_grpc_pb.d.ts +0 -40
- package/dist/src/proto copy/skyeye_rpc_grpc_pb.js +0 -44
- package/dist/src/proto copy/skyeye_rpc_pb.d.ts +0 -47
- package/dist/src/proto copy/skyeye_rpc_pb.js +0 -322
- package/dist/utils/ParseBoardUtils.d.ts +0 -6
- package/dist/utils/ParseBoardUtils.js +0 -108
package/src/SkyEyeClient.ts
CHANGED
|
@@ -633,10 +633,11 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
633
633
|
|
|
634
634
|
|
|
635
635
|
public async setCpuRegisterValue(boardName: string, cpuName: string, registerName: string, value: string) {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
636
|
+
// 设置寄存器 无需板卡名称
|
|
637
|
+
// const deviceTree = await this.getDeviceTree();
|
|
638
|
+
// if (!deviceTree.boardMap.has(boardName)) {
|
|
639
|
+
// throw new SkyEyeSDKException("未能找到该板卡");
|
|
640
|
+
// }
|
|
640
641
|
// const board: Board = boardMap.get(boardName);
|
|
641
642
|
// const deviceMap = board.deviceMap;
|
|
642
643
|
// if (!deviceMap.has(cpuName) || !(deviceMap.get(cpuName) instanceof Cpu)) {
|
|
@@ -1,31 +1,31 @@
|
|
|
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.SkyEyeSDKException = void 0;
|
|
19
|
-
// 定义 SkyEyeSDKException 类
|
|
20
|
-
var SkyEyeSDKException = /** @class */ (function (_super) {
|
|
21
|
-
__extends(SkyEyeSDKException, _super);
|
|
22
|
-
function SkyEyeSDKException(message) {
|
|
23
|
-
// 调用父类的构造函数
|
|
24
|
-
var _this = _super.call(this, message) || this;
|
|
25
|
-
// 设置类名
|
|
26
|
-
_this.name = 'SkyEyeSDKException';
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
return SkyEyeSDKException;
|
|
30
|
-
}(Error));
|
|
31
|
-
exports.SkyEyeSDKException = SkyEyeSDKException;
|
|
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.SkyEyeSDKException = void 0;
|
|
19
|
+
// 定义 SkyEyeSDKException 类
|
|
20
|
+
var SkyEyeSDKException = /** @class */ (function (_super) {
|
|
21
|
+
__extends(SkyEyeSDKException, _super);
|
|
22
|
+
function SkyEyeSDKException(message) {
|
|
23
|
+
// 调用父类的构造函数
|
|
24
|
+
var _this = _super.call(this, message) || this;
|
|
25
|
+
// 设置类名
|
|
26
|
+
_this.name = 'SkyEyeSDKException';
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
return SkyEyeSDKException;
|
|
30
|
+
}(Error));
|
|
31
|
+
exports.SkyEyeSDKException = SkyEyeSDKException;
|
package/src/models/Board.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Board = void 0;
|
|
4
|
-
var Board = /** @class */ (function () {
|
|
5
|
-
function Board() {
|
|
6
|
-
}
|
|
7
|
-
Board.prototype.getName = function () {
|
|
8
|
-
return this.name;
|
|
9
|
-
};
|
|
10
|
-
Board.prototype.getParent = function () {
|
|
11
|
-
return null;
|
|
12
|
-
};
|
|
13
|
-
Board.prototype.toString = function () {
|
|
14
|
-
return "Board{name='".concat(this.name, "', deviceMap=").concat(this.deviceMap, "}");
|
|
15
|
-
};
|
|
16
|
-
return Board;
|
|
17
|
-
}());
|
|
18
|
-
exports.Board = Board;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Board = void 0;
|
|
4
|
+
var Board = /** @class */ (function () {
|
|
5
|
+
function Board() {
|
|
6
|
+
}
|
|
7
|
+
Board.prototype.getName = function () {
|
|
8
|
+
return this.name;
|
|
9
|
+
};
|
|
10
|
+
Board.prototype.getParent = function () {
|
|
11
|
+
return null;
|
|
12
|
+
};
|
|
13
|
+
Board.prototype.toString = function () {
|
|
14
|
+
return "Board{name='".concat(this.name, "', deviceMap=").concat(this.deviceMap, "}");
|
|
15
|
+
};
|
|
16
|
+
return Board;
|
|
17
|
+
}());
|
|
18
|
+
exports.Board = Board;
|
package/src/models/Cpu.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
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.Cpu = void 0;
|
|
19
|
-
var Device_1 = require("./Device");
|
|
20
|
-
var Cpu = /** @class */ (function (_super) {
|
|
21
|
-
__extends(Cpu, _super);
|
|
22
|
-
function Cpu(info) {
|
|
23
|
-
var _this = this;
|
|
24
|
-
if (info) {
|
|
25
|
-
_this = _super.call(this, info) || this;
|
|
26
|
-
_this.className = info.className;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
_this = _super.call(this, null) || this;
|
|
30
|
-
}
|
|
31
|
-
return _this;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* CPU类型
|
|
35
|
-
*/
|
|
36
|
-
// private className: string;
|
|
37
|
-
Cpu.prototype.getClassName = function () {
|
|
38
|
-
return this.className;
|
|
39
|
-
};
|
|
40
|
-
Cpu.prototype.setClassName = function (className) {
|
|
41
|
-
this.className = className;
|
|
42
|
-
};
|
|
43
|
-
Cpu.prototype.setName = function (name) {
|
|
44
|
-
this.name = name;
|
|
45
|
-
};
|
|
46
|
-
Cpu.prototype.setParent = function (parent) {
|
|
47
|
-
this.parent = parent;
|
|
48
|
-
};
|
|
49
|
-
// constructor(
|
|
50
|
-
// className: string,
|
|
51
|
-
// name: string,
|
|
52
|
-
// parent: Node | null,
|
|
53
|
-
// registerMap: Map<string, Register>,
|
|
54
|
-
// baseAddr: number | null,
|
|
55
|
-
// length: number | null,
|
|
56
|
-
// state: DeviceState
|
|
57
|
-
// ) {
|
|
58
|
-
// super(name, parent, registerMap, baseAddr, length, 'Cpu', state);
|
|
59
|
-
// this.className = className;
|
|
60
|
-
// }
|
|
61
|
-
Cpu.prototype.toString = function () {
|
|
62
|
-
return "Cpu{className='".concat(this.className, "', name='").concat(this.name, "', parent=").concat(this.parent != null ? this.parent.getName() : null, ", registerMap=").concat(this.registerMap, ", state=").concat(this.state, "}");
|
|
63
|
-
};
|
|
64
|
-
return Cpu;
|
|
65
|
-
}(Device_1.Device));
|
|
66
|
-
exports.Cpu = Cpu;
|
|
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.Cpu = void 0;
|
|
19
|
+
var Device_1 = require("./Device");
|
|
20
|
+
var Cpu = /** @class */ (function (_super) {
|
|
21
|
+
__extends(Cpu, _super);
|
|
22
|
+
function Cpu(info) {
|
|
23
|
+
var _this = this;
|
|
24
|
+
if (info) {
|
|
25
|
+
_this = _super.call(this, info) || this;
|
|
26
|
+
_this.className = info.className;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
_this = _super.call(this, null) || this;
|
|
30
|
+
}
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* CPU类型
|
|
35
|
+
*/
|
|
36
|
+
// private className: string;
|
|
37
|
+
Cpu.prototype.getClassName = function () {
|
|
38
|
+
return this.className;
|
|
39
|
+
};
|
|
40
|
+
Cpu.prototype.setClassName = function (className) {
|
|
41
|
+
this.className = className;
|
|
42
|
+
};
|
|
43
|
+
Cpu.prototype.setName = function (name) {
|
|
44
|
+
this.name = name;
|
|
45
|
+
};
|
|
46
|
+
Cpu.prototype.setParent = function (parent) {
|
|
47
|
+
this.parent = parent;
|
|
48
|
+
};
|
|
49
|
+
// constructor(
|
|
50
|
+
// className: string,
|
|
51
|
+
// name: string,
|
|
52
|
+
// parent: Node | null,
|
|
53
|
+
// registerMap: Map<string, Register>,
|
|
54
|
+
// baseAddr: number | null,
|
|
55
|
+
// length: number | null,
|
|
56
|
+
// state: DeviceState
|
|
57
|
+
// ) {
|
|
58
|
+
// super(name, parent, registerMap, baseAddr, length, 'Cpu', state);
|
|
59
|
+
// this.className = className;
|
|
60
|
+
// }
|
|
61
|
+
Cpu.prototype.toString = function () {
|
|
62
|
+
return "Cpu{className='".concat(this.className, "', name='").concat(this.name, "', parent=").concat(this.parent != null ? this.parent.getName() : null, ", registerMap=").concat(this.registerMap, ", state=").concat(this.state, "}");
|
|
63
|
+
};
|
|
64
|
+
return Cpu;
|
|
65
|
+
}(Device_1.Device));
|
|
66
|
+
exports.Cpu = Cpu;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/src/models/Device.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Device = void 0;
|
|
4
|
-
var Device = /** @class */ (function () {
|
|
5
|
-
function Device(info) {
|
|
6
|
-
if (info) {
|
|
7
|
-
this.name = info.name;
|
|
8
|
-
this.parent = info.parent;
|
|
9
|
-
this.registerMap = info.registerMap;
|
|
10
|
-
this.baseAddr = info.baseAddr;
|
|
11
|
-
this.length = info.length;
|
|
12
|
-
this.className = info.className;
|
|
13
|
-
this.state = info.state;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
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
|
-
}());
|
|
27
|
-
exports.Device = Device;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Device = void 0;
|
|
4
|
+
var Device = /** @class */ (function () {
|
|
5
|
+
function Device(info) {
|
|
6
|
+
if (info) {
|
|
7
|
+
this.name = info.name;
|
|
8
|
+
this.parent = info.parent;
|
|
9
|
+
this.registerMap = info.registerMap;
|
|
10
|
+
this.baseAddr = info.baseAddr;
|
|
11
|
+
this.length = info.length;
|
|
12
|
+
this.className = info.className;
|
|
13
|
+
this.state = info.state;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
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
|
+
}());
|
|
27
|
+
exports.Device = Device;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeviceState = void 0;
|
|
4
|
-
var DeviceState;
|
|
5
|
-
(function (DeviceState) {
|
|
6
|
-
DeviceState[DeviceState["ENABLE"] = 1] = "ENABLE";
|
|
7
|
-
DeviceState[DeviceState["DISABLE"] = 0] = "DISABLE";
|
|
8
|
-
})(DeviceState || (exports.DeviceState = DeviceState = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceState = void 0;
|
|
4
|
+
var DeviceState;
|
|
5
|
+
(function (DeviceState) {
|
|
6
|
+
DeviceState[DeviceState["ENABLE"] = 1] = "ENABLE";
|
|
7
|
+
DeviceState[DeviceState["DISABLE"] = 0] = "DISABLE";
|
|
8
|
+
})(DeviceState || (exports.DeviceState = DeviceState = {}));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FaultInjectItem = void 0;
|
|
4
|
-
var FaultInjectItem = /** @class */ (function () {
|
|
5
|
-
function FaultInjectItem(info) {
|
|
6
|
-
if (info) {
|
|
7
|
-
this.boardName = info.boardName;
|
|
8
|
-
this.deviceName = info.deviceName;
|
|
9
|
-
this.registerName = info.registerName;
|
|
10
|
-
this.addr = info.addr;
|
|
11
|
-
this.bit = info.bit;
|
|
12
|
-
this.type = info.type;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return FaultInjectItem;
|
|
16
|
-
}());
|
|
17
|
-
exports.FaultInjectItem = FaultInjectItem;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FaultInjectItem = void 0;
|
|
4
|
+
var FaultInjectItem = /** @class */ (function () {
|
|
5
|
+
function FaultInjectItem(info) {
|
|
6
|
+
if (info) {
|
|
7
|
+
this.boardName = info.boardName;
|
|
8
|
+
this.deviceName = info.deviceName;
|
|
9
|
+
this.registerName = info.registerName;
|
|
10
|
+
this.addr = info.addr;
|
|
11
|
+
this.bit = info.bit;
|
|
12
|
+
this.type = info.type;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return FaultInjectItem;
|
|
16
|
+
}());
|
|
17
|
+
exports.FaultInjectItem = FaultInjectItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFaultInjectTypeByValue = exports.FaultInjectTypeDescription = exports.FaultInjectType = void 0;
|
|
4
|
-
var FaultInjectType;
|
|
5
|
-
(function (FaultInjectType) {
|
|
6
|
-
FaultInjectType["SET_ZERO"] = "0";
|
|
7
|
-
FaultInjectType["SET_ONE"] = "1";
|
|
8
|
-
FaultInjectType["SET_REVE"] = "2";
|
|
9
|
-
})(FaultInjectType || (exports.FaultInjectType = FaultInjectType = {}));
|
|
10
|
-
// 可选的描述信息
|
|
11
|
-
exports.FaultInjectTypeDescription = {
|
|
12
|
-
"0": "置零",
|
|
13
|
-
"1": "置一",
|
|
14
|
-
"2": "取反"
|
|
15
|
-
};
|
|
16
|
-
// 通过值获取故障注入类型
|
|
17
|
-
function getFaultInjectTypeByValue(value) {
|
|
18
|
-
for (var key in FaultInjectType) {
|
|
19
|
-
if (FaultInjectType[key] === value) {
|
|
20
|
-
return key;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
exports.getFaultInjectTypeByValue = getFaultInjectTypeByValue;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFaultInjectTypeByValue = exports.FaultInjectTypeDescription = exports.FaultInjectType = void 0;
|
|
4
|
+
var FaultInjectType;
|
|
5
|
+
(function (FaultInjectType) {
|
|
6
|
+
FaultInjectType["SET_ZERO"] = "0";
|
|
7
|
+
FaultInjectType["SET_ONE"] = "1";
|
|
8
|
+
FaultInjectType["SET_REVE"] = "2";
|
|
9
|
+
})(FaultInjectType || (exports.FaultInjectType = FaultInjectType = {}));
|
|
10
|
+
// 可选的描述信息
|
|
11
|
+
exports.FaultInjectTypeDescription = {
|
|
12
|
+
"0": "置零",
|
|
13
|
+
"1": "置一",
|
|
14
|
+
"2": "取反"
|
|
15
|
+
};
|
|
16
|
+
// 通过值获取故障注入类型
|
|
17
|
+
function getFaultInjectTypeByValue(value) {
|
|
18
|
+
for (var key in FaultInjectType) {
|
|
19
|
+
if (FaultInjectType[key] === value) {
|
|
20
|
+
return key;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
exports.getFaultInjectTypeByValue = getFaultInjectTypeByValue;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GlobalVarType = void 0;
|
|
4
|
-
var GlobalVarType;
|
|
5
|
-
(function (GlobalVarType) {
|
|
6
|
-
GlobalVarType["INT"] = "int";
|
|
7
|
-
GlobalVarType["DOUBLE"] = "double";
|
|
8
|
-
GlobalVarType["FLOAT"] = "float";
|
|
9
|
-
})(GlobalVarType || (exports.GlobalVarType = GlobalVarType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalVarType = void 0;
|
|
4
|
+
var GlobalVarType;
|
|
5
|
+
(function (GlobalVarType) {
|
|
6
|
+
GlobalVarType["INT"] = "int";
|
|
7
|
+
GlobalVarType["DOUBLE"] = "double";
|
|
8
|
+
GlobalVarType["FLOAT"] = "float";
|
|
9
|
+
})(GlobalVarType || (exports.GlobalVarType = GlobalVarType = {}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InstructionItem = void 0;
|
|
4
|
-
var InstructionItem = /** @class */ (function () {
|
|
5
|
-
function InstructionItem() {
|
|
6
|
-
}
|
|
7
|
-
return InstructionItem;
|
|
8
|
-
}());
|
|
9
|
-
exports.InstructionItem = InstructionItem;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstructionItem = void 0;
|
|
4
|
+
var InstructionItem = /** @class */ (function () {
|
|
5
|
+
function InstructionItem() {
|
|
6
|
+
}
|
|
7
|
+
return InstructionItem;
|
|
8
|
+
}());
|
|
9
|
+
exports.InstructionItem = InstructionItem;
|
package/src/models/Node.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/src/models/Register.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Register = void 0;
|
|
4
|
-
var Register = /** @class */ (function () {
|
|
5
|
-
function Register(info) {
|
|
6
|
-
if (info) {
|
|
7
|
-
this.name = info.name;
|
|
8
|
-
this.parent = info.parent;
|
|
9
|
-
this.baseAddr = info.baseAddr;
|
|
10
|
-
this.bits = info.bits;
|
|
11
|
-
this.value = info.value;
|
|
12
|
-
this.offset = info.offset;
|
|
13
|
-
this.description = info.description;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
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
|
-
}());
|
|
33
|
-
exports.Register = Register;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Register = void 0;
|
|
4
|
+
var Register = /** @class */ (function () {
|
|
5
|
+
function Register(info) {
|
|
6
|
+
if (info) {
|
|
7
|
+
this.name = info.name;
|
|
8
|
+
this.parent = info.parent;
|
|
9
|
+
this.baseAddr = info.baseAddr;
|
|
10
|
+
this.bits = info.bits;
|
|
11
|
+
this.value = info.value;
|
|
12
|
+
this.offset = info.offset;
|
|
13
|
+
this.description = info.description;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
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
|
+
}());
|
|
33
|
+
exports.Register = Register;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/src/proto/protoc.sh
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
BASEDIR=$(dirname "$0")
|
|
4
|
-
cd "${BASEDIR}"/../
|
|
5
|
-
|
|
6
|
-
PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
|
|
7
|
-
GRPC_TOOLS_NODE_PROTOC_PLUGIN="./node_modules/.bin/grpc_tools_node_protoc_plugin"
|
|
8
|
-
GRPC_TOOLS_NODE_PROTOC="./node_modules/.bin/grpc_tools_node_protoc"
|
|
9
|
-
|
|
10
|
-
for f in ./src/proto/*; do
|
|
11
|
-
|
|
12
|
-
# skip the non proto files
|
|
13
|
-
if [ "$(basename "$f")" == "index.ts" ]; then
|
|
14
|
-
continue
|
|
15
|
-
fi
|
|
16
|
-
|
|
17
|
-
# loop over all the available proto files and compile them into respective dir
|
|
18
|
-
# JavaScript code generating
|
|
19
|
-
${GRPC_TOOLS_NODE_PROTOC} \
|
|
20
|
-
--js_out=import_style=commonjs,binary:"${f}" \
|
|
21
|
-
--grpc_out="${f}" \
|
|
22
|
-
--plugin=protoc-gen-grpc="${GRPC_TOOLS_NODE_PROTOC_PLUGIN}" \
|
|
23
|
-
-I "${f}" \
|
|
24
|
-
"${f}"/*.proto
|
|
25
|
-
|
|
26
|
-
${GRPC_TOOLS_NODE_PROTOC} \
|
|
27
|
-
--plugin=protoc-gen-ts="${PROTOC_GEN_TS_PATH}" \
|
|
28
|
-
--ts_out="${f}" \
|
|
29
|
-
-I "${f}" \
|
|
30
|
-
"${f}"/*.proto
|
|
31
|
-
|
|
32
|
-
done
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
BASEDIR=$(dirname "$0")
|
|
4
|
+
cd "${BASEDIR}"/../
|
|
5
|
+
|
|
6
|
+
PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
|
|
7
|
+
GRPC_TOOLS_NODE_PROTOC_PLUGIN="./node_modules/.bin/grpc_tools_node_protoc_plugin"
|
|
8
|
+
GRPC_TOOLS_NODE_PROTOC="./node_modules/.bin/grpc_tools_node_protoc"
|
|
9
|
+
|
|
10
|
+
for f in ./src/proto/*; do
|
|
11
|
+
|
|
12
|
+
# skip the non proto files
|
|
13
|
+
if [ "$(basename "$f")" == "index.ts" ]; then
|
|
14
|
+
continue
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# loop over all the available proto files and compile them into respective dir
|
|
18
|
+
# JavaScript code generating
|
|
19
|
+
${GRPC_TOOLS_NODE_PROTOC} \
|
|
20
|
+
--js_out=import_style=commonjs,binary:"${f}" \
|
|
21
|
+
--grpc_out="${f}" \
|
|
22
|
+
--plugin=protoc-gen-grpc="${GRPC_TOOLS_NODE_PROTOC_PLUGIN}" \
|
|
23
|
+
-I "${f}" \
|
|
24
|
+
"${f}"/*.proto
|
|
25
|
+
|
|
26
|
+
${GRPC_TOOLS_NODE_PROTOC} \
|
|
27
|
+
--plugin=protoc-gen-ts="${PROTOC_GEN_TS_PATH}" \
|
|
28
|
+
--ts_out="${f}" \
|
|
29
|
+
-I "${f}" \
|
|
30
|
+
"${f}"/*.proto
|
|
31
|
+
|
|
32
|
+
done
|