| | |
| | | public static FrameBuilder builderA5() { |
| | | return new FrameBuilder(FunctionCodeEnum.DATA_TRANSPORT_DATA.getCode()); |
| | | } |
| | | public static FrameBuilder builderA7() { |
| | | return new FrameBuilder(FunctionCodeEnum.PLC.getCode()); |
| | | } |
| | | |
| | | public FrameBuilder orderType(String orderType) { |
| | | this.orderType = orderType; |
| | |
| | | iRequestFrame = new A2Frame(orderType, innerFrame); |
| | | } else if (FunctionCodeEnum.DATA_TRANSPORT_DATA.getCode().equals(functionCode)) { |
| | | iRequestFrame = new A5Frame(orderType, innerFrame); |
| | | } else if (FunctionCodeEnum.PLC.getCode().equals(functionCode)) { |
| | | iRequestFrame = new A7Frame(orderType, innerFrame); |
| | | } else { |
| | | throw new RuntimeException("找不到符合条件的请求帧"); |
| | | } |