Skip to content

Commit

Permalink
Make more idl generator data types as unsigned (#23017)
Browse files Browse the repository at this point in the history
* Make more types unsigned

* percent is also unsigned (basic-types.h)

* Update one more unsigned
  • Loading branch information
andy31415 authored and pull[bot] committed Sep 14, 2023
1 parent 1b62dc1 commit 1641356
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions scripts/idl/generators/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,31 +189,32 @@ def is_struct(self) -> bool:
"int8s": BasicInteger(idl_name="int8s", byte_count=1, is_signed=True),
"int8u": BasicInteger(idl_name="int8u", byte_count=1, is_signed=False),
# Derived types
"action_id": BasicInteger(idl_name="action_id", byte_count=1, is_signed=True),
"attrib_id": BasicInteger(idl_name="attrib_id", byte_count=4, is_signed=True),
"cluster_id": BasicInteger(idl_name="cluster_id", byte_count=4, is_signed=True),
"command_id": BasicInteger(idl_name="command_id", byte_count=4, is_signed=True),
"data_ver": BasicInteger(idl_name="data_ver", byte_count=4, is_signed=True),
"date": BasicInteger(idl_name="date", byte_count=4, is_signed=True),
"devtype_id": BasicInteger(idl_name="devtype_id", byte_count=4, is_signed=True),
"endpoint_no": BasicInteger(idl_name="endpoint_no", byte_count=2, is_signed=True),
# Size and signdness should generally follow DataModelTypes.h or basic-types.h
"action_id": BasicInteger(idl_name="action_id", byte_count=1, is_signed=False),
"attrib_id": BasicInteger(idl_name="attrib_id", byte_count=4, is_signed=False),
"cluster_id": BasicInteger(idl_name="cluster_id", byte_count=4, is_signed=False),
"command_id": BasicInteger(idl_name="command_id", byte_count=4, is_signed=False),
"data_ver": BasicInteger(idl_name="data_ver", byte_count=4, is_signed=False),
"date": BasicInteger(idl_name="date", byte_count=4, is_signed=False),
"devtype_id": BasicInteger(idl_name="devtype_id", byte_count=4, is_signed=False),
"endpoint_no": BasicInteger(idl_name="endpoint_no", byte_count=2, is_signed=False),
"epoch_s": BasicInteger(idl_name="epoch_s", byte_count=4, is_signed=False),
"epoch_us": BasicInteger(idl_name="epoch_us", byte_count=8, is_signed=False),
"event_id": BasicInteger(idl_name="event_id", byte_count=4, is_signed=True),
"event_no": BasicInteger(idl_name="event_no", byte_count=8, is_signed=True),
"fabric_id": BasicInteger(idl_name="fabric_id", byte_count=8, is_signed=True),
"fabric_idx": BasicInteger(idl_name="fabric_idx", byte_count=1, is_signed=True),
"field_id": BasicInteger(idl_name="field_id", byte_count=4, is_signed=True),
"group_id": BasicInteger(idl_name="group_id", byte_count=2, is_signed=True),
"node_id": BasicInteger(idl_name="node_id", byte_count=8, is_signed=True),
"percent": BasicInteger(idl_name="percent", byte_count=1, is_signed=True),
"percent100ths": BasicInteger(idl_name="percent100ths", byte_count=2, is_signed=True),
"status": BasicInteger(idl_name="status", byte_count=2, is_signed=True),
"event_id": BasicInteger(idl_name="event_id", byte_count=4, is_signed=False),
"event_no": BasicInteger(idl_name="event_no", byte_count=8, is_signed=False),
"fabric_id": BasicInteger(idl_name="fabric_id", byte_count=8, is_signed=False),
"fabric_idx": BasicInteger(idl_name="fabric_idx", byte_count=1, is_signed=False),
"field_id": BasicInteger(idl_name="field_id", byte_count=4, is_signed=False),
"group_id": BasicInteger(idl_name="group_id", byte_count=2, is_signed=False),
"node_id": BasicInteger(idl_name="node_id", byte_count=8, is_signed=False),
"percent": BasicInteger(idl_name="percent", byte_count=1, is_signed=False),
"percent100ths": BasicInteger(idl_name="percent100ths", byte_count=2, is_signed=False),
"status": BasicInteger(idl_name="status", byte_count=2, is_signed=False),
"systime_us": BasicInteger(idl_name="systime_us", byte_count=8, is_signed=True),
"tod": BasicInteger(idl_name="tod", byte_count=4, is_signed=True),
"trans_id": BasicInteger(idl_name="trans_id", byte_count=4, is_signed=True),
"utc": BasicInteger(idl_name="utc", byte_count=4, is_signed=True),
"vendor_id": BasicInteger(idl_name="vendor_id", byte_count=2, is_signed=True),
"utc": BasicInteger(idl_name="utc", byte_count=4, is_signed=False),
"vendor_id": BasicInteger(idl_name="vendor_id", byte_count=2, is_signed=False),
}


Expand Down

0 comments on commit 1641356

Please sign in to comment.