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

Implement better buffer abstractions in Silicon Labs code, part 2 #3719

Closed
bzbarsky-apple opened this issue Nov 7, 2020 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

This is a continuation of the work described in #2168 that is not finished yet.

We now have an buffer reader class, but none of the rest of the work has happened. In particular, we need to replace use of emberAfGet* with the buffer reader, possibly replace emberAfPut*InResp with some sort of sematic writer, etc.

Proposed Solution

Copying from #2168, more or less:

  1. Switch all the places to-be-read buffers are passed through (command dispatch, command implementations as needed, etc) to our buffer reader. This would include the emberAfGet* APIs, which would be fixed to advance the read pointer themselves so consumers don't have to.
  2. Introduce Put APIs for higher-level constructs like "attribute id", not just integer sizes. Under the hood this can call the appropriate integer thing, but make it clearer what we're really reading/writing. Basically, create a writer on top of BufBound that has semantic stuff hanging off it.

We can't fully fix this until we change codegen to ZAP. I will probably be filing separate issues for parts of the above work in src/app.

@yunhanw-google @vivien-apple @rwalker-apple

@bzbarsky-apple bzbarsky-apple self-assigned this Nov 7, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@woody-apple woody-apple added feature work p2 priority 2 work and removed feature request labels Jan 29, 2021
@woody-apple woody-apple added this to the V0.7 milestone Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants