skyeye-sdk-js 1.4.2 → 1.4.3
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.
|
@@ -23,6 +23,7 @@ export declare class RequestFactory {
|
|
|
23
23
|
getCpuFreq(cpuName: string): JSONRequest;
|
|
24
24
|
runToTimeRequest(cpuName: string, time: string): JSONRequest;
|
|
25
25
|
getCurrentPC(cpuName: string): JSONRequest;
|
|
26
|
+
getCpuFreqHz(cpuName: string): JSONRequest;
|
|
26
27
|
getCpuMips(cpuName: string): JSONRequest;
|
|
27
28
|
getGlobalVarValue(cpuName: string, varName: string, bytesNum: number, valueType: GlobalVarType): JSONRequest;
|
|
28
29
|
setGlobalVarValue(cpuName: string, varName: string, bytesNum: number, valueType: GlobalVarType, value: string): JSONRequest;
|
|
@@ -35,6 +36,7 @@ export declare class RequestFactory {
|
|
|
35
36
|
deleteFaultInject(machName: string, deviceName: string, addr: string, bit: string, mode: string): JSONRequest;
|
|
36
37
|
getFaultInjectList(): JSONRequest;
|
|
37
38
|
getDisassembleInfo(cpuName: string, startAddr: string, nums: string): JSONRequest;
|
|
39
|
+
step(cpuName: string, stepNum: number): JSONRequest;
|
|
38
40
|
singleStep(cpuName: string): JSONRequest;
|
|
39
41
|
getcpuRegisterInfo(cpuName: string): JSONRequest;
|
|
40
42
|
}
|
|
@@ -165,6 +165,16 @@ class RequestFactory {
|
|
|
165
165
|
request.setRequest(baseRequest.toJSONString());
|
|
166
166
|
return request;
|
|
167
167
|
}
|
|
168
|
+
getCpuFreqHz(cpuName) {
|
|
169
|
+
const baseRequest = new BaseRequest_1.BaseRequest("SE_get_cpu_freq_hz");
|
|
170
|
+
const args = {};
|
|
171
|
+
args.cpuname = cpuName;
|
|
172
|
+
baseRequest.setArgs(args);
|
|
173
|
+
const request = new skyeye_rpc_pb_1.JSONRequest();
|
|
174
|
+
request.setRequest(baseRequest.toJSONString());
|
|
175
|
+
// request.setRequest("{\"request\":{\"name\":\"SE_get_cpu_mips\",\"args\":{\"cpuname\":\"" + cpuName + "\"}}}");
|
|
176
|
+
return request;
|
|
177
|
+
}
|
|
168
178
|
getCpuMips(cpuName) {
|
|
169
179
|
const baseRequest = new BaseRequest_1.BaseRequest("SE_get_cpu_mips");
|
|
170
180
|
const args = {};
|
|
@@ -283,6 +293,16 @@ class RequestFactory {
|
|
|
283
293
|
request.setRequest(baseRequest.toJSONString());
|
|
284
294
|
return request;
|
|
285
295
|
}
|
|
296
|
+
step(cpuName, stepNum) {
|
|
297
|
+
const baseRequest = new BaseRequest_1.BaseRequest("step");
|
|
298
|
+
const args = {};
|
|
299
|
+
args.cpuname = cpuName;
|
|
300
|
+
args.step_num = stepNum;
|
|
301
|
+
baseRequest.setArgs(args);
|
|
302
|
+
const request = new skyeye_rpc_pb_1.JSONRequest();
|
|
303
|
+
request.setRequest(baseRequest.toJSONString());
|
|
304
|
+
return request;
|
|
305
|
+
}
|
|
286
306
|
singleStep(cpuName) {
|
|
287
307
|
const baseRequest = new BaseRequest_1.BaseRequest("SE_system_step");
|
|
288
308
|
const args = {};
|
|
@@ -42,6 +42,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
|
|
|
42
42
|
getCpuFreq(cpuName: string): Promise<any>;
|
|
43
43
|
getPC(cpuName: string): Promise<any>;
|
|
44
44
|
getCurrentPC(): Promise<any>;
|
|
45
|
+
getCpuFreqHz(cpuName: string): Promise<any>;
|
|
45
46
|
getCpuMips(cpuName: string): Promise<any>;
|
|
46
47
|
getCurrentCpuMips(): Promise<any>;
|
|
47
48
|
getGlobalVarValue(cpuName: string, varName: string, bytesNum: number, valueType: GlobalVarType): Promise<any>;
|
|
@@ -75,6 +76,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
|
|
|
75
76
|
getDisassembleInfo(cpuName: string, startAddr: string, nums: string): Promise<GetDisassembleInfoResponse>;
|
|
76
77
|
getDisassembleInfoDefault(startAddr: string, nums: string): Promise<GetDisassembleInfoResponse>;
|
|
77
78
|
SingleStep(cpuName: string): Promise<any>;
|
|
79
|
+
step(cpuName: string, stepNum: number): Promise<any>;
|
|
78
80
|
SingleStepDefault(): Promise<any>;
|
|
79
81
|
close(): boolean;
|
|
80
82
|
getHost(): string;
|
package/dist/src/SkyEyeClient.js
CHANGED
|
@@ -414,6 +414,17 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
+
getCpuFreqHz(cpuName) {
|
|
418
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
419
|
+
try {
|
|
420
|
+
return yield this.call(RequestFactory_1.RequestFactory.getInstance().getCpuFreqHz(cpuName));
|
|
421
|
+
}
|
|
422
|
+
catch (error) {
|
|
423
|
+
console.error("Error during getCpuMips:", error);
|
|
424
|
+
throw error;
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
417
428
|
getCpuMips(cpuName) {
|
|
418
429
|
return __awaiter(this, void 0, void 0, function* () {
|
|
419
430
|
try {
|
|
@@ -983,6 +994,16 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
983
994
|
}
|
|
984
995
|
});
|
|
985
996
|
}
|
|
997
|
+
step(cpuName, stepNum) {
|
|
998
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
999
|
+
try {
|
|
1000
|
+
return yield this.call(RequestFactory_1.RequestFactory.getInstance().step(cpuName, stepNum));
|
|
1001
|
+
}
|
|
1002
|
+
catch (error) {
|
|
1003
|
+
throw error;
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
986
1007
|
SingleStepDefault() {
|
|
987
1008
|
return __awaiter(this, void 0, void 0, function* () {
|
|
988
1009
|
const cpuList = (yield this.getCpuList()).getCpuList;
|
package/package.json
CHANGED
package/src/RequestFactory.ts
CHANGED
|
@@ -197,6 +197,18 @@ export class RequestFactory {
|
|
|
197
197
|
return request;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
public getCpuFreqHz(cpuName: string) {
|
|
201
|
+
const baseRequest = new BaseRequest("SE_get_cpu_freq_hz");
|
|
202
|
+
const args: { [key: string]: string } = {};
|
|
203
|
+
args.cpuname = cpuName;
|
|
204
|
+
baseRequest.setArgs(args)
|
|
205
|
+
const request = new JSONRequest()
|
|
206
|
+
request.setRequest(baseRequest.toJSONString());
|
|
207
|
+
// request.setRequest("{\"request\":{\"name\":\"SE_get_cpu_mips\",\"args\":{\"cpuname\":\"" + cpuName + "\"}}}");
|
|
208
|
+
return request;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
200
212
|
public getCpuMips(cpuName: string) {
|
|
201
213
|
const baseRequest = new BaseRequest("SE_get_cpu_mips");
|
|
202
214
|
const args: { [key: string]: string } = {};
|
|
@@ -346,6 +358,17 @@ export class RequestFactory {
|
|
|
346
358
|
}
|
|
347
359
|
|
|
348
360
|
|
|
361
|
+
public step(cpuName: string, stepNum: number) {
|
|
362
|
+
const baseRequest = new BaseRequest("step");
|
|
363
|
+
const args: { [key: string]: any } = {};
|
|
364
|
+
args.cpuname = cpuName;
|
|
365
|
+
args.step_num = stepNum;
|
|
366
|
+
baseRequest.setArgs(args)
|
|
367
|
+
const request = new JSONRequest()
|
|
368
|
+
request.setRequest(baseRequest.toJSONString());
|
|
369
|
+
return request;
|
|
370
|
+
}
|
|
371
|
+
|
|
349
372
|
|
|
350
373
|
|
|
351
374
|
|
package/src/SkyEyeClient.ts
CHANGED
|
@@ -364,7 +364,14 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
public async getCpuFreqHz(cpuName: string) {
|
|
368
|
+
try {
|
|
369
|
+
return await this.call(RequestFactory.getInstance().getCpuFreqHz(cpuName))
|
|
370
|
+
} catch (error) {
|
|
371
|
+
console.error("Error during getCpuMips:", error);
|
|
372
|
+
throw error;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
368
375
|
|
|
369
376
|
|
|
370
377
|
|
|
@@ -906,6 +913,14 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
906
913
|
}
|
|
907
914
|
}
|
|
908
915
|
|
|
916
|
+
public async step(cpuName: string, stepNum: number) {
|
|
917
|
+
try {
|
|
918
|
+
return await this.call(RequestFactory.getInstance().step(cpuName, stepNum))
|
|
919
|
+
} catch (error) {
|
|
920
|
+
throw error;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
909
924
|
|
|
910
925
|
public async SingleStepDefault() {
|
|
911
926
|
const cpuList = (await this.getCpuList()).getCpuList;
|