Skip to content

Commit

Permalink
Update gen/ folders
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple committed Jun 24, 2021
1 parent 4775813 commit ca8c123
Show file tree
Hide file tree
Showing 38 changed files with 2,642 additions and 17,550 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_BARRIER_CONTROL_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BARRIER_CONTROL_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_BASIC_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BASIC_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -369,7 +369,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_BINDING_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BINDING_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -1460,7 +1460,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_COLOR_CONTROL_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_COLOR_CONTROL_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -2867,7 +2867,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -3063,7 +3063,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -3429,7 +3429,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_GROUPS_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GROUPS_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -3541,7 +3541,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_IAS_ZONE_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IAS_ZONE_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -3655,7 +3655,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_IDENTIFY_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IDENTIFY_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -4185,7 +4185,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -4240,7 +4240,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LOW_POWER_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LOW_POWER_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -4929,7 +4929,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -5209,7 +5209,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_OTA_SERVER_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_OTA_SERVER_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -5276,7 +5276,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_ON_OFF_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -5783,7 +5783,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId,
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId,
ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID);
return;
}
Expand Down Expand Up @@ -6285,7 +6285,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_SCENES_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_SCENES_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -6352,7 +6352,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id,
Protocols::InteractionModel::ProtocolCode::UnsupportedCommand);
ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_TEST_CLUSTER_ID);
ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TEST_CLUSTER_ID);
return;
}
}
Expand Down Expand Up @@ -6380,8 +6380,8 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aCommandId, chip::EndpointId aEndPointId,
chip::TLV::TLVReader & aReader, Command * apCommandObj)
{
ChipLogDetail(Zcl, "Received Cluster Command: Cluster=%" PRIx16 " Command=%" PRIx8 " Endpoint=%" PRIx8, aClusterId, aCommandId,
aEndPointId);
ChipLogDetail(Zcl, "Received Cluster Command: Cluster=%" PRIx32 " Command=%" PRIx32 " Endpoint=%" PRIx16, aClusterId,
aCommandId, aEndPointId);
Compatibility::SetupEmberAfObjects(apCommandObj, aClusterId, aCommandId, aEndPointId);
TLV::TLVType dataTlvType;
SuccessOrExit(aReader.EnterContainer(dataTlvType));
Expand Down Expand Up @@ -6446,7 +6446,7 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC
(chip::app::CommandPathFlags::kEndpointIdValid) };
apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound,
Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
ChipLogError(Zcl, "Unknown cluster %" PRIx16, aClusterId);
ChipLogError(Zcl, "Unknown cluster %" PRIx32, aClusterId);
break;
}
exit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
// Struct _DeviceType
_DeviceType * entry = reinterpret_cast<_DeviceType *>(write ? src : dest);
copyListMember(write ? dest : (uint8_t *) &entry->type, write ? (uint8_t *) &entry->type : src, write, &entryOffset,
sizeof(entry->type)); // DEVICE_TYPE_ID
sizeof(entry->type)); // DEVTYPE_ID
copyListMember(write ? dest : (uint8_t *) &entry->revision, write ? (uint8_t *) &entry->revision : src, write,
&entryOffset, sizeof(entry->revision)); // INT16U
break;
}
case 0x0001: // server list
{
entryLength = 2;
entryLength = 4;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -209,7 +209,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
}
case 0x0002: // client list
{
entryLength = 2;
entryLength = 4;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -221,14 +221,14 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
}
case 0x0003: // parts list
{
entryLength = 1;
entryLength = 2;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + ((index - 1) * entryLength));
copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_ID
copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_NO
break;
}
}
Expand Down Expand Up @@ -304,7 +304,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv6 : src, write, &entryOffset,
sizeof(entry->OffPremiseServicesReachableIPv6)); // BOOLEAN
copyListMember(write ? dest : (uint8_t *) &entry->HardwareAddress, write ? (uint8_t *) &entry->HardwareAddress : src,
write, &entryOffset, sizeof(entry->HardwareAddress)); // IEEE_ADDRESS
write, &entryOffset, sizeof(entry->HardwareAddress)); // node_id
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -809,15 +809,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
break;
case 0x0001: // server list
// chip::ClusterId
entryLength = 2;
entryLength = 4;
break;
case 0x0002: // client list
// chip::ClusterId
entryLength = 2;
entryLength = 4;
break;
case 0x0003: // parts list
// chip::EndpointId
entryLength = 1;
entryLength = 2;
break;
}
break;
Expand Down Expand Up @@ -935,7 +935,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength);
if (!chip::CanCastTo<uint16_t>(totalSize))
{
ChipLogError(Zcl, "Cluster 0x%04x: Size of attribute 0x%02x is too large.", clusterId, attributeId);
ChipLogError(Zcl, "Cluster %" PRIx32 ": Size of attribute %" PRIx32 " is too large.", clusterId, attributeId);
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2107,13 +2107,12 @@
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \
\
/* Endpoint: 1, Cluster: IAS Zone (server) */ \
{ 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \
{ 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \
{ 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \
{ 0x0010, ZAP_TYPE(IEEE_ADDRESS), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \
ZAP_LONG_DEFAULTS_INDEX(5826) }, /* IAS CIE address */ \
{ 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \
{ 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \
{ 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \
{ 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \
{ 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(5826) }, /* IAS CIE address */ \
{ 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \
\
/* Endpoint: 1, Cluster: Wake on LAN (server) */ \
{ 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(5834) }, /* wake on lan mac address */ \
Expand Down
Loading

0 comments on commit ca8c123

Please sign in to comment.