add

fun add(provisioner: Provisioner)

Adds the given Provisioner to the list of provisioners in the network.

Parameters

provisioner

Provisioner to be added.

Throws

if the provisioner already exists.

if the provisioner does not belong to this network.

if no address is available to be assigned.

if the given provisioner has any overlapping address ranges with an existing provisioner.


fun add(provisioner: Provisioner, address: UnicastAddress?)

Adds the given Provisioner with the given address to the list of provisioners in the network.

Parameters

provisioner

Provisioner to be added.

Throws

if the provisioner already exists.

if the provisioner does not belong to this network.

if the given provisioner has any overlapping address ranges with an existing provisioner.


fun add(name: String, key: ByteArray = Crypto.generateRandomKey(), index: KeyIndex? = null): NetworkKey

Adds the given NetworkKey to the list of network keys in the network.

Parameters

name

Network key name.

key

128-bit key to be added.

index

Network key index.

Throws

if the key index is not within 0 - 4095.

if the key index is already in use.


fun add(name: String, key: ByteArray = Crypto.generateRandomKey(), index: KeyIndex? = null, boundNetworkKey: NetworkKey): ApplicationKey

Adds the given ApplicationKey to the list of network keys in the network.

Parameters

name

Application key name.

key

128-bit key to be added.

index

Application key index.

boundNetworkKey

Network key to which the application key must be bound to.

Throws

if the key index is not within 0 - 4095.

if the key index is already in use.


fun add(node: Node)

Adds a given Node to the list of nodes in the mesh network.

Parameters

node

Node to be added to the network.

Throws

If the node already exists.

If the node is not assigned with an address.

If the node does not contain a network key.

If the network key in the node does not match the keys in the network.


fun add(group: Group)

Adds a given Group to the list of groups in the mesh network.

Parameters

group

Group to be removed.

Throws

If the group does not belong to the network.

If the group already exists.


fun add(name: String, number: SceneNumber): Scene

Adds a given Scene with the given name and the scene number to the mesh network.

Parameters

name

Name of the scene.

number

Scene number.

Throws

If the scene already exists.