-
Notifications
You must be signed in to change notification settings - Fork 82
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
need if_is_bitmap and if_is_enum support underneath zcl_event_fields #572
Comments
@yunhanw-google is there an enum or bitmap type which is not detected as one with the above template? |
@brdandu : this doesn't seem to work within 'events'. I was planning to take a look, but I suspect that when querying for the Matter "events" we don't properly populate stuff that those |
There might be an issue in |
I created a new unit test template that looks like this:
So simple iteration across all events and then over fields.
See the "[ENUM]" thingies, which is printed because of "if_is_enum" in the template. |
If I temporarily change one of the types in my test files to bitmap, then I also see "[BITMAP]" printed out. So at this point I am not sure I understand what is not working here. @yunhanw-google : |
Draft pull request: #574 |
let me have a try, thanks |
i see, thanks |
Trying the below
switch (TLV::TagNumFromTag(reader.GetTag()))
{
{{#zcl_event_fields}}
case to_underlying(Fields::k{{asUpperCamelCase name}}):
#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM
{{#if_is_enum type}}
ReturnErrorOnFailure(Check{{type}}({{asLowerCamelCase label}}));
{{/if_is_enum}}
#endif
{{#if_is_bitmap type}}
ReturnErrorOnFailure(Check{{type}}({{asLowerCamelCase label}}));
{{/if_is_bitmap}}
ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase name}}));
break;
{{/zcl_event_fields}}
default:
break;
}
it seems if_is_enum and if_is_bitmap cannot work underneath zcl_event_fields
it seems it is working with command and attribute, thanks
needs this to unblock one IM thing, project-chip/connectedhomeip#19334
The text was updated successfully, but these errors were encountered: