pw_system: Make RPC server a facade
Makes pw_system's RPC server a public facade so users can:
1. Access the RPC server to register services.
2. Provide a custom server implementation with more channels and
different transports.
Also adds some real docs to pw_system.
Change-Id: I789089573359061c5f3254575e540c27a63deed3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/88364
Reviewed-by: Carlos Chinchilla <cachinchilla@google.com>
Reviewed-by: Tom Craig <tommycraig@gmail.com>
Reviewed-by: Chad Norvell <chadnorvell@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
diff --git a/pw_system/init.cc b/pw_system/init.cc
index bc06ac1..2157786 100644
--- a/pw_system/init.cc
+++ b/pw_system/init.cc
@@ -16,10 +16,10 @@
#include "pw_log/log.h"
#include "pw_rpc/echo_service_nanopb.h"
+#include "pw_system/rpc_server.h"
#include "pw_system/target_hooks.h"
#include "pw_system/work_queue.h"
#include "pw_system_private/log.h"
-#include "pw_system_private/rpc.h"
#include "pw_thread/detached_thread.h"
namespace pw::system {
@@ -31,7 +31,7 @@
// Setup logging.
const Status status = GetLogThread().OpenUnrequestedLogStream(
- kDefaultChannelId, GetRpcServer(), GetLogService());
+ kDefaultRpcChannelId, GetRpcServer(), GetLogService());
if (!status.ok()) {
PW_LOG_ERROR("Error opening unrequested log streams %d",
static_cast<int>(status.code()));