@@ -175,6 +175,36 @@ void UnregisterMatchingAttributeAccessInterfaces(F shouldUnregister)
175
175
}
176
176
}
177
177
178
+ bool emberAfIsThisDataTypeAListType (EmberAfAttributeType dataType)
179
+ {
180
+ return dataType == ZCL_ARRAY_ATTRIBUTE_TYPE;
181
+ }
182
+
183
+ uint16_t findIndexFromEndpoint (EndpointId endpoint, bool ignoreDisabledEndpoints)
184
+ {
185
+ if (endpoint == kInvalidEndpointId )
186
+ {
187
+ return kEmberInvalidEndpointIndex ;
188
+ }
189
+
190
+ uint16_t epi;
191
+ for (epi = 0 ; epi < emberAfEndpointCount (); epi++)
192
+ {
193
+ if (emAfEndpoints[epi].endpoint == endpoint &&
194
+ (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask .Has (EmberAfEndpointOptions::isEnabled)))
195
+ {
196
+ return epi;
197
+ }
198
+ }
199
+ return kEmberInvalidEndpointIndex ;
200
+ }
201
+
202
+ // Returns the index of a given endpoint. Considers disabled endpoints.
203
+ uint16_t emberAfIndexFromEndpointIncludingDisabledEndpoints (EndpointId endpoint)
204
+ {
205
+ return findIndexFromEndpoint (endpoint, false /* ignoreDisabledEndpoints */ );
206
+ }
207
+
178
208
} // anonymous namespace
179
209
180
210
// Initial configuration
@@ -354,11 +384,6 @@ bool emberAfEndpointIndexIsEnabled(uint16_t index)
354
384
return (emAfEndpoints[index ].bitmask .Has (EmberAfEndpointOptions::isEnabled));
355
385
}
356
386
357
- bool emberAfIsThisDataTypeAListType (EmberAfAttributeType dataType)
358
- {
359
- return dataType == ZCL_ARRAY_ATTRIBUTE_TYPE;
360
- }
361
-
362
387
// This function is used to call the per-cluster attribute changed callback
363
388
void emAfClusterAttributeChangedCallback (const app::ConcreteAttributePath & attributePath)
364
389
{
@@ -845,25 +870,6 @@ const EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(EndpointId e
845
870
return nullptr ;
846
871
}
847
872
848
- static uint16_t findIndexFromEndpoint (EndpointId endpoint, bool ignoreDisabledEndpoints)
849
- {
850
- if (endpoint == kInvalidEndpointId )
851
- {
852
- return kEmberInvalidEndpointIndex ;
853
- }
854
-
855
- uint16_t epi;
856
- for (epi = 0 ; epi < emberAfEndpointCount (); epi++)
857
- {
858
- if (emAfEndpoints[epi].endpoint == endpoint &&
859
- (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask .Has (EmberAfEndpointOptions::isEnabled)))
860
- {
861
- return epi;
862
- }
863
- }
864
- return kEmberInvalidEndpointIndex ;
865
- }
866
-
867
873
uint16_t emberAfGetClusterServerEndpointIndex (EndpointId endpoint, ClusterId cluster, uint16_t fixedClusterServerEndpointCount)
868
874
{
869
875
VerifyOrDie (fixedClusterServerEndpointCount <= FIXED_ENDPOINT_COUNT);
@@ -980,12 +986,6 @@ uint16_t emberAfIndexFromEndpoint(EndpointId endpoint)
980
986
return findIndexFromEndpoint (endpoint, true /* ignoreDisabledEndpoints */ );
981
987
}
982
988
983
- // Returns the index of a given endpoint. Considers disabled endpoints.
984
- uint16_t emberAfIndexFromEndpointIncludingDisabledEndpoints (EndpointId endpoint)
985
- {
986
- return findIndexFromEndpoint (endpoint, false /* ignoreDisabledEndpoints */ );
987
- }
988
-
989
989
EndpointId emberAfEndpointFromIndex (uint16_t index)
990
990
{
991
991
return emAfEndpoints[index ].endpoint ;
0 commit comments