pw_channel: Consistent datagram/byte channel aliases

Have a consistent set of reader/writer aliases for datagram and byte
channels. Include "Reliable" for reliable channels.

Change-Id: I39010b2dc25951f5c82729558aae3416f0a9a0be
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/210796
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/pw_channel/loopback_channel_test.cc b/pw_channel/loopback_channel_test.cc
index 28a7dfe..6bb1b0f 100644
--- a/pw_channel/loopback_channel_test.cc
+++ b/pw_channel/loopback_channel_test.cc
@@ -32,10 +32,10 @@
 using ::pw::async2::Ready;
 using ::pw::async2::Task;
 using ::pw::operator"" _b;
-using ::pw::channel::ByteReader;
 using ::pw::channel::DatagramReader;
 using ::pw::channel::LoopbackByteChannel;
 using ::pw::channel::LoopbackDatagramChannel;
+using ::pw::channel::ReliableByteReader;
 using ::pw::multibuf::MultiBuf;
 using ::pw::multibuf::MultiBufAllocator;
 using ::pw::multibuf::SimpleAllocator;
@@ -134,7 +134,7 @@
 TEST(LoopbackByteChannel, IgnoresEmptyWrites) {
   SimpleAllocatorForTest alloc;
   LoopbackByteChannel channel(*alloc);
-  ReaderTask<ByteReader> read_task(channel);
+  ReaderTask<ReliableByteReader> read_task(channel);
 
   Dispatcher dispatcher;
   dispatcher.Post(read_task);
@@ -154,7 +154,7 @@
 TEST(LoopbackByteChannel, LoopsData) {
   SimpleAllocatorForTest alloc;
   LoopbackByteChannel channel(*alloc);
-  ReaderTask<ByteReader> read_task(channel);
+  ReaderTask<ReliableByteReader> read_task(channel);
 
   Dispatcher dispatcher;
   dispatcher.Post(read_task);
diff --git a/pw_channel/public/pw_channel/channel.h b/pw_channel/public/pw_channel/channel.h
index d5c47ea..b5ce399 100644
--- a/pw_channel/public/pw_channel/channel.h
+++ b/pw_channel/public/pw_channel/channel.h
@@ -481,12 +481,26 @@
 template <Property... kProperties>
 using DatagramChannel = Channel<DataType::kDatagram, kProperties...>;
 
+/// Unreliable byte-oriented `Channel` that supports reading.
+using ByteReader = ByteChannel<kReadable>;
+/// Unreliable byte-oriented `Channel` that supports writing.
+using ByteWriter = ByteChannel<kWritable>;
+/// Unreliable byte-oriented `Channel` that supports reading and writing.
+using ByteReaderWriter = ByteChannel<kReadable, kWritable>;
+
 /// Reliable byte-oriented `Channel` that supports reading.
-using ByteReader = ByteChannel<kReliable, kReadable>;
+using ReliableByteReader = ByteChannel<kReliable, kReadable>;
 /// Reliable byte-oriented `Channel` that supports writing.
-using ByteWriter = ByteChannel<kReliable, kWritable>;
+using ReliableByteWriter = ByteChannel<kReliable, kWritable>;
 /// Reliable byte-oriented `Channel` that supports reading and writing.
-using ByteReaderWriter = ByteChannel<kReliable, kReadable, kWritable>;
+using ReliableByteReaderWriter = ByteChannel<kReliable, kReadable, kWritable>;
+
+/// Unreliable datagram-oriented `Channel` that supports reading.
+using DatagramReader = DatagramChannel<kReadable>;
+/// Unreliable datagram-oriented `Channel` that supports writing.
+using DatagramWriter = DatagramChannel<kWritable>;
+/// Unreliable datagram-oriented `Channel` that supports reading and writing.
+using DatagramReaderWriter = DatagramChannel<kReadable, kWritable>;
 
 /// Reliable datagram-oriented `Channel` that supports reading.
 using ReliableDatagramReader = DatagramChannel<kReliable, kReadable>;
@@ -496,13 +510,6 @@
 using ReliableDatagramReaderWriter =
     DatagramChannel<kReliable, kReadable, kWritable>;
 
-/// Unreliable datagram-oriented `Channel` that supports reading.
-using DatagramReader = DatagramChannel<kReadable>;
-/// Unreliable datagram-oriented `Channel` that supports writing.
-using DatagramWriter = DatagramChannel<kWritable>;
-/// Unreliable datagram-oriented `Channel` that supports reading and writing.
-using DatagramReaderWriter = DatagramChannel<kReadable, kWritable>;
-
 /// @}
 
 }  // namespace pw::channel
diff --git a/pw_channel/public/pw_channel/forwarding_channel.h b/pw_channel/public/pw_channel/forwarding_channel.h
index 2e9ae7d..f1198ca 100644
--- a/pw_channel/public/pw_channel/forwarding_channel.h
+++ b/pw_channel/public/pw_channel/forwarding_channel.h
@@ -138,7 +138,7 @@
 };
 
 template <>
-class ForwardingChannel<DataType::kByte> : public ByteReaderWriter {
+class ForwardingChannel<DataType::kByte> : public ReliableByteReaderWriter {
  public:
   ForwardingChannel(const ForwardingChannel&) = delete;
   ForwardingChannel& operator=(const ForwardingChannel&) = delete;
diff --git a/pw_channel/public/pw_channel/loopback_channel.h b/pw_channel/public/pw_channel/loopback_channel.h
index 59f9054..b0e41f5 100644
--- a/pw_channel/public/pw_channel/loopback_channel.h
+++ b/pw_channel/public/pw_channel/loopback_channel.h
@@ -74,7 +74,7 @@
 };
 
 template <>
-class LoopbackChannel<DataType::kByte> : public ByteReaderWriter {
+class LoopbackChannel<DataType::kByte> : public ReliableByteReaderWriter {
  public:
   LoopbackChannel(multibuf::MultiBufAllocator& write_allocator)
       : write_allocator_(&write_allocator) {}
diff --git a/pw_hdlc/router_test.cc b/pw_hdlc/router_test.cc
index fe3b57d..e2adcc1 100644
--- a/pw_hdlc/router_test.cc
+++ b/pw_hdlc/router_test.cc
@@ -36,9 +36,7 @@
 using ::pw::async2::Task;
 using ::pw::async2::Waker;
 using ::pw::operator"" _b;
-using ::pw::channel::ByteReaderWriter;
 using ::pw::channel::DatagramReader;
-using ::pw::channel::DatagramReaderWriter;
 using ::pw::channel::DatagramWriter;
 using ::pw::channel::ForwardingByteChannelPair;
 using ::pw::channel::ForwardingDatagramChannelPair;