-
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
Bulk read all the things #14752
Bulk read all the things #14752
Conversation
PR #14752: Size comparison from 1ee9366 to a17e345 Increases (1 build for linux)
Decreases (1 build for linux)
Full report (17 builds for cyw30739, efr32, k32w, linux, p6, qpg, telink)
|
PR #14752: Size comparison from 1ee9366 to 7d45fbb Increases (33 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Decreases (5 builds for esp32, linux)
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
} | ||
// Using ForEachAttribute because this attribute can be queried on any endpoint. | ||
err = mAttributeCache->ForEachAttribute( | ||
app::Clusters::GeneralCommissioning::Id, [this, &info](const app::ConcreteAttributePath & path) { |
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.
For what it's worth, the device library spec does define that General Commissioning has to be on endpoint 0 and only endpoint 0.
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.
Root node device type needs to be on EP0, but it doesn't seem to preclude having a general commissioning cluster on other endpoints - similar to the argument that was made for having multiple networking clusters. It's less likely, but I don't think it's banned.
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.
It absolutely does preclude it. See device library spec. The "General Commissioning" cluster has the "I" quality, which means "singleton". "Network Commissioning", on the other hand, does not have that quality.
So "General Commissioning" is required to be present only once, and is required to be present on endpoint 0.
Followup OK to deal with this, in the interests of getting this merged.
DeviceCommissioner * commissioner = static_cast<DeviceCommissioner *>(context); | ||
commissioner->CommissioningStageComplete(status); | ||
} | ||
err = mAttributeCache->ForEachAttribute(app::Clusters::Basic::Id, [this, &info](const app::ConcreteAttributePath & path) { |
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.
Likewise, per spec this is always only on endpoint 0.
/rebase |
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Get calls need explicit templating.
784f89a
to
427e929
Compare
PR #14752: Size comparison from b5776df to 427e929 Increases (1 build for linux)
Decreases (1 build for linux)
Full report (34 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
} | ||
app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo::DecodableType basicInfo; | ||
ReturnErrorOnFailure( | ||
this->mAttributeCache->Get<app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo>( |
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.
Ugh. I did not realize that the attribute cache requires the template arg to work right... but of course it does so it can look up things on it.
I'll see if there's anything we can do to make this better.
Problem
Given that we're already bulk reading the network feature maps, we may as well just piggy back all the other attribute reads in there as well because it's fewer interactions. Also now that #14671 has landed, we can use the general commissioning cluster attributes.
Change overview
Testing
Commissioned BLE (M5) and on network (lightning app). Confirmed recommended failsafe comes from the device.