Partition.h
Go to the documentation of this file.
156 template <typename T> constexpr FullType(T subType) : FullType(Type(T::partitionType), uint8_t(subType))
195 Info(const String& name, FullType fullType, storage_size_t offset, storage_size_t size, Flags flags = 0)
196 : name(name), offset(offset), size(size), type(fullType.type), subtype(fullType.subtype), flags(flags)
207 return (type == Type::any || type == this->type) && (subType == SubType::any || subType == this->subtype);
283 typename std::enable_if<std::is_pod<T>::value, bool>::type read(storage_size_t offset, T& value)
490 template <typename E> typename std::enable_if<bool(E::partitionType), String>::type toString(E subType)
495 template <typename E> typename std::enable_if<bool(E::partitionType), String>::type toLongString(E subType)
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:616
std::enable_if< std::is_pod< T >::value, bool >::type read(storage_size_t offset, T &value)
Definition: Partition.h:283
XX(tag,...)
storage_size_t address() const
Obtain partition starting address.
Definition: Partition.h:335
bool isEncrypted() const
Check state of partition encrypted flag.
Definition: Partition.h:377
bool verify(T subType) const
Derive type from subtype, expressed as strong C++ enum.
Definition: Partition.h:251
bool isReadOnly() const
Check state of partition readOnly flag.
Definition: Partition.h:385
bool operator!=(const FullType &other) const
Definition: Partition.h:165
uint8_t subType() const
Obtain partition sub-type.
Definition: Partition.h:318
FullType fullType() const
Obtain both type and subtype.
Definition: Partition.h:326
Express both partition type and subtype together.
Definition: Partition.h:139
virtual const Disk::DiskPart * diskpart() const
Definition: Partition.h:210
const Disk::DiskPart * diskpart() const
If this is a disk partition, return pointer to the additional information.
Definition: Partition.h:469
bool operator==(const Partition &other) const
Definition: Partition.h:421
Partition::Type type() const
Obtain partition type.
Definition: Partition.h:310
Class to manage a NUL-terminated C-style string When storing persistent strings in RAM the regular St...
Definition: CString.h:26
storage_size_t lastAddress() const
Obtain address of last byte in this this partition.
Definition: Partition.h:344
String toString(Storage::Partition::Type type, uint8_t subType)
storage_size_t size() const
Obtain partition size.
Definition: Partition.h:353
Adds information specific to MBR/GPT disk partitions.
Definition: PartInfo.h:85
bool operator==(const FullType &other) const
Definition: Partition.h:160
Base class template for linked items with type casting.
Definition: LinkedObject.h:61
Definition: Printable.h:42
Info(const String &name, FullType fullType, storage_size_t offset, storage_size_t size, Flags flags=0)
Definition: Partition.h:195
Timer2Clock::Ticks< uint32_t > read()
Get elapsed watchdog time since last reset.
Represents a storage device (e.g. flash memory)
Definition: Components/Storage/src/include/Storage/Device.h:33
String toLongString(Storage::Partition::Type type, uint8_t subType)
bool verify(uint8_t type, uint8_t subtype) const
Weak 'type' value.
Definition: Partition.h:245
bool match(Type type, uint8_t subType) const
Definition: Partition.h:205
Internal structure describing the binary layout of a partition table entry.
Definition: partition.h:16
static SubType::App apptypeOta(uint8_t i)
Convenience function to get SubType value for the i-th OTA partition.
Definition: Partition.h:261
storage_size_t getSectorCount() const
Obtain total number of sectors in this partition.
Definition: Partition.h:455
bool contains(storage_size_t addr) const
Determine if given address contained within this partition.
Definition: Partition.h:416
Definition: FileDevice.h:25
Definition: Partition.h:98
constexpr FullType(Type type, uint8_t subtype)
Definition: Partition.h:147
1.8.13