|
|
|
@ -87,13 +87,13 @@ public class StreetController {
|
|
|
|
if(configProperties.getLightSource().getType() == 1){
|
|
|
|
if(configProperties.getLightSource().getType() == 1){
|
|
|
|
|
|
|
|
|
|
|
|
JYDAMEquip equip = JYDamHelper.Connect(lightSource.getIp(),lightSource.getPort());
|
|
|
|
JYDAMEquip equip = JYDamHelper.Connect(lightSource.getIp(),lightSource.getPort());
|
|
|
|
JYDamHelper.openDO(equip,obj.getInteger("index"));
|
|
|
|
JYDamHelper.openDO(equip,configProperties.getLightSource().getIndex());
|
|
|
|
Integer status = JYDamHelper.ReadStatus(equip,obj.getInteger("num"),obj.getInteger("index"));
|
|
|
|
Integer status = JYDamHelper.ReadStatus(equip,configProperties.getLightSource().getNum(),configProperties.getLightSource().getIndex());
|
|
|
|
log.info("ip:{},status:{}",lightSource.getIp(),status);
|
|
|
|
log.info("ip:{},status:{}",lightSource.getIp(),status);
|
|
|
|
equip.DisConnect();
|
|
|
|
equip.DisConnect();
|
|
|
|
|
|
|
|
|
|
|
|
}else if(configProperties.getLightSource().getType() == 2){
|
|
|
|
}else if(configProperties.getLightSource().getType() == 2){
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),1,1);
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),configProperties.getLightSource().getIndex(),1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -116,7 +116,7 @@ public class StreetController {
|
|
|
|
Integer status = JYDamHelper.ReadStatus(equip,obj.getInteger("num"),obj.getInteger("index"));
|
|
|
|
Integer status = JYDamHelper.ReadStatus(equip,obj.getInteger("num"),obj.getInteger("index"));
|
|
|
|
log.info("ip:{},status:{}",lightSource.getIp(),status);
|
|
|
|
log.info("ip:{},status:{}",lightSource.getIp(),status);
|
|
|
|
}else if(configProperties.getLightSource().getType() == 2){
|
|
|
|
}else if(configProperties.getLightSource().getType() == 2){
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),1,0);
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),4,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|