| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.ErrMsg; |
| | | import com.zy.core.model.LedSlave; |
| | | import com.zy.core.model.command.LedCommand; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | |
| | | if (slave.getStaArr().contains(ledId)) { |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, slave.getId()); |
| | | if (null != ledThread) { |
| | | errorMsg = ledThread.getErrorMsg().toString(); |
| | | errorMsg = JSONObject.toJSONString(ledThread.getErrorMsg()); |
| | | } |
| | | } |
| | | } |
| | |
| | | public R monitorLed(@RequestParam("ledId") Integer ledId) { |
| | | String ledContent = ""; |
| | | List<LedCommand> commandList = null; |
| | | List<ErrMsg> errMsgs = null; |
| | | for (LedSlave slave : slaveProperties.getLed()) { |
| | | if (slave.getStaArr().contains(ledId)) { |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, slave.getId()); |