|
ImagingTools Core SDK
|
Interface for device data persistence. More...
#include <IDeviceDataPersistence.h>
Inherits istd::IPolymorphic.
Public Types | |
| enum | StorageType { ST_ROM , ST_EEPROM } |
| Device storage types. More... | |
| enum | MetaInfo { MIT_SERIAL_NUMBER = idoc::IDocumentMetaInfo::MIT_USER , MIT_VERSION_NUMBER , MIT_FIRMWARE_VERSION } |
| Device metadata information types. More... | |
Public Member Functions | |
| virtual bool | ReadDeviceMetaInfo (idoc::IDocumentMetaInfo &metaInfo) const =0 |
| Read metadata from the device. | |
| virtual bool | ReadDataFromStorage (QByteArray &data, StorageType storageType, ibase::IProgressManager *progressPtr=nullptr) const =0 |
| Read all data from device storage. | |
| virtual bool | WriteDataToStorage (const QByteArray &data, StorageType storageType, ibase::IProgressManager *progressPtr=nullptr)=0 |
| Write all data to device storage. | |
| virtual bool | RemoveAllData (StorageType storageType)=0 |
| Delete all data from device storage. | |
| virtual bool | ResetStorage (StorageType storageType)=0 |
| Reset storage to initial/factory state. | |
| virtual bool | IsDeviceReady () const =0 |
| Check if device is ready for operations. | |
Interface for device data persistence.
IDeviceDataPersistence provides low-level access to device storage (ROM, EEPROM) for reading and writing data, as well as managing device metadata. This interface enables firmware updates, configuration storage, and metadata retrieval from device hardware.
The interface supports:
Definition at line 86 of file IDeviceDataPersistence.h.
Device metadata information types.
Enumeration of metadata fields that can be read from devices. Extends idoc::IDocumentMetaInfo::MIT_USER for device-specific metadata.
| Enumerator | |
|---|---|
| MIT_SERIAL_NUMBER | Device serial number. |
| MIT_VERSION_NUMBER | Device version number. |
| MIT_FIRMWARE_VERSION | Firmware version string. |
Definition at line 108 of file IDeviceDataPersistence.h.
Device storage types.
Enumeration of storage types available on devices.
| Enumerator | |
|---|---|
| ST_ROM | Read-only memory (firmware, factory data) |
| ST_EEPROM | Electrically erasable programmable ROM (user configuration) |
Definition at line 94 of file IDeviceDataPersistence.h.
|
pure virtual |
Check if device is ready for operations.
Verifies that the device is in a state where storage operations can be performed.
|
pure virtual |
Read all data from device storage.
Reads the complete contents of the specified storage type (ROM or EEPROM). Supports progress tracking for long-running operations.
| data | Output buffer to receive storage data |
| storageType | Type of storage to read from (ST_ROM or ST_EEPROM) |
| progressPtr | Optional progress manager for tracking read progress (can be nullptr) |
|
pure virtual |
Read metadata from the device.
Retrieves device metadata including serial number, version, and firmware version.
| metaInfo | Document metadata object to populate with device information |
|
pure virtual |
Delete all data from device storage.
Erases all data from the specified storage. This operation is only supported for writable storage types (ST_EEPROM).
| storageType | Type of storage to clear |
|
pure virtual |
Reset storage to initial/factory state.
Resets the storage to its initial state, typically restoring factory defaults. This operation is only supported for writable storage types (ST_EEPROM).
| storageType | Type of storage to reset |
|
pure virtual |
Write all data to device storage.
Writes the complete data buffer to the specified storage type. Only writable storage types (ST_EEPROM) support this operation.
| data | Data buffer to write to storage |
| storageType | Type of storage to write to (typically ST_EEPROM) |
| progressPtr | Optional progress manager for tracking write progress (can be nullptr) |