@@ -128,11 +128,6 @@ const CommandId * GetAcceptedCommands(const EmberAfCluster & cluster)
128
128
return cluster.acceptedCommandList ;
129
129
}
130
130
131
- const CommandId * GetGeneratedCommands (const EmberAfCluster & cluster)
132
- {
133
- return cluster.generatedCommandList ;
134
- }
135
-
136
131
// / Load the cluster information into the specified destination
137
132
std::variant<CHIP_ERROR, DataModel::ClusterInfo> LoadClusterInfo (const ConcreteClusterPath & path, const EmberAfCluster & cluster)
138
133
{
@@ -844,9 +839,6 @@ std::optional<DataModel::CommandInfo> CodegenDataModelProvider::GetAcceptedComma
844
839
845
840
MetadataList<CommandId> CodegenDataModelProvider::GeneratedCommands (const ConcreteClusterPath & path)
846
841
{
847
- // For fixed:
848
- // ???? depends on how it looks like
849
- //
850
842
CommandHandlerInterface * interface =
851
843
CommandHandlerInterfaceRegistry::Instance ().GetCommandHandler (path.mEndpointId , path.mClusterId );
852
844
if (interface != nullptr )
@@ -905,7 +897,7 @@ MetadataList<CommandId> CodegenDataModelProvider::GeneratedCommands(const Concre
905
897
}
906
898
907
899
const EmberAfCluster * cluster = FindServerCluster (path);
908
- if (cluster == nullptr )
900
+ if (( cluster == nullptr ) || (cluster-> generatedCommandList == nullptr ) )
909
901
{
910
902
return {};
911
903
}
@@ -918,28 +910,6 @@ MetadataList<CommandId> CodegenDataModelProvider::GeneratedCommands(const Concre
918
910
return MetadataList<CommandId>::FromConstSpan ({ cluster->generatedCommandList , commandCount });
919
911
}
920
912
921
- ConcreteCommandPath CodegenDataModelProvider::FirstGeneratedCommand (const ConcreteClusterPath & path)
922
- {
923
- EnumeratorCommandFinder handlerFinder (&CommandHandlerInterface::EnumerateGeneratedCommands);
924
- CommandId commandId =
925
- FindCommand (ConcreteCommandPath (path.mEndpointId , path.mClusterId , kInvalidCommandId ), handlerFinder,
926
- detail::EnumeratorCommandFinder::Operation::kFindFirst , mGeneratedCommandsIterator , GetGeneratedCommands);
927
-
928
- VerifyOrReturnValue (commandId != kInvalidCommandId , kInvalidCommandPath );
929
- return ConcreteCommandPath (path.mEndpointId , path.mClusterId , commandId);
930
- }
931
-
932
- ConcreteCommandPath CodegenDataModelProvider::NextGeneratedCommand (const ConcreteCommandPath & before)
933
- {
934
- EnumeratorCommandFinder handlerFinder (&CommandHandlerInterface::EnumerateGeneratedCommands);
935
-
936
- CommandId commandId = FindCommand (before, handlerFinder, detail::EnumeratorCommandFinder::Operation::kFindNext ,
937
- mGeneratedCommandsIterator , GetGeneratedCommands);
938
-
939
- VerifyOrReturnValue (commandId != kInvalidCommandId , kInvalidCommandPath );
940
- return ConcreteCommandPath (before.mEndpointId , before.mClusterId , commandId);
941
- }
942
-
943
913
void CodegenDataModelProvider::InitDataModelForTesting ()
944
914
{
945
915
// Call the Ember-specific InitDataModelHandler
0 commit comments