-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve detection of "historical" events in Matter.framework.
We were marking events as "historical" if there were any attributes in the same report that have the C quality. This had a few problems: * Some devices randomly report C-quality attributes, for various reasons. * Some attributes stop having the C quality in favor of Q, in some cases, so this is not very forward-compatible. The fix is to remove this C-quality check altogether. At that point we have the following situations: 1. We're setting up a new subscription and getting our initial priming report. This case will still have _receivingPrimingReport set, and will cause any events reported as part of priming to be marked "historical". 2. We are getting a "priming" report from a server-side subscription resumption after the server timed out on a subscription. If this happens before the max-interval elapses, we will see this as a normal report on our subscription, but with all attributes and events the server knows about included. In this case, we mark ourselves as being in a "priming report" if we get an event that has an event number we have already seen, so that we mark any not-seen-before events in that report as "historical", since we don't know how long ago they are from. 3. We are getting a normal incremental report, and will not mark any such events as "historical". Since we are now keeping track of last-received event numbers, we can also use those for our subscriptions and can filter out any events that have an event number no greater than our last-observed one.
- Loading branch information
1 parent
355a2a6
commit 8a9833a
Showing
2 changed files
with
54 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters