winIDEA SDK
|
This class presents a common API for all storage devices.
#include <CStorageDeviceController.h>
Public Member Functions | |
virtual void | read (ADDRESS_64 address, ADDRESS_64 size, std::vector< BYTE > &data)=0 |
Reads data from device. More... | |
virtual void | write (IConnectUMI::EOperationFlags programMode)=0 |
Writes contents of pre-configured files to device. More... | |
virtual void | write (IConnectUMI::EOperationFlags programMode, DWORD fileFormat, ADDRESS_64 offset, const std::string &fileName)=0 |
Writes contents of file to device. More... | |
virtual void | write (IConnectUMI::EOperationFlags programMode, ADDRESS_64 address, ADDRESS_64 size, std::vector< BYTE > &data)=0 |
Writes data to device. More... | |
virtual void | erase (IConnectUMI::EOperationFlags programMode)=0 |
Erases complete device. More... | |
virtual void | erase (IConnectUMI::EOperationFlags programMode, ADDRESS_64 address, ADDRESS_64 size)=0 |
Erases the specified region (sector, partition,...). More... | |
virtual void | flush ()=0 |
Programs the device from the intermediate cache. More... | |
virtual void | verify ()=0 |
Compares device contents to cache. More... | |
virtual void | verify (ADDRESS_64 address, ADDRESS_64 size)=0 |
Compares device contents to cache. More... | |
virtual bool | isDeviceEmpty ()=0 |
Compares device contents to the empty value. More... | |
virtual bool | isDeviceEmpty (ADDRESS_64 address, ADDRESS_64 size)=0 |
Compares device contents to the empty value at given address. More... | |
virtual void | fill ()=0 |
Fills device with preconfigured value. More... | |
virtual void | readState (IConnectUMI::EOperationFlags programMode, ADDRESS_64 address, ADDRESS_64 size, std::vector< BYTE > &stateResult)=0 |
Reads the device program state. More... | |
virtual void | readHash (std::vector< BYTE > &hashResult)=0 |
Reads target device data MURMUR2 hash. More... | |
virtual void | readHash (IConnectUMI::EOperationFlags programMode, ADDRESS_64 address, ADDRESS_64 size, std::vector< BYTE > &hashResult)=0 |
Reads target device data MURMUR2 hash. More... | |
virtual std::string | getLastError ()=0 |
This function returns error description, after call fails. More... | |
virtual isys::CSecurityStorageDeviceModuleSPtr | getSecurityModule ()=0 |
Returns security storage device module. More... | |
virtual isys::CPartitionConfigurationModuleSPtr | getPartitionConfigurationModule ()=0 |
Returns configuration module for partition based devices. More... | |
|
pure virtual |
Erases complete device.
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. |
Python example: test_storage_erase.py
Python example: test_storage_emmc_erase.py
|
pure virtual |
Erases the specified region (sector, partition,...).
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. |
address | address to erase from |
size | size of the data to be erased |
Python example: test_storage_erase.py
Python example: test_storage_emmc_erase.py
|
pure virtual |
Fills device with preconfigured value.
CUMIException | if device is not empty |
IllegalStateException | if operation not supported. |
Python example: test_storage_fill.py
|
pure virtual |
Programs the device from the intermediate cache.
IllegalStateException | if operation not supported. |
Python example: test_storage_flush.py
|
pure virtual |
This function returns error description, after call fails.
If there is no error message available, an empty string is returned.
Python example: test_storage_get_last_error.py
|
pure virtual |
Returns configuration module for partition based devices.
Python example: test_storage_get_partition_info.py
|
pure virtual |
Returns security storage device module.
|
pure virtual |
Compares device contents to the empty value.
IllegalStateException | if operation not supported. |
Python example: test_storage_is_device_empty.py
Python example: test_storage_emmc_is_device_empty.py
|
pure virtual |
Compares device contents to the empty value at given address.
address | address to verify from |
size | size of the data to be verified |
IllegalStateException | if operation not supported. |
Python example: test_storage_is_device_empty.py
Python example: test_storage_emmc_is_device_empty.py
|
pure virtual |
Reads data from device.
address | address to read from |
size | size of the data to read |
data | vector to contain read data on return |
Python example: test_storage_read.py
Python example: test_storage_emmc_read.py
|
pure virtual |
Reads target device data MURMUR2 hash.
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. |
address | starting address for hash calculation |
size | size of the data to be hashed |
hashResult | Hash result as vector of bytes. LSB is returned first. Vector capacity should be at least 4 bytes, since hash is 4-bytes long. |
IllegalStateException | if operation not supported. |
Python example: test_storage_read_hash.py
|
pure virtual |
Reads target device data MURMUR2 hash.
hashResult | Hash result as vector of bytes. LSB is returned first. Vector capacity should be at least 4 BYTES. |
IllegalStateException | if operation not supported. |
Python example: test_storage_read_hash.py
|
pure virtual |
Reads the device program state.
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. |
address | starting address |
size | size of the data to be examined |
stateResult | Program state as vector of bytes, returned as an unpacked byte array (1 MAU per byte). Vector size must be the size of the data to be examined. Value equals to 1 if MAU programmed and 0 if not. |
IllegalStateException | if operation not supported. |
Python example: test_storage_read_state.py
|
pure virtual |
Compares device contents to cache.
Throws CUMIException
in case of verification error (contents do not match), throws IOException
in case of any other isystem.connect error.
IllegalStateException | if operation not supported. |
Python example: test_storage_verify.py
|
pure virtual |
Compares device contents to cache.
Throws CUMIException
in case of verification error (contents do not match), throws IOException
in case of any other isystem.connect error.
address | address to verify from |
size | size of the data to be verified |
IllegalStateException | if operation not supported. |
Python example: test_storage_verify.py
|
pure virtual |
Writes contents of pre-configured files to device.
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. For eMMC devices IConnectUMI::wProgDevice is always used. |
IllegalStateException | if operation not supported. |
Python example: test_storage_write.py
Python example: test_storage_emmc_read_write.py
|
pure virtual |
Writes data to device.
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. For eMMC devices IConnectUMI::wProgDevice is always used. |
address | address to write to |
size | size of the data to write |
data | vector of data to be written |
Python example: test_storage_write.py
Python example: test_storage_emmc_read_write.py
|
pure virtual |
Writes contents of file to device.
programMode | should be either IConnectUMI::wProgDevice or IConnectUMI::wProgCache. For eMMC devices IConnectUMI::wProgDevice is always used. |
fileFormat | should be one of wFile ... flags from IConnectUMI::EOperationFlags, for example IConnectUMI::wFileFormatAuto, IConnectUMI::wFileFormatBin, IConnectUMI::wFileFormatS, IConnectUMI::wFileFormatHex. |
offset | offset to add to the address in the file |
fileName | path to the file to program |
Python example: test_storage_write.py
Python example: test_storage_emmc_read_write.py