SceneRange

@Serializable
data class SceneRange(val firstScene: SceneNumber, val lastScene: SceneNumber) : Range

The AllocatedSceneRange represents the range of scene numbers that the Provisioner can use to register new scenes in the mesh network, without needing to coordinate the allocated scene numbers with other Provisioners. The firstScene and lastScene represents values from 0x0001 to 0xFFFF. The value of the firstScene property shall be less than or equal to the value of the lastScene property.

Constructors

Link copied to clipboard
constructor(firstScene: SceneNumber, lastScene: SceneNumber)

Creates a Scene Range.

Properties

Link copied to clipboard

First scene a given range.

Link copied to clipboard

High value for a given range.

Link copied to clipboard

Last scene for a given range.

Link copied to clipboard
val low: UShort

Low value for a given range.

Link copied to clipboard
internal open override var range: UIntRange

Functions

Link copied to clipboard
fun contains(value: UShort): Boolean

Checks if the given value is within the range.

fun contains(other: Range): Boolean

Checks if the given value is contained within the range.

Link copied to clipboard
fun distance(other: Range): Int

Returns the closest distance between this and the given range.

Link copied to clipboard
operator fun minus(other: Range): List<Range>

Removes one range from the other.

Link copied to clipboard
fun overlap(other: List<Range>): List<Range>

fun overlap(other: Range): Range?

Returns the overlapping region of a given range

Link copied to clipboard
fun overlaps(otherRanges: List<Range>): Boolean

Checks if the given list of ranges overlaps with the current range

fun overlaps(other: Range): Boolean

Checks if the given range overlaps.

Link copied to clipboard
operator fun plus(other: Range): List<Range>

Adds a range to another.