4#ifdef USE_PACKET_INTERFACE_BASIC_ADDRESSING
33 void setup()
override;
Minimal static vector - saves memory by avoiding std::vector overhead.
The bottom of the stack of layers for one destination, or for broadcast, on an addressed channel.
size_t get_send_capacity() const override
bool send_to_interface(const PacketBuffer &data, const PacketMetaData &meta_data) override
Sends to the port's destination.
BasicAddressing * addressing_
const uint16_t destination_
uint16_t get_destination() const
AddressingPort(BasicAddressing *addressing, uint16_t destination, bool only_port)
With only_port, the port is the top of the link, so top() on the link reaches this port's stack.
void dump_config() override
An addressing layer for channels shared by several devices, such as an RS485 bus or a LoRa radio.
static constexpr size_t HEADER_SIZE
Destination and source addresses.
PacketInterface * get_link() const
bool send(const PacketBuffer &data, const PacketMetaData &meta_data, uint16_t destination)
Sends data to destination, which the port has checked.
void add_port(AddressingPort *port)
void receive_(const PacketBuffer &data, const PacketMetaData &meta_data)
void dump_config() override
StaticVector< AddressingPort *, PACKET_INTERFACE_ADDRESSING_PORT_COUNT > ports_
BasicAddressing(PacketInterface *link, uint16_t address)
static constexpr uint16_t BROADCAST_ADDRESS
uint16_t get_address() const
A buffer class that efficiently represents a composite buffer with three sections:
A class that will transport data to and from an abstract channel.
virtual size_t get_send_capacity() const
How many packets send_to_interface() would accept now, so a layer above can tell before sending a ser...