pw_transfer: Initial C++ service
This starts the RPC transfer service in C++. Initially, only simple read
transfers are supported, where all read data is sent synchronously in
response to parameter requests from the client.
Change-Id: I8ca76702ea8795ed07f702227d84afdf99874205
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53140
Commit-Queue: Alexei Frolov <frolv@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/pw_transfer/BUILD.bazel b/pw_transfer/BUILD.bazel
index 6a2c940..c3d57c4 100644
--- a/pw_transfer/BUILD.bazel
+++ b/pw_transfer/BUILD.bazel
@@ -26,11 +26,20 @@
name = "pw_transfer",
hdrs = [
"public/pw_transfer/handler.h",
+ "public/pw_transfer/transfer.h",
+ ],
+ srcs = [
+ "chunk.cc",
+ "pw_transfer_private/chunk.h",
+ "transfer.cc"
],
includes = ["public"],
deps = [
"//pw_assert",
+ "//pw_bytes",
"//pw_containers:intrusive_list",
+ "//pw_log",
+ "//pw_result",
"//pw_status",
"//pw_stream",
],
@@ -44,3 +53,13 @@
"//pw_unit_test",
],
)
+
+pw_cc_test(
+ name = "transfer_test",
+ srcs = ["transfer_test.cc"],
+ deps = [
+ ":pw_transfer",
+ "//pw_rpc/raw:test_method_context",
+ "//pw_unit_test",
+ ],
+)