template<typename T, Property... kProperties>
class pw::channel::PacketChannel< T, kProperties >
Interface that supports reading and writing writing packets. The supported operations are reflected in the type.
PacketChannel is typically referred to by one its aliases: pw::channel::PacketReader, pw::channel::PacketWriter, or pw::channel::PacketReaderWriter.
To implement a packet channel, derive from pw::channel::Implement<> with the desired PacketChannel type.
- Warning
- This class is in an early, experimental state. Do not use it until this warning is removed (https://pwbug.dev/421962771).
|
|
constexpr bool | is_read_open () const |
| |
|
constexpr bool | is_write_open () const |
| |
|
constexpr bool | is_read_or_write_open () const |
| |
|
async2::PollResult< Packet > | PendRead (async2::Context &cx) |
| |
|
async2::PollResult< PendingWrite< Packet > > | PendReadyToWrite (async2::Context &cx, size_t num=1) |
| |
|
async2::Poll | PendWrite (async2::Context &cx) |
| |
|
void | SetAvailableWrites (uint16_t available_writes) |
| |
|
void | AcknowledgeWrites (uint16_t num_completed) |
| |
|
async2::Poll< Status > | PendClose (async2::Context &cx) |
| |
|
template<typename Sibling , typename = internal::EnableIfConvertible<PacketChannel, Sibling>> |
| constexpr | operator Sibling & () |
| | Channels may be implicitly converted to other compatible channel types.
|
| |
|
template<typename Sibling , typename = internal::EnableIfConvertible<PacketChannel, Sibling>> |
| constexpr | operator const Sibling & () const |
| |
|
constexpr | operator AnyPacketChannel< Packet > & () |
| |
|
constexpr | operator const AnyPacketChannel< Packet > & () const |
| |
|
template<typename Sibling > |
| Sibling & | as () |
| | Returns a reference to this as another compatible packet channel type.
|
| |
|
template<typename Sibling > |
| const Sibling & | as () const |
| |
| template<Property... kOtherProperties> |
| auto & | as () |
| |
|
template<Property... kOtherProperties> |
| const auto & | as () const |
| |
|
|
static constexpr bool | readable () |
| |
|
static constexpr bool | writable () |
| |
|
|
uint16_t | GetAvailableWrites () const |
| |
|
|
template<typename > |
| class | AnyPacketChannel |
| |
◆ as()
template<typename T , Property... kProperties>
template<Property... kOtherProperties>
Returns a reference to this channel as another channel with the specified properties, which must be compatible.
The documentation for this class was generated from the following file: