-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_transfer: Protocol versioning and chunk refactor
This adds the concept of versioning to the C++ pw_transfer implementation. The version of a given transfer is deduced from the chunks sent and received based on the fields which are present within them. Notably, there is no explicit version number encoded anywhere on the wire. The addition of versioning is done in such a way that transfer implementations can remain backwards compatible, supporting communication with users of older protocol versions. Initially, only a single "legacy" version is supported and used, with its handling behavior matching the current uses of pw_transfer. An improved protocol (tentatively "v2") will be rolled out over a series of subsequent CLs. To support these goals, the transfer chunk and code using it is refactored into an encapsulating class, with internal logic for encoding and decoding different fields based on its configured or inferred version. A common public API is presented to the rest of the transfer code, allowing it to be written in a (mostly) version-agnostic manner. Change-Id: I8584e12ca5b44f1a973c837389e1e00f8c6112f6 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/92640 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Alexei Frolov <frolv@google.com>
- Loading branch information
Showing
14 changed files
with
1,478 additions
and
1,190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.