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 25, 2021
1 parent 7caec3e commit ab96ff0
Show file tree
Hide file tree
Showing 22 changed files with 2,555 additions and 17,380 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -303,8 +303,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -835,7 +842,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
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
15 changes: 11 additions & 4 deletions examples/bridge-app/bridge-common/gen/attribute-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -208,8 +208,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -461,7 +468,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/clusters/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static void OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse(void * co
ChipLogProgress(chipTool, " FabricConnected: %" PRIu8 "", entries[i].FabricConnected);
ChipLogProgress(chipTool, " OffPremiseServicesReachableIPv4: %" PRIu8 "", entries[i].OffPremiseServicesReachableIPv4);
ChipLogProgress(chipTool, " OffPremiseServicesReachableIPv6: %" PRIu8 "", entries[i].OffPremiseServicesReachableIPv6);
ChipLogProgress(chipTool, " HardwareAddress: %" PRIu64 "", entries[i].HardwareAddress);
ChipLogProgress(Zcl, " HardwareAddress: %zu", entries[i].HardwareAddress.size());
ChipLogProgress(chipTool, " Type: %" PRIu8 "", entries[i].Type);
}

Expand Down
15 changes: 11 additions & 4 deletions examples/lighting-app/lighting-common/gen/attribute-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -110,8 +110,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -333,7 +340,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
15 changes: 11 additions & 4 deletions examples/lock-app/lock-common/gen/attribute-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -110,8 +110,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -333,7 +340,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
15 changes: 11 additions & 4 deletions examples/pump-app/pump-common/gen/attribute-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -110,8 +110,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -333,7 +340,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -110,8 +110,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -333,7 +340,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -110,8 +110,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -178,7 +185,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
15 changes: 11 additions & 4 deletions examples/tv-app/tv-common/gen/attribute-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
{
case 0x0000: // NetworkInterfaces
{
entryLength = 46;
entryLength = 48;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index);
Expand All @@ -266,8 +266,15 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6,
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
chip::ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING
if (CHIP_NO_ERROR !=
(write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan)
: ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan)))
{
ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + 10);
copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset,
sizeof(entry->Type)); // ENUM8
break;
Expand Down Expand Up @@ -723,7 +730,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
{
case 0x0000: // NetworkInterfaces
// Struct _NetworkInterfaceType
entryLength = 46;
entryLength = 48;
break;
}
break;
Expand Down
Loading

0 comments on commit ab96ff0

Please sign in to comment.