| | |
| | | package com.hdl.sdk.ttl.HDLDeviceManger.Parser; |
| | | |
| | | import static com.hdl.sdk.ttl.HDLDeviceManger.Core.HDLDeviceManager.devicesDataList; |
| | | |
| | | import android.util.Log; |
| | | |
| | | import com.hdl.sdk.ttl.Config.Configuration; |
| | | import com.hdl.sdk.ttl.HDLAppliances.Config.HDLApConfig; |
| | | import com.hdl.sdk.ttl.HDLDeviceManger.Bean.AppliancesInfo; |
| | | import com.hdl.sdk.ttl.HDLDeviceManger.Bean.DevicesData; |
| | | import com.hdl.sdk.ttl.HDLDeviceManger.Core.HDLDeviceManager; |
| | | import com.hdl.sdk.ttl.HDLDeviceManger.Core.HandleSearch; |
| | | import com.hdl.sdk.ttl.Utils.LogUtils.HDLLog; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static com.hdl.sdk.ttl.HDLDeviceManger.Core.HDLDeviceManager.devicesDataList; |
| | | |
| | | /** |
| | | * Created by djl on 2017/3/29. |
| | |
| | | */ |
| | | public static boolean parse(byte[] addBytes, DevicesData devicesData, String parentRemarks) { |
| | | boolean isExitData = false; |
| | | int residue = addBytes.length - 22; |
| | | int residue = addBytes.length - 8; |
| | | int sumCount = residue / 3;//记录总共有多少种设备 |
| | | List<AppliancesInfo> appliancesInfoList = new ArrayList<>(); |
| | | if (sumCount == 0) { |
| | |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | appliancesInfoList.add(appliancesInfo); |
| | | } |
| | | // HDLLog.I("sumCount" + sumCount); |
| | | // 00008 2023年11月29日16:58:01:800: 0F FE 58 01 A8 F5 48 64 00 0F 18 00 00 3E A0 |
| | | // 00009 2023年11月29日16:58:01:816: 16 64 00 11 F7 F5 49 FE 58 0F 18 00 03 00 01 2A 60 07 03 01 35 59 |
| | | // 00010 2023年11月29日16:58:01:832: 19 64 00 11 F7 F5 49 FE 58 0F 18 00 03 00 02 64 80 05 09 01 0E 04 01 FE 35 |
| | | // 00011 2023年11月29日16:58:01:848: 16 64 00 11 F7 F5 49 FE 58 0F 18 00 03 00 03 64 0A 01 01 04 D5 C7 |
| | | int curCount = 0;//循环遍历所有设备次数 |
| | | while (curCount < sumCount) { |
| | | int bigType = addBytes[21 + (2 * curCount) + (curCount + 1)] & 0xFF; |
| | | int littleType = addBytes[21 + (2 * curCount) + (curCount + 2)] & 0xFF; |
| | | int channelNum = addBytes[21 + (2 * curCount) + (curCount + 3)] & 0xFF; |
| | | |
| | | int subnetID = addBytes[6] & 0xFF; |
| | | int deviceID = addBytes[7] & 0xFF; |
| | | devicesData.setDeviceSubnetID(subnetID); |
| | | devicesData.setDeviceDeviceID(deviceID); |
| | | |
| | | int bigType = addBytes[7 + (2 * curCount) + (curCount + 1)] & 0xFF; |
| | | int littleType = addBytes[7 + (2 * curCount) + (curCount + 2)] & 0xFF; |
| | | //通道总数 |
| | | int channelNum = addBytes[7 + (2 * curCount) + (curCount + 3)] & 0xFF; |
| | | |
| | | curCount++; |
| | | int curChannelNum = 0; |
| | | int index = 0; |
| | | while (curChannelNum < channelNum) { |
| | | curChannelNum++; |
| | | curChannelNum++;//有可能不是从1开始的,所以增加index判断 |
| | | index++; |
| | | if (isWantData(bigType, littleType)) { |
| | | AppliancesInfo appliancesInfo = new AppliancesInfo(); |
| | | appliancesInfo.setDeviceSubnetID(subnetID); |
| | | appliancesInfo.setDeviceDeviceID(deviceID); |
| | | |
| | | /**根据类别,赋值操作码等一些重要信息*/ |
| | | switch (bigType) { |
| | | case Configuration.LIGTH_BIG_TYPE: |
| | | parseLightData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseLightData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.CURTAIN_BIG_TYPE: |
| | | parseCurtainData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseCurtainData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.AIR_BIG_TYPE: |
| | | parseAirData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseAirData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.AUDIO_BIG_TYPE: |
| | | parseAudioData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseAudioData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.LOGIC_BIG_TYPE: |
| | | parseLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.GLOBAL_LOGIC_BIG_TYPE: |
| | | parseGlobalLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseGlobalLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.SECURITY_BIG_TYPE://2019-7-29 新增 |
| | | parseSecurityData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseSecurityData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.SENSOR_BIG_TYPE://2019-07-03 屏蔽 |
| | | parseSensorData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | case Configuration.SENSOR_BIG_TYPE: |
| | | parseSensorData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.COMMON_SWITCH_BIG_TYPE://2020-04-01 通用开关 |
| | | parseCommonSwitchData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseCommonSwitchData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | |
| | | case Configuration.FRESH_AIR_BIG_TYPE://2020-07-20 新增新风 |
| | | parseFreshAirData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.GEOTHERMAL_BIG_TYPE://地热 |
| | | parseGeothermalData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.DOOR_MACHINE_BIG_TYPE://门锁 |
| | | parseDoorMachineData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | default: |
| | | // appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | |
| | | |
| | | appliancesInfo.setDeviceKey(key);//2019-8-2 添加唯一标识key |
| | | appliancesInfoList.add(appliancesInfo); |
| | | // HDLLog.I( "向模块添加回路:"+"大类:" + bigType + " 小类:" + littleType +" 模块备注" + devicesData.getRemark() ); |
| | | HDLLog.I("向模块添加回路:" + "大类:" + bigType + " 小类:" + littleType + " 模块备注" + devicesData.getRemark()); |
| | | } else { |
| | | // HDLLog.I( "不是要添加的设备:大类:" + bigType + " 小类:" + littleType +" 模块备注" + devicesData.getRemark() ); |
| | | HDLLog.I("不是要添加的设备:大类:" + bigType + " 小类:" + littleType + " 模块备注" + devicesData.getRemark()); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param littleType |
| | | * @return SDK目前支持的大类:小类 |
| | | * 灯光类1:0 ,1,9,10 |
| | | * 窗帘类2:0,1,2 |
| | | * 窗帘类2:0,1,2,6 |
| | | * 传感器5:0~24 |
| | | * 空调类7:0,3 |
| | | * 背景音乐功能9:0 |
| | |
| | | case Configuration.LIGTH_BIG_TYPE: |
| | | switch (littleType) { |
| | | case 0: |
| | | isWant = true; |
| | | break; |
| | | case 1: |
| | | isWant = true; |
| | | break; |
| | | case 2: |
| | | case 3: |
| | | case 7: |
| | | case 8: |
| | | case 9: |
| | | isWant = true; |
| | | break; |
| | | case 10: |
| | | isWant = true; |
| | | break; |
| | |
| | | case Configuration.CURTAIN_BIG_TYPE: |
| | | switch (littleType) { |
| | | case 0: |
| | | isWant = true; |
| | | break; |
| | | case 1: |
| | | isWant = true; |
| | | break; |
| | | case 2: |
| | | case 6: |
| | | isWant = true; |
| | | break; |
| | | default: |
| | |
| | | case Configuration.AIR_BIG_TYPE: |
| | | switch (littleType) { |
| | | case 0: |
| | | isWant = true; |
| | | break; |
| | | case 3: |
| | | case 100: |
| | | case 101: |
| | | isWant = true; |
| | | break; |
| | | default: |
| | |
| | | break; |
| | | } |
| | | break; |
| | | case Configuration.SENSOR_BIG_TYPE: //屏蔽传感器大类 |
| | | // if (littleType >= 0 && littleType <= 27) { |
| | | // isWant = true; |
| | | // } else { |
| | | // isWant = false; |
| | | // } |
| | | |
| | | if (littleType == 1 || littleType == 9 || littleType == 11 || (littleType > 24 && littleType <= 27)) {//2019-11-5 改为只支持6种感应器 |
| | | case Configuration.SENSOR_BIG_TYPE: |
| | | if (littleType == 1 || littleType == 2 || littleType == 3 |
| | | || (littleType > 4 && littleType <= 11) |
| | | || littleType == 20 || (littleType > 24 && littleType <= 27) |
| | | || littleType == 32) { |
| | | isWant = true; |
| | | } else { |
| | | isWant = false; |
| | |
| | | break; |
| | | } |
| | | break; |
| | | case Configuration.FRESH_AIR_BIG_TYPE://新风设备 2020-07-20 |
| | | switch (littleType) { |
| | | case 0: |
| | | case 1: |
| | | isWant = true; |
| | | break; |
| | | default: |
| | | isWant = false; |
| | | break; |
| | | } |
| | | break; |
| | | case Configuration.GEOTHERMAL_BIG_TYPE://地热设备 2020-07-20 |
| | | switch (littleType) { |
| | | case 0: |
| | | case 3: |
| | | isWant = true; |
| | | break; |
| | | default: |
| | | isWant = false; |
| | | break; |
| | | } |
| | | break; |
| | | case Configuration.DOOR_MACHINE_BIG_TYPE://门锁设备 2023-08-22 |
| | | switch (littleType) { |
| | | case 4: |
| | | isWant = true; |
| | | break; |
| | | default: |
| | | isWant = false; |
| | | break; |
| | | } |
| | | break; |
| | | default: |
| | | isWant = false; |
| | | break; |
| | |
| | | } |
| | | |
| | | |
| | | private static void parseLightData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseLightData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("调光回路"); |
| | |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_LIGHT_RELAY); |
| | | break; |
| | | case 2: |
| | | appliancesInfo.setDeviceName("逻辑灯控制"); |
| | | appliancesInfo.setDeviceName("逻辑灯控制CCT"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_LIGHT_CCT); |
| | | break; |
| | | case 3: |
| | | appliancesInfo.setDeviceName("逻辑灯RGB"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_LIGHT_RGB); |
| | | break; |
| | | case 4: |
| | | appliancesInfo.setDeviceName("逻辑灯RGBW"); |
| | |
| | | break; |
| | | case 7: |
| | | appliancesInfo.setDeviceName("DALI"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_LIGHT_DALI); |
| | | break; |
| | | case 8: |
| | | appliancesInfo.setDeviceName("自定义逻辑灯"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_LIGHT_DMX); |
| | | break; |
| | | case 9: |
| | | appliancesInfo.setDeviceName("混合调光类"); |
| | |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.LIGTH_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setCtrlCommand(Configuration.LIGHT_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.LIGHT_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.LIGHT_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.LIGHT_STATE_BACK_COMMAND); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | |
| | | if (appliancesInfo.getDeviceType() == HDLApConfig.TYPE_LIGHT_CCT || appliancesInfo.getDeviceType() == HDLApConfig.TYPE_LIGHT_RGB || appliancesInfo.getDeviceType() == HDLApConfig.TYPE_LIGHT_DALI || appliancesInfo.getDeviceType() == HDLApConfig.TYPE_LIGHT_DMX) { |
| | | appliancesInfo.setCtrlCommand(Configuration.LIGHT_RGB_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.LIGHT_RGB_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.LIGHT_RGB_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.LIGHT_RGB_STATE_BACK_COMMAND); |
| | | } else { |
| | | appliancesInfo.setCtrlCommand(Configuration.LIGHT_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.LIGHT_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.LIGHT_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.LIGHT_STATE_BACK_COMMAND); |
| | | } |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | } |
| | | } |
| | | |
| | | private static void parseCurtainData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseCurtainData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("开合帘电机"); |
| | |
| | | appliancesInfo.setDeviceName("窗帘模块"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_CURTAIN_MODULE); |
| | | break; |
| | | case 6: |
| | | appliancesInfo.setDeviceName("香格里拉帘电机"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_CURTAIN_SHANGRILA); |
| | | break; |
| | | default: |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.CURTAIN_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setCtrlCommand(Configuration.CURTAIN_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.CURTAIN_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.CURTAIN_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.CURTAIN_STATE_BACK_COMMAND); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | } |
| | | } |
| | | |
| | | private static void parseAirData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseAirData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("HVAC 模块"); |
| | |
| | | appliancesInfo.setDeviceName("通用空调面板"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_AC_PANEL); |
| | | break; |
| | | case 100: |
| | | appliancesInfo.setDeviceName("科技系统"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_AC_TECHSYS); |
| | | break; |
| | | case 101: |
| | | appliancesInfo.setDeviceName("KNX科技系统"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_AC_KNXTECHSYS); |
| | | break; |
| | | default: |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.AIR_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | if (littleType == 0) { |
| | | if (littleType == 0 || littleType == 100 || littleType == 101) {//科技系统走0x193A和0x1938 |
| | | appliancesInfo.setCtrlCommand(Configuration.AIR_HVAC_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.AIR_HVAC_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.AIR_HVAC_STATE_COMMAND); |
| | |
| | | } |
| | | } |
| | | |
| | | private static void parseAudioData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseAudioData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("背景音乐模块"); |
| | |
| | | |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.AUDIO_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setCtrlCommand(Configuration.AUDIO_CTRL_READ_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.AUDIO_CTRL_READ_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.AUDIO_MenuPlay_INSTRUCTION_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.AUDIO_MenuPlay_INSTRUCTION_BACK_COMMAND); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | } |
| | | HDLLog.I("音乐模块:" + parentRemarks); |
| | | } |
| | | |
| | | private static void parseLogicData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseLogicData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("逻辑模块"); |
| | |
| | | |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.LOGIC_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setCtrlCommand(Configuration.LOGIC_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.LOGIC_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.LOGIC_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.LOGIC_STATE_BACK_COMMAND); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | private static void parseGlobalLogicData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseGlobalLogicData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("全局逻辑模块"); |
| | |
| | | |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.GLOBAL_LOGIC_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setCtrlCommand(Configuration.LOGIC_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.LOGIC_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.LOGIC_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.LOGIC_STATE_BACK_COMMAND); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | * @param port |
| | | * @param ipAddress |
| | | */ |
| | | private static void parseSecurityData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseSecurityData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("安防模块"); |
| | |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.SECURITY_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | // appliancesInfo.setPort(port); |
| | | // appliancesInfo.setIpAddress(ipAddress); |
| | | appliancesInfo.setCtrlCommand(Configuration.SECURITY_ARMING_CTRL_COMMAND);//布防 |
| | | appliancesInfo.setCtrlBackCommand(Configuration.SECURITY_ARMING_CTRL_BACK_COMMAND);//布防设置反馈 |
| | | appliancesInfo.setStateCommand(Configuration.SECURITY_STATE_COMMAND);//读取安防设置 |
| | |
| | | |
| | | |
| | | // 2019-07-03 屏蔽 2019-11-5 传感器都改为干接点实现 |
| | | private static void parseSensorData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int curChannelNum, int port, String ipAddress) { |
| | | private static void parseSensorData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("传感器 干结点"); |
| | |
| | | appliancesInfo.setDeviceName("传感器 紧急按钮"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_SENSOR_EMERGENCY_BUTTON); |
| | | break; |
| | | case 32: |
| | | appliancesInfo.setDeviceName("传感器 PM10"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_SENSOR_PM_10); |
| | | break; |
| | | |
| | | default: |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | |
| | | |
| | | |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(curChannelNum); |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.SENSOR_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | // appliancesInfo.setCtrlCommand(Configuration.LOGIC_CTRL_COMMAND); |
| | | // appliancesInfo.setCtrlBackCommand(Configuration.LOGIC_CTRL_BACK_COMMAND); |
| | | // appliancesInfo.setStateCommand(Configuration.SENSOR_STATE_COMMAND); |
| | | // appliancesInfo.setStateBackCommand(Configuration.SENSOR_STATE_BACK_COMMAND); |
| | | |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | |
| | | if (littleType == 1) {//吸顶红外传感器 |
| | | appliancesInfo.setStateCommand(Configuration.DRY_CONTACT_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.DRY_CONTACT_STATE_BACK_COMMAND); |
| | | } else { |
| | | |
| | | appliancesInfo.setStateCommand(Configuration.DRY_CONTACT_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.DRY_CONTACT_STATE_BACK_COMMAND); |
| | | |
| | | } |
| | | appliancesInfo.setStateCommand(Configuration.SENSOR_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.SENSOR_STATE_BACK_COMMAND); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 2020-07-20 |
| | | * 新风系统 |
| | | */ |
| | | private static void parseFreshAirData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("新风系统模块"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_FRESH_AIR); |
| | | appliancesInfo.setCtrlCommand(Configuration.FRESH_AIR_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.FRESH_AIR_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.FRESH_AIR_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.FRESH_AIR_STATE_BACK_COMMAND); |
| | | break; |
| | | case 1: |
| | | appliancesInfo.setDeviceName("金茂新风"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_FRESH_AIR_JINMAO); |
| | | appliancesInfo.setCtrlCommand(Configuration.FRESH_AIR_JINMAO_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.FRESH_AIR_JINMAO_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.FRESH_AIR_JINMAO_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.FRESH_AIR_JINMAO_STATE_BACK_COMMAND); |
| | | break; |
| | | default: |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | | } |
| | | |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.FRESH_AIR_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 地热 |
| | | */ |
| | | private static void parseGeothermalData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("地热模块"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_GEOTHERMAL_MODULE); |
| | | break; |
| | | // case 1: |
| | | // appliancesInfo.setDeviceName("常规地热面板"); |
| | | // appliancesInfo.setDeviceType(HDLApConfig.TYPE_GEOTHERMAL_MODULE_PANEL); |
| | | // break; |
| | | // case 2: |
| | | // appliancesInfo.setDeviceName("带PI运算的地热面板"); |
| | | // appliancesInfo.setDeviceType(HDLApConfig.TYPE_GEOTHERMAL_MODULE_PI); |
| | | // break; |
| | | case 3: |
| | | appliancesInfo.setDeviceName("特殊地热模块"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_GEOTHERMAL_JINMAO); |
| | | break; |
| | | default: |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | | |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.GEOTHERMAL_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | |
| | | appliancesInfo.setCtrlCommand(Configuration.GEOTHERMAL_MODULE_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.GEOTHERMAL_MODULE_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.GEOTHERMAL_MODULE_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.GEOTHERMAL_MODULE_STATE_BACK_COMMAND); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 门锁 |
| | | */ |
| | | private static void parseDoorMachineData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 4: |
| | | appliancesInfo.setDeviceName("门锁模块"); |
| | | appliancesInfo.setDeviceType(HDLApConfig.TYPE_DOOR_MACHINE); |
| | | break; |
| | | default: |
| | | appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.DOOR_MACHINE_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | |
| | | appliancesInfo.setCtrlCommand(Configuration.DOOR_MACHINE_MODULE_CTRL_COMMAND); |
| | | appliancesInfo.setCtrlBackCommand(Configuration.DOOR_MACHINE_MODULE_CTRL_BACK_COMMAND); |
| | | appliancesInfo.setStateCommand(Configuration.DOOR_MACHINE_MODULE_STATE_COMMAND); |
| | | appliancesInfo.setStateBackCommand(Configuration.DOOR_MACHINE_MODULE_STATE_BACK_COMMAND); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 2020-04-01 |
| | | * 新增通用开关 |
| | | * |
| | | * @param littleType |
| | | * @param appliancesInfo |
| | | * @param devicesData |
| | |
| | | * @param port |
| | | * @param ipAddress |
| | | */ |
| | | private static void parseCommonSwitchData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int port, String ipAddress) { |
| | | private static void parseCommonSwitchData(int littleType, AppliancesInfo appliancesInfo, DevicesData devicesData, String parentRemarks, int channelNum, int index, String ipAddress) { |
| | | switch (littleType) { |
| | | case 0: |
| | | appliancesInfo.setDeviceName("通用开关"); |
| | |
| | | } |
| | | if (devicesData != null) { |
| | | appliancesInfo.setChannelNum(channelNum); |
| | | appliancesInfo.setDeviceIndex(index); |
| | | appliancesInfo.setBigType(Configuration.COMMON_SWITCH_BIG_TYPE); |
| | | appliancesInfo.setLittleType(littleType); |
| | | appliancesInfo.setDeviceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setDeviceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setSourceSubnetID(devicesData.getSourceSubnetID()); |
| | | appliancesInfo.setSourceDeviceID(devicesData.getSourceDeviceID()); |
| | | appliancesInfo.setParentRemarks(parentRemarks); |
| | | |
| | | appliancesInfo.setCtrlCommand(Configuration.COMMON_SWITCH_CTRL_COMMAND);//布防 |
| | |
| | | * @param mRemarks |
| | | * @return |
| | | */ |
| | | public static DevicesData addDevicesManuallyWithoutSearching(int mBigType, int mLittleType, int mSubnetID, int mDeviceID, int mChannelNum, String mRemarks) { |
| | | public static DevicesData addDevicesManuallyWithoutSearching(int mBigType, int mLittleType, int mSubnetID, int mDeviceID, int mChannelNum, int mIndex, String mRemarks) { |
| | | boolean bWantData = false; |
| | | DevicesData mDevicesData = new DevicesData(); |
| | | mDevicesData.setSourceSubnetID(mSubnetID); |
| | |
| | | List<AppliancesInfo> appliancesInfoList = new ArrayList<>(); |
| | | if (isWantData(mBigType, mLittleType)) { |
| | | bWantData = true; |
| | | AppliancesInfo appliancesInfo = getDevicesInfo(mDevicesData, mBigType, mLittleType, mChannelNum, mRemarks, mRemarks); |
| | | AppliancesInfo appliancesInfo = getDevicesInfo(mDevicesData, mBigType, mLittleType, mChannelNum, mIndex, mRemarks, mRemarks); |
| | | |
| | | appliancesInfoList.add(appliancesInfo); |
| | | // HDLLog.I( "向模块添加回路:"+"大类:" + mBigType + " 小类:" + mLittleType +" 模块备注" + mRemarks ); |
| | |
| | | List<AppliancesInfo> appliancesInfoList = new ArrayList<>(); |
| | | if (isWantData(bigType, littleType)) { |
| | | for (int i = 0; i < parentRemarksList.size(); i++) { |
| | | appliancesInfoList.add(getDevicesInfo(devicesData, bigType, littleType, i + 1, parentRemarks, parentRemarksList.get(i))); |
| | | appliancesInfoList.add(getDevicesInfo(devicesData, bigType, littleType, i + 1, i+1, parentRemarks, parentRemarksList.get(i))); |
| | | } |
| | | bWantData = true; |
| | | |
| | |
| | | return devicesData; |
| | | } |
| | | |
| | | public static AppliancesInfo getDevicesInfo(DevicesData devicesData, int bigType, int littleType, int curChannelNum, String parentRemarks, String mRemarks) { |
| | | public static AppliancesInfo getDevicesInfo(DevicesData devicesData, int bigType, int littleType, int curChannelNum, int index, String parentRemarks, String mRemarks) { |
| | | AppliancesInfo appliancesInfo = new AppliancesInfo(); |
| | | /**根据类别,赋值操作码等一些重要信息*/ |
| | | switch (bigType) { |
| | | case Configuration.LIGTH_BIG_TYPE: |
| | | parseLightData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseLightData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.CURTAIN_BIG_TYPE: |
| | | parseCurtainData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseCurtainData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.AIR_BIG_TYPE: |
| | | parseAirData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseAirData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.AUDIO_BIG_TYPE: |
| | | parseAudioData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseAudioData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.LOGIC_BIG_TYPE: |
| | | parseLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.GLOBAL_LOGIC_BIG_TYPE: |
| | | parseGlobalLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseGlobalLogicData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.SECURITY_BIG_TYPE://2019-7-29 新增 |
| | | parseSecurityData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseSecurityData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.SENSOR_BIG_TYPE://2019-07-03 屏蔽 |
| | | parseSensorData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | case Configuration.SENSOR_BIG_TYPE: |
| | | parseSensorData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.COMMON_SWITCH_BIG_TYPE://2020-04-01 通用开关 |
| | | parseCommonSwitchData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, 0, ""); |
| | | parseCommonSwitchData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | |
| | | case Configuration.FRESH_AIR_BIG_TYPE://2020-07-20 新增新风 |
| | | parseFreshAirData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.GEOTHERMAL_BIG_TYPE://2020-07-20 地热 |
| | | parseGeothermalData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | case Configuration.DOOR_MACHINE_BIG_TYPE://2023-08-22 门锁 |
| | | parseDoorMachineData(littleType, appliancesInfo, devicesData, parentRemarks, curChannelNum, index, ""); |
| | | break; |
| | | default: |
| | | // appliancesInfo.setDeviceName(Configuration.UNKNOW_TYPE); |
| | | break; |
| | |
| | | + "-" + appliancesInfo.getDeviceSubnetID() |
| | | + "-" + appliancesInfo.getDeviceDeviceID() |
| | | + "-" + appliancesInfo.getChannelNum(); |
| | | appliancesInfo.setRemarks(mRemarks); |
| | | // appliancesInfo.setRemarks(mRemarks); |
| | | HDLLog.I("---getDevicesInfo getRemarks():" + appliancesInfo.getRemarks()); |
| | | appliancesInfo.setDeviceKey(key);//2019-8-2 添加唯一标识key |
| | | return appliancesInfo; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * |
| | | * 添加设备回路 |
| | | * 如果存在相同子网号 设备号,则当成混合模块添加到该回路下,不存在则新添加模块 |
| | | * |
| | | * @param bigType |
| | | * @param littleType |
| | | * @param mSubnetID |
| | |
| | | * @param parentRemarks |
| | | * @return |
| | | */ |
| | | public static DevicesData addDevicesListWithoutSearching(int bigType, int littleType, int mSubnetID, int mDeviceID, int mChannelNum, String mChannelRemark, String parentRemarks) { |
| | | public static DevicesData addDevicesListWithoutSearching(int bigType, int littleType, int mSubnetID, int mDeviceID, int mChannelNum, int mIndex, String mChannelRemark, String parentRemarks) { |
| | | // boolean bWantData = false; |
| | | if (isWantData(bigType, littleType)) { |
| | | DevicesData devicesData = new DevicesData(); |
| | |
| | | |
| | | |
| | | if (isFindDevicesData) { |
| | | AppliancesInfo mAppliancesInfo = getDevicesInfo(devicesData, bigType, littleType, mChannelNum, parentRemarks, mChannelRemark); |
| | | AppliancesInfo mAppliancesInfo = getDevicesInfo(devicesData, bigType, littleType, mChannelNum, mIndex, parentRemarks, mChannelRemark); |
| | | devicesDataList.get(index).getAppliancesInfoList().add(mAppliancesInfo); |
| | | devicesData = devicesDataList.get(index); |
| | | HandleSearch.OnDeviceListGetSuccessCallBack(); |
| | | } else { |
| | | List<AppliancesInfo> appliancesInfoList = new ArrayList<>(); |
| | | appliancesInfoList.add(getDevicesInfo(devicesData, bigType, littleType, mChannelNum, parentRemarks, mChannelRemark)); |
| | | appliancesInfoList.add(getDevicesInfo(devicesData, bigType, littleType, mChannelNum, mIndex, parentRemarks, mChannelRemark)); |
| | | devicesData.setAppliancesInfoList(appliancesInfoList); |
| | | devicesDataList.add(devicesData); |
| | | HandleSearch.OnDeviceListGetSuccessCallBack(); |