k 2 lat temu
rodzic
commit
cf29b42b20
26 zmienionych plików z 47 dodań i 115 usunięć
  1. 44 3
      .gitignore
  2. 3 9
      pom.xml
  3. 0 2
      target/classes/META-INF/additional-spring-configuration-metadata.json
  4. 0 98
      target/classes/META-INF/spring-configuration-metadata.json
  5. 0 3
      target/classes/META-INF/spring.factories
  6. BIN
      target/classes/com/jwk/spring/boot/autoconfigure/ModbusAutoConfiguration.class
  7. BIN
      target/classes/com/jwk/spring/boot/autoconfigure/ModbusProperties$RtuMaster.class
  8. BIN
      target/classes/com/jwk/spring/boot/autoconfigure/ModbusProperties$TcpMaster.class
  9. BIN
      target/classes/com/jwk/spring/boot/autoconfigure/ModbusProperties.class
  10. BIN
      target/classes/com/jwk/spring/boot/autoconfigure/ModbusRtuMasterTemplate.class
  11. BIN
      target/classes/com/jwk/spring/boot/autoconfigure/ModbusTcpMasterTemplate.class
  12. BIN
      target/classes/com/jwk/spring/boot/constant/Constant$FUNCTION_CODE.class
  13. BIN
      target/classes/com/jwk/spring/boot/constant/Constant.class
  14. BIN
      target/classes/com/jwk/spring/boot/constant/DATA_TYPE_WRAPPER.class
  15. BIN
      target/classes/com/jwk/spring/boot/modbus4j/ModbusMasterUtil.class
  16. BIN
      target/classes/com/jwk/spring/boot/modbus4j/ModbusRtuMaster.class
  17. BIN
      target/classes/com/jwk/spring/boot/modbus4j/ModbusTcpMaster.class
  18. BIN
      target/classes/com/jwk/spring/boot/modbus4j/util/rtu/MyProcessImageListener.class
  19. BIN
      target/classes/com/jwk/spring/boot/modbus4j/util/rtu/SerialPortUtils.class
  20. BIN
      target/classes/com/jwk/spring/boot/modbus4j/util/rtu/SerialPortWrapperImpl.class
  21. BIN
      target/classes/com/jwk/spring/boot/test/ModbusTcpMasterUtil.class
  22. BIN
      target/classes/com/jwk/spring/boot/test/RtuMasterTest.class
  23. BIN
      target/classes/com/jwk/spring/boot/test/RtuSlaveTest$1.class
  24. BIN
      target/classes/com/jwk/spring/boot/test/RtuSlaveTest.class
  25. BIN
      target/classes/com/jwk/spring/boot/test/Test.class
  26. BIN
      target/test-classes/com/jwk/AppTest.class

+ 44 - 3
.gitignore

@@ -1,3 +1,44 @@
-/.idea/
-/target/
-/modbus-spring-boot-starter.iml
+######################################################################
+# Build Tools
+
+.gradle
+/build/
+!gradle/wrapper/gradle-wrapper.jar
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+######################################################################
+# IDE
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 3 - 9
pom.xml

@@ -69,25 +69,19 @@
 
     <!--modbus4j start-->
     <dependency>
-      <groupId>com.RXTXcomm</groupId>
+      <groupId>com.jwk</groupId>
       <artifactId>RXTXcomm</artifactId>
       <version>3.0.5</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/src/main/resources/lib/RXTXcomm.jar</systemPath>
     </dependency>
     <dependency>
-      <groupId>com.serotonin</groupId>
+      <groupId>com.jwk</groupId>
       <artifactId>modbus4j</artifactId>
       <version>3.0.5</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/src/main/resources/lib/modbus4j-3.0.5.jar</systemPath>
     </dependency>
     <dependency>
-      <groupId>org.scream3r</groupId>
+      <groupId>com.jwk</groupId>
       <artifactId>jssc</artifactId>
       <version>2.8.0</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/src/main/resources/lib/jssc-2.8.0.jar</systemPath>
     </dependency>
     <!--modbus4j end-->
   </dependencies>

+ 0 - 2
target/classes/META-INF/additional-spring-configuration-metadata.json

@@ -1,2 +0,0 @@
-{
-}

+ 0 - 98
target/classes/META-INF/spring-configuration-metadata.json

