Extensions to Basic Information Cluster; AttrId is now u32
; report more global elements (Was: Chip tool tests)
#232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses 3 problems I found while performing initial testing with the chip-tool YAML tests:
AttrId was
u16
For some reason, our Attribute ID was
type AttrId = u16
, while I really believe it should betype AttrId = u32
or else we(a) Cannot properly parse and process attribute paths containing 32-bit attribute IDs
(b) Cannot declare and process attributes extended with MEIs (Manufacturer Extensible Identifier) which really wants attribute IDs (and command IDs and cluster IDs) to be 32 bit.
Weirdly, we already have
CmdId
correctly declared asu32
(while in non-MEI world it is just au8
) andClusterId
asu32
(while it needs to be onlyu16
for non-MEI use-cases).A bunch of Global Elements (attributes) were not reported
We did report
FeatureMap
andAttributeList
, but we did not report:ClusterRevision
(0xfffd)AcceptedCmdList
(0xfff9)GeneratedCmdList
(0xfff8)We might need to also report
EventList
but I'll figure this out in a subsequent PR, once I hit this problem during testing.Furthermore, we were reporting these attributes as the first ones, while some chip-tool tests expect these to be the last ones, after all "normal" attributes. The new
cluster_attrs
macro taces care of this now.Basic Information Cluster
Location
parameter and a few other mandatory ones. Some of these are since > Matter Spec 1.0, but not all.NodeLabel
andLocation
do need to be persisted in non-volatile storage - just like fabrics - or else the Basic Info test ofchip-tool
is failing=====
Now, these fixes are just the beginning.
Also, there is a bit of an infrastructure work necessary to enable the chip-tool tests to run during the night in our CI.
However, I think it is actually more important if I can first extend our IDL support so that it can output more elements. As in all enums, bitsets and most importantly - structures associated with a cluster, as well as the cluster callable API itself.
Main reason driving this is the so called
UnitTest
cluster, which is used by many of the chip-tool YAML tests.However it is so large, that I think implementing it "by hand" would be a giant waste of time, so I better improve our IDL generator instead.