-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EventFilter encoding #11178
Add EventFilter encoding #11178
Conversation
PR #11178: Size comparison from 1e27d92 to 3de84f2 Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
3de84f2
to
1a8a5df
Compare
PR #11178: Size comparison from 06f9a38 to 1a8a5df Increases (1 build for esp32)
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So two things:
- This is not usable as-is because of the Init problem.
- This general pattern does not seem right to me. Instead, I think we should take an approach more like what we did in cluster-objects. Specifically, have a
EventFilterIB
struct with Encode/Decode methods on it. Consumers then instantiate the struct and either fill it in and call Encode() or call Decode to fill it in.
In this case, the whole thing should be <50 lines of code, I would expect.
1a8a5df
to
ba0755d
Compare
PR #11178: Size comparison from 345723d to ba0755d Increases (1 build for esp32)
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can do this for now, but should really think about whether this is the right pattern for future ibs....
Problem
Add EventFilter encoding, which would be used for ReadRequest and Subscribe request encoding per latest IM spec.
https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/data_model/Encoding-Specification.adoc#encoding-ReadRequestMessage
https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/data_model/Encoding-Specification.adoc#encoding-SubscribeRequestMessage
Change overview
What's in this PR
Testing
Add unit tests for EventFilter