Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some clusters from data-model/silabs and add data-model/chip #7915

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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