| | |
| | | import com.ld.igds.common.CoreDeviceService; |
| | | import com.ld.igds.io.constant.OrderRespEnum; |
| | | import com.ld.igds.io.notify.NotifyWebInvoker; |
| | | import com.ld.igds.io.request.CheckGasRequest; |
| | | import com.ld.igds.io.request.DeviceControlRequest; |
| | | import com.ld.igds.protocol.modbus.ServerUtil; |
| | | import com.ld.igds.protocol.modbus.data.ModbusGasResult; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 解析 |
| | |
| | | public class AnalysisService { |
| | | |
| | | @Resource |
| | | private CoreDeviceService deviceService; |
| | | private CoreDeviceService coreDeviceService; |
| | | @Resource |
| | | private NotifyWebInvoker notifyInvoker; |
| | | |
| | |
| | | Thread.sleep(sleepTime); |
| | | } |
| | | |
| | | deviceService.updateStatus(request.getCompanyId(), request.getSerId(), ServerUtil.getStatusMap()); |
| | | coreDeviceService.updateStatus(request.getCompanyId(), request.getSerId(), ServerUtil.getStatusMap()); |
| | | |
| | | notifyInvoker.notifyAnalysisStatusSuccess(request.getCompanyId(), request.getSerId(), OrderRespEnum.MSG_SUCCESS, "设备状态查询成功并完成解析!"); |
| | | |
| | |
| | | log.error("---MODBUS-TCP-状态解析异常{}", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 解析气体检测结果 |
| | | * |
| | | * @param request |
| | | * @param results |
| | | */ |
| | | public void analysisGas(CheckGasRequest request, List<ModbusGasResult> results) { |
| | | } |
| | | } |