class::hal::DriveInfo

class hal::DriveInfo
  : public api::InfoObject

The Drive Info class provides information on a hal::Drive.

It is a wrapper for the drive_info_t found in sos/dev/drive.h.

Summary

[DriveInfo](#classhal_1_1_drive_info_1abf4201b6ef66cf8a388f06dbe4935ba2)()

[DriveInfo](#classhal_1_1_drive_info_1afe2798dcac70e187f6122edec7175b80)(  

const drive_info_t & info
)

u16 addressable_size() const

u32 erase_block_size() const

chrono::MicroTime erase_block_time() const

chrono::MicroTime erase_device_time() const

u32 frequency() const

bool is_valid() const

u32 o_events() const

u32 o_flags() const

u32 page_program_size() const

u64 size() const

u32 write_block_count() const

u32 write_block_size() const

Members

DriveInfo()

DriveInfo(

const drive_info_t & info
)


u16 addressable_size() const

Returns the number of bytes represented by each address value.

For small drives, this value is usually 1. For large drives, especially those over 4GB, this value is usually larger than one. For large SD cards, it is typically 512.


u32 erase_block_size() const

Returns the size of the smallest eraseable block on the drive.


chrono::MicroTime erase_block_time() const

Returns the approximate amount of time it takes to erase a single block on the drive.


chrono::MicroTime erase_device_time() const

Returns the approximate amount of time it takes to erase the entire drive.


u32 frequency() const

Returns the maximum bitrate that the drive can operate.


bool is_valid() const

Returns true if the Info is valid.

DriveInfo info;
Drive d;
info = d.get_info();
if( info.is_valid() ){
 //get_info() was successful
}

u32 o_events() const

u32 o_flags() const

u32 page_program_size() const

Returns the maximum number of bytes that can be programmed as a single page.


u64 size() const

Returns the number of bytes available on the drive.


u32 write_block_count() const

Returns the number of write blocks on the entire drive.

The number of bytes on the drive is write_block_count() * write_block_size().


u32 write_block_size() const

Returns the size of the smallest writeable block on the drive. If each byte can be written individually, this value is 1.


X

Thanks for Coming!

Subscribe to news and updates