send
abstract suspend fun send(destination: MeshAddress, modelId: MeshModelId, opcode: MeshOpcode, payload: ByteArray, appKey: ApplicationKey, acknowledged: Boolean = true, ttl: UByte): MeshMessageResponse?
Send a mesh message to a destination address.
Return
The response if acknowledged, or null if unacknowledged or timeout.
Parameters
destination
Where to send the message (unicast, group, or virtual).
modelId
The target model identifier.
opcode
The operation code for the model operation.
payload
The operation parameters.
appKey
The application key for encryption.
acknowledged
Whether to wait for a response (true) or fire-and-forget (false).
ttl
Time-To-Live hop limit (default 5).