@@ -1,98 +0,0 @@
-{
-  "groups": [
-    {
-      "name": "modbus",
-      "type": "com.jwk.spring.boot.autoconfigure.ModbusProperties",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties"
-    },
-    {
-      "name": "modbus.rtu-master",
-      "type": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties"
-    },
-    {
-      "name": "modbus.tcp-master",
-      "type": "com.jwk.spring.boot.autoconfigure.ModbusProperties$TcpMaster",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties"
-    }
-  ],
-  "properties": [
-    {
-      "name": "modbus.rtu-master.baud-rate",
-      "type": "java.lang.Integer",
-      "description": "波特率",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": 9600
-    },
-    {
-      "name": "modbus.rtu-master.data-bits",
-      "type": "java.lang.Integer",
-      "description": "数据位的位数,RTU是8位,ASCII是7位",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": 8
-    },
-    {
-      "name": "modbus.rtu-master.flow-control-in",
-      "type": "java.lang.Integer",
-      "description": "硬件之间输入流应答控制",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": 0
-    },
-    {
-      "name": "modbus.rtu-master.flow-control-out",
-      "type": "java.lang.Integer",
-      "description": "硬件之间输出流应答控制",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": 0
-    },
-    {
-      "name": "modbus.rtu-master.open",
-      "type": "java.lang.Boolean",
-      "description": "是否打开串口",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": false
-    },
-    {
-      "name": "modbus.rtu-master.parity",
-      "type": "java.lang.Integer",
-      "description": "奇偶校验位,无校验是0,奇校验是1,偶校验是2",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": 0
-    },
-    {
-      "name": "modbus.rtu-master.port",
-      "type": "java.lang.String",
-      "description": "串口",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": "COM1"
-    },
-    {
-      "name": "modbus.rtu-master.stop-bits",
-      "type": "java.lang.Integer",
-      "description": "停止位的位数,如果无奇偶校验为2,有奇偶校验为1",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$RtuMaster",
-      "defaultValue": 1
-    },
-    {
-      "name": "modbus.tcp-master.host",
-      "type": "java.lang.String",
-      "description": "ip",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$TcpMaster",
-      "defaultValue": "localhost"
-    },
-    {
-      "name": "modbus.tcp-master.open",
-      "type": "java.lang.Boolean",
-      "description": "是否打开Tcp连接",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$TcpMaster",
-      "defaultValue": false
-    },
-    {
-      "name": "modbus.tcp-master.port",
-      "type": "java.lang.Integer",
-      "description": "端口",
-      "sourceType": "com.jwk.spring.boot.autoconfigure.ModbusProperties$TcpMaster"
-    }
-  ],
-  "hints": []
-}

+ 0 - 3
target/classes/META-INF/spring.factories

@@ -1,3 +0,0 @@
-# Auto Configure
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-com.jwk.spring.boot.autoconfigure.ModbusAutoConfiguration

BIN
target/classes/com/jwk/spring/boot/autoconfigure/ModbusAutoConfiguration.class


BIN
target/classes/com/jwk/spring/boot/autoconfigure/ModbusProperties$RtuMaster.class


BIN
target/classes/com/jwk/spring/boot/autoconfigure/ModbusProperties$TcpMaster.class


BIN
target/classes/com/jwk/spring/boot/autoconfigure/ModbusProperties.class


BIN
target/classes/com/jwk/spring/boot/autoconfigure/ModbusRtuMasterTemplate.class


BIN
target/classes/com/jwk/spring/boot/autoconfigure/ModbusTcpMasterTemplate.class


BIN
target/classes/com/jwk/spring/boot/constant/Constant$FUNCTION_CODE.class


BIN
target/classes/com/jwk/spring/boot/constant/Constant.class


BIN
target/classes/com/jwk/spring/boot/constant/DATA_TYPE_WRAPPER.class


BIN
target/classes/com/jwk/spring/boot/modbus4j/ModbusMasterUtil.class


BIN
target/classes/com/jwk/spring/boot/modbus4j/ModbusRtuMaster.class


BIN
target/classes/com/jwk/spring/boot/modbus4j/ModbusTcpMaster.class


BIN
target/classes/com/jwk/spring/boot/modbus4j/util/rtu/MyProcessImageListener.class


BIN
target/classes/com/jwk/spring/boot/modbus4j/util/rtu/SerialPortUtils.class


BIN
target/classes/com/jwk/spring/boot/modbus4j/util/rtu/SerialPortWrapperImpl.class


BIN
target/classes/com/jwk/spring/boot/test/ModbusTcpMasterUtil.class


BIN
target/classes/com/jwk/spring/boot/test/RtuMasterTest.class


BIN
target/classes/com/jwk/spring/boot/test/RtuSlaveTest$1.class


BIN
target/classes/com/jwk/spring/boot/test/RtuSlaveTest.class


BIN
target/classes/com/jwk/spring/boot/test/Test.class


BIN
target/test-classes/com/jwk/AppTest.class