hololink::emulation::get_or_create_dp_sensor_registers

View as Markdown
DPSensorRegisters * hololink::emulation::get_or_create_dp_sensor_registers(
LinuxHSBEmulatorCtxt &ctxt,
uint8_t sensor_id
)

Look up (or lazily create) the DPSensorRegisters slice for sensor_id, growing ctxt.dp_sensor_registers_cache as needed so that ctxt.dp_sensor_registers_cache[sensor_id] is the live slot.

Calling with the same sensor_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.