Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. Comms
  5. pw_channel
Loading...
Searching...
No Matches
pw_channel

Overview

Async, zero-copy API for sending and receiving bytes or datagrams.

Submodules

 Forwarding
 
 Loopback
 
 RP2 stdio
 
 Stream channel
 

Classes

class  pw::channel::Channel< kDataType, kProperties >
 
class  pw::channel::AnyChannel
 
class  pw::channel::ChannelImpl< kDataType, kProperties >
 
class  pw::channel::Implement< ChannelType >
 

Typedefs

template<Property... kProperties>
using pw::channel::ByteChannel = Channel< DataType::kByte, kProperties... >
 
template<Property... kProperties>
using pw::channel::DatagramChannel = Channel< DataType::kDatagram, kProperties... >
 
using pw::channel::ByteReader = ByteChannel< kReadable >
 
using pw::channel::ByteWriter = ByteChannel< kWritable >
 
using pw::channel::ByteReaderWriter = ByteChannel< kReadable, kWritable >
 
using pw::channel::ReliableByteReader = ByteChannel< kReliable, kReadable >
 
using pw::channel::ReliableByteWriter = ByteChannel< kReliable, kWritable >
 
using pw::channel::ReliableByteReaderWriter = ByteChannel< kReliable, kReadable, kWritable >
 
using pw::channel::DatagramReader = DatagramChannel< kReadable >
 
using pw::channel::DatagramWriter = DatagramChannel< kWritable >
 
using pw::channel::DatagramReaderWriter = DatagramChannel< kReadable, kWritable >
 
using pw::channel::ReliableDatagramReader = DatagramChannel< kReliable, kReadable >
 
using pw::channel::ReliableDatagramWriter = DatagramChannel< kReliable, kWritable >
 
using pw::channel::ReliableDatagramReaderWriter = DatagramChannel< kReliable, kReadable, kWritable >
 
template<Property... kProperties>
using pw::channel::ByteChannelImpl = ChannelImpl< DataType::kByte, kProperties... >
 
template<Property... kProperties>
using pw::channel::DatagramChannelImpl = ChannelImpl< DataType::kDatagram, kProperties... >
 

Enumerations

enum  pw::channel::Property : uint8_t { pw::channel::kReliable = 1 << 0 , pw::channel::kReadable = 1 << 1 , pw::channel::kWritable = 1 << 2 }
 
enum class  pw::channel::DataType : uint8_t { kByte = 0 , kDatagram = 1 }
 

Typedef Documentation

◆ ByteChannel

template<Property... kProperties>
using pw::channel::ByteChannel = typedef Channel<DataType::kByte, kProperties...>

A ByteChannel exchanges data as a stream of bytes.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ByteChannelImpl

template<Property... kProperties>
using pw::channel::ByteChannelImpl = typedef ChannelImpl<DataType::kByte, kProperties...>

Implement a byte-oriented Channel with the specified properties.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ByteReader

Unreliable byte-oriented Channel that supports reading.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ByteReaderWriter

Unreliable byte-oriented Channel that supports reading and writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ByteWriter

Unreliable byte-oriented Channel that supports writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ DatagramChannel

template<Property... kProperties>
using pw::channel::DatagramChannel = typedef Channel<DataType::kDatagram, kProperties...>

A DatagramChannel exchanges data as a series of datagrams.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ DatagramChannelImpl

template<Property... kProperties>
using pw::channel::DatagramChannelImpl = typedef ChannelImpl<DataType::kDatagram, kProperties...>

Implement a datagram-oriented Channel with the specified properties.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ DatagramReader

Unreliable datagram-oriented Channel that supports reading.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ DatagramReaderWriter

Unreliable datagram-oriented Channel that supports reading and writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ DatagramWriter

Unreliable datagram-oriented Channel that supports writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ReliableByteReader

Reliable byte-oriented Channel that supports reading.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ReliableByteReaderWriter

Reliable byte-oriented Channel that supports reading and writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ReliableByteWriter

Reliable byte-oriented Channel that supports writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ReliableDatagramReader

Reliable datagram-oriented Channel that supports reading.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ReliableDatagramReaderWriter

Reliable datagram-oriented Channel that supports reading and writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ ReliableDatagramWriter

Reliable datagram-oriented Channel that supports writing.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

Enumeration Type Documentation

◆ DataType

enum class pw::channel::DataType : uint8_t
strong

The type of data exchanged in Channel read and write calls. Unlike Property, Channels with different DataTypes cannot be used interchangeably.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.

◆ Property

enum pw::channel::Property : uint8_t

Basic properties of a Channel. A Channel type can convert to any other Channel for which it supports the required properties. For example, a kReadable and kWritable channel may be passed to an API that only requires kReadable.

Deprecated:
pw_channel is deprecated; use pw::transport::Socket or pw::transport::ReliableSocket.
Enumerator
kReliable 

All data is guaranteed to be delivered in order. The channel is closed if data is lost.

kReadable 

The channel supports reading.

kWritable 

The channel supports writing.