Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App cluster XMLs should use original type definitions instead of BITMAP* directly #15528

Closed
mrjerryjohns opened this issue Feb 24, 2022 · 1 comment · Fixed by #15600 or #16466
Closed
Labels
app-clusters Application cluster work

Comments

@mrjerryjohns
Copy link
Contributor

Problem

Various app cluster XMLs define bitmaps with their underlying enum-like definitions:

e.g

    <bitmap name="WiFiSecurity" type="BITMAP8">
        <field name="Unencrypted" mask="0x1"/>
        <field name="WEP-PERSONAL" mask="0x2"/>
        <field name="WPA-PERSONAL" mask="0x4"/>
        <field name="WPA2-PERSONAL" mask="0x8"/>
        <field name="WPA3-PERSONAL" mask="0x10"/>
    </bitmap>

However, they actually lose the type information when instantiating these in various instances:

    <struct name="WiFiInterfaceScanResult">
        <cluster code="0x0031"/>
        <item name="Security" type="BITMAP8"/> <---- should be of type `WifiSecurity` instead.
        <item name="SSID" type="OCTET_STRING"/>
        <item name="BSSID" type="OCTET_STRING"/>
        <item name="Channel" type="INT16U"/>
        <item name="WiFiBand" type="WiFiBand"/>
        <item name="RSSI" type="INT8S"/>
    </struct>
Solution

Update the various app cluster XMLs to use the original type that is eventually backed by a BITMAP*

@hubTab
Copy link
Contributor

hubTab commented Feb 25, 2022

PR #15600 has been created to address the fix for the Door Lock cluster.

hubTab pushed a commit to hubTab/connectedhomeip that referenced this issue Mar 14, 2022
…ecifications type definitions, instead of using the enum* directly (project-chip#15528).

Fixed the ManualOperationEventMask comment.
Rebuilt all-clusters-app, chip-tool, and re-generated zzz files.

Note: In the review process, it has been noted that the GetLogRecordResponse command documents the EventType as an enum8.
However the spec does not define the EventTypeEnum, which could be easily added to the spec as the Event Type is a textual description.
hubTab pushed a commit to hubTab/connectedhomeip that referenced this issue Mar 14, 2022
…ecifications type definitions, instead of using the enum* directly (project-chip#15528).

Fixed the ManualOperationEventMask comment.
Rebuilt all-clusters-app, chip-tool, and re-generated zzz files.

Note: In the review process, it has been noted that the GetLogRecordResponse command documents the EventType as an enum8.
However the spec does not define the EventTypeEnum, which could be easily added to the spec as the Event Type is a textual description.
mrjerryjohns pushed a commit that referenced this issue Mar 15, 2022
…ecifications type definitions, instead of using the enum* directly (#15528). (#15600)

Fixed the ManualOperationEventMask comment.
Rebuilt all-clusters-app, chip-tool, and re-generated zzz files.

Note: In the review process, it has been noted that the GetLogRecordResponse command documents the EventType as an enum8.
However the spec does not define the EventTypeEnum, which could be easily added to the spec as the Event Type is a textual description.
hubTab pushed a commit to hubTab/connectedhomeip that referenced this issue Mar 18, 2022
…ons, instead of using the enum* directly. See issue project-chip#15528.

Rebuilt all-clusters-app, chip-tool, and re-generated zzz files.
hubTab pushed a commit to hubTab/connectedhomeip that referenced this issue Mar 18, 2022
…ons, instead of using the enum* directly. See issue project-chip#15528.

Added the DlStartUpOnOff enum.
Updated src/app/clusters/on-off-server/on-off-server.cpp to use the DlStartUpOnOff type definition.
Re-generated zzz files, and verified by rebuilding the all-clusters-app, chip-tool applications.
hubTab pushed a commit to hubTab/connectedhomeip that referenced this issue Mar 23, 2022
woody-apple pushed a commit to hubTab/connectedhomeip that referenced this issue Mar 23, 2022
andy31415 pushed a commit that referenced this issue Mar 24, 2022
…ons, instead of using the enum* directly. See issue #15528. (#16466)
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this issue Apr 14, 2022
…ecifications type definitions, instead of using the enum* directly (project-chip#15528). (project-chip#15600)

Fixed the ManualOperationEventMask comment.
Rebuilt all-clusters-app, chip-tool, and re-generated zzz files.

Note: In the review process, it has been noted that the GetLogRecordResponse command documents the EventType as an enum8.
However the spec does not define the EventTypeEnum, which could be easily added to the spec as the Event Type is a textual description.
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this issue Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment