Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bitmap generation support in zap for python cluster objects (#24461)
Browse files Browse the repository at this point in the history
* add bitmap generation support in zap for python cluster objects

* run codegen
yunhanw-google authored and pull[bot] committed Sep 21, 2023
1 parent bf95b5e commit 1134800
Showing 2 changed files with 499 additions and 0 deletions.
487 changes: 487 additions & 0 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/controller/python/templates/python-cluster-Objects-py.zapt
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
import typing
from dataclasses import dataclass, field
from enum import IntEnum
from enum import IntFlag

from chip import ChipUtility
from chip.tlv import float32, uint
@@ -56,6 +57,17 @@ class {{asUpperCamelCase name}}(Cluster):

{{/zcl_enums}}

{{#zcl_bitmaps}}
{{#first}}
class Bitmaps:
{{/first}}
class {{asType label}}(IntFlag):
{{#zcl_bitmap_items}}
k{{asUpperCamelCase label}} = {{asHex mask}}
{{/zcl_bitmap_items}}

{{/zcl_bitmaps}}

{{#zcl_structs}}
{{#first}}
class Structs:

0 comments on commit 1134800

Please sign in to comment.