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,

}

}

std::optional

<ramdevice

_client::RamNand> ram_nand;

ASSERT_EQ(ZX_OK,

ramdevice_client::RamNand::Create(std::move(ram_nand_config),

&ram

_nand));

```

Public Members

static const char[] kBasePath

Public Methods

zx_status_t Create (fuchsia_hardware_nand::wire::RamNandInfo config, std::optional<RamNand> * out)

Creates a ram_nand under ram_nand_ctl running under the main devmgr.

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

void RamNand (const RamNand & )

Not copyable.

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

RamNand & operator= (const RamNand & )

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

void RamNand (RamNand && )

Movable.

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

RamNand & operator= (RamNand && )

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

void NoUnbind ()

Don't unbind in destructor.

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

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

Defined at line 61 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 65 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

void ~RamNand ()

Defined at line 70 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 74 of file ../../src/storage/lib/ramdevice_client/cpp/include/ramdevice-client/ramnand.h

void RamNand (fidl::ClientEnd<fuchsia_device::Controller> controller)

Create a ramnand client from an existing connection. This will not populate the path or

filename for this object.

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