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

[IM] Use DataModel::Encode in EncodeScalarAttributeWritePayload for complex types #10386

Merged
merged 4 commits into from
Oct 12, 2021

Conversation

erjiaqing
Copy link
Contributor

Problem

Need to support writing complex types.

Change overview

  • Replace payload write logic by DataModel::Encode

Testing

  • New unit tests added to verify WriteClient can handle writing complex types.

src/app/tests/TestWriteInteraction.cpp Outdated Show resolved Hide resolved
src/app/tests/TestWriteInteraction.cpp Outdated Show resolved Hide resolved
src/app/tests/TestWriteInteraction.cpp Show resolved Hide resolved
@woody-apple
Copy link
Contributor

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

This is at least not wrong now, though I still think the compare should be against the actual data we meant to send (i.e. the string) not an intermediate representation (the CharSpan), if it's possible....

By the way it might be worth using CharSpan instead of Span in general....

@erjiaqing erjiaqing merged commit 9cfc21b into project-chip:master Oct 12, 2021
@erjiaqing erjiaqing deleted the im/WriteClient-ClusterObject branch October 12, 2021 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants