Commit Graph

8 Commits

Author SHA1 Message Date
Alexei Frolov
e467579086 misc: Size report binary fixes
This fixes compiler errors that occur within various size reports.

Change-Id: Icdfd439ace38e5183c46a92fc73c39b24ea8638e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17628
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
2020-09-08 23:12:30 +00:00
shaneajg
f20ef8ef4a pw_bytes: Added code for Size Report
Change-Id: I224e96c88288c890686cb91eac354cf30dbcad4f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/13182
Commit-Queue: Shane Gomindes <shaneajg@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2020-08-27 20:02:08 +00:00
Wyatt Hepler
6b3a6c9972 pw_bytes: Utilities for building byte arrays
- Rework pw_kvs_private/byte_utils.h into pw_bytes/array.h.
- Remove pw_kvs_private/byte_utils.h and update the KVS code to use the
  new functions.

Change-Id: I55bb861955d67945771391e1887bf3aae37d0f9c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/15663
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
2020-08-11 20:24:33 +00:00
shaneajg
5c15f0db3c pw_bytes: Added iterator value-retrieval methods
Added 'peek' and 'read' functionality that enables ordered retreival
(Little/Big Endian) of the inserted integer values, and adjusts the
position of the iterator accordingly.

Change-Id: I418f7bd3ed5a1b627a80a0eaa190c2d26fed032c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12960
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Shane Gomindes <shaneajg@google.com>
2020-06-29 16:24:03 +00:00
Wyatt Hepler
0158ad731e pw_bytes: ByteSpan and ConstByteSpan aliases
- Introduce ByteSpan and ConstByteSpan aliases for std::span<std::byte>
  and std::span<const std::byte>.
- Use the new aliases in pw_bytes/byte_builder.h.

Change-Id: Ifaf5e19c9b34cf7874b366300aa1e582ae1e5587
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12944
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2020-06-26 22:08:39 +00:00
shaneajg
9fe4cec6f2 pw_bytes: Added an iterator class
Added an iterator class to the ByteBuilder class with functionality
based on C++'s Random access iterator that allows access to the
elements in the buffer.

Change-Id: I3d4c1de916137bb515635fab575b29efc4a8855f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12802
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Shane Gomindes <shaneajg@google.com>
2020-06-24 21:05:45 +00:00
shaneajg
3181d18e36 pw_bytes: Added an ordered put method for values
Added functionality to insert values to the buffer in the endianness
order as specified by the user.

Change-Id: Ie33ac7a38a35cdd1cfdb2952233d13f09242cc8c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12472
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Shane Gomindes <shaneajg@google.com>
2020-06-19 21:01:52 +00:00
shaneajg
9c19db4e78 pw_bytes: Module for bytes manipulation.
Added a ByteBuffer module which contains a collection of utilities for
manipulating binary data.

Change-Id: Ia071c3e68a1ada63232fcb56f3d2d8171bac0778
2020-06-16 22:29:31 +00:00