hololink::emulation::get_or_create_dp_registers

View as Markdown
DPRegisters * hololink::emulation::get_or_create_dp_registers(
LinuxHSBEmulatorCtxt &ctxt,
uint8_t data_plane_id
)

Look up (or lazily create) the DPRegisters slice for data_plane_id, growing ctxt.dp_registers_cache as needed so that ctxt.dp_registers_cache[data_plane_id] is the live slot.

Calling with the same data_plane_id returns the same pointer.

Free function (not a class method) so the public HSBEmulator interface stays unchanged. Not thread-safe; DataPlane construction is expected to be single-threaded.