@@ -149,50 +149,18 @@ uint16_t emberAfIndexFromEndpoint(chip::EndpointId endpoint);
149
149
*/
150
150
uint16_t emberAfIndexFromEndpointIncludingDisabledEndpoints (chip::EndpointId endpoint);
151
151
152
- /* *
153
- * Returns the index of the given endpoint in the list of all defined endpoints
154
- * (including disabled ones) that support the given cluster.
155
- *
156
- * Returns kEmberInvalidEndpointIndex if the given endpoint does not support the
157
- * given cluster.
158
- *
159
- * For fixed endpoints, the returned value never changes, but for dynamic
160
- * endpoints it can change if a dynamic endpoint is defined at a lower index
161
- * that also supports the given cluster.
162
- *
163
- * For example, if a device has 4 fixed endpoints (ids 0-3) and 2 dynamic
164
- * endpoints, and cluster X is supported on endpoints 1 and 3, then:
165
- *
166
- * 1) emberAfFindClusterServerEndpointIndex(0, X) returns kEmberInvalidEndpointIndex
167
- * 2) emberAfFindClusterServerEndpointIndex(1, X) returns 0
168
- * 3) emberAfFindClusterServerEndpointIndex(2, X) returns kEmberInvalidEndpointIndex
169
- * 4) emberAfFindClusterServerEndpointIndex(3, X) returns 1
170
- *
171
- * If the second dynamic endpoint is defined (via
172
- * emberAfSetDynamicEndpoint(1, 7, ...)) to
173
- * have endpoint id 7, and supports cluster X, but the first dynamic endpoint is
174
- * not defined, then emberAfFindClusterServerEndpointIndex(7, X) returns 2.
175
- *
176
- * If now the first dynamic endpoint is defined (via
177
- * emberAfSetDynamicEndpoint(0, 9, ...))
178
- * to have endpoint id 9, and supports cluster X, then
179
- * emberAfFindClusterServerEndpointIndex(7, X) starts returning 3 and
180
- * emberAfFindClusterServerEndpointIndex(9, X) returns 2.
181
- */
182
- uint16_t emberAfFindClusterServerEndpointIndex (chip::EndpointId endpoint, chip::ClusterId clusterId);
183
-
184
152
/* *
185
153
* @brief Returns the index of the given endpoint in the list of all endpoints that might support the given cluster server.
186
154
*
187
155
* Returns kEmberInvalidEndpointIndex if the given endpoint does not support the
188
156
* given cluster or if the given endpoint is disabled.
189
157
*
190
- * Unlike emberAfFindClusterServerEndpointIndex, this function always returns the same index
191
- * for a given endpointId instance, fixed or dynamic, if it does not return kEmberInvalidEndpointIndex.
158
+ * This function always returns the same index for a given endpointId instance, fixed or dynamic.
192
159
*
193
- * The return index is identical to emberAfFindClusterServerEndpointIndex for fixed endpoints,
194
- * but for dynamic endpoints the indexing assumes that any dynamic endpoint could start supporting
195
- * the given server cluster.
160
+ * The return index for fixed endpoints will range from 0 to (fixedClusterServerEndpointCount - 1),
161
+ * For dynamic endpoints the indexing assumes that any dynamic endpoint could start supporting
162
+ * the given server cluster and their index will range from fixedClusterServerEndpointCount to
163
+ * (fixedClusterServerEndpointCount + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT - 1).
196
164
*
197
165
* For example, if a device has 4 fixed endpoints (ids 0-3) and 2 dynamic
198
166
* endpoints, and cluster X is supported on endpoints 1 and 3, then
0 commit comments