Class ModbusElement

Direct Known Subclasses:

public abstract sealed class ModbusElement extends Object permits AbstractModbusElement<SELF,RAW,T>
This abstract class serves as an Interface-like abstraction to avoid Java Generics for external access.
  • Field Details

    • startAddress

      public final int startAddress
      The start address of this Modbus element.
    • length

      public final int length
      Number of Registers or Coils.
  • Constructor Details

    • ModbusElement

      public ModbusElement(int startAddress, int length)
  • Method Details

    • deactivate

      public abstract void deactivate()
      This is called on deactivate of the Modbus-Bridge. It can be used to clear any references like listeners.
    • invalidate

      public abstract void invalidate(AbstractModbusBridge bridge)
      Invalidates the Channel in case it could not be read from the Modbus device, i.e. sets the value to 'UNDEFINED'/null. Applies the 'invalidateElementsAfterReadErrors' config setting of the bridge.
      bridge - the AbstractModbusBridge
    • setModbusTask

      public final void setModbusTask(Task task)
      Set the Task, where this Element belongs to.

      This is called by the AbstractTask constructor.

      task - the Task
    • getModbusTask

      public final Task getModbusTask()