ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
packet_interface_transport.h
Go to the documentation of this file.
1#pragma once
2
5
7
13 public:
14 explicit PacketInterfaceTransport(PacketInterface *interface) : interface_(interface) {}
15
16 void setup() override;
17
18 float get_setup_priority() const override { return setup_priority::PROCESSOR; }
19
20 protected:
21 // implementing PacketTransport virtual methods
22 size_t get_max_packet_size() override { return this->interface_->top()->get_max_packet_size(); }
23 void send_packet(const std::vector<uint8_t> &buf) const override;
24 void receive_(const PacketBuffer &data);
25
27};
28
29} // namespace esphome::packet_interface
A buffer class that efficiently represents a composite buffer with three sections:
A class that will transport data to and from an abstract channel.
size_t get_max_packet_size() const
The largest packet this layer accepts; fixed when the layer is constructed.
PacketInterface * top()
The topmost layer stacked on this one, or this one if nothing is stacked on it.
A transport protocol adapter that bridges PacketInterface to PacketTransport.
void send_packet(const std::vector< uint8_t > &buf) const override
constexpr float PROCESSOR
For components that use data from sensors like displays.
Definition component.h:47