Package apple.matter.protocol
Interface MTRDeviceDelegate
-
public interface MTRDeviceDelegate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddeviceBecameActive(@NotNull MTRDevice device)Notifies delegate the device is currently actively communicating.voiddeviceReceivedAttributeReport(@NotNull MTRDevice device, @NotNull NSArray<? extends NSDictionary<java.lang.String,?>> attributeReport)Notifies delegate of attribute reports from the MTRDevicevoiddeviceReceivedEventReport(@NotNull MTRDevice device, @NotNull NSArray<? extends NSDictionary<java.lang.String,?>> eventReport)Notifies delegate of event reports from the MTRDevicevoiddeviceStateChanged(@NotNull MTRDevice device, long state)
-
-
-
Method Detail
-
deviceReceivedAttributeReport
void deviceReceivedAttributeReport(@NotNull @NotNull MTRDevice device, @NotNull @NotNull NSArray<? extends NSDictionary<java.lang.String,?>> attributeReport)Notifies delegate of attribute reports from the MTRDevice- Parameters:
attributeReport- An array of response-value objects as described in MTRDeviceResponseHandler
-
deviceReceivedEventReport
void deviceReceivedEventReport(@NotNull @NotNull MTRDevice device, @NotNull @NotNull NSArray<? extends NSDictionary<java.lang.String,?>> eventReport)Notifies delegate of event reports from the MTRDevice- Parameters:
eventReport- An array of response-value objects as described in MTRDeviceResponseHandler In addition to the MTREventPathKey and MTRDataKey containing the path and event values, eventReport also contains these keys: MTREventNumberKey : NSNumber-wrapped uint64_t value. Monotonically increasing, and consecutive event reports should have consecutive numbers unless device reboots, or if events are lost. MTREventPriorityKey : NSNumber-wrapped MTREventPriority value. MTREventTimeTypeKey : NSNumber-wrapped MTREventTimeType value. MTREventSystemUpTimeKey : NSNumber-wrapped NSTimeInterval value. MTREventTimestampDateKey : NSDate object. Only one of MTREventTimestampDateKey and MTREventSystemUpTimeKey will be present, depending on the value for MTREventTimeTypeKey.
-
deviceStateChanged
void deviceStateChanged(@NotNull @NotNull MTRDevice device, long state)- Parameters:
state- The current state of the device
-
deviceBecameActive
default void deviceBecameActive(@NotNull @NotNull MTRDevice device)Notifies delegate the device is currently actively communicating. This can be used as a hint that now is a good time to send commands to the device, especially if the device is sleepy and might not be active very often. API-Since: 16.4
-
-