Package-level declarations

Types

Link copied to clipboard
typealias Address = UShort

Type alias for an unsigned 16-bit address.

Link copied to clipboard
@Serializable
sealed class AddressRange : Range

Allocated address range.

Link copied to clipboard

A message sent to the all-friends address shall be processed by the primary element of all nodes that have the friend functionality enabled.

Link copied to clipboard

A message sent to the all-nodes address shall be processed by the primary element of all nodes.

Link copied to clipboard

A message sent to the all-proxies address shall be processed by the primary element of all nodes that have the proxy functionality enabled.

Link copied to clipboard

A message sent to the all-relays address shall be processed by the primary element of all nodes that have the relay functionality enabled.

Link copied to clipboard
@Serializable
data class ApplicationKey

Application Keys are used to secure communications at the upper transport layer. The application key (AppKey) shall be generated using a random number generator compatible with the requirements in Volume 2, Part H, Section 2 of the Core Specification 1.

Link copied to clipboard
@Serializable(with = CredentialsSerializer::class)
sealed class Credentials

The credentials property contains an integer of 0 or 1 that represents whether managed flooding security material (0) or friendship security material (1) is used.

Link copied to clipboard
@Serializable
data class Element(val location: Location, _models: MutableList<Model> = mutableListOf())

Element represents a mesh element that is defined as an addressable entity within a mesh node.

Link copied to clipboard
@Serializable
sealed class Feature

Represents a type feature.

Link copied to clipboard
@Serializable(with = FeaturesSerializer::class)
data class Features

Features represents the functionality of a Node that is determined by the set features that the node supports.

Link copied to clipboard
@Serializable
sealed class FeatureState

FeatureState describes the state of a given Feature.

Link copied to clipboard
@Serializable
sealed class FixedGroupAddress : MeshAddress, ProxyFilterAddress

There are two types of group address; those that can be assigned dynamically and those that are fixed. Fixed group addresses are in the range of 0xFF00 through 0xFFFF.

Link copied to clipboard
@Serializable
data class Friend : Feature

Friend feature is the ability to operate within a mesh network at significantly reduced receiver duty cycles only in conjunction with a node supporting the Friend feature.

Link copied to clipboard

Friendship security material is used for Publishing.

Link copied to clipboard
@Serializable
data class Group(_name: String, val address: PrimaryGroupAddress)

Group defines a GroupAddress of type PrimaryGroupAddress to which a node may subscribe to.

Link copied to clipboard

A group address is an address that is programmed into zero or more elements. A group address has bit 15 set to 1 and bit 14 set to 1. Group addresses in the range 0xFF00 through 0xFFFF are reserved for FixedGroupAddress, and addresses in the range 0xC000 through 0xFEFF are generally available for other usage.

Link copied to clipboard
@Serializable
data class GroupRange(val lowAddress: GroupAddress, val highAddress: GroupAddress) : AddressRange

The AllocatedGroupRange represents the range of group addresses that the Provisioner can allocate to newly created groups, without needing to coordinate the group additions with other Provisioners. The lowAddress and highAddress properties represent values from 0xC000 to 0xFEFF. The value of the lowAddress property shall be less than or equal to the value of the highAddress property.

Link copied to clipboard
interface HasAddress

An interface containing a property type address.

Link copied to clipboard

An address that is used as a destination address by a Heartbeat Publication or a Heartbeat Subscription message. This represents a UnicastAddress, GroupAddress.

Link copied to clipboard
@Serializable
data class HeartbeatPublication

The heartbeat publication represents parameters that define the sending of periodic Heartbeat transport control messages.

Link copied to clipboard

Heartbeat publication destination address for heartbeat messages. This represents a UnicastAddress, GroupAddress or an UnassignedAddress.

Link copied to clipboard
@Serializable
data class HeartbeatSubscription

The heartbeat subscription object represents parameters that define the receiving of periodical Heartbeat transport control messages.

Link copied to clipboard

Heartbeat subscription destination address for heartbeat messages. This represents a UnicastAddress or a GroupAddress.

Link copied to clipboard

Heartbeat subscription source address for heartbeat messages. This represents a UnicastAddress.

Link copied to clipboard
data object Insecure : Security

Describes an insecure security level.

Link copied to clipboard
data class IvIndex(val index: UInt, val isIvUpdateActive: Boolean = false, val transitionDate: Instant = Clock.System.now())

The IV Index received with the last Secure Network Beacon and its current state.

Link copied to clipboard

