Skip to content

Commit 76b7e7d

Browse files
committed
Comment update
1 parent 65baf80 commit 76b7e7d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/app/codegen-data-model/CodegenDataModel_Write.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,18 @@ CHIP_ERROR CodegenDataModel::WriteAttribute(const InteractionModel::WriteAttribu
289289
return *err;
290290
}
291291

292-
// All the global attributes that we do not have metadata for are
293-
// read-only (i.e. cannot write atribute_list/event_list/accepted_cmds/generated_cmds)
294-
//
295-
// so if no metadata available, we wil lreturn an error
296292
const EmberAfAttributeMetadata ** attributeMetadata = std::get_if<const EmberAfAttributeMetadata *>(&metadata);
297293
if (attributeMetadata == nullptr)
298294
{
295+
// All the global attributes that we do not have metadata for are
296+
// read-only. Specifically only the following list-based attributes match the
297+
// "global attributes not in metadata" (see GlobalAttributes.h :: GlobalAttributesNotInMetadat):
298+
// - AttributeList
299+
// - EventList
300+
// - AcceptedCommands
301+
// - GeneratedCommands
302+
//
303+
// Given the above, UnsupportedWrite should be correct (attempt to write to a read-only list)
299304
return CHIP_IM_GLOBAL_STATUS(UnsupportedWrite);
300305
}
301306

0 commit comments

Comments
 (0)