| | |
| | | import com.zy.core.model.command.LedCommand; |
| | | import com.zy.core.model.command.RgvCommand; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.ExtProtocol; |
| | | import com.zy.core.model.protocol.RgvProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.LedThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import com.zy.core.thread.SiemensRgvThread; |
| | | import com.zy.core.thread.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | } |
| | | } |
| | | |
| | | public synchronized void ExtTaskAndPut() throws InterruptedException { |
| | | for (ExtSlave extSlave : slaveProperties.getExt()) { |
| | | // if (!rgv.getDemo()) { |
| | | // continue; |
| | | // } |
| | | MelsecExtThread extThread = (MelsecExtThread) SlaveConnection.get(SlaveType.Ext, extSlave.getId()); |
| | | ExtProtocol extProtocol = extThread.getExtProtocol(); |
| | | if (extProtocol == null) { |
| | | continue; |
| | | } |
| | | // else { |
| | | // extProtocol = extProtocol.clone(); |
| | | // } |
| | | if (extProtocol.isTake()){//允许取 |
| | | |
| | | }else if (extProtocol.isPut()){//允许放 |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |