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

Not able to read the attribute with string type value #13771

Closed
yufengwangca opened this issue Jan 20, 2022 · 1 comment · Fixed by #14255
Closed

Not able to read the attribute with string type value #13771

yufengwangca opened this issue Jan 20, 2022 · 1 comment · Fixed by #14255
Assignees
Labels

Comments

@yufengwangca
Copy link
Contributor

Problem

I found the default generated attribute get API does not work for the attrbute with type of string, such as:

namespace Description {
EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string
EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value);

The Set API works well.

Proposed Solution

<suggested fix, suggested enhancement>

@bzbarsky-apple
Copy link
Contributor

The MutableCharSpan passed in needs to point to a buffer to copy the string into. And the read will fail if the buffer is not big enough.

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