langjie-m-play 0.0.39 → 0.0.41
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/domain/RuntimeInfo.d.ts +1 -0
- package/domain/server/PlayUseSubmit.d.ts +3 -2
- package/package.json +1 -1
- package/service/GtcServiceSocketIOImpl.d.ts +1 -1
- package/service/GtcServiceSocketIOImpl.js +3 -3
- package/service/MPlay.d.ts +4 -0
- package/service/MPlay.js +39 -6
- package/src/domain/AtsInfo.d.ts +15 -0
- package/src/domain/AtsInfo.js +1 -0
- package/src/domain/AtsLoadResponse.d.ts +14 -0
- package/src/domain/AtsLoadResponse.js +1 -0
- package/src/domain/DiDo.d.ts +6 -0
- package/src/domain/DiDo.js +1 -0
- package/src/domain/GtcCallBackMsg.d.ts +10 -0
- package/src/domain/GtcCallBackMsg.js +1 -0
- package/src/domain/JsonRpcConstant.d.ts +30 -0
- package/src/domain/JsonRpcConstant.js +30 -0
- package/src/domain/JsonRpcError.d.ts +6 -0
- package/src/domain/JsonRpcError.js +1 -0
- package/src/domain/JsonRpcRequest.d.ts +13 -0
- package/src/domain/JsonRpcRequest.js +1 -0
- package/src/domain/JsonRpcResponse.d.ts +15 -0
- package/src/domain/JsonRpcResponse.js +1 -0
- package/src/domain/NodeInfo.d.ts +11 -0
- package/src/domain/NodeInfo.js +1 -0
- package/src/domain/OutMsg.d.ts +9 -0
- package/src/domain/OutMsg.js +1 -0
- package/src/domain/ProductInfo.d.ts +4 -0
- package/src/domain/ProductInfo.js +1 -0
- package/src/domain/ReadDataDO.d.ts +9 -0
- package/src/domain/ReadDataDO.js +1 -0
- package/src/domain/RuntimeInfo.d.ts +13 -0
- package/src/domain/RuntimeInfo.js +1 -0
- package/src/domain/SubscribeDatagramResult.d.ts +7 -0
- package/src/domain/SubscribeDatagramResult.js +1 -0
- package/src/domain/VinChnl.d.ts +12 -0
- package/src/domain/VinChnl.js +1 -0
- package/src/domain/VtcMsgTypeConstant.d.ts +46 -0
- package/src/domain/VtcMsgTypeConstant.js +46 -0
- package/src/domain/ats/AtsStruct.d.ts +22 -0
- package/src/domain/ats/AtsStruct.js +1 -0
- package/src/domain/ats/event/AtsActionEnteredEventContent.d.ts +6 -0
- package/src/domain/ats/event/AtsActionEnteredEventContent.js +1 -0
- package/src/domain/ats/event/AtsCapturedEventContent.d.ts +5 -0
- package/src/domain/ats/event/AtsCapturedEventContent.js +1 -0
- package/src/domain/ats/event/AtsLoadEventContent.d.ts +4 -0
- package/src/domain/ats/event/AtsLoadEventContent.js +1 -0
- package/src/domain/ats/event/BaseAtsEvent.d.ts +8 -0
- package/src/domain/ats/event/BaseAtsEvent.js +1 -0
- package/src/domain/enums/AtsEventEnum.d.ts +9 -0
- package/src/domain/enums/AtsEventEnum.js +10 -0
- package/src/domain/enums/CommunicationTypeEnum.d.ts +7 -0
- package/src/domain/enums/CommunicationTypeEnum.js +8 -0
- package/src/domain/enums/ConnectStatusEnum.d.ts +7 -0
- package/src/domain/enums/ConnectStatusEnum.js +8 -0
- package/src/domain/enums/InterRoleEnum.d.ts +8 -0
- package/src/domain/enums/InterRoleEnum.js +9 -0
- package/src/domain/enums/JsonRpcEventEnum.d.ts +12 -0
- package/src/domain/enums/JsonRpcEventEnum.js +13 -0
- package/src/domain/enums/JsonRpcMethodEnum.d.ts +90 -0
- package/src/domain/enums/JsonRpcMethodEnum.js +92 -0
- package/src/domain/enums/JsonRpcResponseCodeEnum.d.ts +22 -0
- package/src/domain/enums/JsonRpcResponseCodeEnum.js +23 -0
- package/src/domain/enums/MixGramTypeEnum.d.ts +11 -0
- package/src/domain/enums/MixGramTypeEnum.js +12 -0
- package/src/domain/enums/MsgEventTypeEnum.d.ts +8 -0
- package/src/domain/enums/MsgEventTypeEnum.js +9 -0
- package/src/domain/enums/MsgSourceEnum.d.ts +4 -0
- package/src/domain/enums/MsgSourceEnum.js +5 -0
- package/src/domain/enums/RunStateEnum.d.ts +9 -0
- package/src/domain/enums/RunStateEnum.js +10 -0
- package/src/domain/enums/ServiceTypeEnum.d.ts +7 -0
- package/src/domain/enums/ServiceTypeEnum.js +8 -0
- package/src/domain/enums/StationEventEnum.d.ts +4 -0
- package/src/domain/enums/StationEventEnum.js +5 -0
- package/src/domain/server/PlayAccountDO.d.ts +9 -0
- package/src/domain/server/PlayAccountDO.js +1 -0
- package/src/domain/server/PlayAccountPageDO.d.ts +5 -0
- package/src/domain/server/PlayAccountPageDO.js +1 -0
- package/src/domain/server/PlayAccountQueryDO.d.ts +4 -0
- package/src/domain/server/PlayAccountQueryDO.js +1 -0
- package/src/domain/server/PlayReleaseSubmit.d.ts +3 -0
- package/src/domain/server/PlayReleaseSubmit.js +1 -0
- package/src/domain/server/PlayUseSubmit.d.ts +6 -0
- package/src/domain/server/PlayUseSubmit.js +1 -0
- package/src/domain/server/RequestServerConfig.d.ts +5 -0
- package/src/domain/server/RequestServerConfig.js +1 -0
- package/src/index.d.ts +23 -0
- package/src/index.js +15 -0
- package/src/server/RemoteWebService.d.ts +14 -0
- package/src/server/RemoteWebService.js +79 -0
- package/src/service/GtcClient.d.ts +377 -0
- package/src/service/GtcClient.js +686 -0
- package/src/service/GtcServiceFactory.d.ts +12 -0
- package/src/service/GtcServiceFactory.js +25 -0
- package/src/service/GtcServiceSocketIOImpl.d.ts +27 -0
- package/src/service/GtcServiceSocketIOImpl.js +149 -0
- package/src/service/GtcServiceWebSocketImpl.d.ts +33 -0
- package/src/service/GtcServiceWebSocketImpl.js +222 -0
- package/src/service/IGtcService.d.ts +16 -0
- package/src/service/IGtcService.js +1 -0
- package/src/service/MPlay.d.ts +217 -0
- package/src/service/MPlay.js +601 -0
- package/src/service/StationSocketIOService.d.ts +12 -0
- package/src/service/StationSocketIOService.js +75 -0
- package/src/utils/Base64Util.d.ts +5 -0
- package/src/utils/Base64Util.js +16 -0
- package/src/utils/DataGramUtil.d.ts +21 -0
- package/src/utils/DataGramUtil.js +37 -0
- package/src/utils/Dvb.d.ts +13 -0
- package/src/utils/Dvb.js +174 -0
- package/src/utils/IdGenerator.d.ts +7 -0
- package/src/utils/IdGenerator.js +11 -0
- package/src/utils/NPack.d.ts +53 -0
- package/src/utils/NPack.js +261 -0
- package/src/utils/PubSubUtil.d.ts +7 -0
- package/src/utils/PubSubUtil.js +21 -0
- package/src/utils/RemoteBinData.d.ts +46 -0
- package/src/utils/RemoteBinData.js +198 -0
- package/src/utils/ServerConfigUtil.d.ts +10 -0
- package/src/utils/ServerConfigUtil.js +26 -0
- package/src/utils/TaskSynchronizer.d.ts +8 -0
- package/src/utils/TaskSynchronizer.js +19 -0
- package/src/utils/ThreadPoolUtil.d.ts +48 -0
- package/src/utils/ThreadPoolUtil.js +299 -0
- package/src/utils/enums/SubKeyEnum.d.ts +16 -0
- package/src/utils/enums/SubKeyEnum.js +17 -0
package/domain/RuntimeInfo.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ declare class GtcServiceSocketIOImpl implements IGtcService {
|
|
|
12
12
|
private callbackMap;
|
|
13
13
|
private threadPool;
|
|
14
14
|
constructor();
|
|
15
|
-
private
|
|
15
|
+
private getValueFromUrl;
|
|
16
16
|
init(url: string, connectCallback: () => void, disconnectCallback: () => void): Promise<boolean>;
|
|
17
17
|
disconnect(): Promise<void>;
|
|
18
18
|
call(request: JsonRpcRequest<any>): Promise<any>;
|
|
@@ -16,9 +16,9 @@ class GtcServiceSocketIOImpl {
|
|
|
16
16
|
this.callbackMap = {};
|
|
17
17
|
// this.threadPool = new ThreadPoolUtil();
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
getValueFromUrl(url, key) {
|
|
20
20
|
const urlObj = new URL(url);
|
|
21
|
-
return urlObj.searchParams.get(
|
|
21
|
+
return urlObj.searchParams.get(key);
|
|
22
22
|
}
|
|
23
23
|
init(url, connectCallback, disconnectCallback) {
|
|
24
24
|
return new Promise((resolve, reject) => {
|
|
@@ -32,7 +32,7 @@ class GtcServiceSocketIOImpl {
|
|
|
32
32
|
this.socket.on('connect', () => {
|
|
33
33
|
this.connectStatus = ConnectStatusEnum.CONNECTED;
|
|
34
34
|
console.log('socket链接成功!' + this.socket.id);
|
|
35
|
-
this.socket.emit("handshake", { ctrlTag: this.
|
|
35
|
+
this.socket.emit("handshake", { ctrlTag: this.getValueFromUrl(url, 'ctrlTag'), debugMode: this.getValueFromUrl(url, 'debugMode') });
|
|
36
36
|
resolve(true);
|
|
37
37
|
if (connectCallback) {
|
|
38
38
|
connectCallback();
|
package/service/MPlay.d.ts
CHANGED
|
@@ -84,6 +84,10 @@ export declare class MPlay {
|
|
|
84
84
|
* Synchronize runtime data for the play.
|
|
85
85
|
*/
|
|
86
86
|
syncRuntimeInfo(ctrlTags: string): Promise<MultiStationRuntimeInfo>;
|
|
87
|
+
/**
|
|
88
|
+
* Pure Synchronize runtime data for the play.
|
|
89
|
+
*/
|
|
90
|
+
syncFullRuntimeInfo(sn: string | null): Promise<MultiStationRuntimeInfo>;
|
|
87
91
|
/**
|
|
88
92
|
* Subscribe datagram to the MPlay server.
|
|
89
93
|
*
|
package/service/MPlay.js
CHANGED
|
@@ -180,11 +180,30 @@ export class MPlay {
|
|
|
180
180
|
if (result.totalCount === 0) {
|
|
181
181
|
throw new Error("No available controller.");
|
|
182
182
|
}
|
|
183
|
+
const tempMultiStationRuntimeInfo = yield this.syncFullRuntimeInfo(params.accountNo);
|
|
184
|
+
if (tempMultiStationRuntimeInfo.debugMode && !params.debugMode) {
|
|
185
|
+
// 处于调试模式,不让试验
|
|
186
|
+
throw new Error("0");
|
|
187
|
+
}
|
|
188
|
+
else if (!tempMultiStationRuntimeInfo.debugMode && params.debugMode && Object.keys(tempMultiStationRuntimeInfo.ctrlTagRuntimeInfoMap).length !== 0) {
|
|
189
|
+
// 处于试验模式,不让调试
|
|
190
|
+
throw new Error("1");
|
|
191
|
+
}
|
|
183
192
|
let ctrlConfig;
|
|
184
193
|
MPlay.isOperator = params.isOperator;
|
|
185
194
|
const { isHttps, httpUrl, cloudHost } = ServerConfigUtil.getRequestTargetInfo();
|
|
186
195
|
if (params.isOperator) {
|
|
187
196
|
ctrlConfig = yield RemoteWebService.usePlay(params);
|
|
197
|
+
if (!params.totalCtrlTags) {
|
|
198
|
+
params.totalCtrlTags = ctrlConfig.controllers.map(c => c.tag).join();
|
|
199
|
+
}
|
|
200
|
+
if (params.ctrlTag === null) {
|
|
201
|
+
// 标定、控制、actionGo页面
|
|
202
|
+
params.ctrlTag = ctrlConfig.controllers[0].tag;
|
|
203
|
+
}
|
|
204
|
+
else if (params.ctrlTag === '') {
|
|
205
|
+
// station 页面
|
|
206
|
+
}
|
|
188
207
|
try {
|
|
189
208
|
let protocol = 'http';
|
|
190
209
|
// 判断是websocket还是socket.io
|
|
@@ -195,21 +214,21 @@ export class MPlay {
|
|
|
195
214
|
if (isHttps) {
|
|
196
215
|
// 连接云服务器操作
|
|
197
216
|
if (protocol === 'http') {
|
|
198
|
-
yield GtcClient.init(this.instId, `${httpUrl}/operate?from=operate&accountNo=${params.accountNo}&ctrlTag=${params.ctrlTag}`, connectCallback, disconnectCallback);
|
|
217
|
+
yield GtcClient.init(this.instId, `${httpUrl}/operate?from=operate&accountNo=${params.accountNo}&ctrlTag=${params.ctrlTag}&debugMode=${params.debugMode}`, connectCallback, disconnectCallback);
|
|
199
218
|
}
|
|
200
219
|
else {
|
|
201
|
-
yield GtcClient.init(this.instId, `wss://precp.langjie.com/operate?sn=${params.accountNo}&ctrlTag=${params.ctrlTag}`, connectCallback, disconnectCallback);
|
|
220
|
+
yield GtcClient.init(this.instId, `wss://precp.langjie.com/operate?sn=${params.accountNo}&ctrlTag=${params.ctrlTag}&debugMode=${params.debugMode}`, connectCallback, disconnectCallback);
|
|
202
221
|
}
|
|
203
222
|
}
|
|
204
223
|
else {
|
|
205
224
|
// 连接本地局域网的MPlay
|
|
206
|
-
yield GtcClient.init(this.instId, `${protocol}://${result.data[0].localAreaNetworkAddress}:${result.data[0].port}?clientId=operator&ctrlTag=${params.ctrlTag}`, connectCallback, disconnectCallback);
|
|
225
|
+
yield GtcClient.init(this.instId, `${protocol}://${result.data[0].localAreaNetworkAddress}:${result.data[0].port}?clientId=operator&ctrlTag=${params.ctrlTag}&debugMode=${params.debugMode}`, connectCallback, disconnectCallback);
|
|
207
226
|
}
|
|
208
227
|
}
|
|
209
228
|
catch (e) {
|
|
210
229
|
console.log(e);
|
|
211
230
|
// 连接云服务器操作
|
|
212
|
-
yield GtcClient.init(this.instId, `https://${cloudHost}/operate?from=operate&accountNo=${params.accountNo}&ctrlTag=${params.ctrlTag}`, connectCallback, disconnectCallback);
|
|
231
|
+
yield GtcClient.init(this.instId, `https://${cloudHost}/operate?from=operate&accountNo=${params.accountNo}&ctrlTag=${params.ctrlTag}&debugMode=${params.debugMode}`, connectCallback, disconnectCallback);
|
|
213
232
|
}
|
|
214
233
|
// 与云服务器心跳保持
|
|
215
234
|
if (!MPlay.timer) {
|
|
@@ -265,8 +284,7 @@ export class MPlay {
|
|
|
265
284
|
*/
|
|
266
285
|
syncRuntimeInfo(ctrlTags) {
|
|
267
286
|
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
-
const
|
|
269
|
-
const multiStationRuntimeInfo = yield RemoteWebService.syncRuntimeInfo(String(productInfo.dSn));
|
|
287
|
+
const multiStationRuntimeInfo = yield this.syncFullRuntimeInfo(null);
|
|
270
288
|
if (multiStationRuntimeInfo && multiStationRuntimeInfo.ctrlTagRuntimeInfoMap) {
|
|
271
289
|
ctrlTags.split(',').forEach(ctrlTag => {
|
|
272
290
|
const ctrlRunTimeInfo = multiStationRuntimeInfo.ctrlTagRuntimeInfoMap[ctrlTag];
|
|
@@ -281,9 +299,24 @@ export class MPlay {
|
|
|
281
299
|
}
|
|
282
300
|
});
|
|
283
301
|
}
|
|
302
|
+
if (multiStationRuntimeInfo) {
|
|
303
|
+
this.multiStationRuntimeInfo.debugMode = multiStationRuntimeInfo.debugMode;
|
|
304
|
+
}
|
|
284
305
|
return this.multiStationRuntimeInfo;
|
|
285
306
|
});
|
|
286
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Pure Synchronize runtime data for the play.
|
|
310
|
+
*/
|
|
311
|
+
syncFullRuntimeInfo(sn) {
|
|
312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
313
|
+
if (!sn) {
|
|
314
|
+
const productInfo = yield GtcClient.getProductInfo(this.instId, this.serviceType, this.ctrlIndex);
|
|
315
|
+
sn = String(productInfo.dSn);
|
|
316
|
+
}
|
|
317
|
+
return yield RemoteWebService.syncRuntimeInfo(sn);
|
|
318
|
+
});
|
|
319
|
+
}
|
|
287
320
|
/**
|
|
288
321
|
* Subscribe datagram to the MPlay server.
|
|
289
322
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface AtsInfo {
|
|
2
|
+
handle: number;
|
|
3
|
+
atsName: string;
|
|
4
|
+
atsParams: Record<string, any>;
|
|
5
|
+
capturedParams: Record<string, any>;
|
|
6
|
+
started: boolean;
|
|
7
|
+
atsFile: string;
|
|
8
|
+
ctrlTag: string;
|
|
9
|
+
atsAxisActionList: Array<AtsAxisAction>;
|
|
10
|
+
}
|
|
11
|
+
export interface AtsAxisAction {
|
|
12
|
+
axisIndex: number;
|
|
13
|
+
actionList: Array<string>;
|
|
14
|
+
currentActionTag: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface AtsLoadResponse<K extends string, V> {
|
|
2
|
+
atsHandle: number;
|
|
3
|
+
atsParam: Record<K, V>;
|
|
4
|
+
capturedParams: Record<K, V>;
|
|
5
|
+
atsFile: string;
|
|
6
|
+
ctrlTag: string;
|
|
7
|
+
atsName: string;
|
|
8
|
+
atsAxisActionList: Array<SimpleAxisAction>;
|
|
9
|
+
}
|
|
10
|
+
export interface SimpleAxisAction {
|
|
11
|
+
axisIndex: number;
|
|
12
|
+
actionList: Array<string>;
|
|
13
|
+
currentActionTag: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MsgSourceEnum } from "./enums/MsgSourceEnum";
|
|
2
|
+
import { RunStateEnum } from "./enums/RunStateEnum";
|
|
3
|
+
export interface GtcCallBackMsg {
|
|
4
|
+
hSrc: number;
|
|
5
|
+
msgId: number;
|
|
6
|
+
ms: number;
|
|
7
|
+
msg: string;
|
|
8
|
+
source: MsgSourceEnum;
|
|
9
|
+
runState: RunStateEnum;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rpc通讯参数常量
|
|
3
|
+
*/
|
|
4
|
+
export declare class JsonRpcConstant {
|
|
5
|
+
static readonly SLAVE_INST_ID = "slaveInstId";
|
|
6
|
+
static readonly CTRL_INDEX = "ctrlIndex";
|
|
7
|
+
static readonly SERVICE_TYPE = "serviceType";
|
|
8
|
+
static readonly CHANNEL_HANDLE = "channelHandle";
|
|
9
|
+
static readonly SPEED = "speed";
|
|
10
|
+
static readonly LOW_LIMIT = "lowLimit";
|
|
11
|
+
static readonly UP_LIMIT = "upLimit";
|
|
12
|
+
static readonly VALUE = "value";
|
|
13
|
+
static readonly SWITCH_CODE = "switchCode";
|
|
14
|
+
static readonly OPEN_STATUS = "openStatus";
|
|
15
|
+
static readonly ATS_SCRIPT = "atsScript";
|
|
16
|
+
static readonly ATS_HANDLE = "atsHandle";
|
|
17
|
+
static readonly ATS_BUTTON_CODE = "atsButtonCode";
|
|
18
|
+
static readonly ATS_PARAM_KEYS = "atsParamKeys";
|
|
19
|
+
static readonly ATS_PARAM_VALUES = "atsParamValues";
|
|
20
|
+
static readonly VIN_TAGS = "vinTags";
|
|
21
|
+
static readonly FILE_NAME = "fileName";
|
|
22
|
+
static readonly FILE_CONTENT = "fileContent";
|
|
23
|
+
static readonly NOTE = "note";
|
|
24
|
+
static readonly ROLE = "role";
|
|
25
|
+
static readonly CONTROLLER_NAME = "controllerName";
|
|
26
|
+
static readonly FORMAL_NAME = "formalName";
|
|
27
|
+
static readonly ACTUAL_TAG = "actualTag";
|
|
28
|
+
static readonly SYNC_MODE = "syncMode";
|
|
29
|
+
static readonly ACTUAL_CTRL_TAG = "actualCtrlTag";
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rpc通讯参数常量
|
|
3
|
+
*/
|
|
4
|
+
export class JsonRpcConstant {
|
|
5
|
+
}
|
|
6
|
+
JsonRpcConstant.SLAVE_INST_ID = "slaveInstId";
|
|
7
|
+
JsonRpcConstant.CTRL_INDEX = "ctrlIndex";
|
|
8
|
+
JsonRpcConstant.SERVICE_TYPE = "serviceType";
|
|
9
|
+
JsonRpcConstant.CHANNEL_HANDLE = "channelHandle";
|
|
10
|
+
JsonRpcConstant.SPEED = "speed";
|
|
11
|
+
JsonRpcConstant.LOW_LIMIT = "lowLimit";
|
|
12
|
+
JsonRpcConstant.UP_LIMIT = "upLimit";
|
|
13
|
+
JsonRpcConstant.VALUE = "value";
|
|
14
|
+
JsonRpcConstant.SWITCH_CODE = "switchCode";
|
|
15
|
+
JsonRpcConstant.OPEN_STATUS = "openStatus";
|
|
16
|
+
JsonRpcConstant.ATS_SCRIPT = "atsScript";
|
|
17
|
+
JsonRpcConstant.ATS_HANDLE = "atsHandle";
|
|
18
|
+
JsonRpcConstant.ATS_BUTTON_CODE = "atsButtonCode";
|
|
19
|
+
JsonRpcConstant.ATS_PARAM_KEYS = "atsParamKeys";
|
|
20
|
+
JsonRpcConstant.ATS_PARAM_VALUES = "atsParamValues";
|
|
21
|
+
JsonRpcConstant.VIN_TAGS = "vinTags";
|
|
22
|
+
JsonRpcConstant.FILE_NAME = "fileName";
|
|
23
|
+
JsonRpcConstant.FILE_CONTENT = "fileContent";
|
|
24
|
+
JsonRpcConstant.NOTE = "note";
|
|
25
|
+
JsonRpcConstant.ROLE = "role";
|
|
26
|
+
JsonRpcConstant.CONTROLLER_NAME = "controllerName";
|
|
27
|
+
JsonRpcConstant.FORMAL_NAME = "formalName";
|
|
28
|
+
JsonRpcConstant.ACTUAL_TAG = "actualTag";
|
|
29
|
+
JsonRpcConstant.SYNC_MODE = "syncMode";
|
|
30
|
+
JsonRpcConstant.ACTUAL_CTRL_TAG = "actualCtrlTag";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JsonRpcMethodEnum } from "./enums/JsonRpcMethodEnum";
|
|
2
|
+
import { JsonRpcEventEnum } from "./enums/JsonRpcEventEnum";
|
|
3
|
+
/**
|
|
4
|
+
* 请求对象
|
|
5
|
+
*/
|
|
6
|
+
export interface JsonRpcRequest<T> {
|
|
7
|
+
id: string;
|
|
8
|
+
method: JsonRpcMethodEnum;
|
|
9
|
+
params: T;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
event: JsonRpcEventEnum;
|
|
12
|
+
slaveInstId: string | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JsonRpcMethodEnum } from "./enums/JsonRpcMethodEnum";
|
|
2
|
+
import { JsonRpcEventEnum } from "./enums/JsonRpcEventEnum";
|
|
3
|
+
import { JsonRpcError } from "./JsonRpcError";
|
|
4
|
+
/**
|
|
5
|
+
* 响应对象
|
|
6
|
+
*/
|
|
7
|
+
export interface JsonRpcResponse<T, E> {
|
|
8
|
+
id: string;
|
|
9
|
+
method: JsonRpcMethodEnum;
|
|
10
|
+
result: T;
|
|
11
|
+
error: JsonRpcError<E>;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
event: JsonRpcEventEnum;
|
|
14
|
+
slaveInstId: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MsgEventTypeEnum } from "./enums/MsgEventTypeEnum";
|
|
2
|
+
import { ServiceTypeEnum } from "./enums/ServiceTypeEnum";
|
|
3
|
+
export interface OutMsg<T> {
|
|
4
|
+
serviceType: ServiceTypeEnum;
|
|
5
|
+
ctrlIndex: number;
|
|
6
|
+
batchId: string;
|
|
7
|
+
msgEventType: MsgEventTypeEnum;
|
|
8
|
+
data: T;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SubscribeDatagramResult } from "./SubscribeDatagramResult";
|
|
2
|
+
import { AtsInfo } from "./AtsInfo";
|
|
3
|
+
export interface RuntimeInfo {
|
|
4
|
+
testing: boolean;
|
|
5
|
+
currentAtsHandle: number;
|
|
6
|
+
currentActionTag: string;
|
|
7
|
+
subscribeDatagramResultList: Array<SubscribeDatagramResult>;
|
|
8
|
+
atsInfoList: Array<AtsInfo>;
|
|
9
|
+
}
|
|
10
|
+
export interface MultiStationRuntimeInfo {
|
|
11
|
+
ctrlTagRuntimeInfoMap: Record<string, RuntimeInfo>;
|
|
12
|
+
subscribeDatagramResultList: Array<SubscribeDatagramResult>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface VinChnl {
|
|
2
|
+
LastVal: number;
|
|
3
|
+
SnapshotValArray: number[];
|
|
4
|
+
SnapshotNum: number;
|
|
5
|
+
Caption: string;
|
|
6
|
+
Dot: number;
|
|
7
|
+
BindHandle: number;
|
|
8
|
+
WavePeak: number[];
|
|
9
|
+
WaveValley: number[];
|
|
10
|
+
WaveEndIndexArr: number[];
|
|
11
|
+
GtWaveCount: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const LAUNCH_STEP = 256;
|
|
2
|
+
export declare const LAUNCH_ABORTED = 33024;
|
|
3
|
+
export declare const LAUNCH_OK = 33280;
|
|
4
|
+
export declare const CLOSE_STEP = 16384;
|
|
5
|
+
export declare const CLOSE_OK = 32768;
|
|
6
|
+
export declare const RUN_MSG = 512;
|
|
7
|
+
export declare const RUN_EVENT = 768;
|
|
8
|
+
export declare const RUN_EVENT_TOUCH = 784;
|
|
9
|
+
export declare const RUN_WARNING = 1024;
|
|
10
|
+
export declare const RUN_DEBUG = 1280;
|
|
11
|
+
export declare const ATS_LOADING = 1536;
|
|
12
|
+
export declare const ATS_LOAD_ABORTED = 1552;
|
|
13
|
+
export declare const ATS_LOAD_OK = 1568;
|
|
14
|
+
export declare const ATS_STARTING = 1584;
|
|
15
|
+
export declare const ATS_STARTED = 1616;
|
|
16
|
+
export declare const ATS_BREAK = 1632;
|
|
17
|
+
export declare const ATS_CONTINUE = 1648;
|
|
18
|
+
export declare const ATS_CATCH_CONTROLLER = 1664;
|
|
19
|
+
export declare const ATS_RELEASE_CONTROLLER = 1680;
|
|
20
|
+
export declare const ATS_TERMINATING = 1696;
|
|
21
|
+
export declare const ATS_ACTION = 1792;
|
|
22
|
+
export declare const ATS_ABORTED = 2048;
|
|
23
|
+
export declare const ATS_COMPLETED = 2304;
|
|
24
|
+
export declare const ATS_TRIGGER = 2560;
|
|
25
|
+
export declare const ATS_FINAL_ACTION = 3328;
|
|
26
|
+
export declare const ATS_TEST_STARTED = 3088;
|
|
27
|
+
export declare const ATS_TEST_ENDED = 3104;
|
|
28
|
+
export declare const ATS_TEST_ABORTED = 3120;
|
|
29
|
+
export declare const ATS_ARGUMENT = 3136;
|
|
30
|
+
export declare const ATS_RUNTIME = 3152;
|
|
31
|
+
export declare const TEST_FFP = 2816;
|
|
32
|
+
export declare const TEST_FFMAP = 2832;
|
|
33
|
+
export declare const CALI_PARAM = 2848;
|
|
34
|
+
export declare const CTRL_PARAM = 2864;
|
|
35
|
+
export declare const ACTU_PARAM = 2880;
|
|
36
|
+
export declare const SPECIMEN_CLAMPED = 2944;
|
|
37
|
+
export declare const SPECIMEN_LOADING = 2960;
|
|
38
|
+
export declare const SPECIMEN_BROKEN = 2976;
|
|
39
|
+
export declare const SPECIMEN_RELEASED = 2992;
|
|
40
|
+
export declare const API_DEBUG = 3584;
|
|
41
|
+
export declare const SYNC_ALIGNED = 3840;
|
|
42
|
+
export declare const SYNC_GROUP = 3856;
|
|
43
|
+
export declare const SYNC_READY = 3872;
|
|
44
|
+
export declare const SYNC_GO = 3888;
|
|
45
|
+
export declare const SYNC_OK = 3904;
|
|
46
|
+
export declare const SYNC_ABORTED = 3968;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const LAUNCH_STEP = 0x0100; // 启动,及以下正常步骤
|
|
2
|
+
export const LAUNCH_ABORTED = 0x8100; // 启动异常中止
|
|
3
|
+
export const LAUNCH_OK = 0x8200; // 启动正常完成
|
|
4
|
+
export const CLOSE_STEP = 0x4000; // 关闭,及以下步骤
|
|
5
|
+
export const CLOSE_OK = 0x8000; // 关闭正常完成
|
|
6
|
+
export const RUN_MSG = 0x0200; // 运行时信息
|
|
7
|
+
export const RUN_EVENT = 0x0300; // 运行中发生指定事件
|
|
8
|
+
export const RUN_EVENT_TOUCH = 0x0310; // 运行中的触碰事件
|
|
9
|
+
export const RUN_WARNING = 0x0400; // 运行时警告
|
|
10
|
+
export const RUN_DEBUG = 0x0500; // 运行时跟踪信息
|
|
11
|
+
export const ATS_LOADING = 0x0600; // ATS正在加载+ATS句柄(下同)
|
|
12
|
+
export const ATS_LOAD_ABORTED = 0x0610; // ATS加载不成功
|
|
13
|
+
export const ATS_LOAD_OK = 0x0620; // ATS加载成功
|
|
14
|
+
export const ATS_STARTING = 0x0630; // ATS启动中
|
|
15
|
+
export const ATS_STARTED = 0x0650; // ATS已经启动
|
|
16
|
+
export const ATS_BREAK = 0x0660; // ATS(长时间动作)中断
|
|
17
|
+
export const ATS_CONTINUE = 0x0670; // ATS(中断后)继续
|
|
18
|
+
export const ATS_CATCH_CONTROLLER = 0x0680; // ATS抓住控制器
|
|
19
|
+
export const ATS_RELEASE_CONTROLLER = 0x0690; // ATS释放控制器
|
|
20
|
+
export const ATS_TERMINATING = 0x06A0; // ATS终止中
|
|
21
|
+
export const ATS_ACTION = 0x0700; // ATS执行动作+句柄+轴
|
|
22
|
+
export const ATS_ABORTED = 0x0800; // ATS异常退出
|
|
23
|
+
export const ATS_COMPLETED = 0x0900; // ATS结束
|
|
24
|
+
export const ATS_TRIGGER = 0x0A00; // ATS跳转触发器+句柄+轴
|
|
25
|
+
export const ATS_FINAL_ACTION = 0x0D00; // ATS轴最终动作+句柄+轴
|
|
26
|
+
export const ATS_TEST_STARTED = 0x0C10; // 驻留模式的试验开始+ATS句柄,与时序消息同时发出
|
|
27
|
+
export const ATS_TEST_ENDED = 0x0C20;
|
|
28
|
+
export const ATS_TEST_ABORTED = 0x0C30;
|
|
29
|
+
export const ATS_ARGUMENT = 0x0C40; // 全局参数变化
|
|
30
|
+
export const ATS_RUNTIME = 0x0C50; // 运行参数变化
|
|
31
|
+
export const TEST_FFP = 0x0B00; // 侦测位移前馈比例
|
|
32
|
+
export const TEST_FFMAP = 0x0B10; // 侦测位移前馈表
|
|
33
|
+
export const CALI_PARAM = 0x0B20; // 测量通道的标定参数变化
|
|
34
|
+
export const CTRL_PARAM = 0x0B30; // 闭环反馈通道的控制参数变化
|
|
35
|
+
export const ACTU_PARAM = 0x0B40; // 作动器的参数变化
|
|
36
|
+
export const SPECIMEN_CLAMPED = 0x0B80; // 试件
|
|
37
|
+
export const SPECIMEN_LOADING = 0x0B90;
|
|
38
|
+
export const SPECIMEN_BROKEN = 0x0BA0;
|
|
39
|
+
export const SPECIMEN_RELEASED = 0x0BB0;
|
|
40
|
+
export const API_DEBUG = 0x0E00; // 应用调用接口跟踪
|
|
41
|
+
export const SYNC_ALIGNED = 0x0F00; // 对齐
|
|
42
|
+
export const SYNC_GROUP = 0x0F10; // 成组
|
|
43
|
+
export const SYNC_READY = 0x0F20; // 就绪
|
|
44
|
+
export const SYNC_GO = 0x0F30; // 启动
|
|
45
|
+
export const SYNC_OK = 0x0F40;
|
|
46
|
+
export const SYNC_ABORTED = 0x0F80;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface AtsStruct {
|
|
2
|
+
name: string;
|
|
3
|
+
parameters: Record<string, Value>;
|
|
4
|
+
captureParameters: Record<string, Value>;
|
|
5
|
+
axes: Array<Axis>;
|
|
6
|
+
}
|
|
7
|
+
export interface Value {
|
|
8
|
+
value: number;
|
|
9
|
+
options: Array<number> | null;
|
|
10
|
+
}
|
|
11
|
+
export interface Axis {
|
|
12
|
+
name: string;
|
|
13
|
+
actions: Array<AtsAction>;
|
|
14
|
+
currentAction: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AtsAction {
|
|
17
|
+
name: string;
|
|
18
|
+
editableParamList: Array<string>;
|
|
19
|
+
editableParamOptionList: Array<number>;
|
|
20
|
+
clickToTargetList: Array<string>;
|
|
21
|
+
captureButtonList: Array<string>;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var AtsEventEnum;
|
|
2
|
+
(function (AtsEventEnum) {
|
|
3
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_AtsLoaded"] = 39950] = "EVENT_ID_AtsLoaded";
|
|
4
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_TestStarted"] = 40732] = "EVENT_ID_TestStarted";
|
|
5
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_TestEnded"] = 62117] = "EVENT_ID_TestEnded";
|
|
6
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_TestAborted"] = 54598] = "EVENT_ID_TestAborted";
|
|
7
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_ActionEntered"] = 16330] = "EVENT_ID_ActionEntered";
|
|
8
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_Captured"] = 413] = "EVENT_ID_Captured";
|
|
9
|
+
AtsEventEnum[AtsEventEnum["EVENT_ID_TriggerJumping"] = 58835] = "EVENT_ID_TriggerJumping";
|
|
10
|
+
})(AtsEventEnum || (AtsEventEnum = {}));
|