langjie-m-play 0.0.49 → 0.0.51
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.
|
@@ -89,6 +89,12 @@ export declare enum JsonRpcMethodEnum {
|
|
|
89
89
|
REPLY_GET_ATS_STRUCT = "R_REPLY_PACK.getAtsStruct",
|
|
90
90
|
CALL_GET_HOT_ATS = "R_CALL_PACK.getHotAts",
|
|
91
91
|
REPLY_GET_HOT_ATS = "R_REPLY_PACK.getHotAts",
|
|
92
|
+
CALL_BEGIN_MEASURE_NOISE = "R_CALL_PACK.beginMeasureNoise",
|
|
93
|
+
REPLY_BEGIN_MEASURE_NOISE = "R_REPLY_PACK.beginMeasureNoise",
|
|
94
|
+
CALL_END_MEASURE_NOISE = "R_CALL_PACK.endMeasureNoise",
|
|
95
|
+
REPLY_END_MEASURE_NOISE = "R_REPLY_PACK.endMeasureNoise",
|
|
96
|
+
CALL_GET_NOISE = "R_CALL_PACK.getNoise",
|
|
97
|
+
REPLY_GET_NOISE = "R_REPLY_PACK.getNoise",
|
|
92
98
|
SYSTEM_EVENT_CONNECT = "R_SYSTEM_EVENT.connect",
|
|
93
99
|
SYSTEM_EVENT_DISCONNECT = "R_SYSTEM_EVENT.disconnect"
|
|
94
100
|
}
|
|
@@ -91,6 +91,12 @@ export var JsonRpcMethodEnum;
|
|
|
91
91
|
JsonRpcMethodEnum["REPLY_GET_ATS_STRUCT"] = "R_REPLY_PACK.getAtsStruct";
|
|
92
92
|
JsonRpcMethodEnum["CALL_GET_HOT_ATS"] = "R_CALL_PACK.getHotAts";
|
|
93
93
|
JsonRpcMethodEnum["REPLY_GET_HOT_ATS"] = "R_REPLY_PACK.getHotAts";
|
|
94
|
+
JsonRpcMethodEnum["CALL_BEGIN_MEASURE_NOISE"] = "R_CALL_PACK.beginMeasureNoise";
|
|
95
|
+
JsonRpcMethodEnum["REPLY_BEGIN_MEASURE_NOISE"] = "R_REPLY_PACK.beginMeasureNoise";
|
|
96
|
+
JsonRpcMethodEnum["CALL_END_MEASURE_NOISE"] = "R_CALL_PACK.endMeasureNoise";
|
|
97
|
+
JsonRpcMethodEnum["REPLY_END_MEASURE_NOISE"] = "R_REPLY_PACK.endMeasureNoise";
|
|
98
|
+
JsonRpcMethodEnum["CALL_GET_NOISE"] = "R_CALL_PACK.getNoise";
|
|
99
|
+
JsonRpcMethodEnum["REPLY_GET_NOISE"] = "R_REPLY_PACK.getNoise";
|
|
94
100
|
JsonRpcMethodEnum["SYSTEM_EVENT_CONNECT"] = "R_SYSTEM_EVENT.connect";
|
|
95
101
|
JsonRpcMethodEnum["SYSTEM_EVENT_DISCONNECT"] = "R_SYSTEM_EVENT.disconnect";
|
|
96
102
|
})(JsonRpcMethodEnum || (JsonRpcMethodEnum = {}));
|
package/package.json
CHANGED
package/service/GtcClient.d.ts
CHANGED
|
@@ -392,4 +392,31 @@ export declare class GtcClient {
|
|
|
392
392
|
* @param ctrlTag
|
|
393
393
|
*/
|
|
394
394
|
static getHotAtsId(slaveInstId: string | null, serviceType: ServiceTypeEnum, ctrlIndex: number, ctrlTag: string): Promise<number>;
|
|
395
|
+
/**
|
|
396
|
+
* 开始监听噪声
|
|
397
|
+
*
|
|
398
|
+
* @param slaveInstId
|
|
399
|
+
* @param serviceType
|
|
400
|
+
* @param ctrlIndex
|
|
401
|
+
* @param channelHandle
|
|
402
|
+
*/
|
|
403
|
+
static beginMeasureNoise(slaveInstId: string | null, serviceType: ServiceTypeEnum, ctrlIndex: number, channelHandle: number): Promise<void>;
|
|
404
|
+
/**
|
|
405
|
+
* 结束监听噪声
|
|
406
|
+
*
|
|
407
|
+
* @param slaveInstId
|
|
408
|
+
* @param serviceType
|
|
409
|
+
* @param ctrlIndex
|
|
410
|
+
* @param channelHandle
|
|
411
|
+
*/
|
|
412
|
+
static endMeasureNoise(slaveInstId: string | null, serviceType: ServiceTypeEnum, ctrlIndex: number, channelHandle: number): Promise<void>;
|
|
413
|
+
/**
|
|
414
|
+
* 获取噪声
|
|
415
|
+
*
|
|
416
|
+
* @param slaveInstId
|
|
417
|
+
* @param serviceType
|
|
418
|
+
* @param ctrlIndex
|
|
419
|
+
* @param channelHandle
|
|
420
|
+
*/
|
|
421
|
+
static getNoise(slaveInstId: string | null, serviceType: ServiceTypeEnum, ctrlIndex: number, channelHandle: number): Promise<number>;
|
|
395
422
|
}
|
package/service/GtcClient.js
CHANGED
|
@@ -719,4 +719,55 @@ export class GtcClient {
|
|
|
719
719
|
return GtcServiceFactory.getGtcService(slaveInstId).call(request);
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
+
/**
|
|
723
|
+
* 开始监听噪声
|
|
724
|
+
*
|
|
725
|
+
* @param slaveInstId
|
|
726
|
+
* @param serviceType
|
|
727
|
+
* @param ctrlIndex
|
|
728
|
+
* @param channelHandle
|
|
729
|
+
*/
|
|
730
|
+
static beginMeasureNoise(slaveInstId, serviceType, ctrlIndex, channelHandle) {
|
|
731
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
732
|
+
const request = GtcClient.generateRequest(JsonRpcMethodEnum.CALL_BEGIN_MEASURE_NOISE, slaveInstId);
|
|
733
|
+
request.params[JsonRpcConstant.SERVICE_TYPE] = serviceType;
|
|
734
|
+
request.params[JsonRpcConstant.CTRL_INDEX] = ctrlIndex;
|
|
735
|
+
request.params[JsonRpcConstant.CHANNEL_HANDLE] = channelHandle;
|
|
736
|
+
return GtcServiceFactory.getGtcService(slaveInstId).call(request);
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* 结束监听噪声
|
|
741
|
+
*
|
|
742
|
+
* @param slaveInstId
|
|
743
|
+
* @param serviceType
|
|
744
|
+
* @param ctrlIndex
|
|
745
|
+
* @param channelHandle
|
|
746
|
+
*/
|
|
747
|
+
static endMeasureNoise(slaveInstId, serviceType, ctrlIndex, channelHandle) {
|
|
748
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
749
|
+
const request = GtcClient.generateRequest(JsonRpcMethodEnum.CALL_END_MEASURE_NOISE, slaveInstId);
|
|
750
|
+
request.params[JsonRpcConstant.SERVICE_TYPE] = serviceType;
|
|
751
|
+
request.params[JsonRpcConstant.CTRL_INDEX] = ctrlIndex;
|
|
752
|
+
request.params[JsonRpcConstant.CHANNEL_HANDLE] = channelHandle;
|
|
753
|
+
return GtcServiceFactory.getGtcService(slaveInstId).call(request);
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* 获取噪声
|
|
758
|
+
*
|
|
759
|
+
* @param slaveInstId
|
|
760
|
+
* @param serviceType
|
|
761
|
+
* @param ctrlIndex
|
|
762
|
+
* @param channelHandle
|
|
763
|
+
*/
|
|
764
|
+
static getNoise(slaveInstId, serviceType, ctrlIndex, channelHandle) {
|
|
765
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
766
|
+
const request = GtcClient.generateRequest(JsonRpcMethodEnum.CALL_GET_NOISE, slaveInstId);
|
|
767
|
+
request.params[JsonRpcConstant.SERVICE_TYPE] = serviceType;
|
|
768
|
+
request.params[JsonRpcConstant.CTRL_INDEX] = ctrlIndex;
|
|
769
|
+
request.params[JsonRpcConstant.CHANNEL_HANDLE] = channelHandle;
|
|
770
|
+
return GtcServiceFactory.getGtcService(slaveInstId).call(request);
|
|
771
|
+
});
|
|
772
|
+
}
|
|
722
773
|
}
|
package/service/MPlay.d.ts
CHANGED
|
@@ -243,4 +243,22 @@ export declare class MPlay {
|
|
|
243
243
|
* @param cycleCount
|
|
244
244
|
*/
|
|
245
245
|
atsSetCycleCount(atsHandle: number, cycleCount: number): Promise<void>;
|
|
246
|
+
/**
|
|
247
|
+
* begin Measure Noise
|
|
248
|
+
*
|
|
249
|
+
* @param channelHandle
|
|
250
|
+
*/
|
|
251
|
+
beginMeasureNoise(channelHandle: number): Promise<void>;
|
|
252
|
+
/**
|
|
253
|
+
* end Measure Noise
|
|
254
|
+
*
|
|
255
|
+
* @param channelHandle
|
|
256
|
+
*/
|
|
257
|
+
endMeasureNoise(channelHandle: number): Promise<void>;
|
|
258
|
+
/**
|
|
259
|
+
* get Noise
|
|
260
|
+
*
|
|
261
|
+
* @param channelHandle
|
|
262
|
+
*/
|
|
263
|
+
getNoise(channelHandle: number): Promise<number>;
|
|
246
264
|
}
|
package/service/MPlay.js
CHANGED
|
@@ -673,6 +673,36 @@ export class MPlay {
|
|
|
673
673
|
yield GtcClient.atsSetCycleCount(this.instId, this.serviceType, atsHandle, cycleCount);
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* begin Measure Noise
|
|
678
|
+
*
|
|
679
|
+
* @param channelHandle
|
|
680
|
+
*/
|
|
681
|
+
beginMeasureNoise(channelHandle) {
|
|
682
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
683
|
+
yield GtcClient.beginMeasureNoise(this.instId, this.serviceType, this.ctrlIndex, channelHandle);
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* end Measure Noise
|
|
688
|
+
*
|
|
689
|
+
* @param channelHandle
|
|
690
|
+
*/
|
|
691
|
+
endMeasureNoise(channelHandle) {
|
|
692
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
693
|
+
yield GtcClient.endMeasureNoise(this.instId, this.serviceType, this.ctrlIndex, channelHandle);
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* get Noise
|
|
698
|
+
*
|
|
699
|
+
* @param channelHandle
|
|
700
|
+
*/
|
|
701
|
+
getNoise(channelHandle) {
|
|
702
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
703
|
+
return yield GtcClient.getNoise(this.instId, this.serviceType, this.ctrlIndex, channelHandle);
|
|
704
|
+
});
|
|
705
|
+
}
|
|
676
706
|
}
|
|
677
707
|
MPlay.isOperator = false;
|
|
678
708
|
MPlay.AND = "AND";
|