| | |
| | | import com.core.common.Cools; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.MatDto; |
| | | import com.zy.common.utils.News; |
| | | import com.zy.core.Slave; |
| | | import com.zy.core.ThreadHandler; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | // screen = new Bx5GScreenClient("my"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.info("led连接构造器错误 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | News.info("led连接构造器错误 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } |
| | | } |
| | | |
| | |
| | | area.addPage(page); |
| | | pf.addArea(area); |
| | | if (pf.validate() != null) { |
| | | log.info("pf out of range"); |
| | | News.info("pf out of range"); |
| | | } else { |
| | | // 更新节目 |
| | | screen.writeProgram(pf); |
| | |
| | | pf.addArea(area); |
| | | // 更新节目 |
| | | if (pf.validate() != null) { |
| | | log.info("pf out of range"); |
| | | News.info("pf out of range"); |
| | | } else { |
| | | // 更新节目 |
| | | screen.writeProgram(pf); |
| | |
| | | |
| | | @Override |
| | | public boolean connect() { |
| | | String methodName = Thread.currentThread().getStackTrace()[1].getMethodName(); |
| | | |
| | | boolean connRes = false; |
| | | try { |
| | | connRes = screen.connect(slave.getIp(),slave.getPort()); |
| | |
| | | } catch (Exception ignore) { |
| | | } |
| | | if (connRes) { |
| | | log.info("led连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | News.info(methodName + ":led连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } else { |
| | | log.error("led连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | News.error(methodName + ":led连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } |
| | | return connRes; |
| | | } |
| | |
| | | // 更新节目 |
| | | if (pf.validate() != null) { |
| | | System.out.println("pf out of range"); |
| | | log.info("pf out of range"); |
| | | News.info("pf out of range"); |
| | | } else { |
| | | // 更新节目 |
| | | screen.writeProgram(pf); |