First phase of Key Refresh procedure, distributes new keys to all nodes. Nodes will transmit using old keys, but can receive using old and new keys.

Link copied to clipboard
typealias KeyIndex = UShort

A Key Index is 12-bit long Unsigned Integer. This property returns true if the value is in range 0...4095.

Link copied to clipboard
@Serializable(with = KeyRefreshPhaseSerializer::class)
sealed class KeyRefreshPhase

The Key Refresh Phase state indicates and controls the Key Refresh procedure for each NetKey in the NetKey List.

Link copied to clipboard

Locations defined by bluetooth SIG. Refer: https://www.bluetooth.com/specifications/assigned-numbers/gatt-namespace-descriptors

Link copied to clipboard
@Serializable
data class LowPower : Feature

LowPower feature is the ability to help a node supporting the Low Power feature to operate by storing messages destined for those nodes.

Link copied to clipboard
@Serializable(with = CredentialsSerializer::class)
data object MasterSecurity : Credentials

Master security material is used for Publishing.

Link copied to clipboard
@Serializable(with = MeshAddressSerializer::class)
sealed class MeshAddress : HasAddress

Wrapper class for Address.

Link copied to clipboard
@Serializable
class MeshNetwork

MeshNetwork representing a Bluetooth mesh network.

Link copied to clipboard
@Serializable
data class Model

Represents Bluetooth mesh model contained in an element in a node.

Link copied to clipboard
@Serializable(with = ModelIdSerializer::class)
sealed class ModelId

Represents Model ID of a Bluetooth mesh model.

Link copied to clipboard
@Serializable
data class NetworkKey

AThe network key object represents the state of the mesh network key that is used for securing communication at the network layer.

Link copied to clipboard
@Serializable
data class NetworkTransmit

The network transmit object represents the parameters of the transmissions of network layer messages originating from a mesh node.

Link copied to clipboard
@Serializable
data class Node

The node represents a configured state of a mesh node.

Link copied to clipboard
@Serializable
data class NodeKey

The state of a NetworkKey or ApplicationKey distributed to a mesh node by a Mesh Manager.

Link copied to clipboard

Normal operation; Key Refresh procedure is not active.

Link copied to clipboard

An address type used to identify a GroupAddress, VirtualAddress or an UnassignedAddress that's used as a parent address of a group. Parent group address cannot be a fixed group address and not allocatable to a provisioner as a range.

Link copied to clipboard

An address type used to identify a GroupAddress or a VirtualAddress that's used to create a group. Primary group address cannot be a fixed group address and not allocatable to a provisioner as a range.

Link copied to clipboard
@Serializable
data class Provisioner

A Provisioner is capable of provisioning a device to a mesh network and is represented by a provisioner object in the Mesh Configuration Database. A provisioner is represented as a node in mesh network only if it is assigned a unicast address. Having a unicast address assigned allows configuring nodes in the mesh network. Otherwise, a provisioner can only provision nodes to a mesh network.

Link copied to clipboard
@Serializable
data class Proxy : Feature

Proxy feature is the ability to receive and retransmit mesh messages between GATT and advertising bearers.

Link copied to clipboard

An address type that can be added to a Proxy Filter List. This represents a UnicastAddress, GroupAddress, VirtualAddress or a FixedGroupAddress.

Link copied to clipboard

An address a model may publish to. This represents a UnicastAddress, GroupAddress or a VirtualAddress.

Link copied to clipboard
@Serializable
data class Publish(val address: PublicationAddress, val index: KeyIndex, val ttl: UByte, val period: PublishPeriod, val credentials: Credentials, val retransmit: Retransmit)

The publish object represents parameters that define how the messages are published by a mesh model.

Link copied to clipboard
@Serializable
data class PublishPeriod(val steps: UByte, val resolution: StepResolution)

The publish period object determines the interval at which messages are published by a model and is defined by two values: the number of steps and step resolution. The publish period is calculated as a product of the number of steps and step resolution. For example, if the value of the numberOfSteps property is 3 and the value of the resolution property is 1000, the publish period is 3000 ms.

Link copied to clipboard
@Serializable
sealed class Range

Allocated Range.

Link copied to clipboard
@Serializable
data class Relay : Feature

Relay feature is the ability to receive and retransmit mesh messages over the advertising bearer to enable larger networks.

Link copied to clipboard
@Serializable
data class RelayRetransmit

The relay retransmit object represents the parameters of the retransmissions of network layer messages relayed by a mesh node.

Link copied to clipboard
@Serializable
data class Retransmit(val count: UByte, val interval: Duration)

