MatterTraitClient

interface MatterTraitClient : TraitStateInvalidation


Provides a very constrained surface for interacting with an individual object and individual cluster

Summary

Public functions

ObjectCommand
<REQUEST : Any?> createObjectCommand(
    commandId: ScopedCommandId,
    requestAdapter: StructAdapter<REQUEST>,
    request: REQUEST,
    useTimedCommand: Boolean
)

Create an object command for the given command request

suspend RESPONSE
<REQUEST : Any?, RESPONSE : Any?> sendCommand(
    commandId: ScopedCommandId,
    requestAdapter: StructAdapter<REQUEST>,
    responseAdapter: StructAdapter<RESPONSE>,
    request: REQUEST,
    useTimedCommand: Boolean
)

Send the given command.

Boolean
suspend Unit
<T : Any?> write(
    adapter: StructAdapter<T>,
    attributes: T,
    useTimedInteraction: Boolean
)

Write the attributes of the trait

Inherited functions

From com.google.home.TraitStateInvalidation
suspend Unit

Public functions

createObjectCommand

fun <REQUEST : Any?> createObjectCommand(
    commandId: ScopedCommandId,
    requestAdapter: StructAdapter<REQUEST>,
    request: REQUEST,
    useTimedCommand: Boolean
): ObjectCommand

Create an object command for the given command request

sendCommand

suspend fun <REQUEST : Any?, RESPONSE : Any?> sendCommand(
    commandId: ScopedCommandId,
    requestAdapter: StructAdapter<REQUEST>,
    responseAdapter: StructAdapter<RESPONSE>,
    request: REQUEST,
    useTimedCommand: Boolean
): RESPONSE

Send the given command. Defines how requests and responses are to be encoded

strictOperationValidation

fun strictOperationValidation(): Boolean

write

suspend fun <T : Any?> write(
    adapter: StructAdapter<T>,
    attributes: T,
    useTimedInteraction: Boolean = false
): Unit

Write the attributes of the trait