Skip to content

Commit 1175616

Browse files
vivien-applepull[bot]
authored andcommitted
Use a dedicated chip-types.xml file into src/app/zap-templates/zcl (#7873)
* Update chip-types.xml * Update gen/ folders
1 parent 091e2d3 commit 1175616

File tree

91 files changed

+1265
-1259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1265
-1259
lines changed

examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp

+21-21
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
129129
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
130130
Protocols::SecureChannel::Id,
131131
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
132-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_BARRIER_CONTROL_CLUSTER_ID);
132+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BARRIER_CONTROL_CLUSTER_ID);
133133
return;
134134
}
135135
}
@@ -178,7 +178,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
178178
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
179179
Protocols::SecureChannel::Id,
180180
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
181-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_BASIC_CLUSTER_ID);
181+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BASIC_CLUSTER_ID);
182182
return;
183183
}
184184
}
@@ -369,7 +369,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
369369
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
370370
Protocols::SecureChannel::Id,
371371
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
372-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_BINDING_CLUSTER_ID);
372+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BINDING_CLUSTER_ID);
373373
return;
374374
}
375375
}
@@ -1460,7 +1460,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
14601460
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
14611461
Protocols::SecureChannel::Id,
14621462
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
1463-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_COLOR_CONTROL_CLUSTER_ID);
1463+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_COLOR_CONTROL_CLUSTER_ID);
14641464
return;
14651465
}
14661466
}
@@ -1580,7 +1580,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
15801580
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
15811581
Protocols::SecureChannel::Id,
15821582
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
1583-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID);
1583+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID);
15841584
return;
15851585
}
15861586
}
@@ -2987,7 +2987,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
29872987
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
29882988
Protocols::SecureChannel::Id,
29892989
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
2990-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID);
2990+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID);
29912991
return;
29922992
}
29932993
}
@@ -3183,7 +3183,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
31833183
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
31843184
Protocols::SecureChannel::Id,
31853185
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
3186-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID);
3186+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID);
31873187
return;
31883188
}
31893189
}
@@ -3549,7 +3549,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
35493549
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
35503550
Protocols::SecureChannel::Id,
35513551
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
3552-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_GROUPS_CLUSTER_ID);
3552+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GROUPS_CLUSTER_ID);
35533553
return;
35543554
}
35553555
}
@@ -3661,7 +3661,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
36613661
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
36623662
Protocols::SecureChannel::Id,
36633663
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
3664-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_IAS_ZONE_CLUSTER_ID);
3664+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IAS_ZONE_CLUSTER_ID);
36653665
return;
36663666
}
36673667
}
@@ -3775,7 +3775,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
37753775
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
37763776
Protocols::SecureChannel::Id,
37773777
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
3778-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_IDENTIFY_CLUSTER_ID);
3778+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IDENTIFY_CLUSTER_ID);
37793779
return;
37803780
}
37813781
}
@@ -4305,7 +4305,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
43054305
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
43064306
Protocols::SecureChannel::Id,
43074307
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
4308-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID);
4308+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID);
43094309
return;
43104310
}
43114311
}
@@ -4360,7 +4360,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
43604360
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
43614361
Protocols::SecureChannel::Id,
43624362
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
4363-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_LOW_POWER_CLUSTER_ID);
4363+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LOW_POWER_CLUSTER_ID);
43644364
return;
43654365
}
43664366
}
@@ -5049,7 +5049,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
50495049
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
50505050
Protocols::SecureChannel::Id,
50515051
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
5052-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID);
5052+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID);
50535053
return;
50545054
}
50555055
}
@@ -5330,7 +5330,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
53305330
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
53315331
Protocols::SecureChannel::Id,
53325332
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
5333-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_OTA_PROVIDER_CLUSTER_ID);
5333+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_OTA_PROVIDER_CLUSTER_ID);
53345334
return;
53355335
}
53365336
}
@@ -5397,7 +5397,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
53975397
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
53985398
Protocols::SecureChannel::Id,
53995399
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
5400-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_ON_OFF_CLUSTER_ID);
5400+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID);
54015401
return;
54025402
}
54035403
}
@@ -5904,7 +5904,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
59045904
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
59055905
Protocols::SecureChannel::Id,
59065906
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
5907-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId,
5907+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId,
59085908
ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID);
59095909
return;
59105910
}
@@ -6406,7 +6406,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
64066406
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
64076407
Protocols::SecureChannel::Id,
64086408
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
6409-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_SCENES_CLUSTER_ID);
6409+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_SCENES_CLUSTER_ID);
64106410
return;
64116411
}
64126412
}
@@ -6473,7 +6473,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
64736473
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
64746474
Protocols::SecureChannel::Id,
64756475
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
6476-
ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_TEST_CLUSTER_ID);
6476+
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TEST_CLUSTER_ID);
64776477
return;
64786478
}
64796479
}
@@ -6501,8 +6501,8 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
65016501
void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aCommandId, chip::EndpointId aEndPointId,
65026502
chip::TLV::TLVReader & aReader, Command * apCommandObj)
65036503
{
6504-
ChipLogDetail(Zcl, "Received Cluster Command: Cluster=%" PRIx16 " Command=%" PRIx8 " Endpoint=%" PRIx8, aClusterId, aCommandId,
6505-
aEndPointId);
6504+
ChipLogDetail(Zcl, "Received Cluster Command: Cluster=%" PRIx32 " Command=%" PRIx32 " Endpoint=%" PRIx16, aClusterId,
6505+
aCommandId, aEndPointId);
65066506
Compatibility::SetupEmberAfObjects(apCommandObj, aClusterId, aCommandId, aEndPointId);
65076507
TLV::TLVType dataTlvType;
65086508
SuccessOrExit(aReader.EnterContainer(dataTlvType));
@@ -6570,7 +6570,7 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC
65706570
(chip::app::CommandPathFlags::kEndpointIdValid) };
65716571
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
65726572
Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
6573-
ChipLogError(Zcl, "Unknown cluster %" PRIx16, aClusterId);
6573+
ChipLogError(Zcl, "Unknown cluster %" PRIx32, aClusterId);
65746574
break;
65756575
}
65766576
exit:

examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
195195
// Struct _DeviceType
196196
_DeviceType * entry = reinterpret_cast<_DeviceType *>(write ? src : dest);
197197
copyListMember(write ? dest : (uint8_t *) &entry->type, write ? (uint8_t *) &entry->type : src, write, &entryOffset,
198-
sizeof(entry->type)); // DEVICE_TYPE_ID
198+
sizeof(entry->type)); // DEVTYPE_ID
199199
copyListMember(write ? dest : (uint8_t *) &entry->revision, write ? (uint8_t *) &entry->revision : src, write,
200200
&entryOffset, sizeof(entry->revision)); // INT16U
201201
break;
202202
}
203203
case 0x0001: // server list
204204
{
205-
entryLength = 2;
205+
entryLength = 4;
206206
if (((index - 1) * entryLength) > (am->size - entryLength))
207207
{
208208
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
@@ -214,7 +214,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
214214
}
215215
case 0x0002: // client list
216216
{
217-
entryLength = 2;
217+
entryLength = 4;
218218
if (((index - 1) * entryLength) > (am->size - entryLength))
219219
{
220220
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
@@ -226,14 +226,14 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
226226
}
227227
case 0x0003: // parts list
228228
{
229-
entryLength = 1;
229+
entryLength = 2;
230230
if (((index - 1) * entryLength) > (am->size - entryLength))
231231
{
232232
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
233233
return 0;
234234
}
235235
entryOffset = static_cast<uint16_t>(entryOffset + ((index - 1) * entryLength));
236-
copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_ID
236+
copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_NO
237237
break;
238238
}
239239
}
@@ -826,15 +826,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
826826
break;
827827
case 0x0001: // server list
828828
// chip::ClusterId
829-
entryLength = 2;
829+
entryLength = 4;
830830
break;
831831
case 0x0002: // client list
832832
// chip::ClusterId
833-
entryLength = 2;
833+
entryLength = 4;
834834
break;
835835
case 0x0003: // parts list
836836
// chip::EndpointId
837-
entryLength = 1;
837+
entryLength = 2;
838838
break;
839839
}
840840
break;
@@ -952,7 +952,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
952952
uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength);
953953
if (!chip::CanCastTo<uint16_t>(totalSize))
954954
{
955-
ChipLogError(Zcl, "Cluster 0x%04x: Size of attribute 0x%02x is too large.", clusterId, attributeId);
955+
ChipLogError(Zcl, "Cluster %" PRIx32 ": Size of attribute %" PRIx32 " is too large.", clusterId, attributeId);
956956
return 0;
957957
}
958958

examples/all-clusters-app/esp32/main/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void SetupInitialLevelControlValues(chip::EndpointId endpointId)
376376
uint8_t level = UINT8_MAX;
377377

378378
emberAfWriteAttribute(endpointId, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, &level,
379-
ZCL_DATA8_ATTRIBUTE_TYPE);
379+
ZCL_INT8U_ATTRIBUTE_TYPE);
380380
}
381381

382382
void SetupPretendDevices()

0 commit comments

Comments
 (0)