Skip to content

Commit

Permalink
Fix decoding of TLV payload data (#27839)
Browse files Browse the repository at this point in the history
  • Loading branch information
hare-siterwell authored and pull[bot] committed Oct 23, 2023
1 parent 9341507 commit 4929593
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def ComputeKnownTypes(self):

# Events are structures
for e in self.cluster.events:
self.known_types.add("%s_%s" % (self.cluster.name, e.name))
if e.fields:
self.known_types.add("%s_%s" % (self.cluster.name, e.name))

for e in self.cluster.enums:
self.known_types.add("%s_%s" % (self.cluster.name, e.name))
Expand Down Expand Up @@ -155,7 +156,7 @@ def GenerateTables(self) -> Generator[Table, None, None]:
reference="%s_%s" % (self.cluster.name, e.name),
real_type='%s::%s' % (self.cluster.name, e.name)
)
for e in self.cluster.events
for e in self.cluster.events if e.fields
])
cluster_entries.extend(
[entry for entry in self.CommandEntries()]
Expand All @@ -173,10 +174,11 @@ def GenerateTables(self) -> Generator[Table, None, None]:
)

for e in self.cluster.events:
yield Table(
full_name="%s_%s" % (self.cluster.name, e.name),
entries=[self.FieldEntry(field) for field in e.fields]
)
if e.fields:
yield Table(
full_name="%s_%s" % (self.cluster.name, e.name),
entries=[self.FieldEntry(field) for field in e.fields]
)

# some items have lists, create an intermediate item for those
for name in self.list_types:
Expand Down

0 comments on commit 4929593

Please sign in to comment.