sample-apps-for-matter-android icon indicating copy to clipboard operation
sample-apps-for-matter-android copied to clipboard

Cluster attributes subscription methods

Open edWin-m opened this issue 1 year ago • 1 comments

@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) {...}

edWin-m avatar Mar 14 '23 03:03 edWin-m

Indeed! As for the reason, sheer ignorance :-). Will look into it shortly...

pierredelisle avatar Mar 14 '23 19:03 pierredelisle