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

Add helper to determine the atomic identifier for attribute Id given #1476

Conversation

brdandu
Copy link
Collaborator

@brdandu brdandu commented Oct 31, 2024

  • as_underlying_atomic_identifier_for_attributeId checks for the attribute type and returns the atomic identifier associated with it.
  • JIRA: ZAPP-1385

@brdandu brdandu force-pushed the feature/addHelperToDetermineAtomicIdentifierForAttribute/ZAPP-1385 branch from 185a42b to 7256090 Compare November 1, 2024 13:41
- as_underlying_atomic_identifier_for_attributeId checks for the attribute type and returns the atomic identifier associated with it.
- JIRA: ZAPP-1385
@brdandu brdandu force-pushed the feature/addHelperToDetermineAtomicIdentifierForAttribute/ZAPP-1385 branch from ab9e179 to f3bf51a Compare November 1, 2024 13:47
// If attribute type does not point to atomic type
let dataType = await queryZcl.selectDataTypeByNameAndClusterId(
this.global.db,
attributeDetails.type,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole block of code is a bit weird.... Mining in all these different places for a name: I can understand where it comes from, but shouldn't there be a better way to do this? Just one table "TYPES" that contains all known types, be it enum values or bitmap values or whatever?

I wonder if having separate tables for these was a mistake...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All types are in the data_type table but that only has the common characteristics with the distinct attributes of each type going into their corresponding tables.

@brdandu brdandu merged commit 14050e7 into project-chip:master Nov 1, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants