UnicastRange

@Serializable
data class UnicastRange(val lowAddress: UnicastAddress, val highAddress: UnicastAddress) : AddressRange

The AllocatedUnicastRange represents the range of unicast addresses that the Provisioner can allocate to new devices when they are provisioned onto the mesh network, without needing to coordinate the node additions with other Provisioners. The lowAddress and highAddress represent values from 0x0001 to 0x7FFF. The value of the lowAddress property shall be less than or equal to the value of the highAddress property.

Constructors

Link copied to clipboard
constructor(address: UnicastAddress, elementsCount: Int)
constructor(lowAddress: UnicastAddress, highAddress: UnicastAddress)

Creates a Unicast Range.

Properties

Link copied to clipboard

High value for a given range.

Link copied to clipboard
open override val highAddress: UnicastAddress

High address for a given range.

Link copied to clipboard
val low: UShort

Low value for a given range.

Link copied to clipboard
open override val lowAddress: UnicastAddress

Low address for a given range.

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.