| | |
| | | import HslCommunication.Core.Types.OperateResultExOne; |
| | | import HslCommunication.Profinet.Siemens.SiemensPLCS; |
| | | import HslCommunication.Profinet.Siemens.SiemensS7Net; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | |
| | | private List<ZyStationStatusEntity> barcodeStatusList; |
| | | private SiemensS7Net siemensNet; |
| | | private DeviceConfig deviceConfig; |
| | | private RedisUtil redisUtil; |
| | | |
| | | public ZyStationRealConnect(DeviceConfig deviceConfig) { |
| | | public ZyStationRealConnect(DeviceConfig deviceConfig, RedisUtil redisUtil) { |
| | | this.deviceConfig = deviceConfig; |
| | | this.redisUtil = redisUtil; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ZyStationStatusEntity> getStatus() { |
| | | public List<ZyStationStatusEntity> getStatus(Integer deviceNo) { |
| | | if (statusList == null) { |
| | | BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class); |
| | | if (basDevpService == null) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public CommandResponse sendCommand(StationCommand command) { |
| | | public CommandResponse sendCommand(Integer deviceNo, StationCommand command) { |
| | | CommandResponse commandResponse = new CommandResponse(false); |
| | | if (null == command) { |
| | | commandResponse.setMessage("命令为空"); |
| | |
| | | } |
| | | return -1; |
| | | } |
| | | } |
| | | } |