send
Encrypts the message with the Application Key and the Network Key bound to it, and sends to the given destination address.
The method completes when the message has been sent or an error occurred.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Source Element. If nil, the primary Element will be used. The Element must belong to the local Provisioner's Node.
Destination address.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
The Application Key to sign the message.
Throws
if the mesh network has not been created.
if the Local Provisioner has no Unicast Address assigned.
if the Address is not Unicast Address, an Unknown destination Node, the Node does not have a Network Key,the Node's device key is unknown or Cannot remove last Network Key.
if the element does not belong to the local node.
if the TTL value is invalid.
Encrypts the message with the Application Key and a Network Key bound to it, and sends to the given Group.
The method completes when the message has been sent or an error occurred.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Source Element. If null, the primary Element will be used. The Element must belong to the local Provisioner's Node.
Target Group.
Initial TTL (Time To Live) value of the message. If null, the default Node TTL will be used.
Application Key to sign the message.
Throws
if the mesh network has not been created.
if the Local Provisioner has no Unicast Address assigned.
if the Address is not Unicast Address, an Unknown destination Node, the Node does not have a Network Key,the Node's device key is unknown or Cannot remove last Network Key.
if the element does not belong to the local node.
if the TTL value is invalid.
Encrypts the message with the first Application Key bound to the given Model and the Network Key bound to it, and sends it to the Node to which the Model belongs to.
The method completes when the message has been sent or an error occurred.
An appropriate callback of the `MeshNetworkDelegate` will be called when th message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Source Element. If nil, the primary Element will be used. The Element must belong to the local Provisioner's Node.
Destination Model.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
if the mesh network has not been created.
if the element does not belong to a node.
if the model is not bound to any application key.
Encrypts the message with the common Application Key bound to both given Models and the Network Key bound to it, and sends it to the Node to which the target Model belongs to.
The method completes when the message has been sent or an error occurred.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Source Model who's primary Element will be used.
Destination Model.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
if the mesh network has not been created.
if the element does not belong to a node.
if the model is not bound to any application key.
if the source model does not belong to an Element or if the element does not belong to the local node.
Encrypts the message with the first Application Key bound to the given Model and a Network Key bound to it, and sends it to the Node to which the Model belongs to and returns the response.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Source Element. If nil, the primary Element will be used. The Element must belong to the local Provisioner's Node.
Destination Model.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
if the mesh network has not been created.
if the Model does not belong to an Element.
if the model is not bound to any application key.
if the Local Provisioner has not Unicast Address assigned.
if the element does not belong to the local node.
if the TTL value is invalid.
Encrypts the message with the common Application Key bound to both given Models and a Network Key bound to it, and sends it to the Node to which the target Model belongs to.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Source Model who's primary element will be used.
Destination Model.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
if the mesh network has not been created.
if the Model does not belong to an Element.
if the model is not bound to any application key.
if the source model does not belong to an Element.
if the element does not belong to the local node.
if the TTL value is invalid.
Sends a Configuration Message to the Node with given destination address and returns the received response.
The destination must be a Unicast Address, otherwise the method throws an InvalidDestination error.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Destination Unicast Address.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
if the mesh network has not been created.
if the Local Provisioner has no Unicast Address assigned.
if the Address is not Unicast Address, an Unknown destination Node, the Node does not have a Network Key,the Node's device key is unknown or Cannot remove last Network Key.
When trying to delete the last Network Key on the device.
if the TTL value is invalid.
Sends a Configuration Message to the primary Element on the given Node.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Destination Node.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
when trying to delete the last Network Key on the device.
if the mesh network has not been created.
if the Local Provisioner has no Unicast Address assigned.
if the Address is not Unicast Address, an Unknown destination Node, the Node does not have a Network Key,the Node's device key is unknown or Cannot remove last Network Key.
if the TTL value is invalid.
Sends Configuration Message to the Node with given destination Address.
The destination must be a UnicastAddress, otherwise the method throws an InvalidDestination error.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Destination Unicast Address.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
when trying to delete the last Network Key on the device.
if the mesh network has not been created.
if the Local Provisioner has no Unicast Address assigned.
if the Address is not Unicast Address, an Unknown destination Node, the Node does not have a Network Key,the Node's device key is unknown or Cannot remove last Network Key.
if the TTL value is invalid.
Sends a Configuration Message to the primary Element on the given Node and returns the received response.
An appropriate callback of the `MeshNetworkDelegate` will be called when the message has been sent successfully or a problem occurred.
Parameters
Message to be sent.
Destination Node.
Initial TTL (Time To Live) value of the message. If nil, the default Node TTL will be used.
Throws
when trying to delete the last Network Key on the device.
if the mesh network has not been created.
if the Local Provisioner has no Unicast Address assigned.
if the Address is not Unicast Address, an Unknown destination Node, the Node does not have a Network Key,the Node's device key is unknown or Cannot remove last Network Key.
if the TTL value is invalid.
Sends the Proxy Configuration Message to the connected Proxy Node.
This method will only work if the bearer uses is GATT Proxy. The message will be encrypted and sent to the Transmitter, which should deliver the PDU to the connected Node.
Parameters
Proxy Configuration message to be sent.
Throws
This method throws when the mesh network has not been created.