Class AllocatedSceneRange

java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.Range
org.openremote.agent.protocol.bluetooth.mesh.AllocatedSceneRange

public class AllocatedSceneRange extends Range
  • Constructor Details

    • AllocatedSceneRange

      public AllocatedSceneRange(int firstScene, int lastScene)
      Constructs AllocatedSceneRange for provisioner
      Parameters:
      firstScene - high address of group range
      lastScene - low address of group range
  • Method Details

    • getLowerBound

      public final int getLowerBound()
      Description copied from class: Range
      Returns the lower bound of the Range
      Specified by:
      getLowerBound in class Range
    • getUpperBound

      public final int getUpperBound()
      Description copied from class: Range
      Returns the upper bound of the range
      Specified by:
      getUpperBound in class Range
    • minus

      public List<Range> minus(Range left, Range right)
    • getLastScene

      public int getLastScene()
      Returns the low address of the allocated group address
      Returns:
      low address
    • setLastScene

      public void setLastScene(int lastScene)
      Sets the low address of the allocated group address
      Parameters:
      lastScene - of the group range
    • getFirstScene

      public int getFirstScene()
      Returns the high address of the allocated group range
      Returns:
      firstScene of the group range
    • setFirstScene

      public void setFirstScene(int firstScene)
      Sets the high address of the group address
      Parameters:
      firstScene - of the group range
    • range

      public int range()
      Description copied from class: Range
      Returns the address range as a int
      Specified by:
      range in class Range
    • overlaps

      public boolean overlaps(Range otherRange)
      Description copied from class: Range
      Checks if two ranges overlaps
      Specified by:
      overlaps in class Range
      Parameters:
      otherRange - other range
      Returns:
      true if overlaps or false otherwise
    • minus

      public static List<AllocatedSceneRange> minus(List<AllocatedSceneRange> ranges, AllocatedSceneRange other)
      Subtracts a range from a list of ranges
      Parameters:
      ranges - ranges to be subtracted
      other - AllocatedSceneRange range
      Returns:
      a resulting AllocatedSceneRange or null otherwise