ConfigurationClient

Client for configuring mesh nodes after provisioning.

The Configuration Client communicates with a node's Configuration Server using the Device Key. Configuration operations include:

  • Adding and binding application keys

  • Setting publication and subscription addresses

  • Configuring node features (relay, proxy, friend)

  • Retrieving composition data

DeviceKey Limitation (Phase 1)

Configuration messages should be encrypted with the node's Device Key, but MeshNetwork.send currently only supports AppKey encryption. In Phase 1, configuration messages are sent via the same send path as model messages. A dedicated sendConfig API using DeviceKey will be added in a future phase.

Functions

Link copied to clipboard
abstract suspend fun addAppKey(node: MeshNode, appKey: ApplicationKey): ConfigurationStatus

Add an application key to a node.

Link copied to clipboard
abstract suspend fun addSubscription(node: MeshNode, elementAddress: MeshAddress.UnicastAddress, modelId: MeshModelId, address: MeshAddress): ConfigurationStatus

Subscribe a model to a group or virtual address.

Link copied to clipboard
abstract suspend fun bindAppKey(node: MeshNode, elementAddress: MeshAddress.UnicastAddress, modelId: MeshModelId, appKeyIndex: KeyIndex): ConfigurationStatus

Bind an application key to a specific model on an element.

Link copied to clipboard
abstract suspend fun getCompositionData(node: MeshNode): CompositionData

Get the composition data (page 0) from a node.

Link copied to clipboard
abstract suspend fun getDefaultTtl(node: MeshNode): UByte

Get the default TTL for outbound messages from a node.

Link copied to clipboard
abstract suspend fun removeSubscription(node: MeshNode, elementAddress: MeshAddress.UnicastAddress, modelId: MeshModelId, address: MeshAddress): ConfigurationStatus

Remove a subscription from a model.

Link copied to clipboard
abstract suspend fun setDefaultTtl(node: MeshNode, ttl: UByte): ConfigurationStatus

Set the default TTL for outbound messages from a node.

Link copied to clipboard
abstract suspend fun setFriend(node: MeshNode, enabled: Boolean): ConfigurationStatus

Enable or disable friend feature on a node.

Link copied to clipboard
abstract suspend fun setProxy(node: MeshNode, enabled: Boolean): ConfigurationStatus

Enable or disable proxy feature on a node.

Link copied to clipboard
abstract suspend fun setPublication(node: MeshNode, elementAddress: MeshAddress.UnicastAddress, modelId: MeshModelId, publishAddress: MeshAddress, appKeyIndex: KeyIndex, ttl: UByte): ConfigurationStatus

Set the publication address for a model.

Link copied to clipboard
abstract suspend fun setRelay(node: MeshNode, enabled: Boolean, retransmitCount: UByte, retransmitIntervalSteps: UByte): ConfigurationStatus

Enable or disable relay feature on a node.