| | |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | index=this.addressIndex; |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | int addressLength = this.addressLength; |
| | | if (addressLength < 2) { |
| | | return null; |
| | | } |
| | | int wordindex = index; |
| | | return stringdatas[0] + "." + wordindex; |
| | | /* if (addressLength == 2) { |
| | | |
| | | if (addressLength == 2) { |
| | | int wordindex = index; |
| | | |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | |
| | | int wordindex = index; |
| | | int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex + "-" + newIndex; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public int getPlcAddress() { |
| | | |
| | | return addressIndex; |
| | | }*/ |
| | | // return null; |
| | | } |
| | | |
| | | public String getAddress() { |