Skip to content

Remove redundancy in conformance definitions in ZAP XMLs #1526

Open
@ethanzhouyc

Description

In ZAP XML, both formats like optional="true" and <mandatoryConform> are used to define compliance, creating redundancy and confusion:

<attribute side="server" code="0x0004" name="CurrentY" define="COLOR_CONTROL_CURRENT_Y" type="int16u" max="0xFEFF" default="0x607D" reportable="true" optional="true">
      <mandatoryConform>
        <feature name="XY"/>
      </mandatoryConform>
</attribute>

Users don’t know which takes precedence and both must be updated manually. Changing one without updating the other can cause inconsistencies.

Proposed solution:

  1. For pure mandatory attributes, no conformance listed at all. optional="false" is disallowed.
  2. For pure optional (O) attributes, allow only optional="true" so we can use the shorthand attribute representation in the XML.
  3. For anything else, disallow having the optional attribute entirely, list longhand conformance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions