|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
An injected FACTORY for mdl_net_iface_t: which backend, decided once. More...
#include <mdl_net.h>
An injected FACTORY for mdl_net_iface_t: which backend, decided once.
mdl_net_iface_t makes the request path backend-agnostic; this makes the CONSTRUCTION path backend-agnostic too. Application code that opens a transport for a run used to name a concrete factory, which pinned every mode above it to one build form – the orchestration could only be compiled where libcurl was. A provider replaces that name with a value the composition root supplies: the host CLI wires the libcurl factory, the device wires the C6 link, a test wires a scripted fake, and the mode is the same code.
The backend's caller-owned private storage lives behind ctx, so the provider is also where "who owns the bytes the backend needs" is answered – the composition root, once, rather than each mode on its own stack.