From 5563293e54259b6baeb98ec9785f747aa3fbdc6a Mon Sep 17 00:00:00 2001
From: whyclxw <810412026@qq,com>
Date: 星期四, 27 八月 2020 14:32:53 +0800
Subject: [PATCH] 负载部分修改提交

---
 src/com/dev/base/data/Dynamicload_button.java |  632 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 364 insertions(+), 268 deletions(-)

diff --git a/src/com/dev/base/data/Dynamicload_button.java b/src/com/dev/base/data/Dynamicload_button.java
index a8ca138..496969d 100644
--- a/src/com/dev/base/data/Dynamicload_button.java
+++ b/src/com/dev/base/data/Dynamicload_button.java
@@ -1,268 +1,364 @@
-package com.dev.base.data;
-
-public class Dynamicload_button {
-	
-	public int dev_id;
-	public int FZ_b1;					//FZ按钮1
-	public int FZ_b2;			//FZ按钮2
-	public int FZ_b3;			//FZ按钮3
-	public int FZ_b4;			//FZ按钮4
-	public int FZ_b5;			//FZ按钮5
-	public int FZ_b6;			//FZ按钮6
-	public int FZ_b7;			//FZ按钮7
-	public int FZ_b8;			//FZ按钮8
-	public int FZ_b9;			//FZ按钮9
-	public int FZ_b10;			//FZ按钮10
-	public int FZ_b11;			//FZ按钮11
-	public int FZ_fw1;			//FZ反馈按钮1
-	public int FZ_fw2;			//FZ反馈按钮2
-	public int FZ_fw3;			//FZ反馈按钮3
-	public int FZ_fw4;			//FZ反馈按钮4
-	public int FZ_fw5;			//FZ反馈按钮5
-	public int FZ_fw6;			//FZ反馈按钮6
-	public int FZ_fw7;			//FZ反馈按钮7
-	public int FZ_fw8;			//FZ反馈按钮8
-	public int FZ_fw9;			//FZ反馈按钮9
-	public int FZ_fw10;			//FZ反馈按钮10
-	public int FZ_fw11;			//FZ反馈按钮11
-	public int FZ_ex1;			//FZ输出按钮1
-	public int FZ_ex2;			//FZ输出按钮2
-	public int FZ_ex3;			//FZ输出按钮3
-	public int FZ_ex4;			//FZ输出按钮4
-	public int FZ_ex5;			//FZ输出按钮5
-	public int FZ_ex6;			//FZ输出按钮6
-	public int FZ_ex7;			//FZ输出按钮7
-	public int FZ_ex8;			//FZ输出按钮8
-	public int FZ_ex9;			//FZ输出按钮9
-	public int FZ_ex10;			//FZ输出按钮10
-	public int FZ_ex11;			//FZ输出按钮11
-	public String note;
-	
-	
-	public Dynamicload_button(int dev_id) {
-		this.dev_id = dev_id;
-	}
-	
-	public int getDev_id() {
-		return dev_id;
-	}
-	public int getFZ_b1() {
-		return FZ_b1;
-	}
-	public int getFZ_b2() {
-		return FZ_b2;
-	}
-	public int getFZ_b3() {
-		return FZ_b3;
-	}
-	public int getFZ_b4() {
-		return FZ_b4;
-	}
-	public int getFZ_b5() {
-		return FZ_b5;
-	}
-	public int getFZ_b6() {
-		return FZ_b6;
-	}
-	public int getFZ_b7() {
-		return FZ_b7;
-	}
-	public int getFZ_b8() {
-		return FZ_b8;
-	}
-	public int getFZ_b9() {
-		return FZ_b9;
-	}
-	public int getFZ_b10() {
-		return FZ_b10;
-	}
-	public int getFZ_b11() {
-		return FZ_b11;
-	}
-	public int getFZ_fw1() {
-		return FZ_fw1;
-	}
-	public int getFZ_fw2() {
-		return FZ_fw2;
-	}
-	public int getFZ_fw3() {
-		return FZ_fw3;
-	}
-	public int getFZ_fw4() {
-		return FZ_fw4;
-	}
-	public int getFZ_fw5() {
-		return FZ_fw5;
-	}
-	public int getFZ_fw6() {
-		return FZ_fw6;
-	}
-	public int getFZ_fw7() {
-		return FZ_fw7;
-	}
-	public int getFZ_fw8() {
-		return FZ_fw8;
-	}
-	public int getFZ_fw9() {
-		return FZ_fw9;
-	}
-	public int getFZ_fw10() {
-		return FZ_fw10;
-	}
-	public int getFZ_fw11() {
-		return FZ_fw11;
-	}
-	public int getFZ_ex1() {
-		return FZ_ex1;
-	}
-	public int getFZ_ex2() {
-		return FZ_ex2;
-	}
-	public int getFZ_ex3() {
-		return FZ_ex3;
-	}
-	public int getFZ_ex4() {
-		return FZ_ex4;
-	}
-	public int getFZ_ex5() {
-		return FZ_ex5;
-	}
-	public int getFZ_ex6() {
-		return FZ_ex6;
-	}
-	public int getFZ_ex7() {
-		return FZ_ex7;
-	}
-	public int getFZ_ex8() {
-		return FZ_ex8;
-	}
-	public int getFZ_ex9() {
-		return FZ_ex9;
-	}
-	public int getFZ_ex10() {
-		return FZ_ex10;
-	}
-	public int getFZ_ex11() {
-		return FZ_ex11;
-	}
-	public String getNote() {
-		return note;
-	}
-	public void setDev_id(int dev_id) {
-		this.dev_id = dev_id;
-	}
-	public void setFZ_b1(int fZ_b1) {
-		FZ_b1 = fZ_b1;
-	}
-	public void setFZ_b2(int fZ_b2) {
-		FZ_b2 = fZ_b2;
-	}
-	public void setFZ_b3(int fZ_b3) {
-		FZ_b3 = fZ_b3;
-	}
-	public void setFZ_b4(int fZ_b4) {
-		FZ_b4 = fZ_b4;
-	}
-	public void setFZ_b5(int fZ_b5) {
-		FZ_b5 = fZ_b5;
-	}
-	public void setFZ_b6(int fZ_b6) {
-		FZ_b6 = fZ_b6;
-	}
-	public void setFZ_b7(int fZ_b7) {
-		FZ_b7 = fZ_b7;
-	}
-	public void setFZ_b8(int fZ_b8) {
-		FZ_b8 = fZ_b8;
-	}
-	public void setFZ_b9(int fZ_b9) {
-		FZ_b9 = fZ_b9;
-	}
-	public void setFZ_b10(int fZ_b10) {
-		FZ_b10 = fZ_b10;
-	}
-	public void setFZ_b11(int fZ_b11) {
-		FZ_b11 = fZ_b11;
-	}
-	public void setFZ_fw1(int fZ_fw1) {
-		FZ_fw1 = fZ_fw1;
-	}
-	public void setFZ_fw2(int fZ_fw2) {
-		FZ_fw2 = fZ_fw2;
-	}
-	public void setFZ_fw3(int fZ_fw3) {
-		FZ_fw3 = fZ_fw3;
-	}
-	public void setFZ_fw4(int fZ_fw4) {
-		FZ_fw4 = fZ_fw4;
-	}
-	public void setFZ_fw5(int fZ_fw5) {
-		FZ_fw5 = fZ_fw5;
-	}
-	public void setFZ_fw6(int fZ_fw6) {
-		FZ_fw6 = fZ_fw6;
-	}
-	public void setFZ_fw7(int fZ_fw7) {
-		FZ_fw7 = fZ_fw7;
-	}
-	public void setFZ_fw8(int fZ_fw8) {
-		FZ_fw8 = fZ_fw8;
-	}
-	public void setFZ_fw9(int fZ_fw9) {
-		FZ_fw9 = fZ_fw9;
-	}
-	public void setFZ_fw10(int fZ_fw10) {
-		FZ_fw10 = fZ_fw10;
-	}
-	public void setFZ_fw11(int fZ_fw11) {
-		FZ_fw11 = fZ_fw11;
-	}
-	public void setFZ_ex1(int fZ_ex1) {
-		FZ_ex1 = fZ_ex1;
-	}
-	public void setFZ_ex2(int fZ_ex2) {
-		FZ_ex2 = fZ_ex2;
-	}
-	public void setFZ_ex3(int fZ_ex3) {
-		FZ_ex3 = fZ_ex3;
-	}
-	public void setFZ_ex4(int fZ_ex4) {
-		FZ_ex4 = fZ_ex4;
-	}
-	public void setFZ_ex5(int fZ_ex5) {
-		FZ_ex5 = fZ_ex5;
-	}
-	public void setFZ_ex6(int fZ_ex6) {
-		FZ_ex6 = fZ_ex6;
-	}
-	public void setFZ_ex7(int fZ_ex7) {
-		FZ_ex7 = fZ_ex7;
-	}
-	public void setFZ_ex8(int fZ_ex8) {
-		FZ_ex8 = fZ_ex8;
-	}
-	public void setFZ_ex9(int fZ_ex9) {
-		FZ_ex9 = fZ_ex9;
-	}
-	public void setFZ_ex10(int fZ_ex10) {
-		FZ_ex10 = fZ_ex10;
-	}
-	public void setFZ_ex11(int fZ_ex11) {
-		FZ_ex11 = fZ_ex11;
-	}
-	public void setNote(String note) {
-		this.note = note;
-	}
-	@Override
-	public String toString() {
-		return "Dynamicload_button [dev_id=" + dev_id + ", FZ_b1=" + FZ_b1 + ", FZ_b2=" + FZ_b2 + ", FZ_b3=" + FZ_b3
-				+ ", FZ_b4=" + FZ_b4 + ", FZ_b5=" + FZ_b5 + ", FZ_b6=" + FZ_b6 + ", FZ_b7=" + FZ_b7 + ", FZ_b8=" + FZ_b8
-				+ ", FZ_b9=" + FZ_b9 + ", FZ_b10=" + FZ_b10 + ", FZ_b11=" + FZ_b11 + ", FZ_fw1=" + FZ_fw1 + ", FZ_fw2="
-				+ FZ_fw2 + ", FZ_fw3=" + FZ_fw3 + ", FZ_fw4=" + FZ_fw4 + ", FZ_fw5=" + FZ_fw5 + ", FZ_fw6=" + FZ_fw6
-				+ ", FZ_fw7=" + FZ_fw7 + ", FZ_fw8=" + FZ_fw8 + ", FZ_fw9=" + FZ_fw9 + ", FZ_fw10=" + FZ_fw10
-				+ ", FZ_fw11=" + FZ_fw11 + ", FZ_ex1=" + FZ_ex1 + ", FZ_ex2=" + FZ_ex2 + ", FZ_ex3=" + FZ_ex3
-				+ ", FZ_ex4=" + FZ_ex4 + ", FZ_ex5=" + FZ_ex5 + ", FZ_ex6=" + FZ_ex6 + ", FZ_ex7=" + FZ_ex7
-				+ ", FZ_ex8=" + FZ_ex8 + ", FZ_ex9=" + FZ_ex9 + ", FZ_ex10=" + FZ_ex10 + ", FZ_ex11=" + FZ_ex11
-				+ ", note=" + note + "]";
-	}
-}
+package com.dev.base.data;
+
+import com.modbus.data.MyModbusMaster;
+import com.modbus.data.MyModbusUtils;
+import com.serotonin.modbus4j.BatchRead;
+import com.serotonin.modbus4j.BatchResults;
+import com.serotonin.modbus4j.code.DataType;
+
+public class Dynamicload_button {
+	
+	public int dev_id;
+	public int FZ_b1;			//FZ按钮1
+	public int FZ_b2;			//FZ按钮2
+	public int FZ_b3;			//FZ按钮3
+	public int FZ_b4;			//FZ按钮4
+	public int FZ_b5;			//FZ按钮5
+	public int FZ_b6;			//FZ按钮6
+	public int FZ_b7;			//FZ按钮7
+	public int FZ_b8;			//FZ按钮8
+	public int FZ_b9;			//FZ按钮9
+	public int FZ_b10;			//FZ按钮10
+	public int FZ_b11;			//FZ按钮11
+	public int FZ_fw1;			//FZ反馈按钮1
+	public int FZ_fw2;			//FZ反馈按钮2
+	public int FZ_fw3;			//FZ反馈按钮3
+	public int FZ_fw4;			//FZ反馈按钮4
+	public int FZ_fw5;			//FZ反馈按钮5
+	public int FZ_fw6;			//FZ反馈按钮6
+	public int FZ_fw7;			//FZ反馈按钮7
+	public int FZ_fw8;			//FZ反馈按钮8
+	public int FZ_fw9;			//FZ反馈按钮9
+	public int FZ_fw10;			//FZ反馈按钮10
+	public int FZ_fw11;			//FZ反馈按钮11
+	public int FZ_ex1;			//FZ输出按钮1
+	public int FZ_ex2;			//FZ输出按钮2
+	public int FZ_ex3;			//FZ输出按钮3
+	public int FZ_ex4;			//FZ输出按钮4
+	public int FZ_ex5;			//FZ输出按钮5
+	public int FZ_ex6;			//FZ输出按钮6
+	public int FZ_ex7;			//FZ输出按钮7
+	public int FZ_ex8;			//FZ输出按钮8
+	public int FZ_ex9;			//FZ输出按钮9
+	public int FZ_ex10;			//FZ输出按钮10
+	public int FZ_ex11;			//FZ输出按钮11
+	public String note;
+	
+	
+	public Dynamicload_button(int dev_id) {
+		this.dev_id = dev_id;
+	}
+	
+	public int getDev_id() {
+		return dev_id;
+	}
+	public int getFZ_b1() {
+		return FZ_b1;
+	}
+	public int getFZ_b2() {
+		return FZ_b2;
+	}
+	public int getFZ_b3() {
+		return FZ_b3;
+	}
+	public int getFZ_b4() {
+		return FZ_b4;
+	}
+	public int getFZ_b5() {
+		return FZ_b5;
+	}
+	public int getFZ_b6() {
+		return FZ_b6;
+	}
+	public int getFZ_b7() {
+		return FZ_b7;
+	}
+	public int getFZ_b8() {
+		return FZ_b8;
+	}
+	public int getFZ_b9() {
+		return FZ_b9;
+	}
+	public int getFZ_b10() {
+		return FZ_b10;
+	}
+	public int getFZ_b11() {
+		return FZ_b11;
+	}
+	public int getFZ_fw1() {
+		return FZ_fw1;
+	}
+	public int getFZ_fw2() {
+		return FZ_fw2;
+	}
+	public int getFZ_fw3() {
+		return FZ_fw3;
+	}
+	public int getFZ_fw4() {
+		return FZ_fw4;
+	}
+	public int getFZ_fw5() {
+		return FZ_fw5;
+	}
+	public int getFZ_fw6() {
+		return FZ_fw6;
+	}
+	public int getFZ_fw7() {
+		return FZ_fw7;
+	}
+	public int getFZ_fw8() {
+		return FZ_fw8;
+	}
+	public int getFZ_fw9() {
+		return FZ_fw9;
+	}
+	public int getFZ_fw10() {
+		return FZ_fw10;
+	}
+	public int getFZ_fw11() {
+		return FZ_fw11;
+	}
+	public int getFZ_ex1() {
+		return FZ_ex1;
+	}
+	public int getFZ_ex2() {
+		return FZ_ex2;
+	}
+	public int getFZ_ex3() {
+		return FZ_ex3;
+	}
+	public int getFZ_ex4() {
+		return FZ_ex4;
+	}
+	public int getFZ_ex5() {
+		return FZ_ex5;
+	}
+	public int getFZ_ex6() {
+		return FZ_ex6;
+	}
+	public int getFZ_ex7() {
+		return FZ_ex7;
+	}
+	public int getFZ_ex8() {
+		return FZ_ex8;
+	}
+	public int getFZ_ex9() {
+		return FZ_ex9;
+	}
+	public int getFZ_ex10() {
+		return FZ_ex10;
+	}
+	public int getFZ_ex11() {
+		return FZ_ex11;
+	}
+	public String getNote() {
+		return note;
+	}
+	public void setDev_id(int dev_id) {
+		this.dev_id = dev_id;
+	}
+	public void setFZ_b1(int fZ_b1) {
+		FZ_b1 = fZ_b1;
+	}
+	public void setFZ_b2(int fZ_b2) {
+		FZ_b2 = fZ_b2;
+	}
+	public void setFZ_b3(int fZ_b3) {
+		FZ_b3 = fZ_b3;
+	}
+	public void setFZ_b4(int fZ_b4) {
+		FZ_b4 = fZ_b4;
+	}
+	public void setFZ_b5(int fZ_b5) {
+		FZ_b5 = fZ_b5;
+	}
+	public void setFZ_b6(int fZ_b6) {
+		FZ_b6 = fZ_b6;
+	}
+	public void setFZ_b7(int fZ_b7) {
+		FZ_b7 = fZ_b7;
+	}
+	public void setFZ_b8(int fZ_b8) {
+		FZ_b8 = fZ_b8;
+	}
+	public void setFZ_b9(int fZ_b9) {
+		FZ_b9 = fZ_b9;
+	}
+	public void setFZ_b10(int fZ_b10) {
+		FZ_b10 = fZ_b10;
+	}
+	public void setFZ_b11(int fZ_b11) {
+		FZ_b11 = fZ_b11;
+	}
+	public void setFZ_fw1(int fZ_fw1) {
+		FZ_fw1 = fZ_fw1;
+	}
+	public void setFZ_fw2(int fZ_fw2) {
+		FZ_fw2 = fZ_fw2;
+	}
+	public void setFZ_fw3(int fZ_fw3) {
+		FZ_fw3 = fZ_fw3;
+	}
+	public void setFZ_fw4(int fZ_fw4) {
+		FZ_fw4 = fZ_fw4;
+	}
+	public void setFZ_fw5(int fZ_fw5) {
+		FZ_fw5 = fZ_fw5;
+	}
+	public void setFZ_fw6(int fZ_fw6) {
+		FZ_fw6 = fZ_fw6;
+	}
+	public void setFZ_fw7(int fZ_fw7) {
+		FZ_fw7 = fZ_fw7;
+	}
+	public void setFZ_fw8(int fZ_fw8) {
+		FZ_fw8 = fZ_fw8;
+	}
+	public void setFZ_fw9(int fZ_fw9) {
+		FZ_fw9 = fZ_fw9;
+	}
+	public void setFZ_fw10(int fZ_fw10) {
+		FZ_fw10 = fZ_fw10;
+	}
+	public void setFZ_fw11(int fZ_fw11) {
+		FZ_fw11 = fZ_fw11;
+	}
+	public void setFZ_ex1(int fZ_ex1) {
+		FZ_ex1 = fZ_ex1;
+	}
+	public void setFZ_ex2(int fZ_ex2) {
+		FZ_ex2 = fZ_ex2;
+	}
+	public void setFZ_ex3(int fZ_ex3) {
+		FZ_ex3 = fZ_ex3;
+	}
+	public void setFZ_ex4(int fZ_ex4) {
+		FZ_ex4 = fZ_ex4;
+	}
+	public void setFZ_ex5(int fZ_ex5) {
+		FZ_ex5 = fZ_ex5;
+	}
+	public void setFZ_ex6(int fZ_ex6) {
+		FZ_ex6 = fZ_ex6;
+	}
+	public void setFZ_ex7(int fZ_ex7) {
+		FZ_ex7 = fZ_ex7;
+	}
+	public void setFZ_ex8(int fZ_ex8) {
+		FZ_ex8 = fZ_ex8;
+	}
+	public void setFZ_ex9(int fZ_ex9) {
+		FZ_ex9 = fZ_ex9;
+	}
+	public void setFZ_ex10(int fZ_ex10) {
+		FZ_ex10 = fZ_ex10;
+	}
+	public void setFZ_ex11(int fZ_ex11) {
+		FZ_ex11 = fZ_ex11;
+	}
+	public void setNote(String note) {
+		this.note = note;
+	}
+	@Override
+	public String toString() {
+		return "Dynamicload_button [dev_id=" + dev_id + ", FZ_b1=" + FZ_b1 + ", FZ_b2=" + FZ_b2 + ", FZ_b3=" + FZ_b3
+				+ ", FZ_b4=" + FZ_b4 + ", FZ_b5=" + FZ_b5 + ", FZ_b6=" + FZ_b6 + ", FZ_b7=" + FZ_b7 + ", FZ_b8=" + FZ_b8
+				+ ", FZ_b9=" + FZ_b9 + ", FZ_b10=" + FZ_b10 + ", FZ_b11=" + FZ_b11 + ", FZ_fw1=" + FZ_fw1 + ", FZ_fw2="
+				+ FZ_fw2 + ", FZ_fw3=" + FZ_fw3 + ", FZ_fw4=" + FZ_fw4 + ", FZ_fw5=" + FZ_fw5 + ", FZ_fw6=" + FZ_fw6
+				+ ", FZ_fw7=" + FZ_fw7 + ", FZ_fw8=" + FZ_fw8 + ", FZ_fw9=" + FZ_fw9 + ", FZ_fw10=" + FZ_fw10
+				+ ", FZ_fw11=" + FZ_fw11 + ", FZ_ex1=" + FZ_ex1 + ", FZ_ex2=" + FZ_ex2 + ", FZ_ex3=" + FZ_ex3
+				+ ", FZ_ex4=" + FZ_ex4 + ", FZ_ex5=" + FZ_ex5 + ", FZ_ex6=" + FZ_ex6 + ", FZ_ex7=" + FZ_ex7
+				+ ", FZ_ex8=" + FZ_ex8 + ", FZ_ex9=" + FZ_ex9 + ", FZ_ex10=" + FZ_ex10 + ", FZ_ex11=" + FZ_ex11
+				+ ", note=" + note + "]";
+	}
+
+	/**
+	 * 创建读取数据集合
+	 * @param master
+	 * @return
+	 */
+	public BatchRead<Integer> createBatchRead(MyModbusMaster master){
+		BatchRead<Integer> batch = new BatchRead<Integer>();		
+		batch.addLocator(0,MyModbusUtils.createBaseLocator(80 ,master));//按钮1
+		batch.addLocator(1,MyModbusUtils.createBaseLocator(81 ,master));
+		batch.addLocator(2,MyModbusUtils.createBaseLocator(82 , master));
+		batch.addLocator(3,MyModbusUtils.createBaseLocator(83, master));								
+		batch.addLocator(4,MyModbusUtils.createBaseLocator(84, master));									
+		batch.addLocator(5,MyModbusUtils.createBaseLocator(85, master));								
+		batch.addLocator(6,MyModbusUtils.createBaseLocator(86, master));								
+		batch.addLocator(7,MyModbusUtils.createBaseLocator(87, master));								
+		batch.addLocator(8,MyModbusUtils.createBaseLocator(88, master));								
+		batch.addLocator(9,MyModbusUtils.createBaseLocator(89, master));									
+		batch.addLocator(10,MyModbusUtils.createBaseLocator(90, master));//按钮11
+		
+		batch.addLocator(11,MyModbusUtils.createBaseLocator(4020,master));//反馈1
+		batch.addLocator(12,MyModbusUtils.createBaseLocator(4021,master));
+		batch.addLocator(13,MyModbusUtils.createBaseLocator(4022, master));
+		batch.addLocator(14,MyModbusUtils.createBaseLocator(4023, master));								
+		batch.addLocator(15,MyModbusUtils.createBaseLocator(4024, master));									
+		batch.addLocator(16,MyModbusUtils.createBaseLocator(4025, master));								
+		batch.addLocator(17,MyModbusUtils.createBaseLocator(4026, master));								
+		batch.addLocator(18,MyModbusUtils.createBaseLocator(4027, master));								
+		batch.addLocator(19,MyModbusUtils.createBaseLocator(4028, master));								
+		batch.addLocator(20,MyModbusUtils.createBaseLocator(4029, master));									
+		batch.addLocator(21,MyModbusUtils.createBaseLocator(4030, master));//反馈11
+		
+		batch.addLocator(22,MyModbusUtils.createBaseLocator(8000,master));//输出1
+		batch.addLocator(23,MyModbusUtils.createBaseLocator(8001 ,master));
+		batch.addLocator(24,MyModbusUtils.createBaseLocator(8002 ,master));
+		batch.addLocator(25,MyModbusUtils.createBaseLocator(8003, master));								
+		batch.addLocator(26,MyModbusUtils.createBaseLocator(8004, master));									
+		batch.addLocator(27,MyModbusUtils.createBaseLocator(8005, master));								
+		batch.addLocator(28,MyModbusUtils.createBaseLocator(8006, master));								
+		batch.addLocator(29,MyModbusUtils.createBaseLocator(8007, master));								
+		batch.addLocator(30,MyModbusUtils.createBaseLocator(8008, master));								
+		batch.addLocator(31,MyModbusUtils.createBaseLocator(8009, master));									
+		batch.addLocator(32,MyModbusUtils.createBaseLocator(8010, master));//输出11
+		
+		return batch;
+	}
+	/**
+	 * 解析返回请求
+	 * @param res
+	 */
+	public void putBatchResult(BatchResults<Integer> res) {
+		if(res != null) {
+			this.FZ_b1 = MyModbusUtils.readBooleanToInt(res.getValue(0));	//按钮1
+			this.FZ_b2 = MyModbusUtils.readBooleanToInt(res.getValue(1));	
+			this.FZ_b3 = MyModbusUtils.readBooleanToInt(res.getValue(2));	
+			this.FZ_b4 = MyModbusUtils.readBooleanToInt(res.getValue(3));				
+			this.FZ_b5 = MyModbusUtils.readBooleanToInt(res.getValue(4));				
+			this.FZ_b6 = MyModbusUtils.readBooleanToInt(res.getValue(5));			
+			this.FZ_b7 = MyModbusUtils.readBooleanToInt(res.getValue(6));				
+			this.FZ_b8 = MyModbusUtils.readBooleanToInt(res.getValue(7));		
+			this.FZ_b9 = MyModbusUtils.readBooleanToInt(res.getValue(8));				
+			this.FZ_b10= MyModbusUtils.readBooleanToInt(res.getValue(9));				
+			this.FZ_b11= MyModbusUtils.readBooleanToInt(res.getValue(10));	//按钮11
+			
+			this.FZ_fw1 = MyModbusUtils.readBooleanToInt(res.getValue(11));	//反馈1
+			this.FZ_fw2 = MyModbusUtils.readBooleanToInt(res.getValue(12));	//反馈2
+			this.FZ_fw3 = MyModbusUtils.readBooleanToInt(res.getValue(13));	//反馈3
+			this.FZ_fw4 = MyModbusUtils.readBooleanToInt(res.getValue(14));	//反馈4
+			this.FZ_fw5 = MyModbusUtils.readBooleanToInt(res.getValue(15));	//反馈5
+			this.FZ_fw6 = MyModbusUtils.readBooleanToInt(res.getValue(16));	//反馈6
+			this.FZ_fw7 = MyModbusUtils.readBooleanToInt(res.getValue(17));	//反馈7
+			this.FZ_fw8 = MyModbusUtils.readBooleanToInt(res.getValue(18));	//反馈8
+			this.FZ_fw9 = MyModbusUtils.readBooleanToInt(res.getValue(19));	//反馈9
+			this.FZ_fw10= MyModbusUtils.readBooleanToInt(res.getValue(20));	//反馈10
+			this.FZ_fw11= MyModbusUtils.readBooleanToInt(res.getValue(21));	//反馈11
+			
+			this.FZ_ex1 = MyModbusUtils.readBooleanToInt(res.getValue(22));	//输出1
+			this.FZ_ex2 = MyModbusUtils.readBooleanToInt(res.getValue(23));	//输出2
+			this.FZ_ex3 = MyModbusUtils.readBooleanToInt(res.getValue(24));	//输出3
+			this.FZ_ex4 = MyModbusUtils.readBooleanToInt(res.getValue(25));	//输出4
+			this.FZ_ex5 = MyModbusUtils.readBooleanToInt(res.getValue(26));	//输出5
+			this.FZ_ex6 = MyModbusUtils.readBooleanToInt(res.getValue(27));	//输出6
+			this.FZ_ex7 = MyModbusUtils.readBooleanToInt(res.getValue(28));	//输出7
+			this.FZ_ex8 = MyModbusUtils.readBooleanToInt(res.getValue(29));	//输出8
+			this.FZ_ex9 = MyModbusUtils.readBooleanToInt(res.getValue(30));	//输出9
+			this.FZ_ex10= MyModbusUtils.readBooleanToInt(res.getValue(31));	//输出10
+			this.FZ_ex11= MyModbusUtils.readBooleanToInt(res.getValue(32));	//输出11
+		}
+	}
+	
+}

--
Gitblit v1.9.1