|
@@ -0,0 +1,69 @@
|
|
|
+import HashMap from '@ohos.util.HashMap';
|
|
|
+
|
|
|
+export default class BusinessConstant {
|
|
|
+
|
|
|
+ static readonly mqttSubscribeTopic: string = 'station100/data/devices';
|
|
|
+ static readonly mqttSubscribeTopic2: string = 'station11/data/devices';
|
|
|
+ static readonly mqttPublishTopic: string = 'station100/cmd/devices';
|
|
|
+ static readonly mqttUrl: string = 'tcp://192.168.1.3';
|
|
|
+ // 每个clientId不重复
|
|
|
+ static readonly mqttClientId: string = 'station100' + Date.now().toString(36);
|
|
|
+ static readonly mqttUserName: string = '';
|
|
|
+ static readonly mqttPassword: string = '';
|
|
|
+
|
|
|
+ static readonly attrMap: Map<string, string> = new Map([
|
|
|
+ ['LedRed', 'SSD'],
|
|
|
+ ['LedOrange', 'SSD'],
|
|
|
+ ['LedGreen', 'SSD'],
|
|
|
+ ['Buzzer', 'SSD'],
|
|
|
+ ['ExhaustFan', 'HYPYJ'],
|
|
|
+ ['SolderingCurrTemp', 'WKDLT'],
|
|
|
+ ['SolderingSetTemp', 'WKDLT'],
|
|
|
+ ['RingWearStatus', 'FJDJC'],
|
|
|
+
|
|
|
+ ['Temperature', 'WSDCGQ'],
|
|
|
+ ['Humidity', 'WSDCGQ'],
|
|
|
+
|
|
|
+ ['Charging1Set', 'PLC'],
|
|
|
+ ['Charging2Set', 'PLC'],
|
|
|
+ ['LED1Control', 'PLC'],
|
|
|
+ ['LED2Control', 'PLC'],
|
|
|
+ ['LED3Control', 'PLC'],
|
|
|
+ ['Assemble_500W_Control', 'PLC'],
|
|
|
+ ['Debugging_500W_Control', 'PLC'],
|
|
|
+ ['Stokinout_500W_Control', 'PLC'],
|
|
|
+ ['Inspection_500W_Control', 'PLC'],
|
|
|
+ ['Packing_500W_Control', 'PLC'],
|
|
|
+ ['Assemble_1000W_Control', 'PLC'],
|
|
|
+ ['Debugging_1000W_Control', 'PLC'],
|
|
|
+ ['Stokinout_1000W_Control', 'PLC'],
|
|
|
+ ['Inspection_1000W_Control', 'PLC'],
|
|
|
+ ['Packing_1000W_Control', 'PLC'],
|
|
|
+
|
|
|
+ ['Rgv1CurrStatus', 'RGV1'],
|
|
|
+ ['Rgv1CurrBatlevel', 'RGV1']
|
|
|
+ ]);
|
|
|
+
|
|
|
+ static readonly stationLightMap: Map<string, string[]> = new Map([
|
|
|
+ ['装调工位1', ['Assemble_500W_Control', 'Assemble_1000W_Control']],
|
|
|
+ ['装调工位2', ['Debugging_500W_Control', 'Debugging_1000W_Control']],
|
|
|
+ ['出入库工位', ['Stokinout_500W_Control', 'Stokinout_1000W_Control']],
|
|
|
+ ['检验工位', ['Inspection_500W_Control', 'Inspection_1000W_Control']],
|
|
|
+ ['包装工位', ['Packing_500W_Control', 'Packing_1000W_Control']],
|
|
|
+ ['仓储充电位1', ['Charging1Set']],
|
|
|
+ ['仓储充电位2', ['Charging2Set']],
|
|
|
+ ])
|
|
|
+}
|
|
|
+
|
|
|
+export enum DeviceType {
|
|
|
+ ThreeColourLight = 'SSD',
|
|
|
+ WeldFumeExtractor = 'HYPYJ',
|
|
|
+ ElectricSolderingIron = 'WKDLT',
|
|
|
+ ElectricScrewdriver = 'DDLSD',
|
|
|
+ AntiWristStrap = 'FJDJC',
|
|
|
+ CardReader = 'DKQ',
|
|
|
+ Lighting = 'ZM',
|
|
|
+ TempHumiditySensor = 'WSDCGQ',
|
|
|
+ PlcControl = 'PLC',
|
|
|
+ RGV1 = 'RGV1',
|
|
|
+}
|