Skip to content

Commit

Permalink
Remove endpoint 5 on the tv-app as it creates some random ZAP behavior (
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Jul 9, 2021
1 parent 6d4647d commit 8cc17bd
Show file tree
Hide file tree
Showing 8 changed files with 540 additions and 10,853 deletions.
4,505 changes: 269 additions & 4,236 deletions examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

65 changes: 0 additions & 65 deletions examples/tv-app/tv-common/gen/attribute-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,58 +77,6 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
uint16_t entryLength = 0;
switch (clusterId)
{
case 0xF004: // Group Key Management Cluster
{
uint16_t entryOffset = kSizeLengthInBytes;
switch (am->attributeId)
{
case 0x0000: // groups
{
entryLength = 6;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %l is invalid.", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + ((index - 1) * entryLength));
// Struct _GroupState
_GroupState * entry = reinterpret_cast<_GroupState *>(write ? src : dest);
copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write,
&entryOffset, sizeof(entry->VendorId)); // INT16U
copyListMember(write ? dest : (uint8_t *) &entry->VendorGroupId, write ? (uint8_t *) &entry->VendorGroupId : src, write,
&entryOffset, sizeof(entry->VendorGroupId)); // INT16U
copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySetIndex, write ? (uint8_t *) &entry->GroupKeySetIndex : src,
write, &entryOffset, sizeof(entry->GroupKeySetIndex)); // INT16U
break;
}
case 0x0001: // group keys
{
entryLength = 29;
if (((index - 1) * entryLength) > (am->size - entryLength))
{
ChipLogError(Zcl, "Index %l is invalid.", index);
return 0;
}
entryOffset = static_cast<uint16_t>(entryOffset + ((index - 1) * entryLength));
// Struct _GroupKey
_GroupKey * entry = reinterpret_cast<_GroupKey *>(write ? src : dest);
copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write,
&entryOffset, sizeof(entry->VendorId)); // INT16U
copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write,
&entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U
copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyRoot, write ? (uint8_t *) &entry->GroupKeyRoot : src, write,
&entryOffset, 16); // OCTET_STRING
copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyEpochStartTime,
write ? (uint8_t *) &entry->GroupKeyEpochStartTime : src, write, &entryOffset,
sizeof(entry->GroupKeyEpochStartTime)); // INT64U
copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySecurityPolicy,
write ? (uint8_t *) &entry->GroupKeySecurityPolicy : src, write, &entryOffset,
sizeof(entry->GroupKeySecurityPolicy)); // GroupKeySecurityPolicy
break;
}
}
break;
}
}

return entryLength;
Expand All @@ -148,19 +96,6 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
uint16_t entryLength = 0;
switch (clusterId)
{
case 0xF004: // Group Key Management Cluster
switch (attributeId)
{
case 0x0000: // groups
// Struct _GroupState
entryLength = 6;
break;
case 0x0001: // group keys
// Struct _GroupKey
entryLength = 29;
break;
}
break;
}

uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength);
Expand Down
Loading

0 comments on commit 8cc17bd

Please sign in to comment.