sample-apps-for-matter-android
sample-apps-for-matter-android copied to clipboard
Cluster attributes subscription methods
@pierredelisle I have noticed that each cluster has its subscription method that we can leverage to get the changes for attributes in that cluster. For instance, the OnOffCluster
has the subscribeOnOffAttribute
method.
public void subscribeOnOffAttribute(BooleanAttributeCallback callback, int minInterval, int maxInterval) {...}
Could you please tell me why is the GHSAFM not using this function, but instead using the subscribeToPath
in ChipDeviceController
?
public void subscribeToPath(SubscriptionEstablishedCallback subscriptionEstablishedCallback, ResubscriptionAttemptCallback resubscriptionAttemptCallback, ReportCallback reportCallback, long devicePtr, List<ChipAttributePath> attributePaths, List<ChipEventPath> eventPaths, int minInterval, int maxInterval, boolean keepSubscriptions, boolean isFabricFiltered) {...}
Indeed! As for the reason, sheer ignorance :-). Will look into it shortly...