Class ModbusTag

    • Field Detail

      • ADDRESS_PATTERN

        public static final Pattern ADDRESS_PATTERN
      • FIXED_DIGIT_MODBUS_PATTERN

        public static final Pattern FIXED_DIGIT_MODBUS_PATTERN
      • PROTOCOL_ADDRESS_OFFSET

        public static final int PROTOCOL_ADDRESS_OFFSET
        See Also:
        Constant Field Values
    • Constructor Detail

      • ModbusTag

        protected ModbusTag​(int address,
                            Integer quantity,
                            ModbusDataType dataType)
        Instantiate a new ModbusTag
        Parameters:
        address - The WIRE address that is to be used.
        quantity - The number of registers
        dataType - The type for the interpretation of the registers.
    • Method Detail

      • getAddressStringPrefix

        protected abstract String getAddressStringPrefix()
      • getAddress

        public int getAddress()
        Get the technical address that must be used 'on the wire'
        Returns:
        The address that is to be used on the wire (shifted by 1 because of the modbus spec).
      • getLogicalAddress

        public abstract int getLogicalAddress()
        Get the logical (configured) address
        Returns:
        The address which was configured and is different from what is used on the wire.
      • getNumberOfElements

        public int getNumberOfElements()
      • getLengthBytes

        public int getLengthBytes()
      • getLengthWords

        public int getLengthWords()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object