| | |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.text.MessageFormat; |
| | | import java.util.Date; |
| | |
| | | if (null == crnProtocol) { |
| | | crnProtocol = new CrnProtocol(); |
| | | } |
| | | crnProtocol.setCrnNo(slave.getId()); |
| | | crnProtocol.setMode((short) -1); |
| | | // crnProtocol.setTaskNo((short)0); |
| | | crnProtocol.setStatus((short)-1); |
| | |
| | | if (null == crnProtocol) { |
| | | crnProtocol = new CrnProtocol(); |
| | | } |
| | | crnProtocol.setCrnNo(slave.getId()); |
| | | crnProtocol.setMode(melsecMcNet.getByteTransform().TransInt16(result.Content, 0)); |
| | | crnProtocol.setTaskNo(melsecMcNet.getByteTransform().TransInt16(result.Content, 2)); |
| | | crnProtocol.setStatus(melsecMcNet.getByteTransform().TransInt16(result.Content, 4)); |