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

[Feature] Review Common Profile Tags Support Within Json-Tlv-Json Convertor #28387

Closed
emargolis opened this issue Jul 29, 2023 · 4 comments
Closed

Comments

@emargolis
Copy link
Contributor

Feature description

Current Json-Tlv-Json converter supports Context and Common Profile tags. There are some issue associated with that, reflected in the following comments:
https://github.com/project-chip/connectedhomeip/pull/27635/files/f25def68e4127a807121069f11dfd5a411969b38#r1275438623
https://github.com/project-chip/connectedhomeip/pull/27635/files/f25def68e4127a807121069f11dfd5a411969b38#r1275439222

The current implementation requires Common Profile Tag Number to be greater than 255. If the Common Profile tag number is less or equal to 255 it cannot be distinguished from the Context Tag in Json.

@turon @mrjerryjohns @yunhanw-google

Platform

core

Platform Version(s)

No response

Anything else?

No response

@yunhanw-google
Copy link
Contributor

We have decided to replace common profile id with implicit profile id, and would update across kotlin side as well using this ticket.

@yunhanw-google
Copy link
Contributor

yunhanw-google commented Sep 5, 2023

From @bzbarsky-apple , So if we had a Common tag that happened to fall into the "less than 256" range, we would treat it as a Context tag?
InternalConvertTlvTag

else if (tagNumber <= UINT32_MAX)
{
    tag = TLV::ProfileTag(profileId, static_cast<uint32_t>(tagNumber));
}

I think we should immediately raise the error when detecting the number within UINT32_MAX range with implicit ProfileId, we have handled this error in

VerifyOrReturnError(TLV::TagNumFromTag(tag) > UINT8_MAX, CHIP_ERROR_INVALID_TLV_TAG);

@bzbarsky-apple
Copy link
Contributor

More useful links to the discussion, with my notes:

@yunhanw-google
Copy link
Contributor

yunhanw-google commented Mar 27, 2024

We have updated with implicit profileId, and improve it in #32276

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

No branches or pull requests

3 participants