class VmoManager

Defined at line 25 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.h

Thread-safe utility class for keeping track of registered VMOs, their VMARs, and lock states.

Public Methods

fit::result<fuchsia_hardware_radar::StatusCode, uint32_t> WriteUnlockedVmoAndGetId (cpp20::span<const uint8_t> data)

Gets the next unlocked VMO, locks it, writes the provided data to it, and returns the VMO ID.

Returns an error if no VMOs are unlocked or if `data` is too large.

Defined at line 22 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

void VmoManager (size_t radar_burst_size)

Defined at line 27 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.h

void UnlockVmo (uint32_t vmo_id)

Unlocks the VMO corresponding to `vmo_id`.

Defined at line 42 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

fuchsia_hardware_radar::StatusCode RegisterVmos (fidl::VectorView<const uint32_t> vmo_ids, fidl::VectorView<zx::vmo> vmos)

Registers the given VMOs. The manager is reset to its state from before this call if any of the

VMOs could not be registered.

Defined at line 55 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

fuchsia_hardware_radar::StatusCode RegisterVmos (fidl::VectorView<uint32_t> vmo_ids, fidl::VectorView<zx::vmo> vmos)

Defined at line 124 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

fit::result<fuchsia_hardware_radar::StatusCode> RegisterVmos (const std::vector<uint32_t> & vmo_ids, std::vector<zx::vmo> vmos)

Defined at line 130 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

fuchsia_hardware_radar::StatusCode UnregisterVmos (fidl::VectorView<const uint32_t> vmo_ids, fidl::VectorView<zx::vmo> out_vmos)

Unregisters and returns the VMOs corresponding to `vmo_ids`. If any of the VMOs could not be

unregistered, `out_vmos` is not populated, and the state of the manager is not changed.

Defined at line 141 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

fuchsia_hardware_radar::StatusCode UnregisterVmos (fidl::VectorView<uint32_t> vmo_ids, fidl::VectorView<zx::vmo> out_vmos)

Defined at line 170 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc

fit::result<fuchsia_hardware_radar::StatusCode, std::vector<zx::vmo>> UnregisterVmos (const std::vector<uint32_t> & vmo_ids)

Defined at line 176 of file ../../src/devices/radar/lib/vmo-manager/vmo-manager.cc