package com.mes.connect.protocol; /** * 协议地址类 */ public class ProtocolAddress { private final ProtocolType protocol; private final int functionCode; private final int dbNumber; private final int address; private final int bit; public ProtocolAddress(ProtocolType protocol, int functionCode, int dbNumber, int address, int bit) { this.protocol = protocol; this.functionCode = functionCode; this.dbNumber = dbNumber; this.address = address; this.bit = bit; } // Getters public ProtocolType getProtocol() { return protocol; } public int getFunctionCode() { return functionCode; } public int getDbNumber() { return dbNumber; } public int getAddress() { return address; } public int getBit() { return bit; } @Override public String toString() { return "ProtocolAddress{" + "protocol=" + protocol + ", functionCode=" + functionCode + ", dbNumber=" + dbNumber + ", address=" + address + ", bit=" + bit + '}'; } }