Skip to content

Commit 8e77e1a

Browse files
Add API for Concentration Measurement Clusters (project-chip#28576)
* WIP; added Concentration Measurement Instance Class and Cluster Objects, implemented Read handler * Server updates to support an API for the concentration measurement clusters * Updating all-clusters-app to give example of the new concentration measurement API * regenerated code * Restyled by whitespace * Restyled by gn * Restyled by prettier-json * Reworked the cluster implementation to be a templated class so that we can turn off parts of it depending on what features are being used. Also added some factory functions to help with bringing up various feature sets to make it clearer for the user * Modifed all-clusters concentration instances to use the new factory functions * Removed the concentration-measurement-server.cpp as no longer used due to templating * Code re-genned * Changing name of the concetration instances to use the word instances rather than Server, per PR comment --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 275e1a1 commit 8e77e1a

File tree

24 files changed

+1929
-5844
lines changed

24 files changed

+1929
-5844
lines changed

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter

+30-30
Original file line numberDiff line numberDiff line change
@@ -2080,9 +2080,9 @@ endpoint 1 {
20802080
}
20812081

20822082
server cluster CarbonMonoxideConcentrationMeasurement {
2083-
ram attribute measuredValue;
2084-
ram attribute minMeasuredValue;
2085-
ram attribute maxMeasuredValue;
2083+
callback attribute measuredValue;
2084+
callback attribute minMeasuredValue;
2085+
callback attribute maxMeasuredValue;
20862086
callback attribute generatedCommandList;
20872087
callback attribute acceptedCommandList;
20882088
callback attribute eventList;
@@ -2092,9 +2092,9 @@ endpoint 1 {
20922092
}
20932093

20942094
server cluster CarbonDioxideConcentrationMeasurement {
2095-
ram attribute measuredValue;
2096-
ram attribute minMeasuredValue;
2097-
ram attribute maxMeasuredValue;
2095+
callback attribute measuredValue;
2096+
callback attribute minMeasuredValue;
2097+
callback attribute maxMeasuredValue;
20982098
callback attribute generatedCommandList;
20992099
callback attribute acceptedCommandList;
21002100
callback attribute eventList;
@@ -2104,9 +2104,9 @@ endpoint 1 {
21042104
}
21052105

21062106
server cluster NitrogenDioxideConcentrationMeasurement {
2107-
ram attribute measuredValue;
2108-
ram attribute minMeasuredValue;
2109-
ram attribute maxMeasuredValue;
2107+
callback attribute measuredValue;
2108+
callback attribute minMeasuredValue;
2109+
callback attribute maxMeasuredValue;
21102110
callback attribute generatedCommandList;
21112111
callback attribute acceptedCommandList;
21122112
callback attribute eventList;
@@ -2116,9 +2116,9 @@ endpoint 1 {
21162116
}
21172117

21182118
server cluster OzoneConcentrationMeasurement {
2119-
ram attribute measuredValue;
2120-
ram attribute minMeasuredValue;
2121-
ram attribute maxMeasuredValue;
2119+
callback attribute measuredValue;
2120+
callback attribute minMeasuredValue;
2121+
callback attribute maxMeasuredValue;
21222122
callback attribute generatedCommandList;
21232123
callback attribute acceptedCommandList;
21242124
callback attribute eventList;
@@ -2128,9 +2128,9 @@ endpoint 1 {
21282128
}
21292129

21302130
server cluster Pm25ConcentrationMeasurement {
2131-
ram attribute measuredValue;
2132-
ram attribute minMeasuredValue;
2133-
ram attribute maxMeasuredValue;
2131+
callback attribute measuredValue;
2132+
callback attribute minMeasuredValue;
2133+
callback attribute maxMeasuredValue;
21342134
callback attribute generatedCommandList;
21352135
callback attribute acceptedCommandList;
21362136
callback attribute eventList;
@@ -2140,9 +2140,9 @@ endpoint 1 {
21402140
}
21412141

21422142
server cluster FormaldehydeConcentrationMeasurement {
2143-
ram attribute measuredValue;
2144-
ram attribute minMeasuredValue;
2145-
ram attribute maxMeasuredValue;
2143+
callback attribute measuredValue;
2144+
callback attribute minMeasuredValue;
2145+
callback attribute maxMeasuredValue;
21462146
callback attribute generatedCommandList;
21472147
callback attribute acceptedCommandList;
21482148
callback attribute eventList;
@@ -2152,9 +2152,9 @@ endpoint 1 {
21522152
}
21532153

21542154
server cluster Pm1ConcentrationMeasurement {
2155-
ram attribute measuredValue;
2156-
ram attribute minMeasuredValue;
2157-
ram attribute maxMeasuredValue;
2155+
callback attribute measuredValue;
2156+
callback attribute minMeasuredValue;
2157+
callback attribute maxMeasuredValue;
21582158
callback attribute generatedCommandList;
21592159
callback attribute acceptedCommandList;
21602160
callback attribute eventList;
@@ -2164,9 +2164,9 @@ endpoint 1 {
21642164
}
21652165

21662166
server cluster Pm10ConcentrationMeasurement {
2167-
ram attribute measuredValue;
2168-
ram attribute minMeasuredValue;
2169-
ram attribute maxMeasuredValue;
2167+
callback attribute measuredValue;
2168+
callback attribute minMeasuredValue;
2169+
callback attribute maxMeasuredValue;
21702170
callback attribute generatedCommandList;
21712171
callback attribute acceptedCommandList;
21722172
callback attribute eventList;
@@ -2176,9 +2176,9 @@ endpoint 1 {
21762176
}
21772177

21782178
server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement {
2179-
ram attribute measuredValue;
2180-
ram attribute minMeasuredValue;
2181-
ram attribute maxMeasuredValue;
2179+
callback attribute measuredValue;
2180+
callback attribute minMeasuredValue;
2181+
callback attribute maxMeasuredValue;
21822182
callback attribute generatedCommandList;
21832183
callback attribute acceptedCommandList;
21842184
callback attribute eventList;
@@ -2188,9 +2188,9 @@ endpoint 1 {
21882188
}
21892189

21902190
server cluster RadonConcentrationMeasurement {
2191-
ram attribute measuredValue;
2192-
ram attribute minMeasuredValue;
2193-
ram attribute maxMeasuredValue;
2191+
callback attribute measuredValue;
2192+
callback attribute minMeasuredValue;
2193+
callback attribute maxMeasuredValue;
21942194
callback attribute generatedCommandList;
21952195
callback attribute acceptedCommandList;
21962196
callback attribute eventList;

0 commit comments

Comments
 (0)