| | |
| | | import com.zy.core.properties.SystemProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.SiemensCrnThread; |
| | | import com.zy.core.thread.DevpThread; |
| | | import com.zy.core.DevpThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.DevpThread; |
| | | import com.zy.core.DevpThread; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.DevpThread; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.thread.LedThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
New file |
| | |
| | | package com.zy.core; |
| | | |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface DevpThread extends ThreadHandler { |
| | | |
| | | Map<Integer, StaProtocol> getStation(); |
| | | |
| | | void setPakMk(Integer siteId, boolean pakMk); |
| | | |
| | | } |
| | |
| | | // 初始化输送线线程 |
| | | log.info("初始化输送线线程..................................................."); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | DevpThread devpThread = new DevpThread(devp); |
| | | new Thread(devpThread).start(); |
| | | DevpThread devpThread = null; |
| | | switch (devp.getId()) { |
| | | case 1: |
| | | devpThread = new SiemensDevpThread(devp); |
| | | break; |
| | | case 2: |
| | | |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | new Thread((Runnable) devpThread).start(); |
| | | SlaveConnection.put(SlaveType.Devp, devp.getId(), devpThread); |
| | | } |
| | | |