Class AllocatedSceneRange
java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.Range
org.openremote.agent.protocol.bluetooth.mesh.AllocatedSceneRange
-
Field Summary
Fields inherited from class org.openremote.agent.protocol.bluetooth.mesh.Range
lowerBound, upperBound
-
Constructor Summary
ConstructorsConstructorDescriptionAllocatedSceneRange
(int firstScene, int lastScene) ConstructsAllocatedSceneRange
for provisioner -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the high address of the allocated group rangeint
Returns the low address of the allocated group addressfinal int
Returns the lower bound of the Rangefinal int
Returns the upper bound of the rangestatic List
<AllocatedSceneRange> minus
(List<AllocatedSceneRange> ranges, AllocatedSceneRange other) Subtracts a range from a list of rangesboolean
Checks if two ranges overlapsint
range()
Returns the address range as a intvoid
setFirstScene
(int firstScene) Sets the high address of the group addressvoid
setLastScene
(int lastScene) Sets the low address of the allocated group addressMethods inherited from class org.openremote.agent.protocol.bluetooth.mesh.Range
mergeGroupRanges, mergeSceneRanges, mergeUnicastRanges, overlaps
-
Constructor Details
-
AllocatedSceneRange
public AllocatedSceneRange(int firstScene, int lastScene) ConstructsAllocatedSceneRange
for provisioner- Parameters:
firstScene
- high address of group rangelastScene
- 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 classRange
-
getUpperBound
public final int getUpperBound()Description copied from class:Range
Returns the upper bound of the range- Specified by:
getUpperBound
in classRange
-
minus
-
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 -
overlaps
Description copied from class:Range
Checks if two ranges overlaps -
minus
public static List<AllocatedSceneRange> minus(List<AllocatedSceneRange> ranges, AllocatedSceneRange other) Subtracts a range from a list of ranges- Parameters:
ranges
- ranges to be subtractedother
-AllocatedSceneRange
range- Returns:
- a resulting
AllocatedSceneRange
or null otherwise
-