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

YAML: Cannot use SaveAs to compare 2 nullable of the same type #14502

Closed
jmeg-sfy opened this issue Jan 28, 2022 · 1 comment · Fixed by #14602
Closed

YAML: Cannot use SaveAs to compare 2 nullable of the same type #14502

jmeg-sfy opened this issue Jan 28, 2022 · 1 comment · Fixed by #14602
Labels

Comments

@jmeg-sfy
Copy link
Contributor

jmeg-sfy commented Jan 28, 2022

Problem

../../zzz_generated/chip-tool/zap-generated/test/Commands.h:46603:35: error: assigning to 'chip::Percent100ths' (aka 'unsigned short') from incompatible type 'const chip::app::DataModel::Nullablechip::Percent100ths' (aka 'const Nullable')

---- example of what i did in YAML

    ### Read Current Position -> Store this value for step 4c
    - label:
          "4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute
          from DUT"
      disabled: true
      command: "readAttribute"
      attribute: "CurrentPositionTiltPercent100ths"
      PICS: WNCV_TL && WNCV_PA_TL
      response:
          saveAs: attrCurrentPositionTilt
          constraints:
              minValue: 0
              maxValue: 10000

    ### Read Target Position -> Compare this value w/ Current
    ### Shall be tested as equals CurrentPositionTiltPercent100ths
    - label:
          "4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute
           4c: it Must be equal with CurrentPositionTiltPercent100ths from DUT"
      disabled: true
      command: "readAttribute"
      attribute: "TargetPositionTiltPercent100ths"
      PICS: WNCV_TL && WNCV_PA_TL
      response:
          value: attrCurrentPositionTilt
@bzbarsky-apple
Copy link
Contributor

    {{#if saveAs}}
    {{~#if (isString type)}}{{#if (isOctetString type)}}uint8_t{{else}}char{{/if}} * {{saveAs}}Buffer = nullptr;{{/if~}}
    {{chipType}} {{saveAs}};
    {{/if}}

The problem is the use of {{chipType}}, which does not know about nullable.... That should really be using zapTypeToDecodableClusterObjectType, probably.

jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Jan 31, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Jan 31, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Jan 31, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 1, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 1, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 1, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 1, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 2, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 2, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 2, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 2, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 2, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 3, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 3, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 4, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 4, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 7, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 7, 2022
woody-apple pushed a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
woody-apple pushed a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 8, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 9, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 9, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 9, 2022
jmeg-sfy added a commit to jmeg-sfy/connectedhomeip that referenced this issue Feb 9, 2022
andy31415 pushed a commit that referenced this issue Feb 9, 2022
* YAML: Update WindowCovering tests 3.1 3.2 to latest test plan

* DEV: Expose and Use HasFeaturePas

* DEV: Add mOperationalStatus var to class WindowApp

* DEV: Add fake motion simulator for CI

* DEV: add to All-cluster-app the missing callback

* ZAP: Add missing diff from regen

* YAML: Tests - Add Feature conditional PICS to WNCV 3.1 3.2

* CFG: ZAP all-cluster-app allows LF + PA_LF and  TL + PA_TL by default

* TEST: YAML update value and report

* DEV: Add PostEvent for Attributes Changes

* DEV: WindowAppImpl Add DispatchEventAttributeChange function

* DEV: Remove StopMotion

- prefer single method of goto current position

* DEV: Rewrite position movement using attributes

* DEV: Window-covering-server cleanup

* DEV: Remove Todos we use PICS to enable/disable tests

* TEST: YAML update WNCV 3.3 StopMotion

* Test: YAML WNCV 3.3 disable steps relying on saveAS

- add a todo on issue #14502

* TEST: Declare YAML test accordingly w/ Test Plan

* TEST: YAML WNCV 3.2 fix target

* TEST: YAML adjust timing

* DEV: remove unused option from ConvertValue

* DEV: Up or Down are inverted compare to the spec

* CFG: Zap Window-app update feature-map

* Restyled by whitespace

* Restyled by clang-format

* Restyled by prettier-yaml

* DEV: Use generated callback rather than declaring one

* DEV: Remove Post attribute declaration

* Restyled by whitespace

* Restyled by clang-format

* YAML: Update attributes check

* Rebase/Regen

* Restyled by whitespace

* TEST: YAML enable test on WNCV 3.3

- issue #14502 fixes by PR# 14602

* DEV: REbase / regen

Co-authored-by: Restyled.io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants