红河财经IBP盘;

This commit is contained in:
joylink_zhangsai 2022-06-10 09:45:31 +08:00
parent 945a076455
commit 4b3d22fd47
4 changed files with 1269 additions and 178 deletions

View File

@ -188,4 +188,6 @@ public interface DeviceService {
void addOrUpdateRichorDeviceConfig(AccountVO accountVO);
void addOrUpdateSrDeviceConfig(AccountVO accountVO, Long mapId);
void addOrUpdateHhcjDeviceConfig(AccountVO accountVO, Long mapId);
}

View File

@ -7,7 +7,6 @@ import club.joylink.rtss.entity.ProjectDevice;
import club.joylink.rtss.entity.ProjectDeviceExample;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.services.IMapService;
import club.joylink.rtss.simulation.cbtc.data.map.Section;
import club.joylink.rtss.util.JsonUtils;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.LoginUserInfoVO;
@ -15,6 +14,7 @@ import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.project.*;
import club.joylink.rtss.vo.client.project.gzb.GzbSignalConfigVO;
import club.joylink.rtss.vo.client.project.gzb.GzbSwitchConfigVO;
import club.joylink.rtss.vo.client.project.hhcj.HhcjIbpConfigVO;
import club.joylink.rtss.vo.client.project.richor.ZjdIbpConfigVO;
import club.joylink.rtss.vo.client.project.richor.ZjdPsdConfigVO;
import club.joylink.rtss.vo.client.project.richor.ZjdPslConfigVO;
@ -447,6 +447,49 @@ public class DeviceServiceImpl implements DeviceService {
}
}
@Override
public void addOrUpdateHhcjDeviceConfig(AccountVO accountVO, Long mapId) {
// 删除旧配置
ProjectDeviceExample example = new ProjectDeviceExample();
example.createCriteria()
.andProjectCodeEqualTo(Project.RICHOR_HHCJ.name())
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
.map(Enum::name).collect(Collectors.toList()));
this.projectDeviceDAO.deleteByExample(example);
// 保存新配置
List<ProjectDevice> list = this.buildHhcjProjectDevices(accountVO, mapId);
for (ProjectDevice projectDevice : list) {
this.projectDeviceDAO.insert(projectDevice);
}
}
private List<ProjectDevice> buildHhcjProjectDevices(AccountVO accountVO, long mapId) {
LocalDateTime now = LocalDateTime.now();
List<ProjectDevice> list = new ArrayList<>();
// PLC网关
ProjectDevice plcGateway = new ProjectDevice();
plcGateway.setProjectCode(Project.RICHOR_JOINT.name());
plcGateway.setCode("hhcj-gateway");
plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name());
plcGateway.setCreator(accountVO.getId());
plcGateway.setCreateTime(now);
PlcGatewayConfigVO plcGatewayConfigVO = new PlcGatewayConfigVO(0, 304);
plcGateway.setConfig(plcGatewayConfigVO.toJson());
list.add(plcGateway);
// IBP盘
ProjectDevice ibp = new ProjectDevice();
ibp.setProjectCode(Project.RICHOR_HHCJ.name());
ibp.setCode("hhcj-ibp");
ibp.setType(ProjectDeviceType.IBP.name());
ibp.setCreator(accountVO.getId());
ibp.setCreateTime(now);
HhcjIbpConfigVO ibpConfigVO = new HhcjIbpConfigVO();
ibp.setConfig(ibpConfigVO.toJson());
list.add(ibp);
return list;
}
private List<ProjectDevice> buildSrProjectDevices(AccountVO accountVO, long mapId) {
LocalDateTime now = LocalDateTime.now();
List<ProjectDevice> list = new ArrayList<>();

View File

@ -43,67 +43,99 @@ public class HhcjIbpServiceImpl implements RealDeviceService {
return;
HhcjIbpConfigVO configVO = config.getConfigVO();
ByteBuf deviceStatus = RealDeviceConfig.getDeviceCoilStatus(byteBuf, configVO.getAddr(), configVO.getQuantity());
boolean r_xx_cz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xx_cz());
boolean r_xx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xx_smkm());
boolean r_xx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xx_km());
boolean r_xx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xx_gm());
boolean r_xx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xx_hsjc());
boolean r_xy = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xy());
//------------------------------ 信号和屏蔽门 ------------------------------
boolean r_xh_xx_kc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_xx_kc());
boolean r_xh_xx_zzkc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_xx_zzkc());
boolean r_xh_xx_qxjt = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_xx_qxjt());
boolean r_xh_xx_jjtc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_xx_jjtc());
boolean r_xh_sx_kc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_sx_kc());
boolean r_xh_sx_zzkc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_sx_zzkc());
boolean r_xh_sx_qxjt = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_sx_qxjt());
boolean r_xh_sx_jjtc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_sx_jjtc());
boolean r_xh_qdbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_qdbj());
boolean r_xh_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xh_sd());
boolean r_psd_xx_cz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_xx_cz());
boolean r_psd_xx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_xx_smkm());
boolean r_psd_xx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_xx_km());
boolean r_psd_xx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_xx_gm());
boolean r_psd_xx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_xx_hsjc());
boolean r_psd_xy = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_xy());
boolean r_psd_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_sd());
boolean r_sx_cz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sx_cz());
boolean r_sx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sx_smkm());
boolean r_sx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sx_km());
boolean r_sx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sx_gm());
boolean r_sx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sx_hsjc());
boolean r_psd_sx_cz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_sx_cz());
boolean r_psd_sx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_sx_smkm());
boolean r_psd_sx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_sx_km());
boolean r_psd_sx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_sx_gm());
boolean r_psd_sx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_psd_sx_hsjc());
boolean w_xx_czyx = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_czyx());
boolean w_xx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_smkm());
boolean w_xx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_km());
boolean w_xx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_gm());
boolean w_xx_gbsj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_gbsj());
boolean w_xx_dk = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_dk());
boolean w_xx_sdcz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_sdcz());
boolean w_xx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xx_hsjc());
boolean w_gzbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_gzbj());
boolean w_xh_xx_kc_light = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xh_xx_kc_light());
boolean w_xh_xx_jjtc_light = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xh_xx_jjtc_light());
boolean w_xh_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xh_fmq());
boolean w_xh_sx_kc_light = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xh_sx_kc_light());
boolean w_xh_sx_jjtc_light = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xh_sx_jjtc_light());
boolean w_psd_xx_czyx = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_czyx());
boolean w_psd_xx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_smkm());
boolean w_psd_xx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_km());
boolean w_psd_xx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_gm());
boolean w_psd_xx_gbsj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_gbsj());
boolean w_psd_xx_dk = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_dk());
boolean w_psd_xx_sdcz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_sdcz());
boolean w_psd_xx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_xx_hsjc());
boolean w_psd_gzbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_gzbj());
boolean w_psd_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_fmq());
boolean w_sx_czyx = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_czyx());
boolean w_sx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_smkm());
boolean w_sx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_km());
boolean w_sx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_gm());
boolean w_sx_gbsj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_gbsj());
boolean w_sx_dk = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_dk());
boolean w_sx_sdcz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_sdcz());
boolean w_sx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sx_hsjc());
boolean w_psd_sx_czyx = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_czyx());
boolean w_psd_sx_smkm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_smkm());
boolean w_psd_sx_km = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_km());
boolean w_psd_sx_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_gm());
boolean w_psd_sx_gbsj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_gbsj());
boolean w_psd_sx_dk = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_dk());
boolean w_psd_sx_sdcz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_sdcz());
boolean w_psd_sx_hsjc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_psd_sx_hsjc());
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_CZYX_LIGHT, false, w_xx_czyx);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SMKM, false, w_xx_smkm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.KM, false, w_xx_km);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.GM, false, w_xx_gm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.gmLight, false, w_xx_gbsj);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kmLight, false, w_xx_dk);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SDCZ_LIGHT, false, w_xx_sdcz);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_HSJC_LIGHT, false, w_xx_hsjc);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_GZBJ_LIGHT, null, w_gzbj);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kcLight, false, w_xh_xx_kc_light);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.jjtcLight, false, w_xh_xx_jjtc_light);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.ALARM, null, w_xh_fmq);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kcLight, true, w_xh_sx_kc_light);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kcLight, true, w_xh_sx_jjtc_light);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_CZYX_LIGHT, false, w_psd_xx_czyx);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SMKM, false, w_psd_xx_smkm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.KM, false, w_psd_xx_km);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.GM, false, w_psd_xx_gm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.gmLight, false, w_psd_xx_gbsj);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kmLight, false, w_psd_xx_dk);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SDCZ_LIGHT, false, w_psd_xx_sdcz);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_HSJC_LIGHT, false, w_psd_xx_hsjc);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_GZBJ_LIGHT, null, w_psd_gzbj);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_ALARM, null, w_psd_fmq);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_CZYX_LIGHT, true, w_sx_czyx);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SMKM, true, w_sx_smkm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.KM, true, w_sx_km);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.GM, true, w_sx_gm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.gmLight, true, w_sx_gbsj);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kmLight, true, w_sx_dk);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SDCZ_LIGHT, true, w_sx_sdcz);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_HSJC_LIGHT, true, w_sx_hsjc);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_CZYX_LIGHT, true, w_psd_sx_czyx);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SMKM, true, w_psd_sx_smkm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.KM, true, w_psd_sx_km);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.GM, true, w_psd_sx_gm);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.gmLight, true, w_psd_sx_gbsj);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.kmLight, true, w_psd_sx_dk);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_SDCZ_LIGHT, true, w_psd_sx_sdcz);
iVirtualRealityIbpService.updateOnOrOff(vrIbp, VirtualRealityIbp.Mean.PSD_HSJC_LIGHT, true, w_psd_sx_hsjc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.XXYS, false, r_xx_cz);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KM, false, r_xx_km);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.GM, false, r_xx_gm);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_HSJC, false, r_xx_hsjc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_BJQC, null, r_xy);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KC, false, r_xh_xx_kc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.ZZKC, false, r_xh_xx_zzkc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.JJTC, false, r_xh_xx_jjtc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.QXJJTC, false, r_xh_xx_qxjt);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KC, true, r_xh_sx_kc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.ZZKC, true, r_xh_sx_zzkc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.JJTC, true, r_xh_sx_jjtc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.QXJJTC, true, r_xh_sx_qxjt);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.SD, null, r_xh_sd);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.BJQC, null, r_xh_qdbj);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.XXYS, false, r_psd_xx_cz);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KM, false, r_psd_xx_km);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.GM, false, r_psd_xx_gm);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_HSJC, false, r_psd_xx_hsjc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_BJQC, null, r_psd_xy);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_SD, null, r_psd_sd);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.SXYS, true, r_sx_cz);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KM, true, r_sx_km);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.GM, true, r_sx_gm);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_HSJC, true, r_sx_hsjc);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.SXYS, true, r_psd_sx_cz);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KM, true, r_psd_sx_km);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.GM, true, r_psd_sx_gm);
iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_HSJC, true, r_psd_sx_hsjc);
int baseAddr = plcGateway.getConfig().getAddr() + configVO.getAddr();
Channel channel = plcGateway.getChannel();
@ -119,29 +151,29 @@ public class HhcjIbpServiceImpl implements RealDeviceService {
switch (element.getMean()) {
case KM:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_km();
currentIsOn = w_sx_km;
addr = configVO.getW_psd_sx_km();
currentIsOn = w_psd_sx_km;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_km();
currentIsOn = w_xx_km;
addr = configVO.getW_psd_xx_km();
currentIsOn = w_psd_xx_km;
}
break;
case PSD_SMKM:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_smkm();
currentIsOn = w_sx_smkm;
addr = configVO.getW_psd_sx_smkm();
currentIsOn = w_psd_sx_smkm;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_smkm();
currentIsOn = w_xx_smkm;
addr = configVO.getW_psd_xx_smkm();
currentIsOn = w_psd_xx_smkm;
}
break;
case GM:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_gm();
currentIsOn = w_sx_gm;
addr = configVO.getW_psd_sx_gm();
currentIsOn = w_psd_sx_gm;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_gm();
currentIsOn = w_xx_gm;
addr = configVO.getW_psd_xx_gm();
currentIsOn = w_psd_xx_gm;
}
break;
case PSD_ALARM:
@ -150,57 +182,346 @@ public class HhcjIbpServiceImpl implements RealDeviceService {
break;
case gmLight:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_gbsj();
currentIsOn = w_sx_gbsj;
addr = configVO.getW_psd_sx_gbsj();
currentIsOn = w_psd_sx_gbsj;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_gbsj();
currentIsOn = w_xx_gbsj;
addr = configVO.getW_psd_xx_gbsj();
currentIsOn = w_psd_xx_gbsj;
}
break;
case kmLight:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_dk();
currentIsOn = w_sx_dk;
addr = configVO.getW_psd_sx_dk();
currentIsOn = w_psd_sx_dk;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_dk();
currentIsOn = w_xx_dk;
addr = configVO.getW_psd_xx_dk();
currentIsOn = w_psd_xx_dk;
}
break;
case PSD_CZYX_LIGHT:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_czyx();
currentIsOn = w_sx_czyx;
addr = configVO.getW_psd_sx_czyx();
currentIsOn = w_psd_sx_czyx;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_czyx();
currentIsOn = w_xx_czyx;
addr = configVO.getW_psd_xx_czyx();
currentIsOn = w_psd_xx_czyx;
}
break;
case PSD_HSJC_LIGHT:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_hsjc();
currentIsOn = w_sx_hsjc;
addr = configVO.getW_psd_sx_hsjc();
currentIsOn = w_psd_sx_hsjc;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_hsjc();
currentIsOn = w_xx_hsjc;
addr = configVO.getW_psd_xx_hsjc();
currentIsOn = w_psd_xx_hsjc;
}
break;
case PSD_SDCZ_LIGHT:
if (Objects.equals(true, element.getUp())) {
addr = configVO.getW_sx_sdcz();
currentIsOn = w_sx_sdcz;
addr = configVO.getW_psd_sx_sdcz();
currentIsOn = w_psd_sx_sdcz;
} else if (Objects.equals(false, element.getUp())) {
addr = configVO.getW_xx_sdcz();
currentIsOn = w_xx_sdcz;
addr = configVO.getW_psd_xx_sdcz();
currentIsOn = w_psd_xx_sdcz;
}
break;
case PSD_GZBJ_LIGHT:
addr = configVO.getW_gzbj();
currentIsOn = w_gzbj;
addr = configVO.getW_psd_gzbj();
currentIsOn = w_psd_gzbj;
break;
}
if (addr != null && on != null) {
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, addr, currentIsOn, on, channel);
}
}
//------------------------------ 防淹门和隧道通风 ------------------------------
boolean r_fym_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_gm());
boolean r_fym_sx_kq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_sx_kq());
boolean r_fym_sx_tz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_sx_tz());
boolean r_fym_sx_gb = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_sx_gb());
boolean r_fym_xx_kq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_xx_kq());
boolean r_fym_xx_tz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_xx_tz());
boolean r_fym_xx_gb = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_xx_gb());
boolean r_fym_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_sd());
boolean r_fym_bjfg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_fym_bjfg());
boolean r_sdtf_cthbm11M15 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cthbm11M15());
boolean r_sdtf_cw11M13 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cw11M13());
boolean r_sdtf_czsd11M13 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_czsd11M13());
boolean r_sdtf_czhbm11M13 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_czhbm11M13());
boolean r_sdtf_cw11M14 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cw11M14());
boolean r_sdtf_yxzs11M9 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_yxzs11M9());
boolean r_sdtf_yxzs11M7 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_yxzs11M7());
boolean r_sdtf_zxzs11M8 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_zxzs11M8());
boolean r_sdtf_zxzs11M6 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_zxzs11M6());
boolean r_sdtf_cw11M12 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cw11M12());
boolean r_sdtf_cthbm11M11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cthbm11M11());
boolean r_sdtf_czsd11M11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_czsd11M11());
boolean r_sdtf_cw11M11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cw11M11());
boolean r_sdtf_cthbm11M10 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_sdtf_cthbm11M10());
boolean w_fym_jl = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_jl());
boolean w_fym_jd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_jd());
boolean w_fym_yjswbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_yjswbj());
boolean w_fym_wxswbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_wxswbj());
boolean w_fym_ckkz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_ckkz());
boolean w_fym_xd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xd());
boolean w_fym_jx = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_jx());
boolean w_fym_xtgz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xtgz());
boolean w_fym_gm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_gm());
boolean w_fym_sx_yxgm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sx_yxgm());
boolean w_fym_sx_dzcs = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sx_dzcs());
boolean w_fym_sx_qk = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sx_qk());
boolean w_fym_sx_kq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sx_kq());
boolean w_fym_sx_tz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sx_tz());
boolean w_fym_sx_gb = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sx_gb());
boolean w_fym_xx_yxgm = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xx_yxgm());
boolean w_fym_xx_dzcs = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xx_dzcs());
boolean w_fym_xx_qkd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xx_qkd());
boolean w_fym_xx_kq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xx_kq());
boolean w_fym_xx_tz = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xx_tz());
boolean w_fym_xx_gb = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_xx_gb());
boolean w_fym_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_sd());
boolean w_fym_bjfg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_fym_bjfg());
boolean w_sdtf_cthbm11M15 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cthbm11M15());
boolean w_sdtf_cw11M13 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cw11M13());
boolean w_sdtf_czsd11M13 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_czsd11M13());
boolean w_sdtf_czhbm11M13 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_czhbm11M13());
boolean w_sdtf_cw11M14 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cw11M14());
boolean w_sdtf_yxzs11M9 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_yxzs11M9());
boolean w_sdtf_yxzs11M7 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_yxzs11M7());
boolean w_sdtf_zxzs11M8 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_zxzs11M8());
boolean w_sdtf_zxzs11M6 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_zxzs11M6());
boolean w_sdtf_cw11M12 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cw11M12());
boolean w_sdtf_cthbm11M11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cthbm11M11());
boolean w_sdtf_czsd11M11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_czsd11M11());
boolean w_sdtf_cw11M11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cw11M11());
boolean w_sdtf_cthbm11M10 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_sdtf_cthbm11M10());
// 按钮灯
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_gm(), w_fym_gm, r_fym_gm, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sx_kq(), w_fym_sx_kq, r_fym_sx_kq, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sx_tz(), w_fym_sx_tz, r_fym_sx_tz, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sx_gb(), w_fym_sx_gb, r_fym_sx_gb, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xx_kq(), w_fym_xx_kq, r_fym_xx_kq, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xx_tz(), w_fym_xx_tz, r_fym_xx_tz, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xx_gb(), w_fym_xx_gb, r_fym_xx_gb, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sd(), w_fym_sd, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_bjfg(), w_fym_bjfg, r_fym_bjfg, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cthbm11M15(), w_sdtf_cthbm11M15, r_sdtf_cthbm11M15, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cw11M13(), w_sdtf_cw11M13, r_sdtf_cw11M13, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_czsd11M13(), w_sdtf_czsd11M13, r_sdtf_czsd11M13, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_czhbm11M13(), w_sdtf_czhbm11M13, r_sdtf_czhbm11M13, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cw11M14(), w_sdtf_cw11M14, r_sdtf_cw11M14, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_yxzs11M9(), w_sdtf_yxzs11M9, r_sdtf_yxzs11M9, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_yxzs11M7(), w_sdtf_yxzs11M7, r_sdtf_yxzs11M7, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_zxzs11M8(), w_sdtf_zxzs11M8, r_sdtf_zxzs11M8, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_zxzs11M6(), w_sdtf_zxzs11M6, r_sdtf_zxzs11M6, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cw11M12(), w_sdtf_cw11M12, r_sdtf_cw11M12, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cthbm11M11(), w_sdtf_cthbm11M11, r_sdtf_cthbm11M11, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_czsd11M11(), w_sdtf_czsd11M11, r_sdtf_czsd11M11, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cw11M11(), w_sdtf_cw11M11, r_sdtf_cw11M11, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_sdtf_cthbm11M10(), w_sdtf_cthbm11M10, r_sdtf_cthbm11M10, channel);
//
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_jl(), w_fym_jl, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_jd(), w_fym_jd, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_yjswbj(), w_fym_yjswbj, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_wxswbj(), w_fym_wxswbj, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_ckkz(), w_fym_ckkz, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xd(), w_fym_xd, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_jx(), w_fym_jx, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xtgz(), w_fym_xtgz, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sx_yxgm(), w_fym_sx_yxgm, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sx_dzcs(), w_fym_sx_dzcs, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_sx_qk(), w_fym_sx_qk, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xx_yxgm(), w_fym_xx_yxgm, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xx_dzcs(), w_fym_xx_dzcs, r_fym_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_fym_xx_qkd(), w_fym_xx_qkd, r_fym_sd, channel);
//------------------------------ 车站环控排烟风机补风机 ------------------------------
boolean r_czhk_hfzc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_hfzc());
boolean r_czhk_sdzd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_sdzd());
boolean r_czhk_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_sd());
boolean r_czhk_xa6 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xa6());
boolean r_czhk_xa7 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xa7());
boolean r_czhk_d5 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_d5());
boolean r_czhk_d6 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_d6());
boolean r_czhk_d7 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_d7());
boolean r_czhk_d8 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_d8());
boolean r_czhk_d9 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_d9());
boolean r_czhk_xb12 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xb12());
boolean r_czhk_xb16 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xb16());
boolean r_czhk_xb17 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xb17());
boolean r_czhk_xb18 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xb18());
boolean r_czhk_xb19 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_czhk_xb19());
boolean r_pyfj_qtA01 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_pyfj_qtA01());
boolean r_pyfj_qtB01 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_pyfj_qtB01());
boolean r_pyfj_qtA201 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_pyfj_qtA201());
boolean r_pyfj_qtB401 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_pyfj_qtB401());
boolean r_pyfj_qtB501 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_pyfj_qtB501());
boolean r_bfj_qtB401 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_bfj_qtB401());
boolean r_bfj_qtB701 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_bfj_qtB701());
boolean r_bfj_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_bfj_sd());
boolean w_czhk_hfzc = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_hfzc());
boolean w_czhk_zd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_zd());
boolean w_czhk_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_sd_light());
boolean w_czhk_anaxzs = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_anaxzs());
boolean w_czhk_xa6 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xa6());
boolean w_czhk_xa7 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xa7());
boolean w_czhk_d5 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_d5());
boolean w_czhk_d6 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_d6());
boolean w_czhk_d7 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_d7());
boolean w_czhk_d8 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_d8());
boolean w_czhk_d9 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_d9());
boolean w_czhk_xb12 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xb12());
boolean w_czhk_xb16 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xb16());
boolean w_czhk_xb17 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xb17());
boolean w_czhk_xb18 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xb18());
boolean w_czhk_xb19 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_czhk_xb19());
boolean w_pyfj_yxA01 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_pyfj_yxA01());
boolean w_pyfj_yxB01 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_pyfj_yxB01());
boolean w_pyfj_yxA201 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_pyfj_yxA201());
boolean w_pyfj_yxB401 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_pyfj_yxB401());
boolean w_pyfj_yxB501 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_pyfj_yxB501());
boolean w_bfj_yxB401 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_bfj_yxB401());
boolean w_bfj_yxB701 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_bfj_yxB701());
// 按钮灯
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_hfzc(), w_czhk_hfzc, r_czhk_hfzc, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xa6(), w_czhk_xa6, r_czhk_xa6, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xa7(), w_czhk_xa7, r_czhk_xa7, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_d5(), w_czhk_d5, r_czhk_d5, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_d6(), w_czhk_d6, r_czhk_d6, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_d7(), w_czhk_d7, r_czhk_d7, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_d8(), w_czhk_d8, r_czhk_d8, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_d9(), w_czhk_d9, r_czhk_d9, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xb12(), w_czhk_xb12, r_czhk_xb12, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xb16(), w_czhk_xb16, r_czhk_xb16, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xb17(), w_czhk_xb17, r_czhk_xb17, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xb18(), w_czhk_xb18, r_czhk_xb18, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_xb19(), w_czhk_xb19, r_czhk_xb19, channel);
//
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_zd(), w_czhk_zd, r_czhk_sd || r_czhk_sdzd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_sd_light(), w_czhk_sd, r_czhk_sd || !r_czhk_sdzd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_czhk_anaxzs(), w_czhk_anaxzs, r_czhk_sd, channel); //逻辑未知
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_pyfj_yxA01(), w_pyfj_yxA01, r_bfj_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_pyfj_yxB01(), w_pyfj_yxB01, r_bfj_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_pyfj_yxA201(), w_pyfj_yxA201, r_bfj_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_pyfj_yxB401(), w_pyfj_yxB401, r_bfj_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_pyfj_yxB501(), w_pyfj_yxB501, r_bfj_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_bfj_yxB401(), w_bfj_yxB401, r_bfj_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_bfj_yxB701(), w_bfj_yxB701, r_bfj_sd, channel);
//------------------------------ 自动扶梯区间水泵闸机门禁消防水泵 ------------------------------
boolean r_zdft_jt01 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt01());
boolean r_zdft_jt02 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt02());
boolean r_zdft_jt03 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt03());
boolean r_zdft_jt04 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt04());
boolean r_zdft_jt05 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt05());
boolean r_zdft_jt06 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt06());
boolean r_zdft_jt07 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt07());
boolean r_zdft_jt08 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt08());
boolean r_zdft_jt09 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt09());
boolean r_zdft_jt10 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt10());
boolean r_zdft_jt11 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zdft_jt11());
boolean r_qjsb_qd1A = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_qjsb_qd1A());
boolean r_qjsb_qd1B = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_qjsb_qd1B());
boolean r_zj_jjsf = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_zj_jjsf());
boolean r_mj_jjsf = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_mj_jjsf());
boolean r_mj_sdzd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_mj_sdzd());
boolean r_xfsb_qdxfb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xfsb_qdxfb1());
boolean r_xfsb_tzxfb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xfsb_tzxfb1());
boolean r_xfsb_qdxfb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xfsb_qdxfb2());
boolean r_xfsb_tzxfb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xfsb_tzxfb2());
boolean r_xfsb_sd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getR_xfsb_sd());
boolean w_zdft_l101 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l101());
boolean w_zdft_l102 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l102());
boolean w_zdft_l103 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l103());
boolean w_zdft_l104 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l104());
boolean w_zdft_l105 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l105());
boolean w_zdft_l106 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l106());
boolean w_zdft_l107 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l107());
boolean w_zdft_l108 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l108());
boolean w_zdft_l109 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l109());
boolean w_zdft_l110 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l110());
boolean w_zdft_l111 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l111());
boolean w_zdft_l201 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l201());
boolean w_zdft_l202 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l202());
boolean w_zdft_l203 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l203());
boolean w_zdft_l204 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l204());
boolean w_zdft_l205 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l205());
boolean w_zdft_l206 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l206());
boolean w_zdft_l207 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l207());
boolean w_zdft_l208 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l208());
boolean w_zdft_l209 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l209());
boolean w_zdft_l210 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l210());
boolean w_zdft_l211 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_l211());
boolean w_zdft_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_fmq());
boolean w_zdft_fdbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zdft_fdbj());
boolean w_qjsb_gswbj = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_qjsb_gswbj());
boolean w_qjsb_qd1A = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_qjsb_qd1A());
boolean w_qjsb_qd1B = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_qjsb_qd1B());
boolean w_zj_jjsf = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_zj_jjsf());
boolean w_mj_jjsf = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_mj_jjsf());
boolean w_xfsb_yxxfb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_yxxfb1());
boolean w_xfsb_gzxfb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_gzxfb1());
boolean w_xfsb_qdxfb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_qdxfb1());
boolean w_xfsb_tzxfb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_tzxfb1());
boolean w_xfsb_yxxfb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_yxxfb2());
boolean w_xfsb_gzxfb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_gzxfb2());
boolean w_xfsb_qdxfb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_qdxfb2());
boolean w_xfsb_tzxfb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_tzxfb2());
boolean w_xfsb_yxwyb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_yxwyb1());
boolean w_xfsb_gzwyb1 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_gzwyb1());
boolean w_xfsb_yxwyb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_yxwyb2());
boolean w_xfsb_gzwyb2 = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_gzwyb2());
boolean w_xfsb_gsw = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_gsw());
boolean w_xfsb_dsw = RealDeviceConfig.getBitOf(deviceStatus, configVO.getW_xfsb_dsw());
// 按钮灯
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_qjsb_qd1A(), w_qjsb_qd1A, r_qjsb_qd1A, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_qjsb_qd1B(), w_qjsb_qd1B, r_qjsb_qd1B, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zj_jjsf(), w_zj_jjsf, r_zj_jjsf, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_mj_jjsf(), w_mj_jjsf, r_mj_jjsf, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_qdxfb1(), w_xfsb_qdxfb1, r_xfsb_qdxfb1, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_tzxfb1(), w_xfsb_tzxfb1, r_xfsb_tzxfb1, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_qdxfb2(), w_xfsb_qdxfb2, r_xfsb_qdxfb2, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_tzxfb2(), w_xfsb_tzxfb2, r_xfsb_tzxfb2, channel);
//
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l101(), w_zdft_l101, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l102(), w_zdft_l102, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l103(), w_zdft_l103, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l104(), w_zdft_l104, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l105(), w_zdft_l105, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l106(), w_zdft_l106, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l107(), w_zdft_l107, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l108(), w_zdft_l108, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l109(), w_zdft_l109, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l110(), w_zdft_l110, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l111(), w_zdft_l111, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l201(), w_zdft_l201, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l202(), w_zdft_l202, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l203(), w_zdft_l203, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l204(), w_zdft_l204, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l205(), w_zdft_l205, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l206(), w_zdft_l206, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l207(), w_zdft_l207, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l208(), w_zdft_l208, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l209(), w_zdft_l209, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l210(), w_zdft_l210, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_l211(), w_zdft_l211, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_fmq(), w_zdft_fmq, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_zdft_fdbj(), w_zdft_fdbj, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_qjsb_gswbj(), w_qjsb_gswbj, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_yxxfb1(), w_xfsb_yxxfb1, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_gzxfb1(), w_xfsb_gzxfb1, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_yxxfb2(), w_xfsb_yxxfb2, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_gzxfb2(), w_xfsb_gzxfb2, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_yxwyb1(), w_xfsb_yxwyb1, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_gzwyb1(), w_xfsb_gzwyb1, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_yxwyb2(), w_xfsb_yxwyb2, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_gzwyb2(), w_xfsb_gzwyb2, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_gsw(), w_xfsb_gsw, r_xfsb_sd, channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_xfsb_dsw(), w_xfsb_dsw, r_xfsb_sd, channel);
}
}