The retransmit object is used to describe the number of times a message is published and the interval between retransmissions of the published messages.

Link copied to clipboard
@Serializable
data class Scene

Scene

Link copied to clipboard
typealias SceneNumber = UShort
Link copied to clipboard
@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.

Link copied to clipboard
data object Secure : Security

Describes a secure security level.

Link copied to clipboard
@Serializable(with = SecuritySerializer::class)
sealed class Security

Security level describes a minimum security level of a subnet associated with this network key. If all the nodes on the subnet associated with this network key have been provisioned using the Secure Provisioning procedure 1, then the value of minSecurity property for the subnet is set to “secure”; otherwise, the value of the minSecurity is set to “insecure”.

Link copied to clipboard
@Serializable
data class SigModelId(val modelIdentifier: UShort) : ModelId

Wrapper class for 16-bit Bluetooth SIG model identifier.

Link copied to clipboard

Mesh implementation of step resolution is a 2-bit field that enumerates the number of steps.

Link copied to clipboard

An address a model may subscribe to. This represents a GroupAddress, VirtualAddress, AllProxies, AllFriends or an AllRelays address.

Link copied to clipboard
data class TransitionTime(val steps: UByte, val stepResolution: StepResolution)

This structure represents a time needed to transition from one state to another, for example dimming a light.

Link copied to clipboard

A unicast address is a unique address allocated to each element. A unicast address has bit 15 set to 0. The unicast address shall not have the value 0x0000, and therefore can have any value from 0x0001 to 0x7FFF inclusive.

Link copied to clipboard
@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.

Link copied to clipboard

Second phase of Key Refresh procedure, nodes will use the new keys when encrypting messages but will still receive using the old or new keys. Nodes shall only receive Secure Network beacons secured using the new Network Key.

Link copied to clipboard
@Serializable
data class VendorModelId : ModelId

Wrapper class for 32-bit vendor model identifier.

Link copied to clipboard

A virtual address represents a set of destination addresses. Each virtual address logically represents a Label UUID, which is a 128-bit value that does not have to be managed centrally. One or more elements may be programmed to publish or subscribe to a Label UUID. The Label UUID is not transmitted and shall be used as the Additional Data field of the message integrity check value in the upper transport layer.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the list of addresses from a list of nodes.

Link copied to clipboard

Returns a list of application keys bound to a given network key.

Link copied to clipboard
infix fun List<ApplicationKey>.contains(networkKey: NetworkKey): Boolean

Checks whether any of the Application keys in the List is bound to the given network Key. The key comparison is based on Key Index property.

operator fun List<Range>.contains(range: Range): Boolean

Checks if an element in the list of ranges contains the given range.

operator fun UIntRange.contains(other: UIntRange): Boolean

Checks if the given range is within the range.

Link copied to clipboard

Returns the list of elements from a list of nodes.

Link copied to clipboard

Returns an Application Key with the given KeyIndex

infix fun List<NetworkKey>.get(index: KeyIndex): NetworkKey?

Returns an Network Key with the given KeyIndex.

Link copied to clipboard

Checks if the Key index is of the given valid range.

Link copied to clipboard

Filters the list of Application keys to only those that are known to the given node.

Filters the list of Network Keys to only those that are known to the given node.

Link copied to clipboard

Merges any overlapping ranges within a given list of ranges.

Link copied to clipboard
operator fun List<Range>.minus(other: List<Range>): List<Range>
operator fun List<Range>.minus(other: Range): List<Range>
Link copied to clipboard
operator fun MutableList<Range>.minusAssign(other: List<Range>)
operator fun MutableList<Range>.minusAssign(other: Range)
Link copied to clipboard
fun List<Model>.model(modelId: ModelId): Model?

Returns the model with the given model id.

fun List<Model>.model(companyIdentifier: UShort?, modelIdentifier: UShort): Model?

Returns the model for a given company and model identifier.

Link copied to clipboard

Returns the overlapping region for a given range.

fun List<Range>.overlap(range: Range): List<Range>

Returns a list of overlapping regions for a given range.

Link copied to clipboard

Checks if the elements in the list of ranges overlaps with the given ranges.

Checks if an element in the list of ranges overlaps with the given range.

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

Converts an array of Features to a Features object.

Link copied to clipboard
fun Address.toHex(prefix0x: Boolean = false): String

Represents a hex representation of an Address in String,

Link copied to clipboard

Converts the Duration to publish period object.

Link copied to clipboard

Converts an array of Features to a raw value.