class RamNand

Defined at line 39 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

A client library for creating, configuring and manipulating ramnands.

```

ASSERT_EQ(ZX_OK, device_watcher::RecursiveWaitForFile("/dev/sys/platform/ram-nand/nand-ctl",

zx::sec(60)).status_value());

fuchsia_hardware_nand::wire::RamNandInfo ram_nand_config = {

.nand_info = {

.page_size = 4096,

.pages_per_block = 32,

.num_blocks = 64,

.ecc_bits = 8,

.oob_size = 16,

.nand_class = fuchsia_hardware_nand::wire::Class::FTL,

}

}

auto ram_nand = ramdevice_client::RamNand::Create(std::move(ram_nand_config));

ASSERT_TRUE(ram_nand.is_ok());

```

Public Members

static const char[] kBasePath

Public Methods

zx::result<RamNand> Create (fuchsia_hardware_nand::wire::RamNandInfo config)

Creates a ram_nand under ram_nand_ctl running under the main devmgr.

Defined at line 25 of file ../../src/storage/lib/ramdevice_client/cpp/ramnand.cc

void RamNand (const RamNand & )

Not copyable.

Defined at line 54 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

RamNand & operator= (const RamNand & )

Defined at line 55 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

void RamNand (RamNand && )

Movable.

Defined at line 58 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

RamNand & operator= (RamNand && )

Defined at line 59 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

void NoUnbind ()

Don't unbind in destructor.

Defined at line 64 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

const fidl::ClientEnd<fuchsia_device::Controller> & controller ()

Defined at line 66 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

const char * path ()

Return the path to the created ramnand device, or nullptr if this object did not create the

device itself.

Defined at line 70 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

zx::result<RamNand> Create (fidl::ClientEnd<fuchsia_device::Controller> controller, std::optional<fbl::String> path, std::optional<fbl::String> filename)

Creates a RamNand from an existing Controller channel.

This will connect to the RamNand FIDL protocol.

Defined at line 73 of file ../../src/storage/lib/ramdevice_client/cpp/ramnand.cc

const char * filename ()

Return the path to the filename of ramnand device, or nullptr if this object did not create the

device itself.

Defined at line 79 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

void ~RamNand ()

Defined at line 99 of file ../../src/storage/lib/ramdevice_client/cpp/ramnand.cc