Skip to content

Commit 899e43d

Browse files
andy31415pull[bot]
authored andcommitted
Update more data types to match spec (#23023)
1 parent 184625e commit 899e43d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

scripts/idl/generators/types.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def is_struct(self) -> bool:
162162
return self.item_type == IdlItemType.STRUCT
163163

164164

165-
# Data types, held by ZAP in chip-types.xml
165+
# Data types, held by ZAP in chip-types.xml and generally by the spec.
166166
__CHIP_SIZED_TYPES__ = {
167167
"bitmap16": BasicInteger(idl_name="bitmap16", byte_count=2, is_signed=False),
168168
"bitmap24": BasicInteger(idl_name="bitmap24", byte_count=3, is_signed=False),
@@ -189,7 +189,7 @@ def is_struct(self) -> bool:
189189
"int8s": BasicInteger(idl_name="int8s", byte_count=1, is_signed=True),
190190
"int8u": BasicInteger(idl_name="int8u", byte_count=1, is_signed=False),
191191
# Derived types
192-
# Size and signdness should generally follow DataModelTypes.h or basic-types.h
192+
# Specification describes them in section '7.18.2. Derived Data Types'
193193
"action_id": BasicInteger(idl_name="action_id", byte_count=1, is_signed=False),
194194
"attrib_id": BasicInteger(idl_name="attrib_id", byte_count=4, is_signed=False),
195195
"cluster_id": BasicInteger(idl_name="cluster_id", byte_count=4, is_signed=False),
@@ -210,10 +210,9 @@ def is_struct(self) -> bool:
210210
"percent": BasicInteger(idl_name="percent", byte_count=1, is_signed=False),
211211
"percent100ths": BasicInteger(idl_name="percent100ths", byte_count=2, is_signed=False),
212212
"status": BasicInteger(idl_name="status", byte_count=2, is_signed=False),
213-
"systime_us": BasicInteger(idl_name="systime_us", byte_count=8, is_signed=True),
214-
"tod": BasicInteger(idl_name="tod", byte_count=4, is_signed=True),
215-
"trans_id": BasicInteger(idl_name="trans_id", byte_count=4, is_signed=True),
216-
"utc": BasicInteger(idl_name="utc", byte_count=4, is_signed=False),
213+
"systime_us": BasicInteger(idl_name="systime_us", byte_count=8, is_signed=False),
214+
"tod": BasicInteger(idl_name="tod", byte_count=4, is_signed=False),
215+
"trans_id": BasicInteger(idl_name="trans_id", byte_count=4, is_signed=False),
217216
"vendor_id": BasicInteger(idl_name="vendor_id", byte_count=2, is_signed=False),
218217
}
219218

0 commit comments

Comments
 (0)